diff --git a/config.js b/config.js index 866057b..5346700 100644 --- a/config.js +++ b/config.js @@ -4,14 +4,21 @@ JC.PATH = JC.PATH || scriptPath(); /** * requirejs config.js for JC Chart Project */ + window.requirejs && requirejs.config( { baseUrl: JC.PATH - , urlArgs: 'v=20141017' + , urlArgs: 'v=' + new Date().getTime() , paths: { - 'JC.common': 'modules/JC.common/0.2/common' + 'codeMirror': 'modules/CodeMirror/lib/codemirror' + + , 'JC.common': 'modules/JC.common/0.3/common' , 'JC.BaseMVC': 'modules/JC.BaseMVC/0.1/BaseMVC' + , 'JC.Tips': 'modules/JC.Tips/0.1/Tips' + + , 'JC.FchartDemo': 'modules/JC.FChart/0.1/_demo/all_demo/0.1/all_demo' + , 'JC.FChart': 'modules/JC.FChart/0.1/FChart' , 'JC.FChartNormalData': 'modules/JC.FChartNormalData/0.1/FChart.NormalData' @@ -20,10 +27,14 @@ requirejs.config( { , 'jquery.mousewheel': 'modules/jquery.mousewheel/3.1.12/jquery.mousewheel' , 'plugins.json2': 'modules/JSON/2/JSON' + , 'swfobject': 'modules/swfobject/2.3/swfobject' , 'SWFObject': 'modules/swfobject/2.3/swfobject' + + , 'demoData': 'modules/JC.FChart/0.1/_demo/all_demo/0.1/data' } }); + /** * 取当前脚本标签的 src路径 * @static diff --git a/docs/only_swfobject.7z b/docs/only_swfobject.7z new file mode 100644 index 0000000..457646c Binary files /dev/null and b/docs/only_swfobject.7z differ diff --git a/docs/only_swfobject/JSON.js b/docs/only_swfobject/JSON.js new file mode 100644 index 0000000..02cdfd8 --- /dev/null +++ b/docs/only_swfobject/JSON.js @@ -0,0 +1,496 @@ +/** + * json2.js + *
JSON is a light-weight, language independent, data interchange format. + *

source + * | docs + *

+ * @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 ' '), + 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/only_swfobject/MixChart.swf b/docs/only_swfobject/MixChart.swf new file mode 100644 index 0000000..fc264ca Binary files /dev/null and b/docs/only_swfobject/MixChart.swf differ diff --git a/docs/only_swfobject/demo.swfobject.html b/docs/only_swfobject/demo.swfobject.html new file mode 100644 index 0000000..f292696 --- /dev/null +++ b/docs/only_swfobject/demo.swfobject.html @@ -0,0 +1,178 @@ + + + + +Open JQuery Components Library - suches + + + +

JC.FChart - mix chart - line, line 示例

+ +
+ + + + + + + + + diff --git a/docs/only_swfobject/swfobject.js b/docs/only_swfobject/swfobject.js new file mode 100644 index 0000000..4989879 --- /dev/null +++ b/docs/only_swfobject/swfobject.js @@ -0,0 +1,831 @@ +/** + * 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 + *

+ * @namespace window + * @class swfobject + * @version 2.3 + */ + +/*! swfobject v2.3.20130521 + is released under the MIT License +*/ + +/* 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 = "" + paramStr + ""; + 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/classes/JC.BaseMVC.Model.html b/docs_api/classes/JC.BaseMVC.Model.html index a24958e..e58006b 100644 --- a/docs_api/classes/JC.BaseMVC.Model.html +++ b/docs_api/classes/JC.BaseMVC.Model.html @@ -87,7 +87,7 @@

APIs

JC.BaseMVC.Model Class

@@ -112,7 +112,7 @@

JC.BaseMVC.Model

@@ -166,6 +166,9 @@

Methods

  • notification
  • +
  • + notificationHandler +
  • on
  • @@ -187,6 +190,9 @@

    Methods

  • trigger
  • +
  • + trigger +
  • windowProp
  • @@ -222,7 +228,7 @@

    attrProp

    @@ -275,7 +281,7 @@

    boolProp

    @@ -330,7 +336,7 @@

    callbackProp

    @@ -379,7 +385,7 @@

    floatProp

    @@ -428,7 +434,7 @@

    intProp

    @@ -477,7 +483,7 @@

    is

    @@ -526,7 +532,7 @@

    jsonProp

    @@ -572,7 +578,7 @@

    notification

    @@ -595,6 +601,54 @@

    Parameters:

    +
    +
    +

    notificationHandler

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

    通知选择器有新事件

    +
    +
    +

    Parameters:

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

    Returns:

    +
    + : +
    +

    on

    @@ -611,7 +665,7 @@

    on

    @@ -653,7 +707,7 @@

    scriptDataProp

    @@ -702,7 +756,7 @@

    scriptTplProp

    @@ -748,7 +802,7 @@

    selector

    @@ -790,7 +844,7 @@

    selectorProp

    @@ -839,7 +893,7 @@

    stringProp

    @@ -882,10 +936,58 @@

    trigger

    )
    + + + +
    +

    使用 jquery trigger 触发 controler 绑定事件( 有换回数据 )

    +
    +
    +

    Parameters:

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

    Returns:

    +
    + : +
    +
    +
    +
    +

    trigger

    +
    + (
      +
    • + _evtName +
    • +
    • + _args +
    • +
    ) +
    +
    @@ -927,7 +1029,7 @@

    windowProp

    @@ -969,7 +1071,7 @@

    _instanceName

    diff --git a/docs_api/classes/JC.BaseMVC.html b/docs_api/classes/JC.BaseMVC.html index 3733f78..fbeaf1d 100644 --- a/docs_api/classes/JC.BaseMVC.html +++ b/docs_api/classes/JC.BaseMVC.html @@ -93,8 +93,7 @@

    JC.BaseMVC Class

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

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

    JC Project Site | API docs @@ -179,6 +178,9 @@

    Methods

  • notification
  • +
  • + notificationHandler +
  • on
  • @@ -188,6 +190,9 @@

    Methods

  • trigger
  • +
  • + triggerHandler +
  • @@ -209,7 +214,7 @@

    _beforeInit

    @@ -229,7 +234,7 @@

    _init

    @@ -254,7 +259,7 @@

    _inited

    @@ -268,7 +273,7 @@

    _initHanlderEvent

    @@ -288,7 +293,7 @@

    build

    @@ -322,7 +327,7 @@

    buildClass

    @@ -359,7 +364,7 @@

    buildModel

    @@ -390,7 +395,7 @@

    buildView

    @@ -430,7 +435,7 @@

    getInstance

    @@ -481,7 +486,7 @@

    notification

    @@ -505,6 +510,55 @@

    Parameters:

    +
    +
    +

    notificationHandler

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

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

    +
    +
    +

    Parameters:

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

    Returns:

    +
    + : +
    +

    on

    @@ -524,7 +578,7 @@

    on

    @@ -563,7 +617,7 @@

    selector

    @@ -594,7 +648,7 @@

    trigger

    @@ -623,6 +677,54 @@

    Returns:

    BaseMVCInstance

    +
    +
    +

    triggerHandler

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

    使用 jquery triggerHandler 触发绑定事件

    +
    +
    +

    Parameters:

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

    Returns:

    +
    + : +
    +
    @@ -634,7 +736,7 @@

    autoInit

    diff --git a/docs_api/classes/JC.FChart.html b/docs_api/classes/JC.FChart.html index 6800ad1..9cfa4b0 100644 --- a/docs_api/classes/JC.FChart.html +++ b/docs_api/classes/JC.FChart.html @@ -234,6 +234,9 @@

    Methods

  • notification
  • +
  • + notificationHandler +
  • on
  • @@ -243,6 +246,9 @@

    Methods

  • trigger
  • +
  • + triggerHandler +
  • update
  • @@ -255,6 +261,10 @@

    Properties

    Model.FLASH_PATH static +
  • + Model.SWF_FILE_MAP + static +
  • Model.TYPE_MAP static @@ -275,7 +285,7 @@

    _beforeInit

    @@ -295,7 +305,7 @@

    _init

    @@ -320,7 +330,7 @@

    _inited

    @@ -334,7 +344,7 @@

    _initHanlderEvent

    @@ -396,7 +406,7 @@

    notification

    @@ -420,6 +430,55 @@

    Parameters:

  • +
    +
    +

    notificationHandler

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

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

    +
    +
    +

    Parameters:

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

    Returns:

    +
    + : +
    +

    on

    @@ -439,7 +498,7 @@

    on

    @@ -478,7 +537,7 @@

    selector

    @@ -509,7 +568,7 @@

    trigger

    @@ -538,6 +597,54 @@

    Returns:

    BaseMVCInstance

    +
    +
    +

    triggerHandler

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

    使用 jquery triggerHandler 触发绑定事件

    +
    +
    +

    Parameters:

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

    Returns:

    +
    + : +
    +

    update

    @@ -580,7 +687,7 @@

    Model.FLASH_PATH

    @@ -589,6 +696,40 @@

    Model.FLASH_PATH


    {1} = chart file name

    Default: {0}/flash/pub/charts/{1}.swf

    +
    +
    +

    Model.SWF_FILE_MAP

    + Object + static + +
    +

    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

    @@ -597,7 +738,7 @@

    Model.TYPE_MAP

    @@ -617,7 +758,7 @@

    Model.VERSION

    diff --git a/docs_api/classes/JC.common.html b/docs_api/classes/JC.common.html index f7ccd30..676fa14 100644 --- a/docs_api/classes/JC.common.html +++ b/docs_api/classes/JC.common.html @@ -87,7 +87,7 @@

    APIs

    JC.common Class

    @@ -96,7 +96,7 @@

    JC.common Class

    require: jQuery

    JC Project Site | API docs -| demo link

    +| demo link

      @@ -110,6 +110,14 @@

      Item Index

      Methods

      @@ -606,49 +855,40 @@

      Parameters:

      Returns:

      -

      string

      + Date:
      -
      -

      delUrlParam

      +
      +

      cloneDate

      (
      • - _url -
      • -
      • - _key + _date
      )
      - + Date static
      -

      删除URL参数 -
      require: filterXSS

      +

      克隆日期对象

      Parameters:

      • - _url - String -
        -
        -
      • -
      • - _key - String + _date + Date
        +

        需要克隆的日期

      @@ -656,25 +896,16 @@

      Parameters:

      Returns:

      -

      string

      -
      -
      -
      -

      Example:

      -
      -
             var url = delUrlParam( location.href, 'tag' );
      + Date:
      -
      -

      delUrlParams

      +
      +

      cloneObject

      (
      • - _url -
      • -
      • - _keys + _inObj
      )
      @@ -685,25 +916,18 @@

      delUrlParams

      -

      批量删除URL参数 -
      require: delUrlParam

      +

      深度克隆对象

      Parameters:

      • - _url - String -
        -
        -
      • -
      • - _keys - Array + _inObj + Object
      • @@ -712,22 +936,16 @@

        Parameters:

        Returns:

        -

        string

        -
        -
        -
        -

        Example:

        -
        -
               var url = delUrlParam( location.href, [ 'k1', 'k2' ] );
        +

        Object

      -
      -

      docSize

      +
      +

      cloneObject

      (
      • - _doc + _inObj
      )
      @@ -738,18 +956,18 @@

      docSize

      -

      获取 document 的 相关大小

      +

      深度克隆对象

      Parameters:

      • - _doc - Document + _inObj + Object
      • @@ -762,77 +980,37 @@

        Returns:

      -
      -

      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号

      @@ -840,55 +1018,53 @@

      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
      -
      -

      encoder

      +
      +

      dateDetect

      (
      • - _selector + _dateStr
      )
      - Encode function + Date | Null static
      -

      URL 请求时, 获取对URL参数进行编码的函数

      +

      日期占位符识别功能

      Parameters:

      • - _selector - Selector + _dateStr + String
        +

        如果起始字符为 NOW, 那么将视为当前日期 + , 如果起始字符为 NOWFirst, 那么将视为当前月的1号

      @@ -896,23 +1072,31 @@

      Parameters:

      Returns:

      - Encode function: -

      default encodeURIComponent

      + 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
      -
      -

      extendObject

      +
      +

      dateFormat

      (
      • - _source -
      • -
      • - _new + _date
      • - _overwrite + _format
      )
      @@ -923,32 +1107,27 @@

      extendObject

      -

      扩展对象属性

      +

      日期格式化 (具体格式请查看 PHP Date Formats)

      Parameters:

      • - _source - Object -
        -
        -
      • -
      • - _new - Object + _date + Date
        +

        default = now

      • - _overwrite - Bool + _format + String
        -

        是否覆盖已有属性, default = true

        +

        default = "YY-MM-DD"

      @@ -956,16 +1135,19 @@

      Parameters:

      Returns:

      -

      object

      +

      string

      -
      -

      filterXSS

      +
      +

      dateFormat

      (
      • - _s + _date +
      • +
      • + _format
      )
      @@ -976,19 +1158,27 @@

      filterXSS

      -

      xss 过滤函数

      +

      日期格式化 (具体格式请查看 PHP Date Formats)

      Parameters:

      • - _s + _date + Date +
        +

        default = now

        +
        +
      • +
      • + _format String
        +

        default = "YY-MM-DD"

      @@ -1000,16 +1190,13 @@

      Returns:

      -
      -

      formatISODate

      +
      +

      dayOfSeason

      (
      • _date
      • -
      • - _split -
      )
      @@ -1019,28 +1206,19 @@

      formatISODate

      -

      格式化日期为 YYYY-mm-dd 格式 -
      require: pad_char_f

      +

      取某一天所在季度的开始结束日期,以及第几个Q

      Parameters:

      • _date - Date -
        -

        要格式化日期的日期对象

        -
        -
      • -
      • - _split - String | Undefined + Iso date
        -

        定义年月日的分隔符, 默认为 '-'

      @@ -1048,16 +1226,16 @@

      Parameters:

      Returns:

      -

      string

      +

      Object

      -
      -

      funcName

      +
      +

      dayOfSeason

      (
      • - _func + _date
      )
      @@ -1068,18 +1246,18 @@

      funcName

      -

      取函数名 ( 匿名函数返回空 )

      +

      取某一天所在季度的开始结束日期,以及第几个Q

      Parameters:

      • - _func - Function + _date + Iso date
      • @@ -1088,19 +1266,19 @@

        Parameters:

        Returns:

        -

        string

        +

        Object

      -
      -

      getJqParent

      +
      +

      dayOfWeek

      (
      • - _selector + _date
      • - _filter + _dayOffset
      )
      @@ -1111,24 +1289,24 @@

      getJqParent

      -

      获取 selector 的指定父级标签

      +

      取某一天所在星期的开始结束日期,以及第几个星期

      Parameters:

      • - _selector - Selector + _date + Iso date
      • - _filter - Selector + _dayOffset + Int
      • @@ -1137,19 +1315,19 @@

        Parameters:

        Returns:

        -

        selector

        +

        Object

      -
      -

      getUrlParam

      +
      +

      dayOfWeek

      (
      • - _url + _date
      • - _key + _dayOffset
      )
      @@ -1160,25 +1338,24 @@

      getUrlParam

      -

      取URL参数的值 -
      require: filterXSS

      +

      取某一天所在星期的开始结束日期,以及第几个星期

      Parameters:

      • - _url - String + _date + Iso date
      • - _key - String + _dayOffset + Int
      • @@ -1187,18 +1364,12 @@

        Parameters:

        Returns:

        -

        string

        -
        -
        -
        -

        Example:

        -
        -
               var defaultTag = getUrlParam(location.href, 'tag');  
        +

        Object

      -
      -

      getUrlParams

      +
      +

      delUrlParam

      (
      • @@ -1216,12 +1387,11 @@

        getUrlParams

        -

        取URL参数的值, 这个方法返回数组 -
        与 getUrlParam 的区别是可以获取 checkbox 的所有值 +

        删除URL参数
        require: filterXSS

        @@ -1244,41 +1414,18 @@

        Parameters:

        Returns:

        -

        Array

        +

        string

        Example:

        -
               var params = getUrlParams(location.href, 'tag');  
        -
        -
        -
        -
        -

        gid

        - () - - - - static - -
        -

        生成全局唯一ID

        -
        -
        -

        Returns:

        -
        -

        string

        +
               var url = delUrlParam( location.href, 'tag' );
        -
        -

        hasUrlParam

        +
        +

        delUrlParam

        (
        • @@ -1296,11 +1443,12 @@

          hasUrlParam

          -

          判断URL中是否有某个get参数

          +

          删除URL参数 +
          require: filterXSS

          Parameters:

          @@ -1322,22 +1470,25 @@

          Parameters:

          Returns:

          -

          bool

          +

          string

          Example:

          -
           var bool = hasUrlParam( 'getkey' );
          +
                 var url = delUrlParam( location.href, 'tag' );
          -
          -

          httpRequire

          +
          +

          delUrlParams

          (
          • - _msg + _url +
          • +
          • + _keys
          )
          @@ -1348,20 +1499,26 @@

          httpRequire

          -

          提示需要 HTTP 环境

          +

          批量删除URL参数 +
          require: delUrlParam

          Parameters:

          • - _msg + _url String
            -

            要提示的文字, 默认 "本示例需要HTTP环境'

            +
            +
          • +
          • + _keys + Array +
          @@ -1369,50 +1526,55 @@

          Parameters:

          Returns:

          -

          bool 如果是HTTP环境返回true, 否则返回false

          +

          string

          +
          +
          +
          +

          Example:

          +
          +
                 var url = delUrlParam( location.href, [ 'k1', 'k2' ] );
          -
          -

          isSameDay

          +
          +

          delUrlParams

          (
          • - _d1 + _url
          • - _d2 + _keys
          )
          - Bool + static
          -

          判断两个日期是否为同一天

          +

          批量删除URL参数 +
          require: delUrlParam

          Parameters:

          • - _d1 - Date + _url + String
            -

            需要判断的日期1

          • - _d2 - Date + _keys + Array
            -

            需要判断的日期2

          @@ -1420,50 +1582,2721 @@

          Parameters:

          Returns:

          - Bool: +

          string

          +
          +
          +
          +

          Example:

          +
          +
                 var url = delUrlParam( location.href, [ 'k1', 'k2' ] );
          +
          +
          +
          +
          +

          docSize

          +
          + (
            +
          • + _doc +
          • +
          ) +
          + + + + static + +
          +

          获取 document 的 相关大小

          +
          +
          +

          Parameters:

          +
            +
          • + _doc + Document +
            +
            +
          • +
          +
          +
          +

          Returns:

          +
          +

          Object

          +
          +
          +
          +
          +

          docSize

          +
          + (
            +
          • + _doc +
          • +
          ) +
          + + + + static + +
          +

          获取 document 的 相关大小

          +
          +
          +

          Parameters:

          +
            +
          • + _doc + Document +
            +
            +
          • +
          +
          +
          +

          Returns:

          +
          +

          Object

          +
          +
          +
          +
          +

          easyEffect

          +
          + (
            +
          • + _cb +
          • +
          • + _maxVal +
          • +
          • + _startVal +
          • +
          • + _duration +
          • +
          • + _stepMs +
          • +
          ) +
          + + + + static + +
          +

          缓动函数, 动画效果为按时间缓动 +
          这个函数只考虑递增, 你如果需要递减的话, 在回调里用 _maxVal - _stepval

          +
          +
          +

          Parameters:

          +
            +
          • + _cb + Function +
            +

            缓动运动时的回调

            +
            +
          • +
          • + _maxVal + Number +
            +

            缓动的最大值, default = 200

            +
            +
          • +
          • + _startVal + Number +
            +

            缓动的起始值, default = 0

            +
            +
          • +
          • + _duration + Number +
            +

            缓动的总时间, 单位毫秒, default = 200

            +
            +
          • +
          • + _stepMs + Number +
            +

            缓动的间隔, 单位毫秒, default = 2

            +
            +
          • +
          +
          +
          +

          Returns:

          +
          +

          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() );
          +       }
          +
          +
          +
          +
          +

          easyEffect

          +
          + (
            +
          • + _cb +
          • +
          • + _maxVal +
          • +
          • + _startVal +
          • +
          • + _duration +
          • +
          • + _stepMs +
          • +
          ) +
          + + + + static + +
          +

          缓动函数, 动画效果为按时间缓动 +
          这个函数只考虑递增, 你如果需要递减的话, 在回调里用 _maxVal - _stepval

          +
          +
          +

          Parameters:

          +
            +
          • + _cb + Function +
            +

            缓动运动时的回调

            +
            +
          • +
          • + _maxVal + Number +
            +

            缓动的最大值, default = 200

            +
            +
          • +
          • + _startVal + Number +
            +

            缓动的起始值, default = 0

            +
            +
          • +
          • + _duration + Number +
            +

            缓动的总时间, 单位毫秒, default = 200

            +
            +
          • +
          • + _stepMs + Number +
            +

            缓动的间隔, 单位毫秒, default = 2

            +
            +
          • +
          +
          +
          +

          Returns:

          +
          +

          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() );
          +       }
          +
          +
          +
          +
          +

          encoder

          +
          + (
            +
          • + _selector +
          • +
          ) +
          + + Encode function + + static + +
          +

          URL 请求时, 获取对URL参数进行编码的函数

          +
          +
          +

          Parameters:

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

          Returns:

          +
          + Encode function: +

          default encodeURIComponent

          +
          +
          +
          +
          +

          encoder

          +
          + (
            +
          • + _selector +
          • +
          ) +
          + + Encode function + + static + +
          +

          URL 请求时, 获取对URL参数进行编码的函数

          +
          +
          +

          Parameters:

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

          Returns:

          +
          + Encode function: +

          default encodeURIComponent

          +
          +
          +
          +
          +

          extendObject

          +
          + (
            +
          • + _source +
          • +
          • + _new +
          • +
          • + _overwrite +
          • +
          ) +
          + + + + static + +
          +

          扩展对象属性

          +
          +
          +

          Parameters:

          +
            +
          • + _source + Object +
            +
            +
          • +
          • + _new + Object +
            +
            +
          • +
          • + _overwrite + Bool +
            +

            是否覆盖已有属性, default = true

            +
            +
          • +
          +
          +
          +

          Returns:

          +
          +

          object

          +
          +
          +
          +
          +

          extendObject

          +
          + (
            +
          • + _source +
          • +
          • + _new +
          • +
          • + _overwrite +
          • +
          ) +
          + + + + static + +
          +

          扩展对象属性

          +
          +
          +

          Parameters:

          +
            +
          • + _source + Object +
            +
            +
          • +
          • + _new + Object +
            +
            +
          • +
          • + _overwrite + Bool +
            +

            是否覆盖已有属性, default = true

            +
            +
          • +
          +
          +
          +

          Returns:

          +
          +

          object

          +
          +
          +
          +
          +

          filterXSS

          +
          + (
            +
          • + _s +
          • +
          ) +
          + + + + static + +
          +

          xss 过滤函数

          +
          +
          +

          Parameters:

          + +
          +
          +

          Returns:

          +
          +

          string

          +
          +
          +
          +
          +

          filterXSS

          +
          + (
            +
          • + _s +
          • +
          ) +
          + + + + static + +
          +

          xss 过滤函数

          +
          +
          +

          Parameters:

          + +
          +
          +

          Returns:

          +
          +

          string

          +
          +
          +
          +
          +

          formatISODate

          +
          + (
            +
          • + _date +
          • +
          • + _split +
          • +
          ) +
          + + + + static + +
          +

          格式化日期为 YYYY-mm-dd 格式 +
          require: pad_char_f

          +
          +
          +

          Parameters:

          +
            +
          • + _date + Date +
            +

            要格式化日期的日期对象

            +
            +
          • +
          • + _split + String | Undefined +
            +

            定义年月日的分隔符, 默认为 '-'

            +
            +
          • +
          +
          +
          +

          Returns:

          +
          +

          string

          +
          +
          +
          +
          +

          formatISODate

          +
          + (
            +
          • + _date +
          • +
          • + _split +
          • +
          ) +
          + + + + static + +
          +

          格式化日期为 YYYY-mm-dd 格式 +
          require: pad_char_f

          +
          +
          +

          Parameters:

          +
            +
          • + _date + Date +
            +

            要格式化日期的日期对象

            +
            +
          • +
          • + _split + String | Undefined +
            +

            定义年月日的分隔符, 默认为 '-'

            +
            +
          • +
          +
          +
          +

          Returns:

          +
          +

          string

          +
          +
          +
          +
          +

          funcName

          +
          + (
            +
          • + _func +
          • +
          ) +
          + + + + static + +
          +

          取函数名 ( 匿名函数返回空 )

          +
          +
          +

          Parameters:

          + +
          +
          +

          Returns:

          +
          +

          string

          +
          +
          +
          +
          +

          funcName

          +
          + (
            +
          • + _func +
          • +
          ) +
          + + + + static + +
          +

          取函数名 ( 匿名函数返回空 )

          +
          +
          +

          Parameters:

          + +
          +
          +

          Returns:

          +
          +

          string

          +
          +
          +
          +
          +

          getJqParent

          +
          + (
            +
          • + _selector +
          • +
          • + _filter +
          • +
          ) +
          + + + + static + +
          +

          获取 selector 的指定父级标签

          +
          +
          +

          Parameters:

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

          Returns:

          +
          +

          selector

          +
          +
          +
          +
          +

          getJqParent

          +
          + (
            +
          • + _selector +
          • +
          • + _filter +
          • +
          ) +
          + + + + static + +
          +

          获取 selector 的指定父级标签

          +
          +
          +

          Parameters:

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

          Returns:

          +
          +

          selector

          +
          +
          +
          +
          +

          getUrlParam

          +
          + (
            +
          • + _url +
          • +
          • + _key +
          • +
          ) +
          + + + + static + +
          +

          取URL参数的值 +
          require: filterXSS

          +
          +
          +

          Parameters:

          + +
          +
          +

          Returns:

          +
          +

          string

          +
          +
          +
          +

          Example:

          +
          +
                 var defaultTag = getUrlParam(location.href, 'tag');  
          +
          +
          +
          +
          +

          getUrlParam

          +
          + (
            +
          • + _url +
          • +
          • + _key +
          • +
          ) +
          + + + + static + +
          +

          取URL参数的值 +
          require: filterXSS

          +
          +
          +

          Parameters:

          + +
          +
          +

          Returns:

          +
          +

          string

          +
          +
          +
          +

          Example:

          +
          +
                 var defaultTag = getUrlParam(location.href, 'tag');  
          +
          +
          +
          +
          +

          getUrlParams

          +
          + (
            +
          • + _url +
          • +
          • + _key +
          • +
          ) +
          + + + + static + +
          +

          取URL参数的值, 这个方法返回数组 +
          与 getUrlParam 的区别是可以获取 checkbox 的所有值 +
          require: filterXSS

          +
          +
          +

          Parameters:

          + +
          +
          +

          Returns:

          +
          +

          Array

          +
          +
          +
          +

          Example:

          +
          +
                 var params = getUrlParams(location.href, 'tag');  
          +
          +
          +
          +
          +

          getUrlParams

          +
          + (
            +
          • + _url +
          • +
          • + _key +
          • +
          ) +
          + + + + static + +
          +

          取URL参数的值, 这个方法返回数组 +
          与 getUrlParam 的区别是可以获取 checkbox 的所有值 +
          require: filterXSS

          +
          +
          +

          Parameters:

          + +
          +
          +

          Returns:

          +
          +

          Array

          +
          +
          +
          +

          Example:

          +
          +
                 var params = getUrlParams(location.href, 'tag');  
          +
          +
          +
          +
          +

          gid

          + () + + + + static + +
          +

          生成全局唯一ID

          +
          +
          +

          Returns:

          +
          +

          string

          +
          +
          +
          +
          +

          gid

          + () + + + + static + +
          +

          生成全局唯一ID

          +
          +
          +

          Returns:

          +
          +

          string

          +
          +
          +
          +
          +

          hasUrlParam

          +
          + (
            +
          • + _url +
          • +
          • + _key +
          • +
          ) +
          + + + + static + +
          +

          判断URL中是否有某个get参数

          +
          +
          +

          Parameters:

          + +
          +
          +

          Returns:

          +
          +

          bool

          +
          +
          +
          +

          Example:

          +
          +
           var bool = hasUrlParam( 'getkey' );
          +
          +
          +
          +
          +

          hasUrlParam

          +
          + (
            +
          • + _url +
          • +
          • + _key +
          • +
          ) +
          + + + + static + +
          +

          判断URL中是否有某个get参数

          +
          +
          +

          Parameters:

          + +
          +
          +

          Returns:

          +
          +

          bool

          +
          +
          +
          +

          Example:

          +
          +
           var bool = hasUrlParam( 'getkey' );
          +
          +
          +
          +
          +

          httpRequire

          +
          + (
            +
          • + _msg +
          • +
          ) +
          + + + + static + +
          +

          提示需要 HTTP 环境

          +
          +
          +

          Parameters:

          +
            +
          • + _msg + String +
            +

            要提示的文字, 默认 "本示例需要HTTP环境'

            +
            +
          • +
          +
          +
          +

          Returns:

          +
          +

          bool 如果是HTTP环境返回true, 否则返回false

          +
          +
          +
          +
          +

          httpRequire

          +
          + (
            +
          • + _msg +
          • +
          ) +
          + + + + static + +
          +

          提示需要 HTTP 环境

          +
          +
          +

          Parameters:

          +
            +
          • + _msg + String +
            +

            要提示的文字, 默认 "本示例需要HTTP环境'

            +
            +
          • +
          +
          +
          +

          Returns:

          +
          +

          bool 如果是HTTP环境返回true, 否则返回false

          +
          +
          +
          +
          +

          isSameDay

          +
          + (
            +
          • + _d1 +
          • +
          • + _d2 +
          • +
          ) +
          + + Bool + + static + +
          +

          判断两个日期是否为同一天

          +
          +
          +

          Parameters:

          +
            +
          • + _d1 + Date +
            +

            需要判断的日期1

            +
            +
          • +
          • + _d2 + Date +
            +

            需要判断的日期2

            +
            +
          • +
          +
          +
          +

          Returns:

          +
          + Bool: +
          +
          +
          +
          +

          isSameDay

          +
          + (
            +
          • + _d1 +
          • +
          • + _d2 +
          • +
          ) +
          + + Bool + + static + +
          +

          判断两个日期是否为同一天

          +
          +
          +

          Parameters:

          +
            +
          • + _d1 + Date +
            +

            需要判断的日期1

            +
            +
          • +
          • + _d2 + Date +
            +

            需要判断的日期2

            +
            +
          • +
          +
          +
          +

          Returns:

          +
          + Bool: +
          +
          +
          +
          +

          isSameMonth

          +
          + (
            +
          • + _d1 +
          • +
          • + _d2 +
          • +
          ) +
          + + Bool + + static + +
          +

          判断两个日期是否为同一月份

          +
          +
          +

          Parameters:

          +
            +
          • + _d1 + Date +
            +

            需要判断的日期1

            +
            +
          • +
          • + _d2 + Date +
            +

            需要判断的日期2

            +
            +
          • +
          +
          +
          +

          Returns:

          +
          + Bool: +
          +
          +
          +
          +

          isSameMonth

          +
          + (
            +
          • + _d1 +
          • +
          • + _d2 +
          • +
          ) +
          + + Bool + + static + +
          +

          判断两个日期是否为同一月份

          +
          +
          +

          Parameters:

          +
            +
          • + _d1 + Date +
            +

            需要判断的日期1

            +
            +
          • +
          • + _d2 + Date +
            +

            需要判断的日期2

            +
            +
          • +
          +
          +
          +

          Returns:

          +
          + Bool: +
          +
          +
          +
          +

          isSameSeason

          +
          + (
            +
          • + _d1 +
          • +
          • + _d2 +
          • +
          ) +
          + + Bool + + static + +
          +

          判断两个日期是否为同一季度

          +
          +
          +

          Parameters:

          +
            +
          • + _d1 + Date +
            +

            需要判断的日期1

            +
            +
          • +
          • + _d2 + Date +
            +

            需要判断的日期2

            +
            +
          • +
          +
          +
          +

          Returns:

          +
          + Bool: +
          +
          +
          +
          +

          isSameSeason

          +
          + (
            +
          • + _d1 +
          • +
          • + _d2 +
          • +
          ) +
          + + Bool + + static + +
          +

          判断两个日期是否为同一季度

          +
          +
          +

          Parameters:

          +
            +
          • + _d1 + Date +
            +

            需要判断的日期1

            +
            +
          • +
          • + _d2 + Date +
            +

            需要判断的日期2

            +
            +
          • +
          +
          +
          +

          Returns:

          +
          + Bool: +
          +
          +
          +
          +

          isSameWeek

          +
          + (
            +
          • + _d1 +
          • +
          • + _d2 +
          • +
          ) +
          + + Bool + + static + +
          +

          判断两个日期是否为同一季度

          +
          +
          +

          Parameters:

          +
            +
          • + _d1 + Date +
            +

            需要判断的日期1

            +
            +
          • +
          • + _d2 + Date +
            +

            需要判断的日期2

            +
            +
          • +
          +
          +
          +

          Returns:

          +
          + Bool: +
          +
          +
          +
          +

          isSameWeek

          +
          + (
            +
          • + _d1 +
          • +
          • + _d2 +
          • +
          ) +
          + + Bool + + static + +
          +

          判断两个日期是否为同一季度

          +
          +
          +

          Parameters:

          +
            +
          • + _d1 + Date +
            +

            需要判断的日期1

            +
            +
          • +
          • + _d2 + Date +
            +

            需要判断的日期2

            +
            +
          • +
          +
          +
          +

          Returns:

          +
          + Bool: +
          +
          +
          +
          +

          isSameYear

          +
          + (
            +
          • + _d1 +
          • +
          • + _d2 +
          • +
          ) +
          + + Bool + + static + +
          +

          判断两个日期是否为同一年

          +
          +
          +

          Parameters:

          +
            +
          • + _d1 + Date +
            +

            需要判断的日期1

            +
            +
          • +
          • + _d2 + Date +
            +

            需要判断的日期2

            +
            +
          • +
          +
          +
          +

          Returns:

          +
          + Bool: +
          +
          +
          +
          +

          isSameYear

          +
          + (
            +
          • + _d1 +
          • +
          • + _d2 +
          • +
          ) +
          + + Bool + + static + +
          +

          判断两个日期是否为同一年

          +
          +
          +

          Parameters:

          +
            +
          • + _d1 + Date +
            +

            需要判断的日期1

            +
            +
          • +
          • + _d2 + Date +
            +

            需要判断的日期2

            +
            +
          • +
          +
          +
          +

          Returns:

          +
          + Bool: +
          +
          +
          +
          +

          jcAutoInitComps

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

          动态添加内容时, 初始化可识别的组件

          +

          +
          目前会自动识别的组件
          +
          + Bizs.CommonModify, JC.Panel, JC.Dialog +
          自动识别的组件不用显式调用 jcAutoInitComps 去识别可识别的组件 +
          +

          +

          +
          可识别的组件
          +
          + JC.AutoSelect, JC.AutoChecked, JC.AjaxUpload, JC.Calendar + , JC.Drag, JC.DCalendar, JC.Placeholder, JC.TableFreeze, JC.ImageCutter, JC.Tab +
          Bizs.DisableLogic, Bizs.FormLogic, Bizs.MoneyTips, Bizs.AutoSelectComplete +
          +

          +
          +
          +

          Parameters:

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

          maxDayOfMonth

          +
          + (
            +
          • + _date +
          • +
          ) +
          + + Int + + static + +
          +

          取得一个月份中最大的一天

          +
          +
          +

          Parameters:

          +
            +
          • + _date + Date +
            +
            +
          • +
          +
          +
          +

          Returns:

          +
          + Int: +

          月份中最大的一天

          +
          +
          +
          +
          +

          maxDayOfMonth

          +
          + (
            +
          • + _date +
          • +
          ) +
          + + Int + + static + +
          +

          取得一个月份中最大的一天

          +
          +
          +

          Parameters:

          +
            +
          • + _date + Date +
            +
            +
          • +
          +
          +
          +

          Returns:

          +
          + Int: +

          月份中最大的一天

          +
          +
          +
          +
          +

          moneyFormat

          +
          + (
            +
          • + _number +
          • +
          • + _len +
          • +
          • + _floatLen +
          • +
          • + _splitSymbol +
          • +
          ) +
          + + + + static + +
          +

          逗号格式化金额

          +
          +
          +

          Parameters:

          +
            +
          • + _number + Int | String +
            +
            +
          • +
          • + _len + Int +
            +
            +
          • +
          • + _floatLen + Int +
            +
            +
          • +
          • + _splitSymbol + Int +
            +
            +
          • +
          +
          +
          +

          Returns:

          +
          +

          string

          +
          +
          +
          +
          +

          moneyFormat

          +
          + (
            +
          • + _number +
          • +
          • + _len +
          • +
          • + _floatLen +
          • +
          • + _splitSymbol +
          • +
          ) +
          + + + + static + +
          +

          逗号格式化金额

          +
          +
          +

          Parameters:

          +
            +
          • + _number + Int | String +
            +
            +
          • +
          • + _len + Int +
            +
            +
          • +
          • + _floatLen + Int +
            +
            +
          • +
          • + _splitSymbol + Int +
            +
            +
          • +
          +
          +
          +

          Returns:

          +
          +

          string

          +
          +
          +
          +
          +

          mousewheelEvent

          +
          + (
            +
          • + _cb +
          • +
          • + _detach +
          • +
          • + _selector +
          • +
          ) +
          + static + +
          +

          绑定或清除 mousewheel 事件

          +
          +
          +

          Parameters:

          +
            +
          • + _cb + Function +
            +
            +
          • +
          • + _detach + Bool +
            +
            +
          • +
          • + _selector + Selector +
            +

            default = document

            +
            +
          • +
          +
          +
          +
          +

          mousewheelEvent

          +
          + (
            +
          • + _cb +
          • +
          • + _detach +
          • +
          • + _selector +
          • +
          ) +
          + static + +
          +

          绑定或清除 mousewheel 事件

          +
          +
          +

          Parameters:

          +
            +
          • + _cb + Function +
            +
            +
          • +
          • + _detach + Bool +
            +
            +
          • +
          • + _selector + Selector +
            +

            default = document

            +
            +
          • +
          +
          +
          +
          +

          padChar

          +
          + (
            +
          • + _str +
          • +
          • + _len +
          • +
          • + _char +
          • +
          ) +
          + + + + static + +
          +

          js 附加字串函数

          +
          +
          +

          Parameters:

          +
            +
          • + _str + String +
            +
            +
          • +
          • + _len + Intl +
            +
            +
          • +
          • + _char + String +
            +
            +
          • +
          +
          +
          +

          Returns:

          +
          +

          string

          +
          +
          +
          +
          +

          padChar

          +
          + (
            +
          • + _str +
          • +
          • + _len +
          • +
          • + _char +
          • +
          ) +
          + + + + static + +
          +

          js 附加字串函数

          +
          +
          +

          Parameters:

          +
            +
          • + _str + String +
            +
            +
          • +
          • + _len + Intl +
            +
            +
          • +
          • + _char + String +
            +
            +
          • +
          +
          +
          +

          Returns:

          +
          +

          string

          +
          +
          +
          +
          +

          parentSelector

          +
          + (
            +
          • + _item +
          • +
          • + _selector +
          • +
          • + _finder +
          • +
          ) +
          + + + + static + +
          +

          扩展 jquery 选择器 +
          扩展起始字符的 '/' 符号为 jquery 父节点选择器 +
          扩展起始字符的 '|' 符号为 jquery 子节点选择器 +
          扩展起始字符的 '(' 符号为 jquery 父节点查找识别符( getJqParent )

          +
          +
          +

          Parameters:

          +
            +
          • + _item + Selector +
            +
            +
          • +
          • + _selector + String +
            +
            +
          • +
          • + _finder + Selector +
            +
            +
          • +
          +
          +
          +

          Returns:

          +
          +

          selector

          +
          +
          +
          +
          +

          parentSelector

          +
          + (
            +
          • + _item +
          • +
          • + _selector +
          • +
          • + _finder +
          • +
          ) +
          + + + + static + +
          +

          扩展 jquery 选择器 +
          扩展起始字符的 '/' 符号为 jquery 父节点选择器 +
          扩展起始字符的 '|' 符号为 jquery 子节点选择器 +
          扩展起始字符的 '(' 符号为 jquery 父节点查找识别符( getJqParent )

          +
          +
          +

          Parameters:

          +
            +
          • + _item + Selector +
            +
            +
          • +
          • + _selector + String +
            +
            +
          • +
          • + _finder + Selector +
            +
            +
          • +
          +
          +
          +

          Returns:

          +
          +

          selector

          +
          +
          +
          +
          +

          parseBool

          +
          + (
            +
          • + _input +
          • +
          ) +
          + + + + static + +
          +

          把输入值转换为布尔值

          +
          +
          +

          Parameters:

          +
            +
          • + _input + +
            +
            +
          • +
          +
          +
          +

          Returns:

          +
          +

          bool

          +
          +
          +
          +
          +

          parseBool

          +
          + (
            +
          • + _input +
          • +
          ) +
          + + + + static + +
          +

          把输入值转换为布尔值

          +
          +
          +

          Parameters:

          +
            +
          • + _input + +
            +
            +
          • +
          +
          +
          +

          Returns:

          +
          +

          bool

          +
          +
          +
          +
          +

          parseDate

          +
          + (
            +
          • + _date +
          • +
          • + _selector +
          • +
          • + _forceISO +
          • +
          ) +
          + + Date | Null + + static + +
          +

          从日期字符串解析日期对象 +
          兼容 JC.Calendar 日期格式

          +
          +
          +

          Parameters:

          +
            +
          • + _date + Date +
            +
            +
          • +
          • + _selector + Selector +
            +

            如果 _selector 为真, 则尝试从 _selector 的 html 属性 dateParse 对日期进行格式化

            +
            +
          • +
          • + _forceISO + Boolean +
            +

            是否强制转换为ISO日期

            +
            +
          • +
          +
          +
          +

          Returns:

          +
          + Date | Null: +
          +
          +
          +
          +

          parseDate

          +
          + (
            +
          • + _date +
          • +
          • + _selector +
          • +
          • + _forceISO +
          • +
          ) +
          + + Date | Null + + static + +
          +

          从日期字符串解析日期对象 +
          兼容 JC.Calendar 日期格式

          +
          +
          +

          Parameters:

          +
            +
          • + _date + Date +
            +
            +
          • +
          • + _selector + Selector +
            +

            如果 _selector 为真, 则尝试从 _selector 的 html 属性 dateParse 对日期进行格式化

            +
            +
          • +
          • + _forceISO + Boolean +
            +

            是否强制转换为ISO日期

            +
            +
          • +
          +
          +
          +

          Returns:

          +
          + Date | Null: +
          +
          +
          +
          +

          parseFinance

          +
          + (
            +
          • + _i +
          • +
          • + _dot +
          • +
          ) +
          + + + + static + +
          +

          取小数点的N位 +
          JS 解析 浮点数的时候,经常出现各种不可预知情况,这个函数就是为了解决这个问题

          +
          +
          +

          Parameters:

          +
            +
          • + _i + Number +
            +
            +
          • +
          • + _dot + Int +
            +

            default = 2

            +
            +
          • +
          +
          +
          +

          Returns:

          +
          +

          number

          -
          -

          isSameMonth

          +
          +

          parseFinance

          (
          • - _d1 + _i
          • - _d2 + _dot
          )
          - Bool + static
          -

          判断两个日期是否为同一月份

          +

          取小数点的N位 +
          JS 解析 浮点数的时候,经常出现各种不可预知情况,这个函数就是为了解决这个问题

          Parameters:

          • - _d1 - Date + _i + Number
            -

            需要判断的日期1

          • - _d2 - Date + _dot + Int
            -

            需要判断的日期2

            +

            default = 2

          @@ -1471,50 +4304,119 @@

          Parameters:

          Returns:

          - Bool: +

          number

          -
          -

          isSameSeason

          +
          +

          parseISODate

          (
          • - _d1 + _datestr +
          • +
          ) +
          + + + + static + +
          +

          从 ISODate 字符串解析日期对象

          +
          +
          +

          Parameters:

          + +
          +
          +

          Returns:

          +
          +

          date

          +
          +
          +
          +
          +

          parseISODate

          +
          + (
          • - _d2 + _datestr
          )
          - Bool + static
          -

          判断两个日期是否为同一季度

          +

          从 ISODate 字符串解析日期对象

          Parameters:

          • - _d1 - Date + _datestr + String
            -

            需要判断的日期1

          • +
          +
          +
          +

          Returns:

          +
          +

          date

          +
          +
          +
          +
          +

          printf

          +
          + (
            +
          • + _str +
          • +
          ) +
          + + + + static + +
          +

          按格式输出字符串

          +
          +
          +

          Parameters:

          +
          • - _d2 - Date + _str + String
            -

            需要判断的日期2

          @@ -1522,50 +4424,102 @@

          Parameters:

          Returns:

          - Bool: +

          string

          +
          +
          +
          +

          Example:

          +
          +
           printf( 'asdfasdf{0}sdfasdf{1}', '000', 1111 );
          + //return asdfasdf000sdfasdf1111
          -
          -

          isSameWeek

          +
          +

          printf

          (
          • - _d1 + _str +
          • +
          ) +
          + + + + static + +
          +

          按格式输出字符串

          +
          +
          +

          Parameters:

          + +
          +
          +

          Returns:

          +
          +

          string

          +
          +
          +
          +

          Example:

          +
          +
           printf( 'asdfasdf{0}sdfasdf{1}', '000', 1111 );
          + //return asdfasdf000sdfasdf1111
          +
          +
          +
          +
          +

          printKey

          +
          + (
            +
          • + _str
          • - _d2 + _keys
          )
          - Bool + static
          -

          判断两个日期是否为同一季度

          +

          按格式输出字符串

          Parameters:

          • - _d1 - Date + _str + String
            -

            需要判断的日期1

          • - _d2 - Date + _keys + Object
            -

            需要判断的日期2

          @@ -1573,50 +4527,103 @@

          Parameters:

          Returns:

          - Bool: +

          string

          +
          +
          +
          +

          Example:

          +
          +
           JC.f.printKey( 'asdfasdf{key1}sdfasdf{key2},{0}', { 'key1': '000', 'key2': 1111, '0': 222 );
          + //return asdfasdf000sdfasdf1111,222
          +
          +
          +
          +
          +

          printKey

          +
          + (
            +
          • + _str +
          • +
          • + _keys +
          • +
          ) +
          + + + + static + +
          +

          按格式输出字符串

          +
          +
          +

          Parameters:

          + +
          +
          +

          Returns:

          +
          +

          string

          +
          +
          +
          +

          Example:

          +
          +
           JC.f.printKey( 'asdfasdf{key1}sdfasdf{key2},{0}', { 'key1': '000', 'key2': 1111, '0': 222 );
          + //return asdfasdf000sdfasdf1111,222
          -
          -

          isSameYear

          +
          +

          pureDate

          (
          • - _d1 -
          • -
          • - _d2 + _d
          )
          - Bool + static
          -

          判断两个日期是否为同一年

          +

          获取不带 时分秒的 日期对象

          Parameters:

          • - _d1 - Date -
            -

            需要判断的日期1

            -
            -
          • -
          • - _d2 + _d Date
            -

            需要判断的日期2

            +

            可选参数, 如果为空 = new Date

          @@ -1624,84 +4631,87 @@

          Parameters:

          Returns:

          - Bool: +

          Date

          -
          -

          jcAutoInitComps

          +
          +

          pureDate

          (
          • - _selector + _d
          )
          - static + + +
          -

          动态添加内容时, 初始化可识别的组件

          -

          -
          目前会自动识别的组件
          -
          - Bizs.CommonModify, JC.Panel, JC.Dialog -
          自动识别的组件不用显式调用 jcAutoInitComps 去识别可识别的组件 -
          -

          -

          -
          可识别的组件
          -
          - JC.AutoSelect, JC.AutoChecked, JC.AjaxUpload, JC.Calendar - , JC.Drag, JC.DCalendar, JC.Placeholder, JC.TableFreeze, JC.ImageCutter, JC.Tab -
          Bizs.DisableLogic, Bizs.FormLogic, Bizs.MoneyTips, Bizs.AutoSelectComplete -
          -

          +

          获取不带 时分秒的 日期对象

          Parameters:

          • - _selector - Selector + _d + Date
            +

            可选参数, 如果为空 = new Date

          +
          +

          Returns:

          +
          +

          Date

          +
          +
          -
          -

          maxDayOfMonth

          +
          +

          relativePath

          (
          • - _date + _path +
          • +
          • + _url
          )
          - Int + static
          -

          取得一个月份中最大的一天

          +

          把 URL 相对路径 转换为 绝对路径

          Parameters:

          • - _date - Date + _path + String +
            +
            +
          • +
          • + _url + String
          • @@ -1710,26 +4720,19 @@

            Parameters:

            Returns:

            - Int: -

            月份中最大的一天

            +

            string

          -
          -

          moneyFormat

          +
          +

          relativePath

          (
          • - _number -
          • -
          • - _len -
          • -
          • - _floatLen + _path
          • - _splitSymbol + _url
          )
          @@ -1740,36 +4743,24 @@

          moneyFormat

          -

          逗号格式化金额

          +

          把 URL 相对路径 转换为 绝对路径

          Parameters:

          • - _number - Int | String -
            -
            -
          • -
          • - _len - Int -
            -
            -
          • -
          • - _floatLen - Int + _path + String
          • - _splitSymbol - Int + _url + String
          • @@ -1782,18 +4773,18 @@

            Returns:

          -
          -

          mousewheelEvent

          +
          +

          reloadPage

          (
          • - _cb + _url
          • - _detach + _nornd
          • - _selector, + _delayms
          )
          @@ -1801,107 +4792,99 @@

          mousewheelEvent

          -

          绑定或清除 mousewheel 事件

          +

          重载页面 +
          require: removeUrlSharp, addUrlParams, filterXSS

          Parameters:

          • - _cb - Function + _url + String
          • - _detach + _nornd Bool
          • - _selector, - Selector + _delayms + Int
            -

            default = document

          -
          -

          padChar

          +
          +

          reloadPage

          (
          • - _str + _url
          • - _len + _nornd
          • - _char + _delayms
          )
          - - - static
          -

          js 附加字串函数

          +

          重载页面 +
          require: removeUrlSharp, addUrlParams, filterXSS

          Parameters:

          • - _str + _url String
          • - _len - Intl + _nornd + Bool
          • - _char - String + _delayms + Int
          -
          -

          Returns:

          -
          -

          string

          -
          -
          -
          -

          parentSelector

          +
          +

          removeUrlSharp

          (
          • - _item + _url
          • - _selector + _nornd
          • - _finder + _rndName
          )
          @@ -1912,33 +4895,32 @@

          parentSelector

          -

          扩展 jquery 选择器 -
          扩展起始字符的 '/' 符号为 jquery 父节点选择器 -
          扩展起始字符的 '|' 符号为 jquery 子节点选择器 -
          扩展起始字符的 '(' 符号为 jquery 父节点查找识别符( getJqParent )

          +

          删除 URL 的锚点 +
          require: addUrlParams, filterXSS

          Parameters:

          • - _item - Selector + _url + String
          • - _selector - String + _nornd + Bool
            +

            是否不添加随机参数

          • - _finder - Selector + _rndName + String
          • @@ -1947,16 +4929,22 @@

            Parameters:

            Returns:

            -

            selector

            +

            string

          -
          -

          parseBool

          +
          +

          removeUrlSharp

          (
          • - _input + _url +
          • +
          • + _nornd +
          • +
          • + _rndName
          )
          @@ -1967,18 +4955,32 @@

          parseBool

          -

          把输入值转换为布尔值

          +

          删除 URL 的锚点 +
          require: addUrlParams, filterXSS

          Parameters:

          • - _input - + _url + String +
            +
            +
          • +
          • + _nornd + Bool +
            +

            是否不添加随机参数

            +
            +
          • +
          • + _rndName + String
          • @@ -1987,60 +4989,69 @@

            Parameters:

            Returns:

            -

            bool

            +

            string

          -
          -

          parseDate

          +
          +

          safeTimeout

          (
          • - _date + _timeout +
          • +
          • + _obj
          • - _selector + _name
          • - _forceISO + _ms
          )
          - Date | Null + static
          -

          从日期字符串解析日期对象 -
          兼容 JC.Calendar 日期格式

          +

          timeout 控制逻辑, 避免相同功能的 setTimeout 重复执行

          Parameters:

          • - _date - Date + _timeout + Timeout | Function
          • - _selector - Selector + _obj + Object
            -

            如果 _selector 为真, 则尝试从 _selector 的 html 属性 dateParse 对日期进行格式化

            +

            default = window.TIMEOUT_HOST || {}

          • - _forceISO - Boolean + _name + String
            -

            是否强制转换为ISO日期

            +

            default = 'NORMAL'

            +
            +
          • +
          • + _ms + Int +
            +

            default = 50

          @@ -2048,19 +5059,25 @@

          Parameters:

          Returns:

          - Date | Null: +

          object

          -
          -

          parseFinance

          +
          +

          safeTimeout

          (
          • - _i + _timeout
          • - _dot, + _obj +
          • +
          • + _name +
          • +
          • + _ms
          )
          @@ -2071,27 +5088,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

          @@ -2099,16 +5129,16 @@

          Parameters:

          Returns:

          -

          number

          +

          object

          -
          -

          parseISODate

          +
          +

          scriptContent

          (
          • - _datestr + _selector
          )
          @@ -2119,18 +5149,18 @@

          parseISODate

          -

          从 ISODate 字符串解析日期对象

          +

          获取脚本模板的内容

          Parameters:

          • - _datestr - String + _selector + Selector
          • @@ -2139,16 +5169,16 @@

            Parameters:

            Returns:

            -

            date

            +

            string

          -
          -

          printf

          +
          +

          scriptContent

          (
          • - _str + _selector
          )
          @@ -2159,18 +5189,18 @@

          printf

          -

          按格式输出字符串

          +

          获取脚本模板的内容

          Parameters:

          • - _str - String + _selector + Selector
          • @@ -2182,119 +5212,61 @@

            Returns:

            string

          -
          -

          Example:

          -
          -
           printf( 'asdfasdf{0}sdfasdf{1}', '000', 1111 );
          - //return asdfasdf000sdfasdf1111
          -
          -
          -
          -

          printKey

          -
          - (
            -
          • - _str -
          • -
          • - _keys -
          • -
          ) -
          +
          +

          scriptPath

          + () - + String static
          -

          按格式输出字符串

          +

          取当前脚本标签的 src路径

          -
          -

          Parameters:

          - -

          Returns:

          -

          string

          -
          -
          -
          -

          Example:

          -
          -
           JC.f.printKey( 'asdfasdf{key1}sdfasdf{key2},{0}', { 'key1': '000', 'key2': 1111, '0': 222 );
          - //return asdfasdf000sdfasdf1111,222
          + String: +

          脚本所在目录的完整路径

          -
          -

          pureDate

          -
          - (
            -
          • - _d -
          • -
          ) -
          +
          +

          scriptPath

          + () - + String + static
          -

          获取不带 时分秒的 日期对象

          +

          取当前脚本标签的 src路径

          -
          -

          Parameters:

          -
            -
          • - _d - Date -
            -

            可选参数, 如果为空 = new Date

            -
            -
          • -
          -

          Returns:

          -

          Date

          + String: +

          脚本所在目录的完整路径

          -
          -

          relativePath

          +
          +

          seasonOfYear

          (
          • - _path -
          • -
          • - _url + _year
          )
          @@ -2305,24 +5277,18 @@

          relativePath

          -

          把 URL 相对路径 转换为 绝对路径

          +

          取一年中所有的季度, 及其开始结束日期

          Parameters:

          • - _path - String -
            -
            -
          • -
          • - _url - String + _year + Int
          • @@ -2331,72 +5297,56 @@

            Parameters:

            Returns:

            -

            string

            +

            Array

          -
          -

          reloadPage

          +
          +

          seasonOfYear

          (
          • - _url -
          • -
          • - _nornd -
          • -
          • - _delayms + _year
          )
          + + + static
          -

          重载页面 -
          require: removeUrlSharp, addUrlParams, filterXSS

          +

          取一年中所有的季度, 及其开始结束日期

          Parameters:

          • - _url - String -
            -
            -
          • -
          • - _nornd - Bool -
            -
            -
          • -
          • - _delayms + _year Int
          +
          +

          Returns:

          +
          +

          Array

          +
          +
          -
          -

          removeUrlSharp

          -
          - (
            -
          • - _url -
          • -
          • - _nornd -
          • +
            +

            sliceArgs

            +
            + (
            • - _rndName + args
            )
            @@ -2407,32 +5357,18 @@

            removeUrlSharp

            -

            删除 URL 的锚点 -
            require: addUrlParams, filterXSS

            +

            把函数的参数转为数组

            Parameters:

            • - _url - String -
              -
              -
            • -
            • - _nornd - Bool -
              -

              是否不添加随机参数

              -
              -
            • -
            • - _rndName - String + args + Arguments
            • @@ -2441,25 +5377,16 @@

              Parameters:

              Returns:

              -

              string

              +

              Array

            -
            -

            safeTimeout

            +
            +

            sliceArgs

            (
            • - _timeout -
            • -
            • - _obj -
            • -
            • - _name -
            • -
            • - _ms + args
            )
            @@ -2470,40 +5397,19 @@

            safeTimeout

            -

            timeout 控制逻辑, 避免相同功能的 setTimeout 重复执行

            +

            把函数的参数转为数组

            Parameters:

            • - _timeout - Timeout | Function -
              -
              -
            • -
            • - _obj - Object -
              -

              default = window.TIMEOUT_HOST || {}

              -
              -
            • -
            • - _name - String -
              -

              default = 'NORMAL'

              -
              -
            • -
            • - _ms - Int + args + Arguments
              -

              default = 50

            @@ -2511,16 +5417,16 @@

            Parameters:

            Returns:

            -

            object

            +

            Array

            -
            -

            scriptContent

            +
            +

            urlDetect

            (
            • - _selector + _url
            )
            @@ -2531,19 +5437,21 @@

            scriptContent

            -

            获取脚本模板的内容

            +

            URL 占位符识别功能 +
            require: addUrlParams, filterXSS

            Parameters:

            • - _selector - Selector + _url + String
              +

              如果 起始字符为 URL, 那么 URL 将祝为本页的URL

            @@ -2554,37 +5462,22 @@

            Returns:

            string

            -
            -
            -

            scriptPath

            - () - - String - - static - -
            -

            取当前脚本标签的 src路径

            -
            -
            -

            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
            -
            -

            seasonOfYear

            +
            +

            urlDetect

            (
            • - _year + _url
            )
            @@ -2595,19 +5488,21 @@

            seasonOfYear

            -

            取一年中所有的季度, 及其开始结束日期

            +

            URL 占位符识别功能 +
            require: addUrlParams, filterXSS

            Parameters:

            • - _year - Int + _url + String
              +

              如果 起始字符为 URL, 那么 URL 将祝为本页的URL

            @@ -2615,16 +5510,25 @@

            Parameters:

            Returns:

            -

            Array

            +

            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
            -
            -

            sliceArgs

            +
            +

            urlHostName

            (
            • - args + _url
            )
            @@ -2635,18 +5539,18 @@

            sliceArgs

            -

            把函数的参数转为数组

            +

            取 URL 的 host name

            Parameters:

            • - args - Arguments + _url + String
            • @@ -2655,12 +5559,12 @@

              Parameters:

              Returns:

              -

              Array

              +

              string

            -
            -

            urlDetect

            +
            +

            urlHostName

            ( @@ -2700,22 +5602,16 @@

            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
            -
            -
            -
            -

            urlHostName

            +
            +

            weekOfYear

            (
            • - _url + _year +
            • +
            • + _dayOffset
            )
            @@ -2726,27 +5622,34 @@

            urlHostName

            -

            取 URL 的 host name

            +

            取一年中所有的星期, 及其开始结束日期

            Parameters:

            • - _url - String + _year + Int
            • +
            • + _dayOffset + Int +
              +

              每周的默认开始为周几, 默认0(周一)

              +
              +

            Returns:

            -

            string

            +

            Array

            @@ -2769,7 +5672,7 @@

            weekOfYear

            @@ -2816,7 +5719,48 @@

            winSize

            +
            +

            获取 window 的 相关大小

            +
            +
            +

            Parameters:

            +
              +
            • + _win, + Window +
              +

              default = window

              +
              +
            • +
            +
            +
            +

            Returns:

            +
            +

            Object

            +
            +
            +
            +
            +

            winSize

            +
            + (
              +
            • + _win, +
            • +
            ) +
            + + + + static +
            @@ -2844,6 +5788,36 @@

            Returns:

            Properties

            +
            +

            _AUTO_INIT_DATA

            + Object + protected + +
            +

            保存需要自动识别的组件

            +
            +
            +
            +

            ZINDEX_COUNT

            + Int + static + +
            +

            全局 css z-index 控制属性 +
            注意: 这个变量是 window.ZINDEX_COUNT

            +
            +

            Default: 50001

            +

            ZINDEX_COUNT

            Int @@ -2851,7 +5825,7 @@

            ZINDEX_COUNT

            diff --git a/docs_api/classes/JC.f.html b/docs_api/classes/JC.f.html index e704be8..cc34a1c 100644 --- a/docs_api/classes/JC.f.html +++ b/docs_api/classes/JC.f.html @@ -87,7 +87,7 @@

            APIs

            JC.f Class

            diff --git a/docs_api/data.json b/docs_api/data.json index a0934a8..2958247 100644 --- a/docs_api/data.json +++ b/docs_api/data.json @@ -64,6 +64,13 @@ "../modules/JC.common/0.2/common.js": { "name": "../modules/JC.common/0.2/common.js", "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} + }, + "../modules/JC.common/0.3/common.js": { + "name": "../modules/JC.common/0.3/common.js", + "modules": {}, "classes": { "JC.f": 1, "JC.common": 1 @@ -122,6 +129,13 @@ "namespaces": { "window": 1 } + }, + "../nginx_config.js": { + "name": "../nginx_config.js", + "modules": {}, + "classes": {}, + "fors": {}, + "namespaces": {} } }, "modules": {}, @@ -137,7 +151,7 @@ "namespace": "JC", "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", "line": 3, - "description": "MVC 抽象类 ( 仅供扩展用, 这个类不能实例化)\n

            require: \n jQuery\n , JC.common\n

            \n

            JC Project Site\n| API docs\n| demo link

            ", + "description": "MVC 抽象类 ( 仅供扩展用, 这个类不能实例化)\n

            require: \n JC.common\n

            \n

            JC Project Site\n| API docs\n| demo link

            ", "is_constructor": 1, "params": [ { @@ -159,7 +173,7 @@ "extension_for": [], "namespace": "JC", "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 229, + "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": [ @@ -263,8 +277,8 @@ "plugin_for": [], "extension_for": [], "namespace": "", - "file": "../modules/JC.common/0.2/common.js", - "line": 25, + "file": "../modules/JC.common/0.3/common.js", + "line": 34, "description": "JC.f 是 JC.common 的别名\n
            具体使用请见 JC.common

            ", "static": 1 }, @@ -277,9 +291,9 @@ "plugin_for": [], "extension_for": [], "namespace": "", - "file": "../modules/JC.common/0.2/common.js", - "line": 31, - "description": "JC 组件通用静态方法和属性 ( JC.common, 别名: JC.f )\n
            所有 JC 组件都会依赖这个静态类\n

            require: jQuery

            \n

            JC Project Site\n| API docs\n| demo link

            ", + "file": "../modules/JC.common/0.3/common.js", + "line": 40, + "description": "JC 组件通用静态方法和属性 ( JC.common, 别名: JC.f )\n
            所有 JC 组件都会依赖这个静态类\n

            require: jQuery

            \n

            JC Project Site\n| API docs\n| demo link

            ", "static": 1, "version": "dev 0.1 2013-07-04", "author": "qiushaowei | 360 75 Team" @@ -358,7 +372,7 @@ "classitems": [ { "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 32, + "line": 31, "description": "内部初始化方法", "itemtype": "method", "name": "_init", @@ -376,7 +390,7 @@ }, { "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 61, + "line": 60, "description": "初始化之前调用的方法", "itemtype": "method", "name": "_beforeInit", @@ -387,7 +401,7 @@ }, { "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 69, + "line": 68, "description": "内部事件初始化方法", "itemtype": "method", "name": "_initHanlderEvent", @@ -398,7 +412,7 @@ }, { "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 77, + "line": 76, "description": "内部初始化完毕时, 调用的方法", "itemtype": "method", "name": "_inited", @@ -409,7 +423,7 @@ }, { "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 85, + "line": 84, "description": "获取 显示 BaseMVC 的触发源选择器, 比如 a 标签", "itemtype": "method", "name": "selector", @@ -421,7 +435,7 @@ }, { "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 91, + "line": 90, "description": "使用 jquery on 绑定事件", "itemtype": "method", "name": "on", @@ -446,7 +460,7 @@ }, { "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 99, + "line": 98, "description": "使用 jquery trigger 触发绑定事件", "itemtype": "method", "name": "trigger", @@ -471,7 +485,33 @@ }, { "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 107, + "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": "../modules/JC.BaseMVC/0.1/BaseMVC.js", + "line": 114, "description": "通知选择器有新事件\n
            JC 组件以后不会在 HTML 属性里放回调, 改为触发 selector 的事件", "itemtype": "method", "name": "notification", @@ -492,7 +532,32 @@ }, { "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 119, + "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": "../modules/JC.BaseMVC/0.1/BaseMVC.js", + "line": 139, "description": "获取或设置组件实例", "itemtype": "method", "name": "getInstance", @@ -523,7 +588,7 @@ }, { "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 146, + "line": 166, "description": "是否自动初始化", "itemtype": "property", "name": "autoInit", @@ -535,7 +600,7 @@ }, { "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 154, + "line": 174, "description": "复制 BaseMVC 的所有方法到 _outClass", "itemtype": "method", "name": "build", @@ -552,7 +617,7 @@ }, { "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 172, + "line": 192, "description": "复制 _inClass 的所有方法到 _outClass", "itemtype": "method", "name": "buildClass", @@ -574,7 +639,7 @@ }, { "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 201, + "line": 221, "description": "为 _outClass 生成一个通用 Model 类", "itemtype": "method", "name": "buildModel", @@ -591,7 +656,7 @@ }, { "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 214, + "line": 234, "description": "为 _outClass 生成一个通用 View 类", "itemtype": "method", "name": "buildView", @@ -608,14 +673,14 @@ }, { "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 224, + "line": 244, "description": "初始化 BaseMVC Model 类 和 View 类", "class": "JC.BaseMVC", "namespace": "JC" }, { "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 244, + "line": 264, "description": "设置 selector 实例引用的 data 属性名", "itemtype": "property", "name": "_instanceName", @@ -629,7 +694,7 @@ }, { "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 258, + "line": 278, "description": "使用 jquery on 为 controler 绑定事件", "itemtype": "method", "name": "on", @@ -651,7 +716,7 @@ }, { "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 269, + "line": 289, "description": "使用 jquery trigger 触发 controler 绑定事件", "itemtype": "method", "name": "trigger", @@ -673,7 +738,33 @@ }, { "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 283, + "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": "../modules/JC.BaseMVC/0.1/BaseMVC.js", + "line": 317, "description": "通知选择器有新事件", "itemtype": "method", "name": "notification", @@ -694,7 +785,32 @@ }, { "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 295, + "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": "../modules/JC.BaseMVC/0.1/BaseMVC.js", + "line": 344, "description": "初始化的 jq 选择器", "itemtype": "method", "name": "selector", @@ -713,7 +829,7 @@ }, { "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 306, + "line": 355, "description": "读取 int 属性的值", "itemtype": "method", "name": "intProp", @@ -737,7 +853,7 @@ }, { "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 327, + "line": 376, "description": "读取 float 属性的值", "itemtype": "method", "name": "floatProp", @@ -761,7 +877,7 @@ }, { "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 348, + "line": 397, "description": "读取 string 属性的值", "itemtype": "method", "name": "stringProp", @@ -785,7 +901,7 @@ }, { "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 366, + "line": 415, "description": "读取 html 属性值\n
            这个跟 stringProp 的区别是不会强制转换为小写", "itemtype": "method", "name": "attrProp", @@ -809,7 +925,7 @@ }, { "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 389, + "line": 438, "description": "读取 boolean 属性的值", "itemtype": "method", "name": "boolProp", @@ -839,7 +955,7 @@ }, { "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 415, + "line": 464, "description": "读取 callback 属性的值", "itemtype": "method", "name": "callbackProp", @@ -864,7 +980,7 @@ }, { "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 438, + "line": 487, "description": "获取与属性名匹配的 window 变量", "itemtype": "method", "name": "windowProp", @@ -889,7 +1005,7 @@ }, { "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 449, + "line": 498, "description": "获取 selector 属性的 jquery 选择器", "itemtype": "method", "name": "selectorProp", @@ -913,7 +1029,7 @@ }, { "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 472, + "line": 521, "description": "获取 脚本模板 jquery 选择器", "itemtype": "method", "name": "scriptTplProp", @@ -937,7 +1053,7 @@ }, { "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 497, + "line": 546, "description": "获取 脚本数据 jquery 选择器", "itemtype": "method", "name": "scriptDataProp", @@ -961,7 +1077,7 @@ }, { "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 519, + "line": 568, "description": "获取 selector 属性的 json 数据", "itemtype": "method", "name": "jsonProp", @@ -986,7 +1102,7 @@ }, { "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 543, + "line": 592, "description": "判断 _selector 是否具体某种特征", "itemtype": "method", "name": "is", @@ -1010,14 +1126,14 @@ }, { "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 572, + "line": 621, "description": "使用 jquery on 为 controler 绑定事件", "class": "JC.BaseMVC.Model", "namespace": "JC" }, { "file": "../modules/JC.BaseMVC/0.1/BaseMVC.js", - "line": 580, + "line": 629, "description": "使用 jquery trigger 触发 controler 绑定事件", "class": "JC.BaseMVC.Model", "namespace": "JC" @@ -1067,6 +1183,21 @@ { "file": "../modules/JC.FChart/0.1/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": "../modules/JC.FChart/0.1/FChart.js", + "line": 244, "description": "flash swf 路径\n
            {0} = JC.PATH\n
            {1} = chart file name", "itemtype": "property", "name": "Model.FLASH_PATH", @@ -1078,7 +1209,7 @@ }, { "file": "../modules/JC.FChart/0.1/FChart.js", - "line": 230, + "line": 255, "description": "flash swf 缓存版本控制", "itemtype": "property", "name": "Model.VERSION", @@ -1090,7 +1221,7 @@ }, { "file": "../modules/JC.FChart/0.1/FChart.js", - "line": 247, + "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", @@ -1101,126 +1232,126 @@ }, { "file": "../modules/JC.FChart/0.1/FChart.js", - "line": 299, + "line": 337, "description": "解析图表默认数据", "class": "JC.FChart", "namespace": "JC" }, { "file": "../modules/JC.FChart/0.1/FChart.js", - "line": 321, + "line": 359, "description": "保存图表数据", "class": "JC.FChart", "namespace": "JC" }, { "file": "../modules/JC.FChart/0.1/FChart.js", - "line": 332, + "line": 370, "description": "图表宽度", "class": "JC.FChart", "namespace": "JC" }, { "file": "../modules/JC.FChart/0.1/FChart.js", - "line": 343, + "line": 381, "description": "图表高度", "class": "JC.FChart", "namespace": "JC" }, { "file": "../modules/JC.FChart/0.1/FChart.js", - "line": 354, + "line": 392, "description": "图表宽度", "class": "JC.FChart", "namespace": "JC" }, { "file": "../modules/JC.FChart/0.1/FChart.js", - "line": 365, + "line": 403, "description": "设置或保存图表的宽高", "class": "JC.FChart", "namespace": "JC" }, { "file": "../modules/JC.FChart/0.1/FChart.js", - "line": 373, + "line": 411, "description": "图表画布", "class": "JC.FChart", "namespace": "JC" }, { "file": "../modules/JC.FChart/0.1/FChart.js", - "line": 379, + "line": 417, "description": "画布圆角弧度", "class": "JC.FChart", "namespace": "JC" }, { "file": "../modules/JC.FChart/0.1/FChart.js", - "line": 383, + "line": 421, "description": "清除图表数据", "class": "JC.FChart", "namespace": "JC" }, { "file": "../modules/JC.FChart/0.1/FChart.js", - "line": 400, + "line": 438, "description": "清除图表状态", "class": "JC.FChart", "namespace": "JC" }, { "file": "../modules/JC.FChart/0.1/FChart.js", - "line": 436, + "line": 519, "description": "渲染图表外观", "class": "JC.FChart", "namespace": "JC" }, { "file": "../modules/JC.FChart/0.1/FChart.js", - "line": 473, + "line": 559, "description": "图表高度", "class": "JC.FChart", "namespace": "JC" }, { "file": "../modules/JC.FChart/0.1/FChart.js", - "line": 477, + "line": 563, "description": "图表高度", "class": "JC.FChart", "namespace": "JC" }, { "file": "../modules/JC.FChart/0.1/FChart.js", - "line": 481, + "line": 567, "description": "图表画布", "class": "JC.FChart", "namespace": "JC" }, { "file": "../modules/JC.FChart/0.1/FChart.js", - "line": 485, + "line": 571, "description": "初始化的选择器", "class": "JC.FChart", "namespace": "JC" }, { "file": "../modules/JC.FChart/0.1/FChart.js", - "line": 492, + "line": 578, "description": "清除图表数据", "class": "JC.FChart", "namespace": "JC" }, { "file": "../modules/JC.FChart/0.1/FChart.js", - "line": 502, + "line": 588, "description": "清除图表状态", "class": "JC.FChart", "namespace": "JC" }, { "file": "../modules/JC.FChart/0.1/FChart.js", - "line": 508, + "line": 594, "description": "更新图表数据", "class": "JC.FChart", "namespace": "JC" @@ -2651,31 +2782,31 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 13, + "line": 16, "description": "声明主要命名空间, 方便迁移", "class": "JC.f" }, { "file": "../modules/JC.common/0.2/common.js", - "line": 101, + "line": 114, "description": "判断 JC.common 是否需要向后兼容, 如果需要的话, 向 window 添加全局静态函数", "class": "JC.common" }, { "file": "../modules/JC.common/0.2/common.js", - "line": 124, + "line": 137, "description": "jquery 1.9.1 默认 string 没有 trim 方法, 这里对 string 原型添加一个默认的 trim 方法", "class": "JC.common" }, { "file": "../modules/JC.common/0.2/common.js", - "line": 128, + "line": 141, "description": "兼容 低版本 ie Array 的 indexOf 方法", "class": "JC.common" }, { "file": "../modules/JC.common/0.2/common.js", - "line": 160, + "line": 173, "description": "全局 css z-index 控制属性\n
            注意: 这个变量是 window.ZINDEX_COUNT", "itemtype": "property", "name": "ZINDEX_COUNT", @@ -2686,7 +2817,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 178, + "line": 191, "description": "一维数组去重", "itemtype": "method", "name": "arrayId", @@ -2705,7 +2836,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 197, + "line": 210, "description": "生成全局唯一ID", "itemtype": "method", "name": "gid", @@ -2717,7 +2848,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 208, + "line": 221, "description": "把函数的参数转为数组", "itemtype": "method", "name": "sliceArgs", @@ -2736,7 +2867,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 222, + "line": 235, "description": "取 URL 的 host name", "itemtype": "method", "name": "urlHostName", @@ -2755,7 +2886,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 238, + "line": 251, "description": "把 URL 相对路径 转换为 绝对路径", "itemtype": "method", "name": "relativePath", @@ -2779,7 +2910,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 266, + "line": 279, "description": "按格式输出字符串", "itemtype": "method", "name": "printf", @@ -2801,7 +2932,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 282, + "line": 295, "description": "按格式输出字符串", "itemtype": "method", "name": "printKey", @@ -2828,7 +2959,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 300, + "line": 313, "description": "判断URL中是否有某个get参数", "itemtype": "method", "name": "hasUrlParam", @@ -2855,7 +2986,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 322, + "line": 335, "description": "添加URL参数\n
            require: delUrlParam, filterXSS", "itemtype": "method", "name": "addUrlParams", @@ -2882,7 +3013,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 348, + "line": 361, "description": "xss 过滤函数", "itemtype": "method", "name": "filterXSS", @@ -2901,7 +3032,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 363, + "line": 376, "description": "取URL参数的值\n
            require: filterXSS", "itemtype": "method", "name": "getUrlParam", @@ -2928,7 +3059,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 391, + "line": 404, "description": "取URL参数的值, 这个方法返回数组\n
            与 getUrlParam 的区别是可以获取 checkbox 的所有值\n
            require: filterXSS", "itemtype": "method", "name": "getUrlParams", @@ -2955,7 +3086,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 422, + "line": 435, "description": "删除URL参数\n
            require: filterXSS", "itemtype": "method", "name": "delUrlParam", @@ -2982,7 +3113,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 452, + "line": 465, "description": "批量删除URL参数\n
            require: delUrlParam", "itemtype": "method", "name": "delUrlParams", @@ -3009,7 +3140,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 468, + "line": 481, "description": "提示需要 HTTP 环境", "itemtype": "method", "name": "httpRequire", @@ -3028,7 +3159,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 483, + "line": 496, "description": "删除 URL 的锚点\n
            require: addUrlParams, filterXSS", "itemtype": "method", "name": "removeUrlSharp", @@ -3057,7 +3188,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 505, + "line": 518, "description": "重载页面\n
            require: removeUrlSharp, addUrlParams, filterXSS", "itemtype": "method", "name": "reloadPage", @@ -3083,7 +3214,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 526, + "line": 539, "description": "取小数点的N位\n
            JS 解析 浮点数的时候,经常出现各种不可预知情况,这个函数就是为了解决这个问题", "itemtype": "method", "name": "parseFinance", @@ -3095,7 +3226,7 @@ "type": "Number" }, { - "name": "_dot,", + "name": "_dot", "description": "default = 2", "type": "Int" } @@ -3107,7 +3238,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 541, + "line": 554, "description": "js 附加字串函数", "itemtype": "method", "name": "padChar", @@ -3136,7 +3267,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 557, + "line": 570, "description": "格式化日期为 YYYY-mm-dd 格式\n
            require: pad\\_char\\_f", "itemtype": "method", "name": "formatISODate", @@ -3160,7 +3291,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 571, + "line": 584, "description": "从 ISODate 字符串解析日期对象", "itemtype": "method", "name": "parseISODate", @@ -3179,7 +3310,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 594, + "line": 607, "description": "从日期字符串解析日期对象\n
            兼容 JC.Calendar 日期格式", "itemtype": "method", "name": "parseDate", @@ -3209,7 +3340,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 618, + "line": 631, "description": "获取不带 时分秒的 日期对象", "itemtype": "method", "name": "pureDate", @@ -3227,7 +3358,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 630, + "line": 643, "description": "克隆日期对象", "itemtype": "method", "name": "cloneDate", @@ -3240,14 +3371,14 @@ } ], "return": { - "description": "需要克隆的日期对象", + "description": "", "type": "Date" }, "class": "JC.common" }, { "file": "../modules/JC.common/0.2/common.js", - "line": 638, + "line": 651, "description": "判断两个日期是否为同一天", "itemtype": "method", "name": "isSameDay", @@ -3272,7 +3403,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 650, + "line": 663, "description": "判断两个日期是否为同一月份", "itemtype": "method", "name": "isSameMonth", @@ -3297,7 +3428,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 663, + "line": 676, "description": "判断两个日期是否为同一季度", "itemtype": "method", "name": "isSameWeek", @@ -3322,7 +3453,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 694, + "line": 707, "description": "判断两个日期是否为同一季度", "itemtype": "method", "name": "isSameSeason", @@ -3347,7 +3478,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 726, + "line": 739, "description": "判断两个日期是否为同一年", "itemtype": "method", "name": "isSameYear", @@ -3372,7 +3503,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 738, + "line": 751, "description": "取一年中所有的星期, 及其开始结束日期", "itemtype": "method", "name": "weekOfYear", @@ -3396,13 +3527,13 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 750, + "line": 763, "description": "元旦开始的第一个星期一开始的一周为政治经济上的第一周", "class": "JC.common" }, { "file": "../modules/JC.common/0.2/common.js", - "line": 775, + "line": 788, "description": "取一年中所有的季度, 及其开始结束日期", "itemtype": "method", "name": "seasonOfYear", @@ -3421,7 +3552,50 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 812, + "line": 824, + "description": "取某一天所在星期的开始结束日期,以及第几个星期", + "itemtype": "method", + "name": "dayOfWeek", + "static": 1, + "params": [ + { + "name": "_date", + "description": "", + "type": "Iso date" + }, + { + "name": "_dayOffset", + "description": "", + "type": "Int" + } + ], + "return": { + "description": "Object" + }, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.2/common.js", + "line": 853, + "description": "取某一天所在季度的开始结束日期,以及第几个Q", + "itemtype": "method", + "name": "dayOfSeason", + "static": 1, + "params": [ + { + "name": "_date", + "description": "", + "type": "Iso date" + } + ], + "return": { + "description": "Object" + }, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.2/common.js", + "line": 880, "description": "取得一个月份中最大的一天", "itemtype": "method", "name": "maxDayOfMonth", @@ -3441,7 +3615,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 825, + "line": 893, "description": "取当前脚本标签的 src路径", "itemtype": "method", "name": "scriptPath", @@ -3454,7 +3628,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 837, + "line": 905, "description": "缓动函数, 动画效果为按时间缓动 \n
            这个函数只考虑递增, 你如果需要递减的话, 在回调里用 _maxVal - _stepval", "itemtype": "method", "name": "easyEffect", @@ -3496,7 +3670,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 890, + "line": 959, "description": "把输入值转换为布尔值", "itemtype": "method", "name": "parseBool", @@ -3515,7 +3689,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 909, + "line": 978, "description": "绑定或清除 mousewheel 事件", "itemtype": "method", "name": "mousewheelEvent", @@ -3531,7 +3705,7 @@ "type": "Bool" }, { - "name": "_selector,", + "name": "_selector", "description": "default = document", "type": "Selector" } @@ -3541,7 +3715,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 933, + "line": 1002, "description": "获取 selector 的指定父级标签", "itemtype": "method", "name": "getJqParent", @@ -3566,7 +3740,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 959, + "line": 1028, "description": "扩展 jquery 选择器\n
            扩展起始字符的 '/' 符号为 jquery 父节点选择器\n
            扩展起始字符的 '|' 符号为 jquery 子节点选择器\n
            扩展起始字符的 '(' 符号为 jquery 父节点查找识别符( getJqParent )", "itemtype": "method", "name": "parentSelector", @@ -3596,7 +3770,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 1027, + "line": 1096, "description": "获取脚本模板的内容", "itemtype": "method", "name": "scriptContent", @@ -3615,7 +3789,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 1042, + "line": 1111, "description": "取函数名 ( 匿名函数返回空 )", "itemtype": "method", "name": "funcName", @@ -3634,7 +3808,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 1057, + "line": 1126, "description": "动态添加内容时, 初始化可识别的组件\n
            \n
            目前会自动识别的组件
            \n
            \n Bizs.CommonModify, JC.Panel, JC.Dialog\n
            自动识别的组件不用显式调用 jcAutoInitComps 去识别可识别的组件\n
            \n\n
            \n
            可识别的组件
            \n
            \n JC.AutoSelect, JC.AutoChecked, JC.AjaxUpload, JC.Calendar\n , JC.Drag, JC.DCalendar, JC.Placeholder, JC.TableFreeze, JC.ImageCutter, JC.Tab\n
            Bizs.DisableLogic, Bizs.FormLogic, Bizs.MoneyTips, Bizs.AutoSelectComplete\n
            \n", "itemtype": "method", "name": "jcAutoInitComps", @@ -3650,91 +3824,91 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 1082, + "line": 1151, "description": "联动下拉框", "class": "JC.common" }, { "file": "../modules/JC.common/0.2/common.js", - "line": 1086, + "line": 1155, "description": "日历组件", "class": "JC.common" }, { "file": "../modules/JC.common/0.2/common.js", - "line": 1090, + "line": 1159, "description": "双日历组件", "class": "JC.common" }, { "file": "../modules/JC.common/0.2/common.js", - "line": 1094, + "line": 1163, "description": "全选反选", "class": "JC.common" }, { "file": "../modules/JC.common/0.2/common.js", - "line": 1098, + "line": 1167, "description": "Ajax 上传", "class": "JC.common" }, { "file": "../modules/JC.common/0.2/common.js", - "line": 1102, + "line": 1171, "description": "占位符", "class": "JC.common" }, { "file": "../modules/JC.common/0.2/common.js", - "line": 1106, + "line": 1175, "description": "表格冻结", "class": "JC.common" }, { "file": "../modules/JC.common/0.2/common.js", - "line": 1110, + "line": 1179, "description": "拖曳", "class": "JC.common" }, { "file": "../modules/JC.common/0.2/common.js", - "line": 1114, + "line": 1183, "description": "图片裁切", "class": "JC.common" }, { "file": "../modules/JC.common/0.2/common.js", - "line": 1122, + "line": 1191, "description": "disable / enable", "class": "JC.common" }, { "file": "../modules/JC.common/0.2/common.js", - "line": 1126, + "line": 1195, "description": "表单提交逻辑", "class": "JC.common" }, { "file": "../modules/JC.common/0.2/common.js", - "line": 1130, + "line": 1199, "description": "格式化金额", "class": "JC.common" }, { "file": "../modules/JC.common/0.2/common.js", - "line": 1134, + "line": 1203, "description": "自动完成", "class": "JC.common" }, { "file": "../modules/JC.common/0.2/common.js", - "line": 1139, + "line": 1210, "description": "排期日期展示", "class": "JC.common" }, { "file": "../modules/JC.common/0.2/common.js", - "line": 1144, + "line": 1215, "description": "URL 占位符识别功能\n
            require: addUrlParams, filterXSS", "itemtype": "method", "name": "urlDetect", @@ -3756,7 +3930,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 1185, + "line": 1256, "description": "日期占位符识别功能", "itemtype": "method", "name": "dateDetect", @@ -3779,13 +3953,13 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 1249, + "line": 1325, "description": "inject jquery val func, for hidden change event", "class": "JC.common" }, { "file": "../modules/JC.common/0.2/common.js", - "line": 1267, + "line": 1343, "description": "逗号格式化金额", "itemtype": "method", "name": "moneyFormat", @@ -3819,7 +3993,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 1322, + "line": 1398, "description": "日期格式化 (具体格式请查看 PHP Date Formats)", "itemtype": "method", "name": "dateFormat", @@ -3843,7 +4017,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 1403, + "line": 1479, "description": "扩展对象属性", "itemtype": "method", "name": "extendObject", @@ -3872,7 +4046,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 1425, + "line": 1501, "description": "timeout 控制逻辑, 避免相同功能的 setTimeout 重复执行", "itemtype": "method", "name": "safeTimeout", @@ -3906,7 +4080,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 1446, + "line": 1522, "description": "URL 请求时, 获取对URL参数进行编码的函数", "itemtype": "method", "name": "encoder", @@ -3926,7 +4100,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 1464, + "line": 1540, "description": "深度克隆对象", "itemtype": "method", "name": "cloneObject", @@ -3945,7 +4119,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 1507, + "line": 1583, "description": "获取 document 的 相关大小", "itemtype": "method", "name": "docSize", @@ -3964,7 +4138,7 @@ }, { "file": "../modules/JC.common/0.2/common.js", - "line": 1536, + "line": 1612, "description": "获取 window 的 相关大小", "itemtype": "method", "name": "winSize", @@ -3982,56 +4156,1474 @@ "class": "JC.common" }, { - "file": "../config.js", + "file": "../modules/JC.common/0.3/common.js", "line": 4, - "description": "requirejs config.js for JC Chart Project", - "class": "window.requirejs", - "namespace": "window" + "description": "如果 console 不可用, 生成一个模拟的 console 对象", + "class": "JC.f" }, { - "file": "../config.js", - "line": 27, - "description": "取当前脚本标签的 src路径", - "static": 1, - "return": { - "description": "脚本所在目录的完整路径", - "type": "String" - }, - "class": "window.requirejs", - "namespace": "window" + "file": "../modules/JC.common/0.3/common.js", + "line": 16, + "description": "声明主要命名空间, 方便迁移", + "class": "JC.f" }, { - "file": "../lib.js", - "line": 8, - "license": "RequireJS 2.1.8 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.\nAvailable via the MIT or new BSD license.\nsee: http://github.com/jrburke/requirejs for details", - "class": "window.requirejs", - "namespace": "window" + "file": "../modules/JC.common/0.3/common.js", + "line": 84, + "description": "保存需要自动识别的组件", + "itemtype": "property", + "name": "_AUTO_INIT_DATA", + "type": "Object", + "access": "protected", + "tagname": "", + "class": "JC.common" }, { - "file": "../lib.js", - "line": 56, - "description": "Helper function for iterating over an array. If the func returns\na true value, it will break out of the loop.", - "class": "window.requirejs", - "namespace": "window" + "file": "../modules/JC.common/0.3/common.js", + "line": 123, + "description": "判断 JC.common 是否需要向后兼容, 如果需要的话, 向 window 添加全局静态函数", + "class": "JC.common" }, { - "file": "../lib.js", - "line": 71, - "description": "Helper function for iterating over an array backwards. If the func\nreturns a true value, it will break out of the loop.", - "class": "window.requirejs", - "namespace": "window" + "file": "../modules/JC.common/0.3/common.js", + "line": 146, + "description": "jquery 1.9.1 默认 string 没有 trim 方法, 这里对 string 原型添加一个默认的 trim 方法", + "class": "JC.common" }, { - "file": "../lib.js", - "line": 94, - "description": "Cycles over properties in an object and calls a function for each\nproperty value. If the function returns a truthy value, then the\niteration is stopped.", - "class": "window.requirejs", - "namespace": "window" + "file": "../modules/JC.common/0.3/common.js", + "line": 150, + "description": "兼容 低版本 ie Array 的 indexOf 方法", + "class": "JC.common" }, { - "file": "../lib.js", - "line": 110, - "description": "Simple function to mix in properties from source into target,\nbut only if target does not already have a property of the same name.", + "file": "../modules/JC.common/0.3/common.js", + "line": 182, + "description": "全局 css z-index 控制属性\n
            注意: 这个变量是 window.ZINDEX_COUNT", + "itemtype": "property", + "name": "ZINDEX_COUNT", + "type": "int", + "default": "50001", + "static": 1, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 200, + "description": "一维数组去重", + "itemtype": "method", + "name": "arrayId", + "params": [ + { + "name": "_ar", + "description": "", + "type": "Array" + } + ], + "return": { + "description": "Array" + }, + "static": 1, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 219, + "description": "生成全局唯一ID", + "itemtype": "method", + "name": "gid", + "return": { + "description": "string" + }, + "static": 1, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 230, + "description": "把函数的参数转为数组", + "itemtype": "method", + "name": "sliceArgs", + "params": [ + { + "name": "args", + "description": "", + "type": "Arguments" + } + ], + "return": { + "description": "Array" + }, + "static": 1, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 244, + "description": "取 URL 的 host name", + "itemtype": "method", + "name": "urlHostName", + "params": [ + { + "name": "_url", + "description": "", + "type": "String" + } + ], + "return": { + "description": "string" + }, + "static": 1, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 260, + "description": "把 URL 相对路径 转换为 绝对路径", + "itemtype": "method", + "name": "relativePath", + "params": [ + { + "name": "_path", + "description": "", + "type": "String" + }, + { + "name": "_url", + "description": "", + "type": "String" + } + ], + "return": { + "description": "string" + }, + "static": 1, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 288, + "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": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 304, + "description": "按格式输出字符串", + "itemtype": "method", + "name": "printKey", + "static": 1, + "params": [ + { + "name": "_str", + "description": "", + "type": "String" + }, + { + "name": "_keys", + "description": "", + "type": "Object" + } + ], + "return": { + "description": "string" + }, + "example": [ + "\n JC.f.printKey( 'asdfasdf{key1}sdfasdf{key2},{0}', { 'key1': '000', 'key2': 1111, '0': 222 );\n //return asdfasdf000sdfasdf1111,222" + ], + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 322, + "description": "判断URL中是否有某个get参数", + "itemtype": "method", + "name": "hasUrlParam", + "params": [ + { + "name": "_url", + "description": "", + "type": "String" + }, + { + "name": "_key", + "description": "", + "type": "String" + } + ], + "return": { + "description": "bool" + }, + "static": 1, + "example": [ + "\n var bool = hasUrlParam( 'getkey' );" + ], + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 344, + "description": "添加URL参数\n
            require: delUrlParam, filterXSS", + "itemtype": "method", + "name": "addUrlParams", + "params": [ + { + "name": "_url", + "description": "", + "type": "String" + }, + { + "name": "_params", + "description": "", + "type": "Object" + } + ], + "return": { + "description": "string" + }, + "static": 1, + "example": [ + "\n var url = addUrlParams( location.href, {'key1': 'key1value', 'key2': 'key2value' } );" + ], + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 370, + "description": "xss 过滤函数", + "itemtype": "method", + "name": "filterXSS", + "params": [ + { + "name": "_s", + "description": "", + "type": "String" + } + ], + "return": { + "description": "string" + }, + "static": 1, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 385, + "description": "取URL参数的值\n
            require: filterXSS", + "itemtype": "method", + "name": "getUrlParam", + "params": [ + { + "name": "_url", + "description": "", + "type": "String" + }, + { + "name": "_key", + "description": "", + "type": "String" + } + ], + "return": { + "description": "string" + }, + "static": 1, + "example": [ + "\n var defaultTag = getUrlParam(location.href, 'tag'); " + ], + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 413, + "description": "取URL参数的值, 这个方法返回数组\n
            与 getUrlParam 的区别是可以获取 checkbox 的所有值\n
            require: filterXSS", + "itemtype": "method", + "name": "getUrlParams", + "params": [ + { + "name": "_url", + "description": "", + "type": "String" + }, + { + "name": "_key", + "description": "", + "type": "String" + } + ], + "return": { + "description": "Array" + }, + "static": 1, + "example": [ + "\n var params = getUrlParams(location.href, 'tag'); " + ], + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 444, + "description": "删除URL参数\n
            require: filterXSS", + "itemtype": "method", + "name": "delUrlParam", + "params": [ + { + "name": "_url", + "description": "", + "type": "String" + }, + { + "name": "_key", + "description": "", + "type": "String" + } + ], + "return": { + "description": "string" + }, + "static": 1, + "example": [ + "\n var url = delUrlParam( location.href, 'tag' );" + ], + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 474, + "description": "批量删除URL参数\n
            require: delUrlParam", + "itemtype": "method", + "name": "delUrlParams", + "params": [ + { + "name": "_url", + "description": "", + "type": "String" + }, + { + "name": "_keys", + "description": "", + "type": "Array" + } + ], + "return": { + "description": "string" + }, + "static": 1, + "example": [ + "\n var url = delUrlParam( location.href, [ 'k1', 'k2' ] );" + ], + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 490, + "description": "提示需要 HTTP 环境", + "itemtype": "method", + "name": "httpRequire", + "static": 1, + "params": [ + { + "name": "_msg", + "description": "要提示的文字, 默认 \"本示例需要HTTP环境'", + "type": "String" + } + ], + "return": { + "description": "bool 如果是HTTP环境返回true, 否则返回false" + }, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 505, + "description": "删除 URL 的锚点\n
            require: addUrlParams, filterXSS", + "itemtype": "method", + "name": "removeUrlSharp", + "static": 1, + "params": [ + { + "name": "_url", + "description": "", + "type": "String" + }, + { + "name": "_nornd", + "description": "是否不添加随机参数", + "type": "Bool" + }, + { + "name": "_rndName", + "description": "", + "type": "String" + } + ], + "return": { + "description": "string" + }, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 527, + "description": "重载页面\n
            require: removeUrlSharp, addUrlParams, filterXSS", + "itemtype": "method", + "name": "reloadPage", + "static": 1, + "params": [ + { + "name": "_url", + "description": "", + "type": "String" + }, + { + "name": "_nornd", + "description": "", + "type": "Bool" + }, + { + "name": "_delayms", + "description": "", + "type": "Int" + } + ], + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 548, + "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": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 563, + "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": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 579, + "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": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 593, + "description": "从 ISODate 字符串解析日期对象", + "itemtype": "method", + "name": "parseISODate", + "static": 1, + "params": [ + { + "name": "_datestr", + "description": "", + "type": "String" + } + ], + "return": { + "description": "date" + }, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 616, + "description": "从日期字符串解析日期对象\n
            兼容 JC.Calendar 日期格式", + "itemtype": "method", + "name": "parseDate", + "params": [ + { + "name": "_date", + "description": "", + "type": "Date" + }, + { + "name": "_selector", + "description": "如果 _selector 为真, 则尝试从 _selector 的 html 属性 dateParse 对日期进行格式化", + "type": "Selector" + }, + { + "name": "_forceISO", + "description": "是否强制转换为ISO日期", + "type": "Boolean" + } + ], + "return": { + "description": "", + "type": "Date|null" + }, + "static": 1, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 640, + "description": "获取不带 时分秒的 日期对象", + "itemtype": "method", + "name": "pureDate", + "params": [ + { + "name": "_d", + "description": "可选参数, 如果为空 = new Date", + "type": "Date" + } + ], + "return": { + "description": "Date" + }, + "static": 1, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 653, + "description": "克隆日期对象", + "itemtype": "method", + "name": "cloneDate", + "static": 1, + "params": [ + { + "name": "_date", + "description": "需要克隆的日期", + "type": "Date" + } + ], + "return": { + "description": "", + "type": "Date" + }, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 661, + "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": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 673, + "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": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 686, + "description": "判断两个日期是否为同一季度", + "itemtype": "method", + "name": "isSameWeek", + "static": 1, + "params": [ + { + "name": "_d1", + "description": "需要判断的日期1", + "type": "Date" + }, + { + "name": "_d2", + "description": "需要判断的日期2", + "type": "Date" + } + ], + "return": { + "description": "", + "type": "Bool" + }, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 717, + "description": "判断两个日期是否为同一季度", + "itemtype": "method", + "name": "isSameSeason", + "static": 1, + "params": [ + { + "name": "_d1", + "description": "需要判断的日期1", + "type": "Date" + }, + { + "name": "_d2", + "description": "需要判断的日期2", + "type": "Date" + } + ], + "return": { + "description": "", + "type": "Bool" + }, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 749, + "description": "判断两个日期是否为同一年", + "itemtype": "method", + "name": "isSameYear", + "static": 1, + "params": [ + { + "name": "_d1", + "description": "需要判断的日期1", + "type": "Date" + }, + { + "name": "_d2", + "description": "需要判断的日期2", + "type": "Date" + } + ], + "return": { + "description": "", + "type": "Bool" + }, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 761, + "description": "取一年中所有的星期, 及其开始结束日期", + "itemtype": "method", + "name": "weekOfYear", + "static": 1, + "params": [ + { + "name": "_year", + "description": "", + "type": "Int" + }, + { + "name": "_dayOffset", + "description": "每周的默认开始为周几, 默认0(周一)", + "type": "Int" + } + ], + "return": { + "description": "Array" + }, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 773, + "description": "元旦开始的第一个星期一开始的一周为政治经济上的第一周", + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 798, + "description": "取一年中所有的季度, 及其开始结束日期", + "itemtype": "method", + "name": "seasonOfYear", + "static": 1, + "params": [ + { + "name": "_year", + "description": "", + "type": "Int" + } + ], + "return": { + "description": "Array" + }, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 834, + "description": "取某一天所在星期的开始结束日期,以及第几个星期", + "itemtype": "method", + "name": "dayOfWeek", + "static": 1, + "params": [ + { + "name": "_date", + "description": "", + "type": "Iso date" + }, + { + "name": "_dayOffset", + "description": "", + "type": "Int" + } + ], + "return": { + "description": "Object" + }, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 863, + "description": "取某一天所在季度的开始结束日期,以及第几个Q", + "itemtype": "method", + "name": "dayOfSeason", + "static": 1, + "params": [ + { + "name": "_date", + "description": "", + "type": "Iso date" + } + ], + "return": { + "description": "Object" + }, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 890, + "description": "取得一个月份中最大的一天", + "itemtype": "method", + "name": "maxDayOfMonth", + "static": 1, + "params": [ + { + "name": "_date", + "description": "", + "type": "Date" + } + ], + "return": { + "description": "月份中最大的一天", + "type": "Int" + }, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 903, + "description": "取当前脚本标签的 src路径", + "itemtype": "method", + "name": "scriptPath", + "static": 1, + "return": { + "description": "脚本所在目录的完整路径", + "type": "String" + }, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 915, + "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": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 969, + "description": "把输入值转换为布尔值", + "itemtype": "method", + "name": "parseBool", + "params": [ + { + "name": "_input", + "description": "", + "type": "*" + } + ], + "return": { + "description": "bool" + }, + "static": 1, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 988, + "description": "绑定或清除 mousewheel 事件", + "itemtype": "method", + "name": "mousewheelEvent", + "params": [ + { + "name": "_cb", + "description": "", + "type": "Function" + }, + { + "name": "_detach", + "description": "", + "type": "Bool" + }, + { + "name": "_selector", + "description": "default = document", + "type": "Selector" + } + ], + "static": 1, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 1012, + "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": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 1038, + "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": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 1106, + "description": "获取脚本模板的内容", + "itemtype": "method", + "name": "scriptContent", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "return": { + "description": "string" + }, + "static": 1, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 1121, + "description": "取函数名 ( 匿名函数返回空 )", + "itemtype": "method", + "name": "funcName", + "params": [ + { + "name": "_func", + "description": "", + "type": "Function" + } + ], + "return": { + "description": "string" + }, + "static": 1, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 1136, + "description": "执行自动识别的组件", + "itemtype": "method", + "name": "autoInit", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "static": 1, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 1153, + "description": "添加需要自动识别的组件", + "itemtype": "method", + "name": "addAutoInit", + "params": [ + { + "name": "_class", + "description": "", + "type": "Class" + } + ], + "static": 1, + "example": [ + "\n JC.f.addAutoInit( JC.Calendar );" + ], + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 1172, + "description": "jcAutoInitComps 不久后将被清除\n请使用 JC.f.autoInit 和 JC.f.addAutoInit", + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 1180, + "description": "联动下拉框", + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 1184, + "description": "日历组件", + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 1188, + "description": "双日历组件", + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 1192, + "description": "全选反选", + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 1196, + "description": "Ajax 上传", + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 1200, + "description": "占位符", + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 1204, + "description": "表格冻结", + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 1208, + "description": "拖曳", + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 1212, + "description": "图片裁切", + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 1220, + "description": "disable / enable", + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 1224, + "description": "表单提交逻辑", + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 1228, + "description": "格式化金额", + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 1232, + "description": "自动完成", + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 1239, + "description": "排期日期展示", + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 1245, + "description": "URL 占位符识别功能\n
            require: addUrlParams, filterXSS", + "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": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 1286, + "description": "日期占位符识别功能", + "itemtype": "method", + "name": "dateDetect", + "params": [ + { + "name": "_dateStr", + "description": "如果起始字符为 NOW, 那么将视为当前日期\n , 如果起始字符为 NOWFirst, 那么将视为当前月的1号", + "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": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 1355, + "description": "inject jquery val func, for hidden change event", + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 1373, + "description": "逗号格式化金额", + "itemtype": "method", + "name": "moneyFormat", + "params": [ + { + "name": "_number", + "description": "", + "type": "Int|string" + }, + { + "name": "_len", + "description": "", + "type": "Int" + }, + { + "name": "_floatLen", + "description": "", + "type": "Int" + }, + { + "name": "_splitSymbol", + "description": "", + "type": "Int" + } + ], + "return": { + "description": "string" + }, + "static": 1, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 1428, + "description": "日期格式化 (具体格式请查看 PHP Date Formats)", + "itemtype": "method", + "name": "dateFormat", + "params": [ + { + "name": "_date", + "description": "default = now", + "type": "Date" + }, + { + "name": "_format", + "description": "default = \"YY-MM-DD\"", + "type": "String" + } + ], + "return": { + "description": "string" + }, + "static": 1, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 1509, + "description": "扩展对象属性", + "itemtype": "method", + "name": "extendObject", + "params": [ + { + "name": "_source", + "description": "", + "type": "Object" + }, + { + "name": "_new", + "description": "", + "type": "Object" + }, + { + "name": "_overwrite", + "description": "是否覆盖已有属性, default = true", + "type": "Bool" + } + ], + "return": { + "description": "object" + }, + "static": 1, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 1531, + "description": "timeout 控制逻辑, 避免相同功能的 setTimeout 重复执行", + "itemtype": "method", + "name": "safeTimeout", + "params": [ + { + "name": "_timeout", + "description": "", + "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": "object" + }, + "static": 1, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 1552, + "description": "URL 请求时, 获取对URL参数进行编码的函数", + "itemtype": "method", + "name": "encoder", + "params": [ + { + "name": "_selector", + "description": "", + "type": "Selector" + } + ], + "return": { + "description": "default encodeURIComponent", + "type": "Encode function" + }, + "static": 1, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 1570, + "description": "深度克隆对象", + "itemtype": "method", + "name": "cloneObject", + "params": [ + { + "name": "_inObj", + "description": "", + "type": "Object" + } + ], + "return": { + "description": "Object" + }, + "static": 1, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 1613, + "description": "获取 document 的 相关大小", + "itemtype": "method", + "name": "docSize", + "params": [ + { + "name": "_doc", + "description": "", + "type": "Document" + } + ], + "return": { + "description": "Object" + }, + "static": 1, + "class": "JC.common" + }, + { + "file": "../modules/JC.common/0.3/common.js", + "line": 1642, + "description": "获取 window 的 相关大小", + "itemtype": "method", + "name": "winSize", + "params": [ + { + "name": "_win,", + "description": "default = window", + "type": "Window" + } + ], + "return": { + "description": "Object" + }, + "static": 1, + "class": "JC.common" + }, + { + "file": "../config.js", + "line": 4, + "description": "requirejs config.js for JC Chart Project", + "class": "window.requirejs", + "namespace": "window" + }, + { + "file": "../config.js", + "line": 31, + "description": "取当前脚本标签的 src路径", + "static": 1, + "return": { + "description": "脚本所在目录的完整路径", + "type": "String" + }, + "class": "window.requirejs", + "namespace": "window" + }, + { + "file": "../lib.js", + "line": 8, + "license": "RequireJS 2.1.8 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.\nAvailable via the MIT or new BSD license.\nsee: http://github.com/jrburke/requirejs for details", + "class": "window.requirejs", + "namespace": "window" + }, + { + "file": "../lib.js", + "line": 56, + "description": "Helper function for iterating over an array. If the func returns\na true value, it will break out of the loop.", + "class": "window.requirejs", + "namespace": "window" + }, + { + "file": "../lib.js", + "line": 71, + "description": "Helper function for iterating over an array backwards. If the func\nreturns a true value, it will break out of the loop.", + "class": "window.requirejs", + "namespace": "window" + }, + { + "file": "../lib.js", + "line": 94, + "description": "Cycles over properties in an object and calls a function for each\nproperty value. If the function returns a truthy value, then the\niteration is stopped.", + "class": "window.requirejs", + "namespace": "window" + }, + { + "file": "../lib.js", + "line": 110, + "description": "Simple function to mix in properties from source into target,\nbut only if target does not already have a property of the same name.", "class": "window.requirejs", "namespace": "window" }, @@ -4351,6 +5943,25 @@ ], "class": "window.requirejs", "namespace": "window" + }, + { + "file": "../nginx_config.js", + "line": 7, + "description": "requirejs config.js for JC Project", + "class": "", + "namespace": "window" + }, + { + "file": "../nginx_config.js", + "line": 70, + "description": "取当前脚本标签的 src路径", + "static": 1, + "return": { + "description": "脚本所在目录的完整路径", + "type": "String" + }, + "class": "", + "namespace": "window" } ], "warnings": [ @@ -4360,7 +5971,7 @@ }, { "message": "unknown tag: version", - "line": " ../modules/JC.BaseMVC/0.1/BaseMVC.js:229" + "line": " ../modules/JC.BaseMVC/0.1/BaseMVC.js:249" }, { "message": "unknown tag: version", @@ -4388,19 +5999,39 @@ }, { "message": "unknown tag: version", - "line": " ../modules/JC.common/0.2/common.js:31" + "line": " ../modules/JC.common/0.2/common.js:40" + }, + { + "message": "unknown tag: version", + "line": " ../modules/JC.common/0.2/common.js:40" + }, + { + "message": "unknown tag: require", + "line": " ../modules/JC.common/0.2/common.js:1002" + }, + { + "message": "unknown tag: require", + "line": " ../modules/JC.common/0.2/common.js:1028" + }, + { + "message": "unknown tag: version", + "line": " ../modules/JC.common/0.3/common.js:40" + }, + { + "message": "unknown tag: version", + "line": " ../modules/JC.common/0.3/common.js:40" }, { "message": "unknown tag: version", - "line": " ../modules/JC.common/0.2/common.js:31" + "line": " ../modules/JC.common/0.3/common.js:40" }, { "message": "unknown tag: require", - "line": " ../modules/JC.common/0.2/common.js:933" + "line": " ../modules/JC.common/0.3/common.js:1012" }, { "message": "unknown tag: require", - "line": " ../modules/JC.common/0.2/common.js:959" + "line": " ../modules/JC.common/0.3/common.js:1038" }, { "message": "unknown tag: version", @@ -4432,15 +6063,15 @@ }, { "message": "Missing item type\n初始化 BaseMVC Model 类 和 View 类", - "line": " ../modules/JC.BaseMVC/0.1/BaseMVC.js:224" + "line": " ../modules/JC.BaseMVC/0.1/BaseMVC.js:244" }, { "message": "Missing item type\n使用 jquery on 为 controler 绑定事件", - "line": " ../modules/JC.BaseMVC/0.1/BaseMVC.js:572" + "line": " ../modules/JC.BaseMVC/0.1/BaseMVC.js:621" }, { "message": "Missing item type\n使用 jquery trigger 触发 controler 绑定事件", - "line": " ../modules/JC.BaseMVC/0.1/BaseMVC.js:580" + "line": " ../modules/JC.BaseMVC/0.1/BaseMVC.js:629" }, { "message": "Missing item type", @@ -4448,75 +6079,75 @@ }, { "message": "Missing item type\n解析图表默认数据", - "line": " ../modules/JC.FChart/0.1/FChart.js:299" + "line": " ../modules/JC.FChart/0.1/FChart.js:337" }, { "message": "Missing item type\n保存图表数据", - "line": " ../modules/JC.FChart/0.1/FChart.js:321" + "line": " ../modules/JC.FChart/0.1/FChart.js:359" }, { "message": "Missing item type\n图表宽度", - "line": " ../modules/JC.FChart/0.1/FChart.js:332" + "line": " ../modules/JC.FChart/0.1/FChart.js:370" }, { "message": "Missing item type\n图表高度", - "line": " ../modules/JC.FChart/0.1/FChart.js:343" + "line": " ../modules/JC.FChart/0.1/FChart.js:381" }, { "message": "Missing item type\n图表宽度", - "line": " ../modules/JC.FChart/0.1/FChart.js:354" + "line": " ../modules/JC.FChart/0.1/FChart.js:392" }, { "message": "Missing item type\n设置或保存图表的宽高", - "line": " ../modules/JC.FChart/0.1/FChart.js:365" + "line": " ../modules/JC.FChart/0.1/FChart.js:403" }, { "message": "Missing item type\n图表画布", - "line": " ../modules/JC.FChart/0.1/FChart.js:373" + "line": " ../modules/JC.FChart/0.1/FChart.js:411" }, { "message": "Missing item type\n画布圆角弧度", - "line": " ../modules/JC.FChart/0.1/FChart.js:379" + "line": " ../modules/JC.FChart/0.1/FChart.js:417" }, { "message": "Missing item type\n清除图表数据", - "line": " ../modules/JC.FChart/0.1/FChart.js:383" + "line": " ../modules/JC.FChart/0.1/FChart.js:421" }, { "message": "Missing item type\n清除图表状态", - "line": " ../modules/JC.FChart/0.1/FChart.js:400" + "line": " ../modules/JC.FChart/0.1/FChart.js:438" }, { "message": "Missing item type\n渲染图表外观", - "line": " ../modules/JC.FChart/0.1/FChart.js:436" + "line": " ../modules/JC.FChart/0.1/FChart.js:519" }, { "message": "Missing item type\n图表高度", - "line": " ../modules/JC.FChart/0.1/FChart.js:473" + "line": " ../modules/JC.FChart/0.1/FChart.js:559" }, { "message": "Missing item type\n图表高度", - "line": " ../modules/JC.FChart/0.1/FChart.js:477" + "line": " ../modules/JC.FChart/0.1/FChart.js:563" }, { "message": "Missing item type\n图表画布", - "line": " ../modules/JC.FChart/0.1/FChart.js:481" + "line": " ../modules/JC.FChart/0.1/FChart.js:567" }, { "message": "Missing item type\n初始化的选择器", - "line": " ../modules/JC.FChart/0.1/FChart.js:485" + "line": " ../modules/JC.FChart/0.1/FChart.js:571" }, { "message": "Missing item type\n清除图表数据", - "line": " ../modules/JC.FChart/0.1/FChart.js:492" + "line": " ../modules/JC.FChart/0.1/FChart.js:578" }, { "message": "Missing item type\n清除图表状态", - "line": " ../modules/JC.FChart/0.1/FChart.js:502" + "line": " ../modules/JC.FChart/0.1/FChart.js:588" }, { "message": "Missing item type\n更新图表数据", - "line": " ../modules/JC.FChart/0.1/FChart.js:508" + "line": " ../modules/JC.FChart/0.1/FChart.js:594" }, { "message": "Missing item type\n如果 console 不可用, 则生成一个模拟的 console 对象", @@ -4564,83 +6195,171 @@ }, { "message": "Missing item type\n声明主要命名空间, 方便迁移", - "line": " ../modules/JC.common/0.2/common.js:13" + "line": " ../modules/JC.common/0.2/common.js:16" + }, + { + "message": "Missing item type\n判断 JC.common 是否需要向后兼容, 如果需要的话, 向 window 添加全局静态函数", + "line": " ../modules/JC.common/0.2/common.js:114" + }, + { + "message": "Missing item type\njquery 1.9.1 默认 string 没有 trim 方法, 这里对 string 原型添加一个默认的 trim 方法", + "line": " ../modules/JC.common/0.2/common.js:137" + }, + { + "message": "Missing item type\n兼容 低版本 ie Array 的 indexOf 方法", + "line": " ../modules/JC.common/0.2/common.js:141" + }, + { + "message": "Missing item type\n元旦开始的第一个星期一开始的一周为政治经济上的第一周", + "line": " ../modules/JC.common/0.2/common.js:763" + }, + { + "message": "Missing item type\n联动下拉框", + "line": " ../modules/JC.common/0.2/common.js:1151" + }, + { + "message": "Missing item type\n日历组件", + "line": " ../modules/JC.common/0.2/common.js:1155" + }, + { + "message": "Missing item type\n双日历组件", + "line": " ../modules/JC.common/0.2/common.js:1159" + }, + { + "message": "Missing item type\n全选反选", + "line": " ../modules/JC.common/0.2/common.js:1163" + }, + { + "message": "Missing item type\nAjax 上传", + "line": " ../modules/JC.common/0.2/common.js:1167" + }, + { + "message": "Missing item type\n占位符", + "line": " ../modules/JC.common/0.2/common.js:1171" + }, + { + "message": "Missing item type\n表格冻结", + "line": " ../modules/JC.common/0.2/common.js:1175" + }, + { + "message": "Missing item type\n拖曳", + "line": " ../modules/JC.common/0.2/common.js:1179" + }, + { + "message": "Missing item type\n图片裁切", + "line": " ../modules/JC.common/0.2/common.js:1183" + }, + { + "message": "Missing item type\ndisable / enable", + "line": " ../modules/JC.common/0.2/common.js:1191" + }, + { + "message": "Missing item type\n表单提交逻辑", + "line": " ../modules/JC.common/0.2/common.js:1195" + }, + { + "message": "Missing item type\n格式化金额", + "line": " ../modules/JC.common/0.2/common.js:1199" + }, + { + "message": "Missing item type\n自动完成", + "line": " ../modules/JC.common/0.2/common.js:1203" + }, + { + "message": "Missing item type\n排期日期展示", + "line": " ../modules/JC.common/0.2/common.js:1210" + }, + { + "message": "Missing item type\ninject jquery val func, for hidden change event", + "line": " ../modules/JC.common/0.2/common.js:1325" + }, + { + "message": "Missing item type\n如果 console 不可用, 生成一个模拟的 console 对象", + "line": " ../modules/JC.common/0.3/common.js:4" + }, + { + "message": "Missing item type\n声明主要命名空间, 方便迁移", + "line": " ../modules/JC.common/0.3/common.js:16" }, { "message": "Missing item type\n判断 JC.common 是否需要向后兼容, 如果需要的话, 向 window 添加全局静态函数", - "line": " ../modules/JC.common/0.2/common.js:101" + "line": " ../modules/JC.common/0.3/common.js:123" }, { "message": "Missing item type\njquery 1.9.1 默认 string 没有 trim 方法, 这里对 string 原型添加一个默认的 trim 方法", - "line": " ../modules/JC.common/0.2/common.js:124" + "line": " ../modules/JC.common/0.3/common.js:146" }, { "message": "Missing item type\n兼容 低版本 ie Array 的 indexOf 方法", - "line": " ../modules/JC.common/0.2/common.js:128" + "line": " ../modules/JC.common/0.3/common.js:150" }, { "message": "Missing item type\n元旦开始的第一个星期一开始的一周为政治经济上的第一周", - "line": " ../modules/JC.common/0.2/common.js:750" + "line": " ../modules/JC.common/0.3/common.js:773" + }, + { + "message": "Missing item type\njcAutoInitComps 不久后将被清除\n请使用 JC.f.autoInit 和 JC.f.addAutoInit", + "line": " ../modules/JC.common/0.3/common.js:1172" }, { "message": "Missing item type\n联动下拉框", - "line": " ../modules/JC.common/0.2/common.js:1082" + "line": " ../modules/JC.common/0.3/common.js:1180" }, { "message": "Missing item type\n日历组件", - "line": " ../modules/JC.common/0.2/common.js:1086" + "line": " ../modules/JC.common/0.3/common.js:1184" }, { "message": "Missing item type\n双日历组件", - "line": " ../modules/JC.common/0.2/common.js:1090" + "line": " ../modules/JC.common/0.3/common.js:1188" }, { "message": "Missing item type\n全选反选", - "line": " ../modules/JC.common/0.2/common.js:1094" + "line": " ../modules/JC.common/0.3/common.js:1192" }, { "message": "Missing item type\nAjax 上传", - "line": " ../modules/JC.common/0.2/common.js:1098" + "line": " ../modules/JC.common/0.3/common.js:1196" }, { "message": "Missing item type\n占位符", - "line": " ../modules/JC.common/0.2/common.js:1102" + "line": " ../modules/JC.common/0.3/common.js:1200" }, { "message": "Missing item type\n表格冻结", - "line": " ../modules/JC.common/0.2/common.js:1106" + "line": " ../modules/JC.common/0.3/common.js:1204" }, { "message": "Missing item type\n拖曳", - "line": " ../modules/JC.common/0.2/common.js:1110" + "line": " ../modules/JC.common/0.3/common.js:1208" }, { "message": "Missing item type\n图片裁切", - "line": " ../modules/JC.common/0.2/common.js:1114" + "line": " ../modules/JC.common/0.3/common.js:1212" }, { "message": "Missing item type\ndisable / enable", - "line": " ../modules/JC.common/0.2/common.js:1122" + "line": " ../modules/JC.common/0.3/common.js:1220" }, { "message": "Missing item type\n表单提交逻辑", - "line": " ../modules/JC.common/0.2/common.js:1126" + "line": " ../modules/JC.common/0.3/common.js:1224" }, { "message": "Missing item type\n格式化金额", - "line": " ../modules/JC.common/0.2/common.js:1130" + "line": " ../modules/JC.common/0.3/common.js:1228" }, { "message": "Missing item type\n自动完成", - "line": " ../modules/JC.common/0.2/common.js:1134" + "line": " ../modules/JC.common/0.3/common.js:1232" }, { "message": "Missing item type\n排期日期展示", - "line": " ../modules/JC.common/0.2/common.js:1139" + "line": " ../modules/JC.common/0.3/common.js:1239" }, { "message": "Missing item type\ninject jquery val func, for hidden change event", - "line": " ../modules/JC.common/0.2/common.js:1249" + "line": " ../modules/JC.common/0.3/common.js:1355" }, { "message": "Missing item type\nrequirejs config.js for JC Chart Project", @@ -4648,7 +6367,7 @@ }, { "message": "Missing item type\n取当前脚本标签的 src路径", - "line": " ../config.js:27" + "line": " ../config.js:31" }, { "message": "Missing item type", @@ -4765,6 +6484,14 @@ { "message": "Missing item type\nExecutes the text. Normally just uses eval, but can be modified\nto use a better, environment-specific call. Only used for transpiling\nloader plugins, not for plain JS modules.", "line": " ../lib.js:2047" + }, + { + "message": "Missing item type\nrequirejs config.js for JC Project", + "line": " ../nginx_config.js:7" + }, + { + "message": "Missing item type\n取当前脚本标签的 src路径", + "line": " ../nginx_config.js:70" } ] } \ No newline at end of file diff --git a/docs_api/files/.._config.js.html b/docs_api/files/.._config.js.html index 47a93b3..f69748b 100644 --- a/docs_api/files/.._config.js.html +++ b/docs_api/files/.._config.js.html @@ -122,14 +122,17 @@

            File: ../config.js

            /** * requirejs config.js for JC Chart Project */ + window.requirejs && requirejs.config( { baseUrl: JC.PATH - , urlArgs: 'v=20141017' + , urlArgs: 'v=' + new Date().getTime() , paths: { - 'JC.common': 'modules/JC.common/0.2/common' + 'JC.common': 'modules/JC.common/0.3/common' , 'JC.BaseMVC': 'modules/JC.BaseMVC/0.1/BaseMVC' + , 'JC.FchartDemo': 'modules/JC.FChart/0.1/_demo/all_demo/0.1/all_demo' + , 'JC.FChart': 'modules/JC.FChart/0.1/FChart' , 'JC.FChartNormalData': 'modules/JC.FChartNormalData/0.1/FChart.NormalData' @@ -142,6 +145,7 @@

            File: ../config.js

            , 'SWFObject': 'modules/swfobject/2.3/swfobject' } }); + /** * 取当前脚本标签的 src路径 * @static diff --git a/docs_api/files/.._modules_JC.BaseMVC_0.1_BaseMVC.js.html b/docs_api/files/.._modules_JC.BaseMVC_0.1_BaseMVC.js.html index 45a7913..e29f3c6 100644 --- a/docs_api/files/.._modules_JC.BaseMVC_0.1_BaseMVC.js.html +++ b/docs_api/files/.._modules_JC.BaseMVC_0.1_BaseMVC.js.html @@ -116,13 +116,12 @@

            File: ../modules/JC.BaseMVC/0.1/BaseMVC.js

            -;(function(define, _win) { 'use strict'; define( [ 'JC.common' ], function(){
            +;(function(define, _win) { 'use strict'; define( 'JC.BaseMVC', [ 'JC.common' ], function(){
                 window.BaseMVC = JC.BaseMVC = BaseMVC;
                 /**
                  * MVC 抽象类 ( <b>仅供扩展用, 这个类不能实例化</b>)
                  * <p><b>require</b>: 
            -     *      <a href='window.jQuery.html'>jQuery</a>
            -     *      , <a href='JC.common.html'>JC.common</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://jc2.openjavascript.org/docs_api/classes/JC.BaseMVC.html' target='_blank'>API docs</a>
            @@ -163,7 +162,7 @@ 

            File: ../modules/JC.BaseMVC/0.1/BaseMVC.js

            $([ _p._view, _p._model ] ).on('TriggerEvent', function( _evt, _evtName ){ var _data = JC.f.sliceArgs( arguments ).slice( 2 ); - _p.trigger( _evtName, _data ); + return _p.triggerHandler( _evtName, _data ); }); _p._beforeInit(); @@ -222,6 +221,14 @@

            File: ../modules/JC.BaseMVC/0.1/BaseMVC.js

            * @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 的事件 @@ -233,6 +240,19 @@

            File: ../modules/JC.BaseMVC/0.1/BaseMVC.js

            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 ); + } + } /** * 获取或设置组件实例 @@ -398,6 +418,20 @@

            File: ../modules/JC.BaseMVC/0.1/BaseMVC.js

            $( 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 @@ -410,6 +444,21 @@

            File: ../modules/JC.BaseMVC/0.1/BaseMVC.js

            && 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 @@ -500,7 +549,7 @@

            File: ../modules/JC.BaseMVC/0.1/BaseMVC.js

            var _r = ''; _selector && _selector.is( '[' + _key + ']' ) - && ( _r = _selector.attr( _key ).trim() ); + && ( ( _r = _selector.attr( _key ) || '' ).trim() ); return _r; } @@ -706,10 +755,21 @@

            File: ../modules/JC.BaseMVC/0.1/BaseMVC.js

            $( 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; diff --git a/docs_api/files/.._modules_JC.FChart_0.1_FChart.js.html b/docs_api/files/.._modules_JC.FChart_0.1_FChart.js.html index d53a67c..162b635 100644 --- a/docs_api/files/.._modules_JC.FChart_0.1_FChart.js.html +++ b/docs_api/files/.._modules_JC.FChart_0.1_FChart.js.html @@ -116,7 +116,7 @@

            File: ../modules/JC.FChart/0.1/FChart.js

            -;(function(define, _win) { 'use strict'; define( [ 'JC.BaseMVC', 'swfobject', 'plugins.json2', 'jquery.mousewheel'  ], function(){
            +;(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' );
            @@ -334,6 +334,31 @@ 

            File: ../modules/JC.FChart/0.1/FChart.js

            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 @@ -343,7 +368,7 @@

            File: ../modules/JC.FChart/0.1/FChart.js

            * @default {0}/flash/pub/charts/{1}.swf * @static */ - FChart.Model.FLASH_PATH = '{0}/flash/pub/charts/{1}.swf?{2}'; + FChart.Model.FLASH_PATH = '{0}/swf/{1}.swf?{2}'; /** * flash swf 缓存版本控制 @@ -382,11 +407,18 @@

            File: ../modules/JC.FChart/0.1/FChart.js

            , 'histogram': 'Histogram' , 'vbar': 'VHistogram' + , 'hbar': 'VHistogram' , 'vhistogram': 'VHistogram' + , 'column': 'ZHistogram' , 'zbar': 'ZHistogram' , 'zhistogram': 'ZHistogram' + + , 'hcolumn': 'VZHistogram' + + , 'mix': 'MixChart' + , 'map': 'Map' , 'trend': 'Trend' @@ -397,6 +429,12 @@

            File: ../modules/JC.FChart/0.1/FChart.js

            , 'dount': 'Dount' + , 'ddount': 'DDount' + , 'ndount': 'NDount' + + , 'stack': 'Stack' + , 'hstack': 'HStack' + , 'rate': 'Rate' }; @@ -535,12 +573,57 @@

            File: ../modules/JC.FChart/0.1/FChart.js

            , 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 - , JC.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; } }); @@ -559,7 +642,7 @@

            File: ../modules/JC.FChart/0.1/FChart.js

            if( !this._model.type() ) return; var _p = this , _path = _p._model.path() - , _fpath = _path.replace( /[\/]+/g, '/' ) + , _fpath = _path.replace( /([^\:]|)[\/]+/g, '$1/' ) , _element = $( '#' + _p._model.gid() ) , _dataStr = JSON.stringify( _data ) ; @@ -570,7 +653,10 @@

            File: ../modules/JC.FChart/0.1/FChart.js

            } var _flashVar = { 'chart': encodeURIComponent( _dataStr ) } - , _flashParams = { 'wmode': 'transparent' } + , _flashParams = { + 'wmode': 'transparent' + , 'allowScriptAccess' : 'always' + } , _flashAttrs = { 'id': _p._model.gid(), 'name': _p._model.gid() } ; diff --git a/docs_api/files/.._modules_JC.common_0.1_common.js.html b/docs_api/files/.._modules_JC.common_0.1_common.js.html index 837ba96..5f32466 100644 --- a/docs_api/files/.._modules_JC.common_0.1_common.js.html +++ b/docs_api/files/.._modules_JC.common_0.1_common.js.html @@ -383,7 +383,7 @@

            File: ../modules/JC.common/0.1/common.js

            function padChar( _str, _len, _char ){ _len = _len || 2; _char = _char || "0"; _str += ''; - if( _str.length >_str ) return _str; + if( _str.length >= _len ) return _str; _str = new Array( _len + 1 ).join( _char ) + _str return _str.slice( _str.length - _len ); } diff --git a/docs_api/files/.._modules_JC.common_0.2_common.js.html b/docs_api/files/.._modules_JC.common_0.2_common.js.html index c0d74d3..94d5add 100644 --- a/docs_api/files/.._modules_JC.common_0.2_common.js.html +++ b/docs_api/files/.._modules_JC.common_0.2_common.js.html @@ -116,7 +116,7 @@

            File: ../modules/JC.common/0.2/common.js

            -;(function(define, _win) { 'use strict'; define( [], function(){
            +;(function(define, _win) { 'use strict'; define( 'JC.Common', [], function(){
                 window.JWIN = window.JWIN || $( window );
                 window.JDOC = window.JDOC || $( document );
                 /**
            @@ -128,6 +128,9 @@ 

            File: ../modules/JC.common/0.2/common.js

            !console.dir && ( console.dir = function(){} ); + !console.error && ( + console.error = function(){} + ); /** * 声明主要命名空间, 方便迁移 */ @@ -136,6 +139,12 @@

            File: ../modules/JC.common/0.2/common.js

            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(); @@ -183,7 +192,11 @@

            File: ../modules/JC.common/0.2/common.js

            , "isSameYear": isSameYear , "weekOfYear": weekOfYear , "seasonOfYear": seasonOfYear + , "dayOfWeek": dayOfWeek + , "dayOfSeason": dayOfSeason , "jcAutoInitComps": jcAutoInitComps + , "autoInit": jcAutoInitComps + , "addAutoInit": function(){} , "maxDayOfMonth": maxDayOfMonth , "mousewheelEvent": mousewheelEvent @@ -647,7 +660,7 @@

            File: ../modules/JC.common/0.2/common.js

            * @method parseFinance * @static * @param {number} _i - * @param {int} _dot, default = 2 + * @param {int} _dot default = 2 * @return number */ function parseFinance( _i, _dot ){ @@ -668,7 +681,7 @@

            File: ../modules/JC.common/0.2/common.js

            function padChar( _str, _len, _char ){ _len = _len || 2; _char = _char || "0"; _str += ''; - if( _str.length >_str ) return _str; + if( _str.length >= _len ) return _str; _str = new Array( _len + 1 ).join( _char ) + _str return _str.slice( _str.length - _len ); } @@ -750,7 +763,7 @@

            File: ../modules/JC.common/0.2/common.js

            * @method cloneDate * @static * @param {Date} _date 需要克隆的日期 - * @return {Date} 需要克隆的日期对象 + * @return {Date} */ function cloneDate( _date ){ var d = new Date(); d.setTime( _date.getTime() ); return d; } /** @@ -926,6 +939,61 @@

            File: ../modules/JC.common/0.2/common.js

            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; + } + } + + } /** * 取得一个月份中最大的一天 @@ -1000,7 +1068,8 @@

            File: ../modules/JC.common/0.2/common.js

            _done = true; clearInterval( _interval ); } - _cb && _cb( _tmp + _startVal, _done ); + cb && _cb( _tmp + _startVal, _done, _timepass, _duration, _stepMs, _startVal, _maxVal ); + }, _stepMs ); return _interval; @@ -1029,7 +1098,7 @@

            File: ../modules/JC.common/0.2/common.js

            * @method mousewheelEvent * @param {function} _cb * @param {bool} _detach - * @param {selector} _selector, default = document + * @param {selector} _selector default = document * @static */ function mousewheelEvent( _cb, _detach, _selector ){ @@ -1254,6 +1323,8 @@

            File: ../modules/JC.common/0.2/common.js

            */ Bizs.AutoSelectComplete && Bizs.AutoSelectComplete.init( _selector ); + Bizs.InputSelect && Bizs.InputSelect.init( _selector ); + /** *排期日期展示 */ @@ -1321,14 +1392,19 @@

            File: ../modules/JC.common/0.2/common.js

            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 ) ){ + 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(','); diff --git a/docs_api/files/.._modules_JC.common_0.3_common.js.html b/docs_api/files/.._modules_JC.common_0.3_common.js.html new file mode 100644 index 0000000..ddc3716 --- /dev/null +++ b/docs_api/files/.._modules_JC.common_0.3_common.js.html @@ -0,0 +1,1812 @@ + + + + + ../modules/JC.common/0.3/common.js - FChart + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.2 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../modules/JC.common/0.3/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='window.jQuery.html'>jQuery</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.common.html' target='_blank'>API docs</a>
            +     * | <a href='../../modules/JC.common/0.3/_demo/' target='_blank'>demo link</a></p>
            +     * @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/.._modules_jquery.mousewheel_3.1.12_jquery.mousewheel.js.html b/docs_api/files/.._modules_jquery.mousewheel_3.1.12_jquery.mousewheel.js.html index c289343..158815f 100644 --- a/docs_api/files/.._modules_jquery.mousewheel_3.1.12_jquery.mousewheel.js.html +++ b/docs_api/files/.._modules_jquery.mousewheel_3.1.12_jquery.mousewheel.js.html @@ -135,7 +135,7 @@

            File: ../modules/jquery.mousewheel/3.1.12/jquery.mousew (function (factory) { if ( typeof define === 'function' && define.amd ) { // AMD. Register as an anonymous module. - define(['jquery'], factory); + define( 'jquery.mousewheel', ['jquery'], factory); } else if (typeof exports === 'object') { // Node/CommonJS style for Browserify module.exports = factory; diff --git a/docs_api/files/.._nginx_config.js.html b/docs_api/files/.._nginx_config.js.html new file mode 100644 index 0000000..6261f31 --- /dev/null +++ b/docs_api/files/.._nginx_config.js.html @@ -0,0 +1,219 @@ + + + + + ../nginx_config.js - FChart + + + + + + + + + + + + + + +
            +
            +
            + +

            + +
            +
            + API Docs for: 0.2 +
            +
            +
            + +
            + +
            +
            +
            + Show: + + + + + + + +
            + + +
            +
            +
            +

            File: ../nginx_config.js

            + +
            +
            +;(function(){
            +window.JC = window.JC || {log:function(){}};
            +JC.PATH = JC.PATH || scriptPath();
            +//JC.PATH  = 'http://crm.360.cn/static/jc2/';           //test for crm online
            +//JC.PATH  = '/jc2_requirejs_master/';                  //test for jc2 master
            +//JC.PATH  = '/jc2_requirejs_master/deploy/normal/';    //test for jc2 deploy
            +/**
            + * requirejs config.js for JC Project
            + */
            +
            +var _configMap = {
            +    'Base': [
            +        , '??'
            +        ,  'modules/JC.common/0.3/common.js'
            +        , ',modules/JC.BaseMVC/0.1/BaseMVC.js'
            +        , '?'
            +    ].join('')
            +
            +
            +    , 'JCChart': [
            +        , '??'
            +        , 'modules/JC.FChart/0.1/FChart.js'
            +        , ',modules/jquery.mousewheel/3.1.12/jquery.mousewheel.js'
            +        , '?'
            +    ].join('')
            +
            +    , 'tpl': [
            +        , '??'
            +        , '?'
            +    ].join('')
            +
            +};
            +
            +window.requirejs && 
            +requirejs.config( {
            +    baseUrl: JC.PATH
            +    , urlArgs: 'v=' + new Date().getTime()
            +    , paths: {
            +        'JC.common': _configMap[ 'Base' ]
            +        , 'JC.BaseMVC': _configMap[ 'Base' ]
            +
            +       
            +        , 'JC.FChart': _configMap[ 'JCChart' ]
            +
            +        , 'jquery.mousewheel': _configMap[ 'JCChart' ]
            +        , 'jquery.cookie': 'modules/jquery.cookie/1.4.1/jquery.cookie'
            +
            +        , 'json2': 'modules/JSON/2/JSON'
            +        , 'plugins.JSON2': 'modules/JSON/2/JSON'
            +        , 'plugins.json2': 'modules/JSON/2/JSON'
            +
            +        , 'plugins.Aes': 'plugins/Aes/0.1/Aes'
            +        , 'plugins.Base64': 'plugins/Base64/0.1/Base64'
            +        , 'plugins.md5': 'plugins/md5/0.1/md5'
            +
            +        , 'plugins.requirejs.domReady': 'plugins/requirejs.domReady/2.0.1/domReady'
            +
            +        , 'plugins.swfobject': 'plugins/SWFObject/2.2/SWFObject'
            +        , 'swfobject': 'modules/swfobject/2.3/swfobject'
            +        , 'SWFObject': 'modules/swfobject/2.3/swfobject'
            +
            +        , 'SWFUpload': 'modules/SWFUpload/2.5.0/SWFUpload'
            +        , 'swfupload': 'modules/SWFUpload/2.5.0/SWFUpload'
            +        , 'Raphael': 'modules/Raphael/latest/raphael'
            +
            +        , 'artTemplate':  "modules/artTemplate/3.0/artTemplate"
            +        , 'store':  "modules/store/1.3.14/store"
            +    }
            +});
            +/**
            + * 取当前脚本标签的 src路径 
            + * @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;
            +}
            +}());
            +
            +    
            +
            + +
            +
            +
            +
            +
            +
            + + + + + + + + + + diff --git a/flash/pub/charts/CurveGram.swf b/flash/pub/charts/CurveGram.swf deleted file mode 100644 index f47f72b..0000000 Binary files a/flash/pub/charts/CurveGram.swf and /dev/null differ diff --git a/flash/pub/charts/DDount.swf b/flash/pub/charts/DDount.swf deleted file mode 100644 index c81a24d..0000000 Binary files a/flash/pub/charts/DDount.swf and /dev/null differ diff --git a/flash/pub/charts/Dount.swf b/flash/pub/charts/Dount.swf deleted file mode 100644 index 8de055c..0000000 Binary files a/flash/pub/charts/Dount.swf and /dev/null differ diff --git a/flash/pub/charts/Histogram.swf b/flash/pub/charts/Histogram.swf deleted file mode 100644 index 8c43ebd..0000000 Binary files a/flash/pub/charts/Histogram.swf and /dev/null differ diff --git a/flash/pub/charts/Map.swf b/flash/pub/charts/Map.swf deleted file mode 100644 index 1f8a296..0000000 Binary files a/flash/pub/charts/Map.swf and /dev/null differ diff --git a/flash/pub/charts/NDount.swf b/flash/pub/charts/NDount.swf deleted file mode 100644 index c0162c4..0000000 Binary files a/flash/pub/charts/NDount.swf and /dev/null differ diff --git a/flash/pub/charts/PieGraph.swf b/flash/pub/charts/PieGraph.swf deleted file mode 100644 index ceb2887..0000000 Binary files a/flash/pub/charts/PieGraph.swf and /dev/null differ diff --git a/flash/pub/charts/Rate.swf b/flash/pub/charts/Rate.swf deleted file mode 100644 index 90fc9ad..0000000 Binary files a/flash/pub/charts/Rate.swf and /dev/null differ diff --git a/flash/pub/charts/Trend.swf b/flash/pub/charts/Trend.swf deleted file mode 100644 index 85581d5..0000000 Binary files a/flash/pub/charts/Trend.swf and /dev/null differ diff --git a/flash/pub/charts/VHistogram.swf b/flash/pub/charts/VHistogram.swf deleted file mode 100644 index d185a0b..0000000 Binary files a/flash/pub/charts/VHistogram.swf and /dev/null differ diff --git a/flash/pub/charts/ZHistogram.swf b/flash/pub/charts/ZHistogram.swf deleted file mode 100644 index 02d1e2a..0000000 Binary files a/flash/pub/charts/ZHistogram.swf and /dev/null differ 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 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/flash/pub_folder_move_to_JC.FChart_0.1_swf.txt @@ -0,0 +1 @@ + diff --git a/flash/source/chart/CurveGram/0.1/.actionScriptProperties b/flash/source/chart/CurveGram/0.1/.actionScriptProperties index f181bd0..e05caf2 100644 --- a/flash/source/chart/CurveGram/0.1/.actionScriptProperties +++ b/flash/source/chart/CurveGram/0.1/.actionScriptProperties @@ -2,7 +2,7 @@ - + @@ -37,4 +37,3 @@ - diff --git a/flash/source/chart/CurveGram/0.1/src/Config.as b/flash/source/chart/CurveGram/0.1/src/Config.as index f6e4293..43d4e54 100644 --- a/flash/source/chart/CurveGram/0.1/src/Config.as +++ b/flash/source/chart/CurveGram/0.1/src/Config.as @@ -12,6 +12,9 @@ package super(); } + override public function get chartName():String{ return 'CurveGram'; } + override public function get chartUrl():String{ return 'http://fchart.openjavascript.org/modules/JC.FChart/0.1/_demo/line/'; } + public function lineDashStyle( _seriesPart:Object ):String{ var _r:String = 'Solid'; @@ -80,5 +83,11 @@ package return _r; } + + override public function get animationDuration():Number { + var _r:Number = 1; + 'duration' in animation && ( _r = parseFloat( this.animation.duration ) ); + return _r; + } } } \ No newline at end of file diff --git a/flash/source/chart/CurveGram/0.1/src/CurveGram.as b/flash/source/chart/CurveGram/0.1/src/CurveGram.as index 60d0d60..6d686f9 100644 --- a/flash/source/chart/CurveGram/0.1/src/CurveGram.as +++ b/flash/source/chart/CurveGram/0.1/src/CurveGram.as @@ -10,40 +10,43 @@ package import flash.system.Security; import flash.utils.Timer; import flash.utils.setInterval; - import flash.utils.setTimeout; + import flash.utils.setTimeout; import org.puremvc.as3.multicore.patterns.facade.*; import org.xas.core.events.*; import org.xas.core.ui.error.BaseError; import org.xas.core.utils.Log; - import org.xas.jchart.common.BaseConfig; - import org.xas.jchart.common.data.test.DefaultData; - import org.xas.jchart.common.event.JChartEvent; + import org.xas.jchart.common.BaseConfig; + import org.xas.jchart.common.BaseFacade; + import org.xas.jchart.common.Common; + import org.xas.jchart.common.data.test.DefaultData; + import org.xas.jchart.common.event.JChartEvent; import org.xas.jchart.curvegram.MainFacade; - + //[SWF(frameRate="30", width="790", height="230")] //[SWF(frameRate="30", width="385", height="225")] - //[SWF(frameRate="30", width="600", height="425")] - //[SWF(frameRate="30", width="590", height="360")] - //[SWF(frameRate="30", width="1400", height="460")] + //[SWF(frameRate="30", width="600", height="425")] + //[SWF(frameRate="30", width="590", height="360")] + //[SWF(frameRate="30", width="1400", height="460")] //[SWF(frameRate="30", width="800", height="400")] - [SWF(frameRate="30", width="800", height="360")] - public class CurveGram extends Sprite + [SWF(frameRate="30", width="800", height="560")] + public class CurveGram extends Sprite { private var _inited: Boolean = false; private var _timer:Timer; private var _data:Object; private var _facade:Facade; - private var _resizeTimer:Timer; + private var _resizeTimer:Timer; private var _ins:CurveGram; private var _loaderInfo:Object; public function CurveGram() { - flash.system.Security.allowDomain("*"); + Security.allowDomain("*"); + Security.allowInsecureDomain("*"); _ins = this; - + this.root.stage.scaleMode = StageScaleMode.NO_SCALE; this.root.stage.align = StageAlign.TOP_LEFT; @@ -70,9 +73,13 @@ package runData(); if( ExternalInterface.available ){ - ExternalInterface.addCallback( 'update', extenalUpdate ); + try{ + ExternalInterface.addCallback( 'update', extenalUpdate ); + + ExternalInterface.addCallback( 'legendUpdate', legendUpdate ); + }catch( ex:Error ){ + } } - //BaseConfig.ins.setChartData( {}); } private function extenalUpdate( _data:Object ):void{ @@ -82,6 +89,10 @@ package _facade.sendNotification( JChartEvent.DRAW ); } + private function legendUpdate( _data:Object ):void{ + _facade.sendNotification( JChartEvent.FILTER_DATA, _data ); + } + public function update( _data:Object, _x:int = 0, _y:int = 0 ):void{ if( !_inited ){ _ins._data = _data; @@ -97,13 +108,12 @@ package } private function process( _evt:JChartEvent ):void{ - //Log.printJSON( _evt.data ); var _data:Object = _evt.data as Object; BaseConfig.ins.setRoot( _ins.root ); if( _data ){ BaseConfig.ins.setChartData( _data ); } - !_facade && ( _facade = MainFacade.getInstance() ); + !_facade && ( _facade = MainFacade.getInstance() ); _facade.sendNotification( JChartEvent.DRAW ); } @@ -139,7 +149,6 @@ package if( !BaseConfig.ins.chartData ) return; dispatchEvent( new JChartEvent( JChartEvent.PROCESS, BaseConfig.ins.chartData ) ); - //_facade.sendNotification( JChartEvent.CLEAR ); } private function onRemovedFromStage( _evt:Event ):void{ @@ -156,12 +165,13 @@ package if( !ExternalInterface.available ){ if( !DefaultData.instance.data.length ) return; - _data = DefaultData.instance.data[0]; + _data = DefaultData.instance.data[1]; }else{ - _loaderInfo = LoaderInfo(this.root.stage.loaderInfo).parameters||{}; + _loaderInfo = LoaderInfo(this.root.stage.loaderInfo).parameters||{}; + if( _loaderInfo.chart ){ _data = JSON.parse( _loaderInfo.chart ); - } + } _data = _data || {}; } diff --git a/flash/source/chart/CurveGram/0.1/src/org/xas/jchart/curvegram/MainFacade.as b/flash/source/chart/CurveGram/0.1/src/org/xas/jchart/curvegram/MainFacade.as index b5c9980..96a9caa 100644 --- a/flash/source/chart/CurveGram/0.1/src/org/xas/jchart/curvegram/MainFacade.as +++ b/flash/source/chart/CurveGram/0.1/src/org/xas/jchart/curvegram/MainFacade.as @@ -4,7 +4,12 @@ package org.xas.jchart.curvegram import org.puremvc.as3.multicore.interfaces.*; import org.puremvc.as3.multicore.patterns.facade.*; + import org.xas.core.utils.Log; import org.xas.jchart.common.BaseFacade; + import org.xas.jchart.common.controller.GroupClickCmd; + import org.xas.jchart.common.controller.InitedCmd; + import org.xas.jchart.common.controller.ItemClickCmd; + import org.xas.jchart.common.controller.LegendUpdateCmd; import org.xas.jchart.common.event.JChartEvent; import org.xas.jchart.curvegram.controller.CalcCoordinateCmd; import org.xas.jchart.curvegram.controller.ClearCmd; @@ -30,7 +35,9 @@ package org.xas.jchart.curvegram override protected function initializeController():void { + super.initializeController(); + //Log.log( 'MainFacade.initializeController' ); registerCommand( JChartEvent.CALC_COORDINATE, CalcCoordinateCmd ); diff --git a/flash/source/chart/CurveGram/0.1/src/org/xas/jchart/curvegram/controller/CalcCoordinateCmd.as b/flash/source/chart/CurveGram/0.1/src/org/xas/jchart/curvegram/controller/CalcCoordinateCmd.as index 5b46d30..05501ea 100644 --- a/flash/source/chart/CurveGram/0.1/src/org/xas/jchart/curvegram/controller/CalcCoordinateCmd.as +++ b/flash/source/chart/CurveGram/0.1/src/org/xas/jchart/curvegram/controller/CalcCoordinateCmd.as @@ -14,7 +14,26 @@ package org.xas.jchart.curvegram.controller import org.xas.jchart.common.data.Coordinate; import org.xas.jchart.common.data.test.DefaultData; import org.xas.jchart.common.event.JChartEvent; + import org.xas.jchart.common.proxy.*; import org.xas.jchart.common.view.mediator.*; + import org.xas.jchart.common.view.mediator.BgLineMediator.CurveGramBgLineMediator; + import org.xas.jchart.common.view.mediator.BgMediator.StackBgMediator; + import org.xas.jchart.common.view.mediator.CreditMediator.BaseCreditMediator; + import org.xas.jchart.common.view.mediator.GraphicBgMediator.CurveGramGraphicBgMediator; + import org.xas.jchart.common.view.mediator.GroupMediator.BaseGroupMediator; + import org.xas.jchart.common.view.mediator.GroupMediator.CurveGramGropuMediator; + import org.xas.jchart.common.view.mediator.HLabelMediator.BaseHLabelMediator; + import org.xas.jchart.common.view.mediator.HLabelMediator.CurveGramHLabelMediator; + import org.xas.jchart.common.view.mediator.LegendMediator.BaseLegendMediator; + import org.xas.jchart.common.view.mediator.SeriesLabelMediator.CurveGramSeriesLabelMediator; + import org.xas.jchart.common.view.mediator.SubtitleMediator.BaseSubtitleMediator; + import org.xas.jchart.common.view.mediator.TestMediator.BaseTestMediator; + import org.xas.jchart.common.view.mediator.TipsMediator.HistogramTipsMediator; + import org.xas.jchart.common.view.mediator.TitleMediator.BaseTitleMediator; + import org.xas.jchart.common.view.mediator.ToggleBgMediator.CurveGramToggleBgMediator; + import org.xas.jchart.common.view.mediator.VLabelMediator.BaseVLabelMediator; + import org.xas.jchart.common.view.mediator.VLabelMediator.StackVLabelMediator; + import org.xas.jchart.common.view.mediator.VTitleMediator.BaseVTitleMediator; import org.xas.jchart.curvegram.view.mediator.*; public class CalcCoordinateCmd extends SimpleCommand implements ICommand @@ -35,61 +54,61 @@ package org.xas.jchart.curvegram.controller _c.corner = corner(); _c.minX = _c.x + _config.vlabelSpace + 2; - _c.minY = _c.y + 5; - _c.maxX = _c.x + _config.stageWidth - 6; - _c.maxY = _c.y + _config.stageHeight - 5; - - if( _config.serialLabelEnabled ){ - _c.minX += 10; - _c.maxX -= 10; - } + _c.minY = _c.y + _config.vspace * 2; + _c.maxX = _c.x + _config.stageWidth - _config.vspace; + _c.maxY = _c.y + _config.stageHeight - _config.vspace; + //_c.arrowLength = 0; var _yPad:Number = _c.minY; - facade.registerMediator( new BgMediator( ) ) - - //Log.log( _config.rate.length ); - //Log.log( _config.maxNum, _config.finalMaxNum, _config.chartMaxNum, 11111 ); - - if( _config.cd ){ + facade.registerMediator( new StackBgMediator( ) ) + + if( _config.cd ){ - if( _config.cd.title && _config.cd.title.text ){ - facade.registerMediator( new TitleMediator( _config.cd.title.text ) ) + if( _config.titleEnable ){ + facade.registerMediator( new BaseTitleMediator( _config.titleText ) ) _config.c.title = { x: _config.stageWidth / 2, y: _c.minY, item: pTitleMediator }; _config.c.minY += pTitleMediator.view.height; } - if( _config.cd.subtitle && _config.cd.subtitle.text ){ - facade.registerMediator( new SubtitleMediator( _config.cd.subtitle.text ) ) + if( _config.subtitleEnable ){ + facade.registerMediator( new BaseSubtitleMediator( _config.subtitleText ) ) _config.c.subtitle = { x: _config.stageWidth / 2, y: _c.minY, item: pSubtitleMediator }; _config.c.minY += pSubtitleMediator.view.height + 5; - } + } + + if( _config.groupEnabled ){ + if( _config.cd.subtitle && _config.cd.subtitle.text ){ + facade.registerMediator( new CurveGramGropuMediator( _config.c.minY - 5 ) ); + }else{ + facade.registerMediator( new CurveGramGropuMediator( _config.c.minY ) ); + } + _config.c.minY += pGroupMediator.maxHeight; + } + + if( _config.legendEnabled ){ + + facade.registerProxy( new LegendProxy() ); + facade.registerMediator( new BaseLegendMediator() ); + + pLegendProxy.dataModel.calLegendPosition( pLegendMediator.view ); + } - if( _config.cd.yAxis && _config.cd.yAxis.title && _config.cd.yAxis.title.text ){ - facade.registerMediator( new VTitleMediator( _config.cd.yAxis.title.text ) ) + if( _config.vtitleEnabled ){ + facade.registerMediator( new BaseVTitleMediator( _config.vtitleText ) ) _config.c.vtitle = { x: _config.c.minX, y: _config.c.x + _config.c.height / 2, item: pVTitleMediator }; _config.c.minX += pVTitleMediator.view.width - _config.vlabelSpace; } if( _config.cd.credits && _config.cd.credits.enabled && ( _config.cd.credits.text || _config.cd.credits.href ) ){ - facade.registerMediator( new CreditMediator( _config.cd.credits.text, _config.cd.credits.href ) ) + facade.registerMediator( new BaseCreditMediator( _config.cd.credits.text, _config.cd.credits.href ) ) _config.c.credits = { x: _config.c.maxX, y: _config.c.maxY, item: pCreditMediator }; _config.c.maxY -= pCreditMediator.view.height; } - if( _config.legendEnabled ){ - facade.registerMediator( new LegendMediator() ); - _config.c.maxY -= pLegendMediator.view.height; - _config.c.legend = { - x: _config.width / 2 - pLegendMediator.view.width / 2 - , y: _config.c.maxY - }; - _config.c.maxY -= 5; - } - _config.c.maxX -= 5; _config.c.linePadding = 0; @@ -100,42 +119,48 @@ package org.xas.jchart.curvegram.controller }; if( _config.yAxisEnabled ){ - facade.registerMediator( new VLabelMediator() ); + facade.registerMediator( new StackVLabelMediator() ); _config.c.minX += pVLabelMediator.maxWidth; - }else{ - } - _config.c.hoverPadY = 10; - if( _config.hoverBgEnabled ){ - facade.registerMediator( new HoverBgMediator() ); - _config.c.minY += _config.c.hoverPadY; - _yPad += _config.c.hoverPadY; + _config.c.minX += _config.yArrowLength; } +// _config.c.hoverPadY = 10; +// if( _config.hoverBgEnabled ){ +// facade.registerMediator( new HoverBgMediator() ); +// _config.c.minY += _config.c.hoverPadY; +// _yPad += _config.c.hoverPadY; +// } + _config.c.serialLabelPadY = 15; if( _config.serialLabelEnabled ){ - facade.registerMediator( new SerialLabelMediator() ); - _config.c.minY += _config.c.serialLabelPadY; - _yPad += _config.c.serialLabelPadY; - } - - _config.c.arrowLength = 8; - - if( _config.yAxisEnabled ){ - _config.c.chartWidth = _config.c.maxX - _config.c.minX - 5; - }else{ - _config.c.chartWidth = _config.c.maxX - _config.c.minX; + facade.registerMediator( new CurveGramSeriesLabelMediator() ); +// _config.c.minY += _config.c.serialLabelPadY; +// _yPad += _config.c.serialLabelPadY; } if( _config.categories && _config.categories.length ){ - _config.c.labelWidth = _config.c.chartWidth / ( _config.categories.length ) / 2; + if( _config.displayAllLabel ){ + _config.c.labelWidth = _config.c.chartWidth / ( _config.categories.length ) / 2; + }else{ + _config.c.labelWidth = _config.c.chartWidth / 7; + } } if( _config.xAxisEnabled ){ - facade.registerMediator( new HLabelMediator() ); + facade.registerMediator( new CurveGramHLabelMediator() ); _config.c.maxY -= pHLabelMediator.maxHeight; + + var _tmpMaxWidth:Number = pHLabelMediator.maxWidth; + + if( _tmpMaxWidth < 0 ){ + _config.c.minX += Math.abs( _tmpMaxWidth ); + } else { + _config.c.maxX -= _tmpMaxWidth; + } } - //_config.c.chartHeight = _config.c.maxY - _config.c.minY; + _config.c.chartWidth = _config.c.maxX - _config.c.minX - _config.hspace; + if( _config.graphicHeight ){ var _hpad:Number = _config.c.maxY - _config.graphicHeight; _config.c.chartHeight = _config.graphicHeight - _yPad; @@ -152,16 +177,17 @@ package org.xas.jchart.curvegram.controller _config.c.chartHeight = _config.c.maxY - _config.c.minY; } - _config.c.chartX = _config.c.minX + _config.c.arrowLength - 2; + _config.c.chartX = _config.c.minX + _config.yArrowLength - 2; _config.c.chartY = _config.c.minY; - facade.registerMediator( new GraphicBgMediator() ); - //facade.registerMediator( new TipsMediator() ); - _config.tooltipEnabled && facade.registerMediator( new TipsMediator() ); + sendNotification( JChartEvent.DISPLAY_ALL_CHECK ); + + facade.registerMediator( new CurveGramGraphicBgMediator() ); + _config.tooltipEnabled && facade.registerMediator( new HistogramTipsMediator() ); if( _config.toggleBgEnabled ){ - facade.registerMediator( new ToggleBgMediator() ); + facade.registerMediator( new CurveGramToggleBgMediator() ); } calcChartPoint(); @@ -169,10 +195,8 @@ package org.xas.jchart.curvegram.controller calcGraphic(); if( !ExternalInterface.available ){ - facade.registerMediator( new TestMediator( DefaultData.instance.data ) ); + facade.registerMediator( new BaseTestMediator( DefaultData.instance.data ) ); } - - //Log.log( _config.c.chartWidth, _config.c.chartHeight ); } sendNotification( JChartEvent.SHOW_CHART ); @@ -185,31 +209,28 @@ package org.xas.jchart.curvegram.controller _config.c.vectorPaths = []; if( !( _config.series && _config.series.length ) ) return; _config.c.partWidth = _config.c.itemWidth / _config.displaySeries.length; - - Common.each( _config.displaySeries, function( _k:int, _item:Object ):void{ + Common.each( _config.displaySeries, function( _k:int, _item:Object ):void { var _cmd:Vector. = new Vector. , _path:Vector. = new Vector. , _positions:Array = [] - , _vectorPath:Vector. = new Vector. - ; + , _vectorPath:Vector. = new Vector.; - Common.each( _item.data, function( _sk:int, _num:Number ):void{ + Common.each( _item.data, function( _sk:int, _num:Number ):void { var _rectItem:Object = {} , _pointItem:Object = _config.c.hpointReal[ _sk ] , _sp:Point = _pointItem.start as Point , _ep:Point = _pointItem.end as Point - , _h:Number - , _x:Number, _y:Number + , _h:Number, _x:Number, _y:Number , _itemNum:Number - , _dataHeight:Number + , _dataHeight:Number = _config.c.vpart * _config.rateZeroIndex , _dataY:Number - , _sNum:Number = _num; - ; - //Log.log( _sk, _sp.x, _sp.y ); + , _sNum:Number = _num + , _customRate:Boolean = _config.isAutoRate + , _minYvalue:Number; - if( _config.isItemPercent && _config.displaySeries.length > 1 ){ + if( _config.isItemPercent && _config.displaySeries.length > 1 ) { _h = _config.c.vpart * _config.rateZeroIndex; if( _num > 0 ){ _h = ( _num / _config.itemMax( _sk ) || 1 ) * _h; @@ -217,39 +238,42 @@ package org.xas.jchart.curvegram.controller if( _num == 0 ){ _h = 0; } - _y = _sp.y - + _config.c.vpart * _config.rateZeroIndex - _h - ; - if( _sk === 0 ){ + _y = _sp.y + _dataHeight - _h; + + if( _sk === 0 ) { //Log.log( _num / _config.itemMax( _sk ) * 100, _num, _config.itemMax( _sk ) ); } - - //Log.log( _config.itemMax( _sk ), _num, ( _num / _config.itemMax( _sk ) || 1 ) * 100 ); - }else{ - if( Common.isNegative( _num ) && _num != 0 ){ - _num = Math.abs( _num ); - _dataHeight = _config.c.vpart * _config.rateZeroIndex; - - _h = _config.c.chartHeight - _dataHeight; - _y = _sp.y + _dataHeight ; - - _h = - ( _num / - Math.abs( _config.finalMaxNum * _config.rate[ _config.rate.length - 1 ] ) ) - * _h; - _y += _h; - //Log.log( _h, _config.finalMaxNum ); - }else{ - _h = _config.c.vpart * _config.rateZeroIndex; - if( _num > 0 ){ - _h = ( _num / _config.chartMaxNum || 1 ) * _h; + } else { + if( Common.isNegative( _num ) && _num != 0 ) { + if( _customRate ) { + _minYvalue = _config.realRate[ 0 ]; + + _num = Math.abs( _num ) - _minYvalue; + + _h = ( _num / Math.abs( _config.finalMaxNum * + _config.rate[ _config.rate.length - 1 ] ) ) * + ( _config.c.chartHeight - _dataHeight ); + + _y = _sp.y + _dataHeight + _h; + } else { + _num = Math.abs( _num ); + _h = ( _num / Math.abs( _config.finalMaxNum * + _config.rate[ _config.rate.length - 1 ] ) ) * + ( _config.c.chartHeight - _dataHeight ); + + _y = _sp.y + _dataHeight + _h; } - if( _num == 0 ){ - _h = 0; + } else { + if( _customRate ) { + _minYvalue = _config.realRate[ _config.realRate.length - 1 ]; + + _h = ( _num > _minYvalue ) ? ( ( ( _num -_minYvalue ) / + ( _config.chartMaxNum - _minYvalue ) || 1 ) * _dataHeight ) : 0; + _y = _sp.y + _dataHeight - _h; + } else { + _h = ( _num == 0 ) ? 0 : ( ( _num / _config.chartMaxNum || 1 ) * _dataHeight ); + _y = _sp.y + _dataHeight - _h; } - _y = _sp.y - + _config.c.vpart * _config.rateZeroIndex - _h - ; } } _x = _sp.x; @@ -258,12 +282,7 @@ package org.xas.jchart.curvegram.controller _path.push( _x, _y ); _vectorPath.push( new Point( _x, _y ) ); _positions.push( { x: _x, y: _y, value: _sNum } ); - - - //Log.log( _y, _sp.y, _config.c.vpart, _config.rateZeroIndex, _h, _config.finalMaxNum ); - }); - //Log.log( 'xxxxxxxxxxxxx' ); _config.c.paths.push( { cmd: _cmd, path: _path, position: _positions, data: _item } ); _config.c.vectorPaths.push( _vectorPath ); @@ -272,16 +291,14 @@ package org.xas.jchart.curvegram.controller } private function calcChartPoint():void{ - facade.registerMediator( new BgLineMediator() ); + facade.registerMediator( new CurveGramBgLineMediator() ); calcChartVPoint(); calcChartHPoint(); } private function calcChartVPoint():void{ - var _partN:Number = _config.c.chartHeight / ( _config.rate.length -1 ) - , _sideLen:Number = _config.c.arrowLength - ; + var _partN:Number = _config.c.chartHeight / ( _config.rate.length -1 ); _config.c.vpart = _partN; _config.c.itemHeight = _partN / 2; _config.c.vpoint = []; @@ -289,28 +306,26 @@ package org.xas.jchart.curvegram.controller var _padX:Number = 0; if( !_config.yAxisEnabled ){ - //_padX = _config.c.arrowLength - ( _config.c.arrowLength - _config.c.chartX ); - _padX = _config.vlabelSpace + 2; - } + + } Common.each( _config.rate, function( _k:int, _item:* ):void{ - var _n:Number = _config.c.minY + _partN * _k, _sideLen:int = _config.c.arrowLength; + var _n:Number = _config.c.chartY + _partN * _k; _config.c.vpoint.push( { - start: new Point( _config.c.minX + _padX, _n ) - , end: new Point( _config.c.maxX + _padX, _n ) + start: new Point( _config.c.chartX, _n ) + , end: new Point( _config.c.chartX +_config.c.chartWidth, _n ) }); - + _config.c.vpointReal.push( { - start: new Point( _config.c.minX + _sideLen, _n ) - , end: new Point( _config.c.maxX + _sideLen, _n ) + start: new Point( _config.c.chartX, _n ) + , end: new Point( _config.c.chartX +_config.c.chartWidth, _n ) }); }); } private function calcChartHPoint():void{ - var _partN:Number =  _config.c.chartWidth / ( ( _config.categories.length - 1 ) || 1 ) - , _rpartN:Number = ( _config.c.chartWidth - _config.c.linePadding ) / ( ( _config.categories.length - 1 ) || 1) - , _sideLen:Number = _config.c.arrowLength + var _partN:Number =  _config.c.chartWidth / ( ( _config.realItemLength - 1 ) || 1 ) + , _rpartN:Number = ( _config.c.chartWidth - _config.c.linePadding ) / ( ( _config.realItemLength - 1 ) || 1) ; _config.c.hpart = _partN; _config.c.rhpart = _rpartN; @@ -319,72 +334,75 @@ package org.xas.jchart.curvegram.controller _config.c.hpointReal = []; _config.c.itemWidth = _partN / 2; _config.c.ritemWidth = _rpartN / 2; - - - Common.each( _config.categories, function( _k:int, _item:* ):void{ - var _n:Number = _config.c.minX + _partN * _k + 5 - , _rn:Number = _config.c.minX + _config.c.linePadding / 2 + _rpartN * _k + 5 - , _sideLen:int = _config.c.arrowLength + + Common.each( _config.series[0].data, function( _k:int, _item:* ):void{ + var _n:Number = _config.c.chartX + _partN * _k + , _rn:Number = _config.c.chartX + _rpartN * _k + _config.c.linePadding / 2 ; _config.c.hlinePoint.push( { - start: new Point( _n, _config.c.minY ) - , end: new Point( _n, _config.c.maxY + 1 ) + start: new Point( _n, _config.c.chartY ) + , end: new Point( _n, _config.c.chartY + _config.c.chartHeight ) }); - if( !_config.displayAllLabel ){ - if( !( _k in _config.labelDisplayIndex ) ){ - _sideLen = 0; - } - } - _config.c.hpoint.push( { - start: new Point( _n, _config.c.maxY ) - , end: new Point( _n, _config.c.maxY + _sideLen ) + start: new Point( _n, _config.c.chartY + _config.c.chartHeight ) + , end: new Point( _n, _config.c.chartY + _config.c.chartHeightY ) }); _config.c.hpointReal.push( { - start: new Point( _rn, _config.c.minY ) - , end: new Point( _rn, _config.c.maxY ) + start: new Point( _rn, _config.c.chartY ) + , end: new Point( _rn, _config.c.chartY + _config.c.chartHeight) }); }); } - private function get pLegendMediator():LegendMediator{ - return facade.retrieveMediator( LegendMediator.name ) as LegendMediator; + private function get pGroupMediator():BaseGroupMediator{ + return facade.retrieveMediator( BaseGroupMediator.name ) as BaseGroupMediator; } - private function get pHLabelMediator():HLabelMediator{ - return facade.retrieveMediator( HLabelMediator.name ) as HLabelMediator; + private function get pLegendMediator():BaseLegendMediator{ + return facade.retrieveMediator( BaseLegendMediator.name ) as BaseLegendMediator; } - private function get pVLabelMediator():VLabelMediator{ - return facade.retrieveMediator( VLabelMediator.name ) as VLabelMediator; + private function get pHLabelMediator():BaseHLabelMediator{ + return facade.retrieveMediator( BaseHLabelMediator.name ) as BaseHLabelMediator; } - private function get pCreditMediator():CreditMediator{ - return facade.retrieveMediator( CreditMediator.name ) as CreditMediator; + private function get pVLabelMediator():BaseVLabelMediator{ + return facade.retrieveMediator( BaseVLabelMediator.name ) as BaseVLabelMediator; } - private function get pVTitleMediator():VTitleMediator{ - return facade.retrieveMediator( VTitleMediator.name ) as VTitleMediator; + private function get pCreditMediator():BaseCreditMediator{ + return facade.retrieveMediator( BaseCreditMediator.name ) as BaseCreditMediator; } - private function get pSubtitleMediator():SubtitleMediator{ - return facade.retrieveMediator( SubtitleMediator.name ) as SubtitleMediator; + private function get pVTitleMediator():BaseVTitleMediator{ + return facade.retrieveMediator( BaseVTitleMediator.name ) as BaseVTitleMediator; } - private function get pTitleMediator():TitleMediator{ - return facade.retrieveMediator( TitleMediator.name ) as TitleMediator; + private function get pSubtitleMediator():BaseSubtitleMediator{ + return facade.retrieveMediator( BaseSubtitleMediator.name ) as BaseSubtitleMediator; } + private function get pTitleMediator():BaseTitleMediator{ + return facade.retrieveMediator( BaseTitleMediator.name ) as BaseTitleMediator; + } private function get mainMediator():MainMediator{ return facade.retrieveMediator( MainMediator.name ) as MainMediator; } + private function get pLegendProxy():LegendProxy{ + return facade.retrieveProxy( LegendProxy.name ) as LegendProxy; + } + + private function get pLineProxy():LineProxy{ + return facade.retrieveProxy( LineProxy.name ) as LineProxy; + } + private function corner():uint{ return 20; } } -} \ No newline at end of file +} diff --git a/flash/source/chart/CurveGram/0.1/src/org/xas/jchart/curvegram/controller/ClearCmd.as b/flash/source/chart/CurveGram/0.1/src/org/xas/jchart/curvegram/controller/ClearCmd.as index 209f5f4..4689712 100644 --- a/flash/source/chart/CurveGram/0.1/src/org/xas/jchart/curvegram/controller/ClearCmd.as +++ b/flash/source/chart/CurveGram/0.1/src/org/xas/jchart/curvegram/controller/ClearCmd.as @@ -6,13 +6,29 @@ package org.xas.jchart.curvegram.controller import org.xas.core.utils.Log; import org.xas.jchart.common.BaseConfig; import org.xas.jchart.common.event.JChartEvent; - import org.xas.jchart.common.view.mediator.*; - import org.xas.jchart.curvegram.view.mediator.*; + import org.xas.jchart.common.view.mediator.BgLineMediator.BaseBgLineMediator; + import org.xas.jchart.common.view.mediator.BgMediator.BaseBgMediator; + import org.xas.jchart.common.view.mediator.CreditMediator.BaseCreditMediator; + import org.xas.jchart.common.view.mediator.GraphicBgMediator.BaseGraphicBgMediator; + import org.xas.jchart.common.view.mediator.GroupMediator.BaseGroupMediator; + import org.xas.jchart.common.view.mediator.HLabelMediator.BaseHLabelMediator; + import org.xas.jchart.common.view.mediator.HoverBgMediator.BaseHoverBgMediator; + import org.xas.jchart.common.view.mediator.LegendMediator.BaseLegendMediator; + import org.xas.jchart.common.view.mediator.MainMediator; + import org.xas.jchart.common.view.mediator.SeriesLabelMediator.BaseSeriesLabelMediator; + import org.xas.jchart.common.view.mediator.SubtitleMediator.BaseSubtitleMediator; + import org.xas.jchart.common.view.mediator.TestMediator.BaseTestMediator; + import org.xas.jchart.common.view.mediator.TipsMediator.BaseTipsMediator; + import org.xas.jchart.common.view.mediator.TitleMediator.BaseTitleMediator; + import org.xas.jchart.common.view.mediator.ToggleBgMediator.BaseToggleBgMediator; + import org.xas.jchart.common.view.mediator.VLabelMediator.BaseVLabelMediator; + import org.xas.jchart.common.view.mediator.VTitleMediator.BaseVTitleMediator; + import org.xas.jchart.curvegram.view.mediator.GraphicMediator; public class ClearCmd extends SimpleCommand implements ICommand { public function ClearCmd() - { + { super(); } @@ -20,23 +36,26 @@ package org.xas.jchart.curvegram.controller //Log.log( 'ClearCmd' ); - facade.hasMediator( BgMediator.name ) && facade.removeMediator( BgMediator.name ); - facade.hasMediator( TitleMediator.name ) && facade.removeMediator( TitleMediator.name ); - facade.hasMediator( SubtitleMediator.name ) && facade.removeMediator( SubtitleMediator.name ); - facade.hasMediator( VTitleMediator.name ) && facade.removeMediator( VTitleMediator.name ); - facade.hasMediator( CreditMediator.name ) && facade.removeMediator( CreditMediator.name ); - facade.hasMediator( VLabelMediator.name ) && facade.removeMediator( VLabelMediator.name ); - facade.hasMediator( HLabelMediator.name ) && facade.removeMediator( HLabelMediator.name ); - facade.hasMediator( GraphicMediator.name ) && facade.removeMediator( GraphicMediator.name ); - facade.hasMediator( GraphicBgMediator.name ) && facade.removeMediator( GraphicBgMediator.name ); - facade.hasMediator( MainMediator.name ) && facade.removeMediator( MainMediator.name ); - facade.hasMediator( BgLineMediator.name ) && facade.removeMediator( BgLineMediator.name ); - facade.hasMediator( LegendMediator.name ) && facade.removeMediator( LegendMediator.name ); - facade.hasMediator( TipsMediator.name ) && facade.removeMediator( TipsMediator.name ); - facade.hasMediator( TestMediator.name ) && facade.removeMediator( TestMediator.name ); - facade.hasMediator( SerialLabelMediator.name ) && facade.removeMediator( SerialLabelMediator.name ); - facade.hasMediator( HoverBgMediator.name ) && facade.removeMediator( HoverBgMediator.name ); - facade.hasMediator( ToggleBgMediator.name ) && facade.removeMediator( ToggleBgMediator.name ); + facade.hasMediator( BaseBgMediator.name ) && facade.removeMediator( BaseBgMediator.name ); + facade.hasMediator( BaseVLabelMediator.name ) && facade.removeMediator( BaseVLabelMediator.name ); + facade.hasMediator( BaseHLabelMediator.name ) && facade.removeMediator( BaseHLabelMediator.name ); + facade.hasMediator( BaseGraphicBgMediator.name ) && facade.removeMediator( BaseGraphicBgMediator.name ); + facade.hasMediator( BaseBgLineMediator.name ) && facade.removeMediator( BaseBgLineMediator.name ); + facade.hasMediator( BaseLegendMediator.name ) && facade.removeMediator( BaseLegendMediator.name ); + facade.hasMediator( BaseTipsMediator.name ) && facade.removeMediator( BaseTipsMediator.name ); + facade.hasMediator( BaseSeriesLabelMediator.name ) && facade.removeMediator( BaseSeriesLabelMediator.name ); + facade.hasMediator( BaseHoverBgMediator.name ) && facade.removeMediator( BaseHoverBgMediator.name ); + facade.hasMediator( BaseToggleBgMediator.name ) && facade.removeMediator( BaseToggleBgMediator.name ); + facade.hasMediator( BaseGroupMediator.name ) && facade.removeMediator( BaseGroupMediator.name ); + + facade.hasMediator( BaseTitleMediator.name ) && facade.removeMediator( BaseTitleMediator.name ); + facade.hasMediator( BaseSubtitleMediator.name ) && facade.removeMediator( BaseSubtitleMediator.name ); + facade.hasMediator( BaseVTitleMediator.name ) && facade.removeMediator( BaseVTitleMediator.name ); + facade.hasMediator( BaseCreditMediator.name ) && facade.removeMediator( BaseCreditMediator.name ); + facade.hasMediator( BaseTestMediator.name ) && facade.removeMediator( BaseTestMediator.name ); + + facade.hasMediator( MainMediator.name ) && facade.removeMediator( MainMediator.name ); + facade.hasMediator( GraphicMediator.name ) && facade.removeMediator( GraphicMediator.name ); } } } \ No newline at end of file diff --git a/flash/source/chart/CurveGram/0.1/src/org/xas/jchart/curvegram/controller/FilterDataCmd.as b/flash/source/chart/CurveGram/0.1/src/org/xas/jchart/curvegram/controller/FilterDataCmd.as index f5b85b0..89d9cf0 100644 --- a/flash/source/chart/CurveGram/0.1/src/org/xas/jchart/curvegram/controller/FilterDataCmd.as +++ b/flash/source/chart/CurveGram/0.1/src/org/xas/jchart/curvegram/controller/FilterDataCmd.as @@ -1,35 +1,12 @@ package org.xas.jchart.curvegram.controller { - import org.puremvc.as3.multicore.interfaces.ICommand; - import org.puremvc.as3.multicore.interfaces.INotification; - import org.puremvc.as3.multicore.patterns.command.SimpleCommand; - import org.xas.core.utils.Log; - import org.xas.jchart.common.BaseConfig; - import org.xas.jchart.common.event.JChartEvent; - import org.xas.jchart.common.view.mediator.BgLineMediator; - import org.xas.jchart.common.view.mediator.GraphicBgMediator; - import org.xas.jchart.common.view.mediator.HLabelMediator; - import org.xas.jchart.common.view.mediator.TipsMediator; - import org.xas.jchart.common.view.mediator.VLabelMediator; - import org.xas.jchart.curvegram.view.mediator.GraphicMediator; + import org.xas.jchart.common.controller.LegendUpdateCmd; - public class FilterDataCmd extends SimpleCommand implements ICommand + public class FilterDataCmd extends LegendUpdateCmd { public function FilterDataCmd() { super(); } - override public function execute(notification:INotification):void{ - //Log.log( 'filter data cmd' ); - //Log.printJSON( BaseConfig.ins.displaySeries ); - - update( notification.getBody() ); - } - - private function update( _data:Object ):void{ - BaseConfig.ins.updateDisplaySeries( _data ); - BaseConfig.ins.setChartData( BaseConfig.ins.chartData ); - facade.sendNotification( JChartEvent.DRAW ); - } } } \ No newline at end of file diff --git a/flash/source/chart/CurveGram/0.1/src/org/xas/jchart/curvegram/view/components/GraphicView.as b/flash/source/chart/CurveGram/0.1/src/org/xas/jchart/curvegram/view/components/GraphicView.as index 4a186d6..ee75134 100644 --- a/flash/source/chart/CurveGram/0.1/src/org/xas/jchart/curvegram/view/components/GraphicView.as +++ b/flash/source/chart/CurveGram/0.1/src/org/xas/jchart/curvegram/view/components/GraphicView.as @@ -1,18 +1,12 @@ package org.xas.jchart.curvegram.view.components { - import com.adobe.utils.StringUtil; - import flash.display.Sprite; import flash.events.Event; import flash.events.MouseEvent; + import flash.external.ExternalInterface; import flash.geom.Point; - import flash.text.TextField; - import flash.text.TextFieldAutoSize; - import flash.text.TextFormat; - import flash.text.TextFormatAlign; import org.xas.core.utils.Log; - import org.xas.core.utils.StringUtils; import org.xas.jchart.common.BaseConfig; import org.xas.jchart.common.Common; import org.xas.jchart.common.event.JChartEvent; @@ -23,6 +17,7 @@ package org.xas.jchart.curvegram.view.components { private var _boxs:Vector.; private var _preIndex:int = -1; + private var _nowIndex:int; private var _config:Config; @@ -51,11 +46,13 @@ package org.xas.jchart.curvegram.view.components graphics.clear(); _boxs = new Vector.; + var _delay:Number = 0; + BaseConfig.ins.xAxisEnabled && ( _delay = BaseConfig.ins.animationDuration / 2 ); + Common.each( _config.c.paths, function( _k:int, _item:Object ):void{ var _cmd:Vector. = _item.cmd as Vector. , _path:Vector. = _item.path as Vector. - , _gitem:CurveGramUI , _vectorPath:Vector. = _config.c.vectorPaths[ _k ] as Vector. ; @@ -67,31 +64,46 @@ package org.xas.jchart.curvegram.view.components thickness: 2 , lineColor: _config.itemColor( _k ) , fillOpacity: _config.lineFillOpacity( _item.data ) + , delayShow: _delay + BaseConfig.ins.animationEnabled + , animationEnabled: BaseConfig.ins.animationEnabled + , duration: BaseConfig.ins.animationDuration + , delay: _delay } , _config.isLineGradient( _item.data ) ) ); } - }); - Common.each( _config.c.paths, function( _k:int, _item:Object ):void{ +// Log.log( _config.c.hpart ); + Common.each( _config.c.paths, function( _k:int, _item:Object ):void{ + var _cmd:Vector. = _item.cmd as Vector. , _path:Vector. = _item.path as Vector. , _gitem:CurveGramUI - , _vectorPath:Vector. = _config.c.vectorPaths[ _k ] as Vector. - ; - - addChild( - _gitem = new CurveGramUI( + , _vectorPath:Vector. = _config.c.vectorPaths[ _k ] as Vector.; + + addChild( + _gitem = new CurveGramUI( _cmd , _path , _config.itemColor( _k ) , _vectorPath , _config.lineDashStyle( _item.data ) - ) + , { + animationEnabled: BaseConfig.ins.animationEnabled + , duration: BaseConfig.ins.animationDuration + , delay: _delay + , index: _k + , seriesIndex: _k + , pointEnabled: BaseConfig.ins.pointEnabled( _item.data ) + , hoverShow: BaseConfig.ins.pointHoverShow( _item.data ) + , lineSmooth: BaseConfig.ins.lineSmoothEnable + } + ) ); + _boxs.push( _gitem ); }); } @@ -103,7 +115,12 @@ package org.xas.jchart.curvegram.view.components if( _preIndex >= 0 ){ Common.each( _boxs, function( _k:int, _item:CurveGramUI ):void{ - _boxs[ _k ].items[ _preIndex ].unhover(); + ( _k < _boxs.length ) + && _boxs[ _k ] && _boxs[ _k ].items + && ( _preIndex < _boxs[ _k ].items.length ) +// && _boxs[ _k ].items[ _preIndex ].unhover() + && _boxs[ _k ].dispatchEvent( new JChartEvent( JChartEvent.UPDATE_STATUS, { index: _preIndex, action: 'hide' } ) ) + ; }); } _preIndex = -1; @@ -114,21 +131,40 @@ package org.xas.jchart.curvegram.view.components var _srcEvt:MouseEvent = _evt.data.evt as MouseEvent , _ix:int = _evt.data.index as int - ; - if( !( _boxs && _boxs.length ) ) return; + ; + + _nowIndex = _ix; + + if( !_boxs || _boxs.length == 0 ) return; if( _preIndex == _ix ) return; if( _preIndex >= 0 ){ Common.each( _boxs, function( _k:int, _item:CurveGramUI ):void{ - _preIndex >= 0 && _boxs[ _k ].items[ _preIndex ].unhover(); + + ( _k < _boxs.length ) + && _boxs[ _k ].items + && ( _preIndex < _boxs[ _k ].items.length ) +// && _boxs[ _k ].items[ _preIndex ].unhover() + && _boxs[ _k ].dispatchEvent( new JChartEvent( JChartEvent.UPDATE_STATUS, { index: _preIndex, action: 'hide' } ) ) + ; + + }); } Common.each( _boxs, function( _k:int, _item:CurveGramUI ):void{ - _ix >= 0 && _boxs[ _k ].items[ _ix ].hover(); + + ( _k < _boxs.length ) + && _boxs[ _k ].items + && ( _ix < _boxs[ _k ].items.length ) +// && _boxs[ _k ].items[ _ix ].hover() + && _boxs[ _k ].dispatchEvent( new JChartEvent( JChartEvent.UPDATE_STATUS, { index: _ix, action: 'show' } ) ) + ; + }); _preIndex = _ix; } + } -} \ No newline at end of file +} diff --git a/flash/source/chart/CurveGram/0.1/src/org/xas/jchart/curvegram/view/mediator/GraphicMediator.as b/flash/source/chart/CurveGram/0.1/src/org/xas/jchart/curvegram/view/mediator/GraphicMediator.as index 08df32e..471d3f5 100644 --- a/flash/source/chart/CurveGram/0.1/src/org/xas/jchart/curvegram/view/mediator/GraphicMediator.as +++ b/flash/source/chart/CurveGram/0.1/src/org/xas/jchart/curvegram/view/mediator/GraphicMediator.as @@ -20,7 +20,19 @@ package org.xas.jchart.curvegram.view.mediator } override public function onRegister():void{ - mainMediator.view.index7.addChild( _view = new GraphicView() ); + mainMediator.view.index7.addChild( _view = new GraphicView() ); + +// _view.addEventListener( JChartEvent.ITEM_CLICK, function( _evt:JChartEvent ):void{ +// sendNotification( JChartEvent.ITEM_CLICK, _evt.data ); +// } ); +// +// _view.addEventListener( JChartEvent.GROUP_CLICK, function( _evt:JChartEvent ):void{ +// sendNotification( JChartEvent.GROUP_CLICK, _evt.data ); +// } ); +// +// _view.addEventListener( JChartEvent.INITED, function( _evt:JChartEvent ):void{ +// sendNotification( JChartEvent.INITED, _evt.data ); +// } ); } override public function onRemove():void{ diff --git a/flash/source/chart/DDount/0.1/.actionScriptProperties b/flash/source/chart/DDount/0.1/.actionScriptProperties index 7c2a57f..1b77bcb 100644 --- a/flash/source/chart/DDount/0.1/.actionScriptProperties +++ b/flash/source/chart/DDount/0.1/.actionScriptProperties @@ -36,3 +36,4 @@ + diff --git a/flash/source/chart/DDount/0.1/src/Config.as b/flash/source/chart/DDount/0.1/src/Config.as index 19d1d4c..15a1b3c 100644 --- a/flash/source/chart/DDount/0.1/src/Config.as +++ b/flash/source/chart/DDount/0.1/src/Config.as @@ -49,6 +49,8 @@ package _displaySeries = [] //Log.printJSON( _tmpSeries[0].data ); + _displaySeriesIndexMap = {}; + Common.each( _tmpSeries[0].data, function( _k:int, _item: * ):void{ var _o:Object, _a:Array = _item as Array; if( !_a ){ @@ -57,10 +59,9 @@ package _o = { 'name': _a[0], 'y': _a[1] }; } _displaySeries.push( _o ); + _displaySeriesIndexMap[ _k ] = _k; }); - _displaySeriesIndexMap = null; - if( _filter ){ var _tmp:Array = [], _count:int = 0; diff --git a/flash/source/chart/DDount/0.1/src/DDount.as b/flash/source/chart/DDount/0.1/src/DDount.as index ba7c4ff..692c061 100644 --- a/flash/source/chart/DDount/0.1/src/DDount.as +++ b/flash/source/chart/DDount/0.1/src/DDount.as @@ -13,7 +13,7 @@ package import flash.utils.Timer; import flash.utils.setInterval; import flash.utils.setTimeout; - + import org.puremvc.as3.multicore.patterns.facade.*; import org.xas.core.events.*; import org.xas.core.ui.error.BaseError; @@ -66,7 +66,11 @@ package runData(); if( ExternalInterface.available ){ - ExternalInterface.addCallback( 'update', extenalUpdate ); + try{ + ExternalInterface.addCallback( 'update', extenalUpdate ); + }catch( ex:Error ){ + + } } //BaseConfig.ins.setChartData( {}); } diff --git a/flash/source/chart/DDount/0.1/src/org/xas/jchart/ddount/controller/CalcCoordinateCmd.as b/flash/source/chart/DDount/0.1/src/org/xas/jchart/ddount/controller/CalcCoordinateCmd.as index 2731278..9e82763 100644 --- a/flash/source/chart/DDount/0.1/src/org/xas/jchart/ddount/controller/CalcCoordinateCmd.as +++ b/flash/source/chart/DDount/0.1/src/org/xas/jchart/ddount/controller/CalcCoordinateCmd.as @@ -43,27 +43,27 @@ package org.xas.jchart.ddount.controller if( BaseConfig.ins.cd ){ if( BaseConfig.ins.cd.title && BaseConfig.ins.cd.title.text ){ - facade.registerMediator( new TitleMediator( BaseConfig.ins.cd.title.text ) ) + facade.registerMediator( new BaseTitleMediator( BaseConfig.ins.cd.title.text ) ) BaseConfig.ins.c.title = { x: _c.width / 2, y: _c.minY, item: pTitleMediator }; BaseConfig.ins.c.minY += pTitleMediator.view.height; } if( BaseConfig.ins.cd.subtitle && BaseConfig.ins.cd.subtitle.text ){ - facade.registerMediator( new SubtitleMediator( BaseConfig.ins.cd.subtitle.text ) ) + facade.registerMediator( new BaseSubtitleMediator( BaseConfig.ins.cd.subtitle.text ) ) BaseConfig.ins.c.subtitle = { x: _c.width / 2, y: _c.minY, item: pSubtitleMediator }; BaseConfig.ins.c.minY += pSubtitleMediator.view.height + 5; } if( BaseConfig.ins.cd.yAxis && BaseConfig.ins.cd.yAxis.title && BaseConfig.ins.cd.yAxis.title.text ){ - facade.registerMediator( new VTitleMediator( BaseConfig.ins.cd.yAxis.title.text ) ) + facade.registerMediator( new BaseVTitleMediator( BaseConfig.ins.cd.yAxis.title.text ) ) BaseConfig.ins.c.vtitle = { x: BaseConfig.ins.c.minX, y: BaseConfig.ins.c.x + BaseConfig.ins.c.height / 2, item: pVTitleMediator }; BaseConfig.ins.c.minX += pVTitleMediator.view.width - 5; } if( BaseConfig.ins.cd.credits && BaseConfig.ins.cd.credits.enabled && ( BaseConfig.ins.cd.credits.text || BaseConfig.ins.cd.credits.href ) ){ - facade.registerMediator( new CreditMediator( BaseConfig.ins.cd.credits.text, BaseConfig.ins.cd.credits.href ) ) + facade.registerMediator( new BaseCreditMediator( BaseConfig.ins.cd.credits.text, BaseConfig.ins.cd.credits.href ) ) BaseConfig.ins.c.credits = { x: BaseConfig.ins.c.maxX, y: BaseConfig.ins.c.maxY, item: pCreditMediator }; BaseConfig.ins.c.maxY -= pCreditMediator.view.height; @@ -97,7 +97,7 @@ package org.xas.jchart.ddount.controller calcGraphic(); if( !ExternalInterface.available ){ - facade.registerMediator( new TestMediator( DefaultPieData.instance.data ) ); + facade.registerMediator( new BaseTestMediator( DefaultPieData.instance.data ) ); } //Log.log( BaseConfig.ins.c.chartWidth, BaseConfig.ins.c.chartHeight ); @@ -108,7 +108,7 @@ package org.xas.jchart.ddount.controller private function calcGraphic():void{ - facade.registerMediator( new PieLabelMediator() ); + facade.registerMediator( new BasePieLabelMediator() ); facade.registerMediator( new GraphicMediator() ); BaseConfig.ins.c.cx = BaseConfig.ins.c.chartX + BaseConfig.ins.c.chartWidth / 2; @@ -249,20 +249,20 @@ package org.xas.jchart.ddount.controller return facade.retrieveMediator( LegendMediator.name ) as LegendMediator; } - private function get pCreditMediator():CreditMediator{ - return facade.retrieveMediator( CreditMediator.name ) as CreditMediator; + private function get pCreditMediator():BaseCreditMediator{ + return facade.retrieveMediator( BaseCreditMediator.name ) as BaseCreditMediator; } - private function get pVTitleMediator():VTitleMediator{ - return facade.retrieveMediator( VTitleMediator.name ) as VTitleMediator; + private function get pVTitleMediator():BaseVTitleMediator{ + return facade.retrieveMediator( BaseVTitleMediator.name ) as BaseVTitleMediator; } - private function get pSubtitleMediator():SubtitleMediator{ - return facade.retrieveMediator( SubtitleMediator.name ) as SubtitleMediator; + private function get pSubtitleMediator():BaseSubtitleMediator{ + return facade.retrieveMediator( BaseSubtitleMediator.name ) as BaseSubtitleMediator; } - private function get pTitleMediator():TitleMediator{ - return facade.retrieveMediator( TitleMediator.name ) as TitleMediator; + private function get pTitleMediator():BaseTitleMediator{ + return facade.retrieveMediator( BaseTitleMediator.name ) as BaseTitleMediator; } diff --git a/flash/source/chart/DDount/0.1/src/org/xas/jchart/ddount/controller/ClearCmd.as b/flash/source/chart/DDount/0.1/src/org/xas/jchart/ddount/controller/ClearCmd.as index 6067fc0..c78c077 100644 --- a/flash/source/chart/DDount/0.1/src/org/xas/jchart/ddount/controller/ClearCmd.as +++ b/flash/source/chart/DDount/0.1/src/org/xas/jchart/ddount/controller/ClearCmd.as @@ -21,10 +21,10 @@ package org.xas.jchart.ddount.controller //Log.log( 'ClearCmd' ); facade.hasMediator( BgMediator.name ) && facade.removeMediator( BgMediator.name ); - facade.hasMediator( TitleMediator.name ) && facade.removeMediator( TitleMediator.name ); - facade.hasMediator( SubtitleMediator.name ) && facade.removeMediator( SubtitleMediator.name ); - facade.hasMediator( VTitleMediator.name ) && facade.removeMediator( VTitleMediator.name ); - facade.hasMediator( CreditMediator.name ) && facade.removeMediator( CreditMediator.name ); + facade.hasMediator( BaseTitleMediator.name ) && facade.removeMediator( BaseTitleMediator.name ); + facade.hasMediator( BaseSubtitleMediator.name ) && facade.removeMediator( BaseSubtitleMediator.name ); + facade.hasMediator( BaseVTitleMediator.name ) && facade.removeMediator( BaseVTitleMediator.name ); + facade.hasMediator( BaseCreditMediator.name ) && facade.removeMediator( BaseCreditMediator.name ); facade.hasMediator( VLabelMediator.name ) && facade.removeMediator( VLabelMediator.name ); facade.hasMediator( HLabelMediator.name ) && facade.removeMediator( HLabelMediator.name ); facade.hasMediator( GraphicMediator.name ) && facade.removeMediator( GraphicMediator.name ); @@ -33,8 +33,8 @@ package org.xas.jchart.ddount.controller facade.hasMediator( BgLineMediator.name ) && facade.removeMediator( BgLineMediator.name ); facade.hasMediator( LegendMediator.name ) && facade.removeMediator( LegendMediator.name ); facade.hasMediator( TipsMediator.name ) && facade.removeMediator( TipsMediator.name ); - facade.hasMediator( TestMediator.name ) && facade.removeMediator( TestMediator.name ); - facade.hasMediator( PieLabelMediator.name ) && facade.removeMediator( PieLabelMediator.name ); + facade.hasMediator( BaseTestMediator.name ) && facade.removeMediator( BaseTestMediator.name ); + facade.hasMediator( BasePieLabelMediator.name ) && facade.removeMediator( BasePieLabelMediator.name ); } } } \ No newline at end of file diff --git a/flash/source/chart/Dount/0.1/.actionScriptProperties b/flash/source/chart/Dount/0.1/.actionScriptProperties index 332e0d6..40bdb7d 100644 --- a/flash/source/chart/Dount/0.1/.actionScriptProperties +++ b/flash/source/chart/Dount/0.1/.actionScriptProperties @@ -37,6 +37,3 @@ - - - diff --git a/flash/source/chart/Dount/0.1/.project b/flash/source/chart/Dount/0.1/.project index f8a04b8..6699b45 100644 --- a/flash/source/chart/Dount/0.1/.project +++ b/flash/source/chart/Dount/0.1/.project @@ -1,7 +1,7 @@ - + - Dount - + 0.1 + @@ -22,3 +22,4 @@ + diff --git a/flash/source/chart/Dount/0.1/src/Config.as b/flash/source/chart/Dount/0.1/src/Config.as index bf2a553..d5e8d45 100644 --- a/flash/source/chart/Dount/0.1/src/Config.as +++ b/flash/source/chart/Dount/0.1/src/Config.as @@ -3,136 +3,17 @@ package import org.xas.core.utils.Log; import org.xas.jchart.common.BaseConfig; import org.xas.jchart.common.Common; + import org.xas.jchart.common.config.BasePieConfig; - public class Config extends BaseConfig + public class Config extends BasePieConfig { public function Config() { super(); - } + } - private var _pseries:Array = []; - - override public function setChartData(_d:Object):Object{ - super.setChartData( _d ); - - _pseries = []; - - if( this.cd.series && this.cd.series.length ){ - Common.each( this.cd.series[0].data, function( _k:int, _item: * ):void{ - var _o:Object, _a:Array = _item as Array; - if( !_a ){ - _o = _item as Object; - }else{ - _o = { 'name': _a[0], 'y': _a[1] }; - } - _pseries.push( _o ); - }); - //Log.printJSON( _pseries ); - } - - return this.chartData; - } - - override public function get series():Array{ - - return _pseries; - } - - override public function updateDisplaySeries( _filter:Object = null, _data:Object = null ):BaseConfig{ - _data = _data || chartData; - if( !( _data && _data.series && _data.series.length ) ) return this; - var _tmpSeries:Array = JSON.parse( JSON.stringify( _data.series ) ) as Array - ; - - _displaySeries = [] - //Log.printJSON( _tmpSeries[0].data ); - - Common.each( _tmpSeries[0].data, function( _k:int, _item: * ):void{ - var _o:Object, _a:Array = _item as Array; - if( !_a ){ - _o = _item as Object; - }else{ - _o = { 'name': _a[0], 'y': _a[1] }; - } - _displaySeries.push( _o ); - }); - - _displaySeriesIndexMap = null; - - - if( _filter ){ - var _tmp:Array = [], _count:int = 0; - _displaySeriesIndexMap = {}; - Common.each( _displaySeries, function( _k:int, _item:Object ):void{ - if( !(_k in _filter) ){ - _tmp.push( _item ); - _displaySeriesIndexMap[ _count++ ] = _k; - } - }); - _displaySeries = _tmp; - } - - _filterData = _filter || {}; - - //Log.printJSON( _displaySeries ); - - return this; - } - - override public function get totalNum():Number{ - var _r:Number = 0; - - if( this.isPercent ){ - _r = 100; - }else{ - Common.each( _displaySeries, function( _k:int, _item:Object ):void{ - _r += _item.y; - }); - } - - return _r; - } - - override public function get itemName():String{ - var _r:String = ''; - cd && cd.series && cd.series.length && ( _r = cd.series[0].name || '' ); - return _r; - } - - override public function get floatLen():int{ - - if( _isFloatLenReady ){ - return _floatLen; - } - _isFloatLenReady = true; - - if( cd && ( 'floatLen' in cd ) ){ - _floatLen = cd.floatLen; - }else{ - _floatLen = 0; - var _tmpLen:int = 0; - Common.each( series, function( _k:int, _item:Object ):void{ - _tmpLen = Common.floatLen( _item.y ); - _tmpLen > _floatLen && ( _floatLen = _tmpLen ); - }); - } - _floatLen == 1 && ( _floatLen = 2 ); - - return _floatLen; - } - - - public function get radiusInnerRate():Number{ - var _r:Number = .6; - radiusData.innerRate && ( _r = radiusData.innerRate ); - return _r; - } - - public function get radiusData():Object{ - var _r:Object = {}; - cd && cd.radius && ( _r = cd.radius ); - return _r; - } + override public function get chartName():String{ return 'Dount'; } + override public function get chartUrl():String{ return 'http://fchart.openjavascript.org/modules/JC.FChart/0.1/_demo/dount/'; } + } } \ No newline at end of file diff --git a/flash/source/chart/Dount/0.1/src/Dount.as b/flash/source/chart/Dount/0.1/src/Dount.as index b088645..01faba2 100644 --- a/flash/source/chart/Dount/0.1/src/Dount.as +++ b/flash/source/chart/Dount/0.1/src/Dount.as @@ -22,14 +22,14 @@ package import org.xas.jchart.dount.MainFacade; - [SWF(frameRate="30", width="800", height="500")] + [SWF(frameRate="30", width="600", height="500")] public class Dount extends Sprite { private var _inited: Boolean = false; private var _timer:Timer; private var _data:Object; private var _facade:Facade; - private var _resizeTimer:Timer; + private var _resizeTimer:Timer; private var _ins:Dount; private var _loaderInfo:Object; @@ -64,7 +64,9 @@ package runData(); if( ExternalInterface.available ){ + try{ ExternalInterface.addCallback( 'update', extenalUpdate ); + }catch( ex:Error ){} } //BaseConfig.ins.setChartData( {}); } @@ -148,8 +150,10 @@ package var _data:Object = {}; - if( !ExternalInterface.available ){ + if( !ExternalInterface.available ){ + if( ! DefaultPieData.instance.data.length ) return; _data = DefaultPieData.instance.data[0]; + return; }else{ _loaderInfo = LoaderInfo(this.root.stage.loaderInfo).parameters||{}; if( _loaderInfo.chart ){ diff --git a/flash/source/chart/Dount/0.1/src/org/xas/jchart/dount/controller/CalcCoordinateCmd.as b/flash/source/chart/Dount/0.1/src/org/xas/jchart/dount/controller/CalcCoordinateCmd.as index 3a5bdd9..2ae0edb 100644 --- a/flash/source/chart/Dount/0.1/src/org/xas/jchart/dount/controller/CalcCoordinateCmd.as +++ b/flash/source/chart/Dount/0.1/src/org/xas/jchart/dount/controller/CalcCoordinateCmd.as @@ -12,16 +12,33 @@ package org.xas.jchart.dount.controller import org.xas.jchart.common.data.Coordinate; import org.xas.jchart.common.data.test.DefaultPieData; import org.xas.jchart.common.event.JChartEvent; + import org.xas.jchart.common.proxy.LegendProxy; import org.xas.jchart.common.view.mediator.*; + import org.xas.jchart.common.view.mediator.BgMediator.BaseBgMediator; + import org.xas.jchart.common.view.mediator.BgMediator.DountBgMediator; + import org.xas.jchart.common.view.mediator.CreditMediator.BaseCreditMediator; + import org.xas.jchart.common.view.mediator.GraphicBgMediator.DountGraphicBgMediator; + import org.xas.jchart.common.view.mediator.LegendMediator.BaseLegendMediator; + import org.xas.jchart.common.view.mediator.PieLabelMediator.BasePieLabelMediator; + import org.xas.jchart.common.view.mediator.PieTotalLabelMediator.BasePieTotalLabelMediator; + import org.xas.jchart.common.view.mediator.SubtitleMediator.BaseSubtitleMediator; + import org.xas.jchart.common.view.mediator.TestMediator.BaseTestMediator; + import org.xas.jchart.common.view.mediator.TipsMediator.DountTipsMediator; + import org.xas.jchart.common.view.mediator.TitleMediator.BaseTitleMediator; + import org.xas.jchart.common.view.mediator.VTitleMediator.BaseVTitleMediator; import org.xas.jchart.dount.view.mediator.*; public class CalcCoordinateCmd extends SimpleCommand implements ICommand - { + { private var _c:Coordinate; + private var _config:Config; + private var _maxLabelWidth:Number = 0; + private var _maxLabelHeight:Number = 0; public function CalcCoordinateCmd() { super(); + _config = BaseConfig.ins as Config; } override public function execute(notification:INotification):void{ @@ -30,77 +47,88 @@ package org.xas.jchart.dount.controller _c.corner = corner(); - _c.minX = _c.x; - _c.minY = _c.y + 5; - _c.maxX = _c.x + _c.width - 5; - _c.maxY = _c.y + _c.height - 5; + _c.minX = _config.vlabelSpace; + _c.minY = _config.vspace; + _c.maxX = _config.stageWidth - _config.vlabelSpace; + _c.maxY = _config.stageHeight - _config.vspace; - facade.registerMediator( new BgMediator( ) ) + facade.registerMediator( new BaseBgMediator( ) ) //Log.log( BaseConfig.ins.rate.length ); //Log.log( BaseConfig.ins.maxNum, BaseConfig.ins.finalMaxNum, BaseConfig.ins.chartMaxNum, 11111 ); - if( BaseConfig.ins.cd ){ + if( _config.cd ){ - if( BaseConfig.ins.cd.title && BaseConfig.ins.cd.title.text ){ - facade.registerMediator( new TitleMediator( BaseConfig.ins.cd.title.text ) ) - BaseConfig.ins.c.title = { x: _c.width / 2, y: _c.minY, item: pTitleMediator }; - BaseConfig.ins.c.minY += pTitleMediator.view.height; + if( _config.titleEnable ){ + facade.registerMediator( new BaseTitleMediator( _config.titleText ) ) + _config.c.title = { x: _c.width / 2, y: _c.minY, item: pTitleMediator }; + _config.c.minY += pTitleMediator.view.height; } - if( BaseConfig.ins.cd.subtitle && BaseConfig.ins.cd.subtitle.text ){ - facade.registerMediator( new SubtitleMediator( BaseConfig.ins.cd.subtitle.text ) ) + if( _config.subtitleEnable ){ + facade.registerMediator( new BaseSubtitleMediator( _config.subtitleText ) ) - BaseConfig.ins.c.subtitle = { x: _c.width / 2, y: _c.minY, item: pSubtitleMediator }; - BaseConfig.ins.c.minY += pSubtitleMediator.view.height + 5; - } + _config.c.subtitle = { x: _c.width / 2, y: _c.minY, item: pSubtitleMediator }; + _config.c.minY += pSubtitleMediator.view.height + _config.vspace; + } - if( BaseConfig.ins.cd.yAxis && BaseConfig.ins.cd.yAxis.title && BaseConfig.ins.cd.yAxis.title.text ){ - facade.registerMediator( new VTitleMediator( BaseConfig.ins.cd.yAxis.title.text ) ) + if( _config.legendEnabled ){ + + facade.registerProxy( new LegendProxy() ); + facade.registerMediator( new BaseLegendMediator() ); - BaseConfig.ins.c.vtitle = { x: BaseConfig.ins.c.minX, y: BaseConfig.ins.c.x + BaseConfig.ins.c.height / 2, item: pVTitleMediator }; - BaseConfig.ins.c.minX += pVTitleMediator.view.width - 5; + pLegendProxy.dataModel.calLegendPosition( pLegendMediator.view ); } - if( BaseConfig.ins.cd.credits && BaseConfig.ins.cd.credits.enabled && ( BaseConfig.ins.cd.credits.text || BaseConfig.ins.cd.credits.href ) ){ - facade.registerMediator( new CreditMediator( BaseConfig.ins.cd.credits.text, BaseConfig.ins.cd.credits.href ) ) + if( _config.vtitleEnabled ){ + facade.registerMediator( new BaseVTitleMediator( _config.vtitleText ) ) - BaseConfig.ins.c.credits = { x: BaseConfig.ins.c.maxX, y: BaseConfig.ins.c.maxY, item: pCreditMediator }; - BaseConfig.ins.c.maxY -= pCreditMediator.view.height; - } - - if( BaseConfig.ins.legendEnabled ){ - facade.registerMediator( new LegendMediator() ); - BaseConfig.ins.c.maxY -= pLegendMediator.view.height; - BaseConfig.ins.c.legend = { - x: BaseConfig.ins.width / 2 - pLegendMediator.view.width / 2 - , y: BaseConfig.ins.c.maxY - }; - BaseConfig.ins.c.maxY -= 2; + _config.c.vtitle = { x: _config.c.minX, y: _config.c.x + _config.c.height / 2, item: pVTitleMediator }; + _config.c.minX += pVTitleMediator.view.width - _config.vspace; } - BaseConfig.ins.c.maxX -= 5; + if( _config.cd.credits && _config.cd.credits.enabled && ( _config.cd.credits.text || _config.cd.credits.href ) ){ + facade.registerMediator( new BaseCreditMediator( _config.cd.credits.text, _config.cd.credits.href ) ) + + _config.c.credits = { x: _config.c.maxX, y: _config.c.maxY, item: pCreditMediator }; + _config.c.maxY -= pCreditMediator.view.height; + } - BaseConfig.ins.c.arrowLength = 0; - BaseConfig.ins.c.chartWidth = BaseConfig.ins.c.maxX - BaseConfig.ins.c.minX - 5; - BaseConfig.ins.c.chartHeight = BaseConfig.ins.c.maxY - BaseConfig.ins.c.minY; +// _config.c.maxX -= 5; - BaseConfig.ins.c.chartX = BaseConfig.ins.c.minX + BaseConfig.ins.c.arrowLength + 6.5; - BaseConfig.ins.c.chartY = BaseConfig.ins.c.minY; + _config.c.arrowLength = 0; + _config.c.chartWidth = _config.c.maxX - _config.c.minX; + _config.c.chartHeight = _config.c.maxY - _config.c.minY; - BaseConfig.ins.c.chartMaxX = BaseConfig.ins.c.chartX + BaseConfig.ins.c.chartWidth; - BaseConfig.ins.c.chartMaxY = BaseConfig.ins.c.chartY + BaseConfig.ins.c.chartHeight; + _config.c.chartX = _config.c.minX; + _config.c.chartY = _config.c.minY; - facade.registerMediator( new GraphicBgMediator() ); - facade.registerMediator( new TipsMediator() ); - - calcGraphic(); + _config.c.chartMaxX = _config.c.chartX + _config.c.chartWidth; + _config.c.chartMaxY = _config.c.chartY + _config.c.chartHeight; + + facade.registerMediator( new DountGraphicBgMediator() ); + facade.registerMediator( new DountTipsMediator() ); + + if( _config.dataLabelEnabled ){ + facade.registerMediator( new BasePieLabelMediator() ); + _maxLabelWidth = pPieLabelMediator.maxWidth; + _maxLabelHeight = pPieLabelMediator.maxHeight; + } + + + facade.registerMediator( new GraphicMediator() ); + + calcGraphic(); + if( _config.totalLabelEnabled ){ + facade.registerMediator( new BasePieTotalLabelMediator() ); + } + if( !ExternalInterface.available ){ - facade.registerMediator( new TestMediator( DefaultPieData.instance.data ) ); + facade.registerMediator( new BaseTestMediator( DefaultPieData.instance.data ) ); } - //Log.log( BaseConfig.ins.c.chartWidth, BaseConfig.ins.c.chartHeight ); + //Log.log( _config.c.chartWidth, _config.c.chartHeight ); } sendNotification( JChartEvent.SHOW_CHART ); @@ -108,34 +136,34 @@ package org.xas.jchart.dount.controller private function calcGraphic():void{ - facade.registerMediator( new PieLabelMediator() ); - facade.registerMediator( new GraphicMediator() ); + _config.c.cx = _config.c.chartX + _config.c.chartWidth / 2; + _config.c.cy = _config.c.chartY + _config.c.chartHeight / 2; + + _config.c.lineLength = _config.dataLabelLineLength; + _config.c.lineStart = _config.dataLabelLineStart; - BaseConfig.ins.c.cx = BaseConfig.ins.c.chartX + BaseConfig.ins.c.chartWidth / 2; - BaseConfig.ins.c.cy = BaseConfig.ins.c.chartY + BaseConfig.ins.c.chartHeight / 2; - BaseConfig.ins.c.lineLength = 40; - BaseConfig.ins.c.lineStart = 10; - BaseConfig.ins.c.radius = calcRadius( BaseConfig.ins.c.chartWidth, BaseConfig.ins.c.chartHeight ); + _config.c.radius = calcRadius( _config.c.chartWidth, _config.c.chartHeight ); - BaseConfig.ins.c.piePart = []; - BaseConfig.ins.c.pieLine = []; + _config.c.piePart = []; + _config.c.pieLine = []; - if( !( BaseConfig.ins.series && BaseConfig.ins.series.length ) ) return; + if( !( _config.series && _config.series.length ) ) return; var _angle:Number = 360 , _angleCount:Number = 0 - , _offsetAngle:Number = BaseConfig.ins.offsetAngle - , _totalNum:Number = BaseConfig.ins.totalNum + , _offsetAngle:Number = _config.offsetAngle + , _totalNum:Number = _config.totalNum , _tmpPoint:Point - , _cpoint:Point = new Point( BaseConfig.ins.c.cx, BaseConfig.ins.c.cy ) + , _cpoint:Point = new Point( _config.c.cx, _config.c.cy ) ; +// Log.log( _offsetAngle ); - Common.each( BaseConfig.ins.displaySeries, function( _k:int, _item:Object ):void { + Common.each( _config.displaySeries, function( _k:int, _item:Object ):void { if( _item.y === 0 ) return; var _pieP:Object = { - cx: BaseConfig.ins.c.cx - , cy: BaseConfig.ins.c.cy - , radius: BaseConfig.ins.c.radius + cx: _config.c.cx + , cy: _config.c.cy + , radius: _config.c.radius , offsetAngle: _offsetAngle , totalNum: _totalNum , data: _item @@ -165,11 +193,11 @@ package org.xas.jchart.dount.controller _pieP.startPoint = { x: _spoint.x + _pieP.cx, y: _spoint.y + _pieP.cy }; _pieP.endPoint = { x: _epoint.x + _pieP.cx, y: _epoint.y + _pieP.cy }; - _spoint = Common.distanceAngleToPoint( _pieP.radius - BaseConfig.ins.c.lineStart, _pieP.midAngle ); - _epoint = Common.distanceAngleToPoint( _pieP.radius + BaseConfig.ins.c.lineLength, _pieP.midAngle ); + _spoint = Common.distanceAngleToPoint( _pieP.radius - _config.c.lineStart, _pieP.midAngle ); + _epoint = Common.distanceAngleToPoint( _pieP.radius + _config.c.lineLength, _pieP.midAngle ); - _pieL.cx = BaseConfig.ins.c.cx; - _pieL.cy = BaseConfig.ins.c.cy; + _pieL.cx = _config.c.cx; + _pieL.cy = _config.c.cy; _pieL.start = { x: _spoint.x + _pieL.cx, y: _spoint.y + _pieL.cy }; _pieL.end = { x: _epoint.x + _pieL.cx, y: _epoint.y + _pieL.cy }; _pieL.ex = { x: _expoint.x + _pieL.cx, y: _expoint.y + _pieL.cy }; @@ -190,26 +218,26 @@ package org.xas.jchart.dount.controller }else{ //left top if( _pieL.end.x < _pieL.cx && _pieL.end.y < _pieL.cy ){ - _controlY -= 5; - _controlX += 5; + _controlY -= _config.dataLabelLineControlYOffset; + _controlX += _config.dataLabelLineControlXOffset; _pieL.direction = "left_top"; } //right top if( _pieL.end.x > _pieL.cx && _pieL.end.y < _pieL.cy ){ - _controlY -= 5; - _controlX -= 5; + _controlY -= _config.dataLabelLineControlYOffset; + _controlX -= _config.dataLabelLineControlXOffset; _pieL.direction = "right_top"; } //left bottom if( _pieL.end.x < _pieL.cx && _pieL.end.y > _pieL.cy ){ - _controlY += 5; - _controlX += 5; + _controlY += _config.dataLabelLineControlYOffset; + _controlX += _config.dataLabelLineControlXOffset; _pieL.direction = "left_bottom"; } //right bottom if( _pieL.end.x > _pieL.cx && _pieL.end.y > _pieL.cy ){ - _controlY += 5; - _controlX -= 5; + _controlY += _config.dataLabelLineControlYOffset; + _controlX -= _config.dataLabelLineControlXOffset; _pieL.direction = "right_bottom"; } } @@ -223,54 +251,76 @@ package org.xas.jchart.dount.controller ); */ - BaseConfig.ins.c.piePart.push( _pieP ); - BaseConfig.ins.c.pieLine.push( _pieL ); + _config.c.piePart.push( _pieP ); + _config.c.pieLine.push( _pieL ); }); } private function calcRadius( _w:Number, _h:Number ):Number{ var _radius:Number = Math.min( _w, _h ); - if( BaseConfig.ins.legendEnabled ){ - _radius -= 30; + + if( _config.legendEnabled ){ +// _radius += pLegendMediator.maxHeight; } - if( BaseConfig.ins.dataLabelEnabled ){ - _radius -= ( BaseConfig.ins.c.lineLength - BaseConfig.ins.c.lineStart + 40 ) * 2; + _radius /= 2; + + // Log.log( '_maxLabelWidth:', _maxLabelWidth ); + + if( _config.dataLabelEnabled ){ + _radius -= (_config.dataLabelLineLength - _config.dataLabelLineStart ); + if( + _w > _h && !_config.legendIntersect( _radius - _maxLabelHeight + , _maxLabelWidth + , _config.dataLabelLineLength - _config.dataLabelLineStart + ) + ){ + _radius = _radius - _maxLabelHeight; + }else{ + _radius = _radius - _maxLabelWidth; + } }else{ - _radius -= 40; + _radius -= _config.moveDistance; } - - _radius /= 2; + // Log.log( _config.c.chartWidth,_config.c.chartHeight, _radius ); return _radius; } + - private function get pLegendMediator():LegendMediator{ - return facade.retrieveMediator( LegendMediator.name ) as LegendMediator; + private function get pLegendMediator():BaseLegendMediator{ + return facade.retrieveMediator( BaseLegendMediator.name ) as BaseLegendMediator; } - - private function get pCreditMediator():CreditMediator{ - return facade.retrieveMediator( CreditMediator.name ) as CreditMediator; + + private function get pPieLabelMediator():BasePieLabelMediator{ + return facade.retrieveMediator( BasePieLabelMediator.name ) as BasePieLabelMediator; } - private function get pVTitleMediator():VTitleMediator{ - return facade.retrieveMediator( VTitleMediator.name ) as VTitleMediator; + private function get pCreditMediator():BaseCreditMediator{ + return facade.retrieveMediator( BaseCreditMediator.name ) as BaseCreditMediator; } - private function get pSubtitleMediator():SubtitleMediator{ - return facade.retrieveMediator( SubtitleMediator.name ) as SubtitleMediator; + private function get pVTitleMediator():BaseVTitleMediator{ + return facade.retrieveMediator( BaseVTitleMediator.name ) as BaseVTitleMediator; } - private function get pTitleMediator():TitleMediator{ - return facade.retrieveMediator( TitleMediator.name ) as TitleMediator; + private function get pSubtitleMediator():BaseSubtitleMediator{ + return facade.retrieveMediator( BaseSubtitleMediator.name ) as BaseSubtitleMediator; } + private function get pTitleMediator():BaseTitleMediator{ + return facade.retrieveMediator( BaseTitleMediator.name ) as BaseTitleMediator; + } private function get mainMediator():MainMediator{ return facade.retrieveMediator( MainMediator.name ) as MainMediator; } + private function get pLegendProxy():LegendProxy{ + return facade.retrieveProxy( LegendProxy.name ) as LegendProxy; + } + private function corner():uint{ return 20; } diff --git a/flash/source/chart/Dount/0.1/src/org/xas/jchart/dount/controller/ClearCmd.as b/flash/source/chart/Dount/0.1/src/org/xas/jchart/dount/controller/ClearCmd.as index 4890ba6..8d40f1f 100644 --- a/flash/source/chart/Dount/0.1/src/org/xas/jchart/dount/controller/ClearCmd.as +++ b/flash/source/chart/Dount/0.1/src/org/xas/jchart/dount/controller/ClearCmd.as @@ -7,6 +7,20 @@ package org.xas.jchart.dount.controller import org.xas.jchart.common.BaseConfig; import org.xas.jchart.common.event.JChartEvent; import org.xas.jchart.common.view.mediator.*; + import org.xas.jchart.common.view.mediator.BgLineMediator.BaseBgLineMediator; + import org.xas.jchart.common.view.mediator.BgMediator.BaseBgMediator; + import org.xas.jchart.common.view.mediator.CreditMediator.BaseCreditMediator; + import org.xas.jchart.common.view.mediator.GraphicBgMediator.BaseGraphicBgMediator; + import org.xas.jchart.common.view.mediator.HLabelMediator.BaseHLabelMediator; + import org.xas.jchart.common.view.mediator.LegendMediator.BaseLegendMediator; + import org.xas.jchart.common.view.mediator.PieLabelMediator.BasePieLabelMediator; + import org.xas.jchart.common.view.mediator.PieTotalLabelMediator.BasePieTotalLabelMediator; + import org.xas.jchart.common.view.mediator.SubtitleMediator.BaseSubtitleMediator; + import org.xas.jchart.common.view.mediator.TestMediator.BaseTestMediator; + import org.xas.jchart.common.view.mediator.TipsMediator.BaseTipsMediator; + import org.xas.jchart.common.view.mediator.TitleMediator.BaseTitleMediator; + import org.xas.jchart.common.view.mediator.VLabelMediator.BaseVLabelMediator; + import org.xas.jchart.common.view.mediator.VTitleMediator.BaseVTitleMediator; import org.xas.jchart.dount.view.mediator.*; public class ClearCmd extends SimpleCommand implements ICommand @@ -20,21 +34,24 @@ package org.xas.jchart.dount.controller //Log.log( 'ClearCmd' ); - facade.hasMediator( BgMediator.name ) && facade.removeMediator( BgMediator.name ); - facade.hasMediator( TitleMediator.name ) && facade.removeMediator( TitleMediator.name ); - facade.hasMediator( SubtitleMediator.name ) && facade.removeMediator( SubtitleMediator.name ); - facade.hasMediator( VTitleMediator.name ) && facade.removeMediator( VTitleMediator.name ); - facade.hasMediator( CreditMediator.name ) && facade.removeMediator( CreditMediator.name ); - facade.hasMediator( VLabelMediator.name ) && facade.removeMediator( VLabelMediator.name ); - facade.hasMediator( HLabelMediator.name ) && facade.removeMediator( HLabelMediator.name ); + facade.hasMediator( BaseBgMediator.name ) && facade.removeMediator( BaseBgMediator.name ); + facade.hasMediator( BaseBgLineMediator.name ) && facade.removeMediator( BaseBgLineMediator.name ); + facade.hasMediator( BaseLegendMediator.name ) && facade.removeMediator( BaseLegendMediator.name ); + facade.hasMediator( BaseTipsMediator.name ) && facade.removeMediator( BaseTipsMediator.name ); + facade.hasMediator( BaseHLabelMediator.name ) && facade.removeMediator( BaseHLabelMediator.name ); + facade.hasMediator( BaseGraphicBgMediator.name ) && facade.removeMediator( BaseGraphicBgMediator.name ); + facade.hasMediator( BaseVLabelMediator.name ) && facade.removeMediator( BaseVLabelMediator.name ); + + facade.hasMediator( BaseTitleMediator.name ) && facade.removeMediator( BaseTitleMediator.name ); + facade.hasMediator( BaseSubtitleMediator.name ) && facade.removeMediator( BaseSubtitleMediator.name ); + facade.hasMediator( BaseVTitleMediator.name ) && facade.removeMediator( BaseVTitleMediator.name ); + facade.hasMediator( BaseCreditMediator.name ) && facade.removeMediator( BaseCreditMediator.name );; + facade.hasMediator( BaseTestMediator.name ) && facade.removeMediator( BaseTestMediator.name ); + facade.hasMediator( BasePieLabelMediator.name ) && facade.removeMediator( BasePieLabelMediator.name ); + facade.hasMediator( BasePieTotalLabelMediator.name ) && facade.removeMediator( BasePieTotalLabelMediator.name ); + facade.hasMediator( GraphicMediator.name ) && facade.removeMediator( GraphicMediator.name ); - facade.hasMediator( GraphicBgMediator.name ) && facade.removeMediator( GraphicBgMediator.name ); - facade.hasMediator( MainMediator.name ) && facade.removeMediator( MainMediator.name ); - facade.hasMediator( BgLineMediator.name ) && facade.removeMediator( BgLineMediator.name ); - facade.hasMediator( LegendMediator.name ) && facade.removeMediator( LegendMediator.name ); - facade.hasMediator( TipsMediator.name ) && facade.removeMediator( TipsMediator.name ); - facade.hasMediator( TestMediator.name ) && facade.removeMediator( TestMediator.name ); - facade.hasMediator( PieLabelMediator.name ) && facade.removeMediator( PieLabelMediator.name ); + facade.hasMediator( MainMediator.name ) && facade.removeMediator( MainMediator.name ) } } } \ No newline at end of file diff --git a/flash/source/chart/Dount/0.1/src/org/xas/jchart/dount/controller/FilterDataCmd.as b/flash/source/chart/Dount/0.1/src/org/xas/jchart/dount/controller/FilterDataCmd.as index d01e607..320c1bb 100644 --- a/flash/source/chart/Dount/0.1/src/org/xas/jchart/dount/controller/FilterDataCmd.as +++ b/flash/source/chart/Dount/0.1/src/org/xas/jchart/dount/controller/FilterDataCmd.as @@ -6,11 +6,6 @@ package org.xas.jchart.dount.controller import org.xas.core.utils.Log; import org.xas.jchart.common.BaseConfig; import org.xas.jchart.common.event.JChartEvent; - import org.xas.jchart.common.view.mediator.BgLineMediator; - import org.xas.jchart.common.view.mediator.GraphicBgMediator; - import org.xas.jchart.common.view.mediator.HLabelMediator; - import org.xas.jchart.common.view.mediator.TipsMediator; - import org.xas.jchart.common.view.mediator.VLabelMediator; import org.xas.jchart.dount.view.mediator.GraphicMediator; public class FilterDataCmd extends SimpleCommand implements ICommand diff --git a/flash/source/chart/Dount/0.1/src/org/xas/jchart/dount/view/components/GraphicView.as b/flash/source/chart/Dount/0.1/src/org/xas/jchart/dount/view/components/GraphicView.as index 67da9a5..4f75de9 100644 --- a/flash/source/chart/Dount/0.1/src/org/xas/jchart/dount/view/components/GraphicView.as +++ b/flash/source/chart/Dount/0.1/src/org/xas/jchart/dount/view/components/GraphicView.as @@ -22,7 +22,7 @@ package org.xas.jchart.dount.view.components public class GraphicView extends Sprite { - private var _boxs:Vector.; + private var _boxs:Vector.; private var _preIndex:int = -1; private var _piePart:Vector.; @@ -31,7 +31,10 @@ package org.xas.jchart.dount.view.components private var _config:Config; private var _currentPart:DountPart; + private var _selectedIndex:int = -1; + private var _ready:Boolean; + public function GraphicView() { _config = BaseConfig.ins as Config; @@ -41,20 +44,11 @@ package org.xas.jchart.dount.view.components _hideTimer = new Timer( 200, 1 ); _hideTimer.addEventListener( TimerEvent.TIMER, onTimerHideDone ); - //_hideTimer.start(); - - /* - addEventListener( JChartEvent.SHOW_TIPS, showTips ); - addEventListener( JChartEvent.UPDATE_TIPS, updateTips ); - addEventListener( JChartEvent.HIDE_TIPS, hideTips ); - */ - + } private function addToStage( _evt:Event ):void{ - - //addChild( new DountPart( new Point( 200, 200 ), 0, 100 ) ); - //addChild( new DountPart( new Point( 200, 200 ), 0, 360, 100 ) ); + addEventListener( JChartEvent.SELECTED, onSelected ); } public function update():void{ @@ -64,45 +58,95 @@ package org.xas.jchart.dount.view.components graphics.clear(); _piePart = new Vector.(); + + if( !_config.dataInited ){ + Common.each( _config.displaySeries, function( _k:int, _item:Object ):void{ + if( _item.selected ){ + _selectedIndex = _k; + // _item.selected = false; + } + }); + } + + // Log.log( 'GraphicView: _config.selected = ', _config.selected ); + + if( _config.selected >= 0 ){ + Common.each( _config.displaySeries, function( _k:int, _item:Object ):void{ + if( _config.selected === _config.displaySeriesIndexMap[ _k ] ){ + _selectedIndex = _k; + } + }); + // Log.log( _selectedIndex, _config.selected ); + } + +// Log.log( _config.angleBeginMargin ) Common.each( _config.c.piePart, function( _k:int, _item:Object ):void{ if( _item.data.y === 0 ) return; + + var _preItem:DountPart; + _k && _piePart.length && ( _preItem = _piePart[ _piePart.length - 1 ] ); var _pp:DountPart = new DountPart( new Point( _item.cx, _item.cy ) - , _item.startAngle, _item.endAngle - , _item.radius, _item.radius * _config.radiusInnerRate + , _item.startAngle + _config.angleMargin, _item.endAngle - _config.angleMargin + , _config.outRadius, _config.inRadius , _k , { 'color': _config.itemColor( _k ) } , {} + , 0 + , { + 'seriesIndex': _config.displaySeriesIndexMap[ _k ] + , 'preItem': _preItem + , "moveDistance": _config.moveDistance + , 'innerRadiusEnabled': _config.innerRadiusEnabled + , 'innerRadiusThickness': _config.innerRadiusThickness + , 'innerRadiusMargin': _config.innerRadiusMargin + } ); - _pp.addEventListener( JChartEvent.UPDATE_STATUS, onDountPartUpdateStatus ); + _pp.addEventListener( JChartEvent.UPDATE_STATUS, onPiePartUpdateStatus ); _pp.addEventListener( MouseEvent.MOUSE_OVER, onMouseOver ); _pp.addEventListener( MouseEvent.MOUSE_OUT, onMouseOut ); _pp.addEventListener( MouseEvent.CLICK, onMouseClick ); + _pp.addEventListener( JChartEvent.READY, onItemReady ); + _pp.addEventListener( MouseEvent.MOUSE_MOVE, onMouseMove ); + addChild( _pp ); _piePart.push( _pp ); - //Log.log( _item.cx, _item.cy, _item.startAngle, _item.endAngle, _item.radius ); }); - - var _selectedIndex:int = -1; - Common.each( _config.displaySeries, function( _k:int, _item:Object ):void{ - if( _item.selected ){ - _selectedIndex = _k; - } - }); - - //Log.log( _selectedIndex ); - if( _config.selected >= 0 ){ - _selectedIndex = _config.selected; + + + } + + private function onItemReady( _evt:JChartEvent ):void{ + var _data:Object = _evt.data || {} + , _index:int = _data.index || 0 + ; +// Log.log( 'onItemReady:', _selectedIndex, _data.index ); + if( _data.index === ( _config.c.piePart.length - 1 ) ){ + + _ready = true; + dispatchEvent( new JChartEvent( JChartEvent.SELECTED, { index: _selectedIndex } ) ); + _config.facade.sendNotification( JChartEvent.READY ); } + } + + private function onSelected( _evt:JChartEvent ):void{ + if( !_config.selectableEnabled ) return; + if( !_ready ) return; + var _data:Object = _evt.data || {} + , _index:int = _data.index || 0 + ; + if( !_piePart.length ) return; - if( _selectedIndex >= 0 && _selectedIndex <= (_piePart.length - 1 ) && _piePart.length > 1 ){ - _piePart[ _selectedIndex ].selected( true ); + if( _index >= 0 && _index <= (_piePart.length - 1 ) && _piePart.length > 1 ){ + _piePart[ _index ].toggle(); + // Log.log( _index ); } } + protected function onMouseOver( _evt:MouseEvent ):void{ var _target:DountPart = _evt.currentTarget as DountPart; @@ -110,8 +154,8 @@ package org.xas.jchart.dount.view.components _currentPart = _target; _hideTimer.running && _hideTimer.stop(); - root.stage.removeEventListener( MouseEvent.MOUSE_MOVE, onMouseMove ); - root.stage.addEventListener( MouseEvent.MOUSE_MOVE, onMouseMove ); +// root.stage.removeEventListener( MouseEvent.MOUSE_MOVE, onMouseMove ); +// root.stage.addEventListener( MouseEvent.MOUSE_MOVE, onMouseMove ); dispatchEvent( new JChartEvent( JChartEvent.SHOW_TIPS, _evt ) ); //Log.log( 'show tips' ); @@ -119,7 +163,7 @@ package org.xas.jchart.dount.view.components protected function onMouseOut( _evt:MouseEvent ):void{ try{ - root.stage.removeEventListener( MouseEvent.MOUSE_MOVE, onMouseMove ); +// root.stage.removeEventListener( MouseEvent.MOUSE_MOVE, onMouseMove ); //dispatchEvent( new JChartEvent( JChartEvent.HIDE_TIPS, _evt ) ); _hideTimer.running && _hideTimer.stop(); _hideTimer.start(); @@ -137,7 +181,8 @@ package org.xas.jchart.dount.view.components protected function onMouseClick( _evt:MouseEvent ):void{ var _pp:DountPart = _evt.currentTarget as DountPart; if( !( _pp && _config.displaySeries.length >= 2 ) ) return; - _pp.toggle(); +// _pp.toggle(); + dispatchEvent( new JChartEvent( JChartEvent.SELECTED, { index: _pp.dataIndex } ) ); } @@ -150,28 +195,37 @@ package org.xas.jchart.dount.view.components dispatchEvent( new JChartEvent( JChartEvent.UPDATE_TIPS, { evt: _evt, index: _pp.dataIndex } ) ); } - private function onDountPartUpdateStatus( _evt:JChartEvent ):void{ - var _data:Object = _evt.data as Object; - + private function onPiePartUpdateStatus( _evt:JChartEvent ):void{ + if( !_ready ) return; + var _data:Object = _evt.data as Object + , _oindex:int = _config.displaySeriesIndexMap[ _data.index ] + ; if( _piePart.length === 1 ) { return; } - if( _config.selected >= 0 - && _config.selected <= ( _piePart.length - 1 ) - && _config.selected != _data.dataIndex - ){ - _piePart[ _config.selected ].unselected(); - } + if( _oindex > -1 && _oindex != _config.selected ){ + Common.each( _piePart, function( _k:int, _item:DountPart ):Boolean{ + var _r:Boolean = true, _tindex:int = _config.displaySeriesIndexMap[ _item.dataIndex ]; + if( _config.selected === _tindex ){ + _r = false; + _item.unselected(); + } + + return _r; + }); + } if( _data.selected ){ - _config.selected = _data.dataIndex; + _config.selected = _oindex; }else{ _config.selected = -1; } - //Log.log( _config.selected ); + // Log.log( 'onPiePartUpdateStatus: _config.selected = ', _config.selected ); + // Log.log( _config.selected, _data.selected ); } + private function showTips( _evt: JChartEvent ):void{ } @@ -184,7 +238,7 @@ package org.xas.jchart.dount.view.components }); } _preIndex = -1; - + } private function updateTips( _evt: JChartEvent ):void{ diff --git a/flash/source/chart/HStack/0.1/.actionScriptProperties b/flash/source/chart/HStack/0.1/.actionScriptProperties new file mode 100644 index 0000000..6a69468 --- /dev/null +++ b/flash/source/chart/HStack/0.1/.actionScriptProperties @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/flash/source/chart/HStack/0.1/.project b/flash/source/chart/HStack/0.1/.project new file mode 100644 index 0000000..56df646 --- /dev/null +++ b/flash/source/chart/HStack/0.1/.project @@ -0,0 +1,24 @@ + + + HStack + + + + + + com.adobe.flexbuilder.project.flexbuilder + + + + + + com.adobe.flexbuilder.project.actionscriptnature + + + + [source path] src + 2 + MY_WORKSPACE/lib/src + + + diff --git a/flash/source/chart/HStack/0.1/.settings/org.eclipse.core.resources.prefs b/flash/source/chart/HStack/0.1/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..f04f024 --- /dev/null +++ b/flash/source/chart/HStack/0.1/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +#Thu Jul 03 10:03:13 CST 2014 +eclipse.preferences.version=1 +encoding/=utf-8 diff --git a/flash/source/chart/HStack/0.1/_demo/demo.Histogram.double.line.html b/flash/source/chart/HStack/0.1/_demo/demo.Histogram.double.line.html new file mode 100644 index 0000000..a8640ad --- /dev/null +++ b/flash/source/chart/HStack/0.1/_demo/demo.Histogram.double.line.html @@ -0,0 +1,137 @@ + + + + +CRM - HStack.swf + + + + + +
            +
            CRM - HStack.swf
            +
            +
            +
            +
            + + + + + + + + + diff --git a/flash/source/chart/HStack/0.1/_demo/demo.Histogram.double.line.percent.html b/flash/source/chart/HStack/0.1/_demo/demo.Histogram.double.line.percent.html new file mode 100644 index 0000000..25e592e --- /dev/null +++ b/flash/source/chart/HStack/0.1/_demo/demo.Histogram.double.line.percent.html @@ -0,0 +1,119 @@ + + + + +CRM - HStack.swf + + + + + +
            +
            CRM - HStack.swf
            +
            +
            +
            +
            + + + + + + + + + diff --git a/flash/source/chart/HStack/0.1/_demo/demo.Histogram.html b/flash/source/chart/HStack/0.1/_demo/demo.Histogram.html new file mode 100644 index 0000000..a6f0197 --- /dev/null +++ b/flash/source/chart/HStack/0.1/_demo/demo.Histogram.html @@ -0,0 +1,104 @@ + + + + +CRM - HStack.swf + + + + + +
            +
            CRM - HStack.swf
            +
            +
            +
            +
            + + + + + + + + + diff --git a/flash/source/chart/HStack/0.1/_demo/demo.Histogram.itemBg.html b/flash/source/chart/HStack/0.1/_demo/demo.Histogram.itemBg.html new file mode 100644 index 0000000..18838f6 --- /dev/null +++ b/flash/source/chart/HStack/0.1/_demo/demo.Histogram.itemBg.html @@ -0,0 +1,127 @@ + + + + +CRM - HStack.swf + + + + + +
            +
            CRM - HStack.swf
            +
            +
            +
            +
            + + + + + + + + + diff --git a/flash/source/chart/HStack/0.1/_demo/demo.Histogram.no_rate.html b/flash/source/chart/HStack/0.1/_demo/demo.Histogram.no_rate.html new file mode 100644 index 0000000..83eacb3 --- /dev/null +++ b/flash/source/chart/HStack/0.1/_demo/demo.Histogram.no_rate.html @@ -0,0 +1,108 @@ + + + + +CRM - HStack.swf + + + + + +
            +
            CRM - HStack.swf
            +
            +
            +
            +
            + + + + + + + + + diff --git a/flash/source/chart/HStack/0.1/_demo/demo.Histogram.no_vline.html b/flash/source/chart/HStack/0.1/_demo/demo.Histogram.no_vline.html new file mode 100644 index 0000000..c65623a --- /dev/null +++ b/flash/source/chart/HStack/0.1/_demo/demo.Histogram.no_vline.html @@ -0,0 +1,113 @@ + + + + +CRM - HStack.swf + + + + + +
            +
            CRM - HStack.swf
            +
            +
            +
            +
            + + + + + + + + + diff --git a/flash/source/chart/HStack/0.1/_demo/demo.Histogram.no_vline_hline.html b/flash/source/chart/HStack/0.1/_demo/demo.Histogram.no_vline_hline.html new file mode 100644 index 0000000..517de86 --- /dev/null +++ b/flash/source/chart/HStack/0.1/_demo/demo.Histogram.no_vline_hline.html @@ -0,0 +1,100 @@ + + + + +CRM - HStack.swf + + + + + +
            +
            CRM - HStack.swf
            +
            +
            +
            +
            + + + + + + + + + diff --git a/flash/source/chart/HStack/0.1/_demo/index.php b/flash/source/chart/HStack/0.1/_demo/index.php new file mode 100644 index 0000000..01c8488 --- /dev/null +++ b/flash/source/chart/HStack/0.1/_demo/index.php @@ -0,0 +1,4 @@ + diff --git a/flash/source/chart/HStack/0.1/_demo/jq.js b/flash/source/chart/HStack/0.1/_demo/jq.js new file mode 100644 index 0000000..fd085fc --- /dev/null +++ b/flash/source/chart/HStack/0.1/_demo/jq.js @@ -0,0 +1,8 @@ +(function(a2,aG){var ai,w,aC=typeof aG,l=a2.document,aL=a2.location,bi=a2.jQuery,H=a2.$,aa={},a6=[],s="1.9.1",aI=a6.concat,ao=a6.push,a4=a6.slice,aM=a6.indexOf,z=aa.toString,V=aa.hasOwnProperty,aQ=s.trim,bJ=function(e,b3){return new bJ.fn.init(e,b3,w)},bA=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ac=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,br=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,a=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,bh=/^[\],:{}\s]*$/,bk=/(?:^|:|,)(?:\s*\[)+/g,bG=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,aZ=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,bS=/^-ms-/,aV=/-([\da-z])/gi,M=function(e,b3){return b3.toUpperCase()},bW=function(e){if(l.addEventListener||e.type==="load"||l.readyState==="complete"){bl();bJ.ready()}},bl=function(){if(l.addEventListener){l.removeEventListener("DOMContentLoaded",bW,false);a2.removeEventListener("load",bW,false)}else{l.detachEvent("onreadystatechange",bW);a2.detachEvent("onload",bW)}};bJ.fn=bJ.prototype={jquery:s,constructor:bJ,init:function(e,b5,b4){var b3,b6;if(!e){return this}if(typeof e==="string"){if(e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3){b3=[null,e,null]}else{b3=br.exec(e)}if(b3&&(b3[1]||!b5)){if(b3[1]){b5=b5 instanceof bJ?b5[0]:b5;bJ.merge(this,bJ.parseHTML(b3[1],b5&&b5.nodeType?b5.ownerDocument||b5:l,true));if(a.test(b3[1])&&bJ.isPlainObject(b5)){for(b3 in b5){if(bJ.isFunction(this[b3])){this[b3](b5[b3])}else{this.attr(b3,b5[b3])}}}return this}else{b6=l.getElementById(b3[2]);if(b6&&b6.parentNode){if(b6.id!==b3[2]){return b4.find(e)}this.length=1;this[0]=b6}this.context=l;this.selector=e;return this}}else{if(!b5||b5.jquery){return(b5||b4).find(e)}else{return this.constructor(b5).find(e)}}}else{if(e.nodeType){this.context=this[0]=e;this.length=1;return this}else{if(bJ.isFunction(e)){return b4.ready(e)}}}if(e.selector!==aG){this.selector=e.selector;this.context=e.context}return bJ.makeArray(e,this)},selector:"",length:0,size:function(){return this.length},toArray:function(){return a4.call(this)},get:function(e){return e==null?this.toArray():(e<0?this[this.length+e]:this[e])},pushStack:function(e){var b3=bJ.merge(this.constructor(),e);b3.prevObject=this;b3.context=this.context;return b3},each:function(b3,e){return bJ.each(this,b3,e)},ready:function(e){bJ.ready.promise().done(e);return this},slice:function(){return this.pushStack(a4.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(b4){var e=this.length,b3=+b4+(b4<0?e:0);return this.pushStack(b3>=0&&b30){return}ai.resolveWith(l,[bJ]);if(bJ.fn.trigger){bJ(l).trigger("ready").off("ready")}},isFunction:function(e){return bJ.type(e)==="function"},isArray:Array.isArray||function(e){return bJ.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return !isNaN(parseFloat(e))&&isFinite(e)},type:function(e){if(e==null){return String(e)}return typeof e==="object"||typeof e==="function"?aa[z.call(e)]||"object":typeof e},isPlainObject:function(b5){if(!b5||bJ.type(b5)!=="object"||b5.nodeType||bJ.isWindow(b5)){return false}try{if(b5.constructor&&!V.call(b5,"constructor")&&!V.call(b5.constructor.prototype,"isPrototypeOf")){return false}}catch(b4){return false}var b3;for(b3 in b5){}return b3===aG||V.call(b5,b3)},isEmptyObject:function(b3){var e;for(e in b3){return false}return true},error:function(e){throw new Error(e)},parseHTML:function(b6,b4,b5){if(!b6||typeof b6!=="string"){return null}if(typeof b4==="boolean"){b5=b4;b4=false}b4=b4||l;var b3=a.exec(b6),e=!b5&&[];if(b3){return[b4.createElement(b3[1])]}b3=bJ.buildFragment([b6],b4,e);if(e){bJ(e).remove()}return bJ.merge([],b3.childNodes)},parseJSON:function(e){if(a2.JSON&&a2.JSON.parse){return a2.JSON.parse(e)}if(e===null){return e}if(typeof e==="string"){e=bJ.trim(e);if(e){if(bh.test(e.replace(bG,"@").replace(aZ,"]").replace(bk,""))){return(new Function("return "+e))()}}}bJ.error("Invalid JSON: "+e)},parseXML:function(b5){var b3,b4;if(!b5||typeof b5!=="string"){return null}try{if(a2.DOMParser){b4=new DOMParser();b3=b4.parseFromString(b5,"text/xml")}else{b3=new ActiveXObject("Microsoft.XMLDOM");b3.async="false";b3.loadXML(b5)}}catch(b6){b3=aG}if(!b3||!b3.documentElement||b3.getElementsByTagName("parsererror").length){bJ.error("Invalid XML: "+b5)}return b3},noop:function(){},globalEval:function(e){if(e&&bJ.trim(e)){(a2.execScript||function(b3){a2["eval"].call(a2,b3)})(e)}},camelCase:function(e){return e.replace(bS,"ms-").replace(aV,M)},nodeName:function(b3,e){return b3.nodeName&&b3.nodeName.toLowerCase()===e.toLowerCase()},each:function(b7,b8,b3){var b6,b4=0,b5=b7.length,e=ab(b7);if(b3){if(e){for(;b40&&(b3-1) in b4)}w=bJ(l);var bY={};function ae(b3){var e=bY[b3]={};bJ.each(b3.match(ac)||[],function(b5,b4){e[b4]=true});return e}bJ.Callbacks=function(cc){cc=typeof cc==="string"?(bY[cc]||ae(cc)):bJ.extend({},cc);var b6,b5,e,b7,b8,b4,b9=[],ca=!cc.once&&[],b3=function(cd){b5=cc.memory&&cd;e=true;b8=b4||0;b4=0;b7=b9.length;b6=true;for(;b9&&b8-1){b9.splice(ce,1);if(b6){if(ce<=b7){b7--}if(ce<=b8){b8--}}}})}return this},has:function(cd){return cd?bJ.inArray(cd,b9)>-1:!!(b9&&b9.length)},empty:function(){b9=[];return this},disable:function(){b9=ca=b5=aG;return this},disabled:function(){return !b9},lock:function(){ca=aG;if(!b5){cb.disable()}return this},locked:function(){return !ca},fireWith:function(ce,cd){cd=cd||[];cd=[ce,cd.slice?cd.slice():cd];if(b9&&(!e||ca)){if(b6){ca.push(cd)}else{b3(cd)}}return this},fire:function(){cb.fireWith(this,arguments);return this},fired:function(){return !!e}};return cb};bJ.extend({Deferred:function(b4){var b3=[["resolve","done",bJ.Callbacks("once memory"),"resolved"],["reject","fail",bJ.Callbacks("once memory"),"rejected"],["notify","progress",bJ.Callbacks("memory")]],b5="pending",b6={state:function(){return b5},always:function(){e.done(arguments).fail(arguments);return this},then:function(){var b7=arguments;return bJ.Deferred(function(b8){bJ.each(b3,function(ca,b9){var cc=b9[0],cb=bJ.isFunction(b7[ca])&&b7[ca];e[b9[1]](function(){var cd=cb&&cb.apply(this,arguments);if(cd&&bJ.isFunction(cd.promise)){cd.promise().done(b8.resolve).fail(b8.reject).progress(b8.notify)}else{b8[cc+"With"](this===b6?b8.promise():this,cb?[cd]:arguments)}})});b7=null}).promise()},promise:function(b7){return b7!=null?bJ.extend(b7,b6):b6}},e={};b6.pipe=b6.then;bJ.each(b3,function(b8,b7){var ca=b7[2],b9=b7[3];b6[b7[1]]=ca.add;if(b9){ca.add(function(){b5=b9},b3[b8^1][2].disable,b3[2][2].lock)}e[b7[0]]=function(){e[b7[0]+"With"](this===e?b6:this,arguments);return this};e[b7[0]+"With"]=ca.fireWith});b6.promise(e);if(b4){b4.call(e,e)}return e},when:function(b6){var b4=0,b8=a4.call(arguments),e=b8.length,b3=e!==1||(b6&&bJ.isFunction(b6.promise))?e:0,cb=b3===1?b6:bJ.Deferred(),b5=function(cd,ce,cc){return function(cf){ce[cd]=this;cc[cd]=arguments.length>1?a4.call(arguments):cf;if(cc===ca){cb.notifyWith(ce,cc)}else{if(!(--b3)){cb.resolveWith(ce,cc)}}}},ca,b7,b9;if(e>1){ca=new Array(e);b7=new Array(e);b9=new Array(e);for(;b4
            a";cd=b3.getElementsByTagName("*");cb=b3.getElementsByTagName("a")[0];if(!cd||!cb||!cd.length){return{}}cc=l.createElement("select");b5=cc.appendChild(l.createElement("option"));ca=b3.getElementsByTagName("input")[0];cb.style.cssText="top:1px;float:left;opacity:.5";ce={getSetAttribute:b3.className!=="t",leadingWhitespace:b3.firstChild.nodeType===3,tbody:!b3.getElementsByTagName("tbody").length,htmlSerialize:!!b3.getElementsByTagName("link").length,style:/top/.test(cb.getAttribute("style")),hrefNormalized:cb.getAttribute("href")==="/a",opacity:/^0.5/.test(cb.style.opacity),cssFloat:!!cb.style.cssFloat,checkOn:!!ca.value,optSelected:b5.selected,enctype:!!l.createElement("form").enctype,html5Clone:l.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",boxModel:l.compatMode==="CSS1Compat",deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true,boxSizingReliable:true,pixelPosition:false};ca.checked=true;ce.noCloneChecked=ca.cloneNode(true).checked;cc.disabled=true;ce.optDisabled=!b5.disabled;try{delete b3.test}catch(b8){ce.deleteExpando=false}ca=l.createElement("input");ca.setAttribute("value","");ce.input=ca.getAttribute("value")==="";ca.value="t";ca.setAttribute("type","radio");ce.radioValue=ca.value==="t";ca.setAttribute("checked","t");ca.setAttribute("name","t");b9=l.createDocumentFragment();b9.appendChild(ca);ce.appendChecked=ca.checked;ce.checkClone=b9.cloneNode(true).cloneNode(true).lastChild.checked;if(b3.attachEvent){b3.attachEvent("onclick",function(){ce.noCloneEvent=false});b3.cloneNode(true).click()}for(b6 in {submit:true,change:true,focusin:true}){b3.setAttribute(b7="on"+b6,"t");ce[b6+"Bubbles"]=b7 in a2||b3.attributes[b7].expando===false}b3.style.backgroundClip="content-box";b3.cloneNode(true).style.backgroundClip="";ce.clearCloneStyle=b3.style.backgroundClip==="content-box";bJ(function(){var cf,ci,ch,cg="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",e=l.getElementsByTagName("body")[0];if(!e){return}cf=l.createElement("div");cf.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";e.appendChild(cf).appendChild(b3);b3.innerHTML="
            t
            ";ch=b3.getElementsByTagName("td");ch[0].style.cssText="padding:0;margin:0;border:0;display:none";b4=(ch[0].offsetHeight===0);ch[0].style.display="";ch[1].style.display="none";ce.reliableHiddenOffsets=b4&&(ch[0].offsetHeight===0);b3.innerHTML="";b3.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%;";ce.boxSizing=(b3.offsetWidth===4);ce.doesNotIncludeMarginInBodyOffset=(e.offsetTop!==1);if(a2.getComputedStyle){ce.pixelPosition=(a2.getComputedStyle(b3,null)||{}).top!=="1%";ce.boxSizingReliable=(a2.getComputedStyle(b3,null)||{width:"4px"}).width==="4px";ci=b3.appendChild(l.createElement("div"));ci.style.cssText=b3.style.cssText=cg;ci.style.marginRight=ci.style.width="0";b3.style.width="1px";ce.reliableMarginRight=!parseFloat((a2.getComputedStyle(ci,null)||{}).marginRight)}if(typeof b3.style.zoom!==aC){b3.innerHTML="";b3.style.cssText=cg+"width:1px;padding:1px;display:inline;zoom:1";ce.inlineBlockNeedsLayout=(b3.offsetWidth===3);b3.style.display="block";b3.innerHTML="
            ";b3.firstChild.style.width="5px";ce.shrinkWrapBlocks=(b3.offsetWidth!==3);if(ce.inlineBlockNeedsLayout){e.style.zoom=1}}e.removeChild(cf);cf=b3=ch=ci=null});cd=cc=b9=b5=cb=ca=null;return ce})();var bw=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,aN=/([A-Z])/g;function ba(b5,b3,b7,b6){if(!bJ.acceptData(b5)){return}var b8,ca,cb=bJ.expando,b9=typeof b3==="string",cc=b5.nodeType,e=cc?bJ.cache:b5,b4=cc?b5[cb]:b5[cb]&&cb;if((!b4||!e[b4]||(!b6&&!e[b4].data))&&b9&&b7===aG){return}if(!b4){if(cc){b5[cb]=b4=a6.pop()||bJ.guid++}else{b4=cb}}if(!e[b4]){e[b4]={};if(!cc){e[b4].toJSON=bJ.noop}}if(typeof b3==="object"||typeof b3==="function"){if(b6){e[b4]=bJ.extend(e[b4],b3)}else{e[b4].data=bJ.extend(e[b4].data,b3)}}b8=e[b4];if(!b6){if(!b8.data){b8.data={}}b8=b8.data}if(b7!==aG){b8[bJ.camelCase(b3)]=b7}if(b9){ca=b8[b3];if(ca==null){ca=b8[bJ.camelCase(b3)]}}else{ca=b8}return ca}function Z(b5,b3,b6){if(!bJ.acceptData(b5)){return}var b8,b7,b9,ca=b5.nodeType,e=ca?bJ.cache:b5,b4=ca?b5[bJ.expando]:bJ.expando;if(!e[b4]){return}if(b3){b9=b6?e[b4]:e[b4].data;if(b9){if(!bJ.isArray(b3)){if(b3 in b9){b3=[b3]}else{b3=bJ.camelCase(b3);if(b3 in b9){b3=[b3]}else{b3=b3.split(" ")}}}else{b3=b3.concat(bJ.map(b3,bJ.camelCase))}for(b8=0,b7=b3.length;b81,null,true)},removeData:function(e){return this.each(function(){bJ.removeData(this,e)})}});function by(b5,b4,b6){if(b6===aG&&b5.nodeType===1){var b3="data-"+b4.replace(aN,"-$1").toLowerCase();b6=b5.getAttribute(b3);if(typeof b6==="string"){try{b6=b6==="true"?true:b6==="false"?false:b6==="null"?null:+b6+""===b6?+b6:bw.test(b6)?bJ.parseJSON(b6):b6}catch(b7){}bJ.data(b5,b4,b6)}else{b6=aG}}return b6}function N(b3){var e;for(e in b3){if(e==="data"&&bJ.isEmptyObject(b3[e])){continue}if(e!=="toJSON"){return false}}return true}bJ.extend({queue:function(b4,b3,b5){var e;if(b4){b3=(b3||"fx")+"queue";e=bJ._data(b4,b3);if(b5){if(!e||bJ.isArray(b5)){e=bJ._data(b4,b3,bJ.makeArray(b5))}else{e.push(b5)}}return e||[]}},dequeue:function(b7,b6){b6=b6||"fx";var b3=bJ.queue(b7,b6),b8=b3.length,b5=b3.shift(),e=bJ._queueHooks(b7,b6),b4=function(){bJ.dequeue(b7,b6)};if(b5==="inprogress"){b5=b3.shift();b8--}e.cur=b5;if(b5){if(b6==="fx"){b3.unshift("inprogress")}delete e.stop;b5.call(b7,b4,e)}if(!b8&&e){e.empty.fire()}},_queueHooks:function(b4,b3){var e=b3+"queueHooks";return bJ._data(b4,e)||bJ._data(b4,e,{empty:bJ.Callbacks("once memory").add(function(){bJ._removeData(b4,b3+"queue");bJ._removeData(b4,e)})})}});bJ.fn.extend({queue:function(e,b3){var b4=2;if(typeof e!=="string"){b3=e;e="fx";b4--}if(arguments.length1)},removeAttr:function(e){return this.each(function(){bJ.removeAttr(this,e)})},prop:function(e,b3){return bJ.access(this,bJ.prop,e,b3,arguments.length>1)},removeProp:function(e){e=bJ.propFix[e]||e;return this.each(function(){try{this[e]=aG;delete this[e]}catch(b3){}})},addClass:function(b9){var b3,e,ca,b6,b4,b5=0,b7=this.length,b8=typeof b9==="string"&&b9;if(bJ.isFunction(b9)){return this.each(function(cb){bJ(this).addClass(b9.call(this,cb,this.className))})}if(b8){b3=(b9||"").match(ac)||[];for(;b5=0){ca=ca.replace(" "+b6+" "," ")}}e.className=b9?bJ.trim(ca):""}}}return this},toggleClass:function(b5,b3){var b4=typeof b5,e=typeof b3==="boolean";if(bJ.isFunction(b5)){return this.each(function(b6){bJ(this).toggleClass(b5.call(this,b6,this.className,b3),b3)})}return this.each(function(){if(b4==="string"){var b8,b7=0,b6=bJ(this),b9=b3,ca=b5.match(ac)||[];while((b8=ca[b7++])){b9=e?b9:!b6.hasClass(b8);b6[b9?"addClass":"removeClass"](b8)}}else{if(b4===aC||b4==="boolean"){if(this.className){bJ._data(this,"__className__",this.className)}this.className=this.className||b5===false?"":bJ._data(this,"__className__")||""}}})},hasClass:function(e){var b5=" "+e+" ",b4=0,b3=this.length;for(;b4=0){return true}}return false},val:function(b5){var b3,e,b6,b4=this[0];if(!arguments.length){if(b4){e=bJ.valHooks[b4.type]||bJ.valHooks[b4.nodeName.toLowerCase()];if(e&&"get" in e&&(b3=e.get(b4,"value"))!==aG){return b3}b3=b4.value;return typeof b3==="string"?b3.replace(ak,""):b3==null?"":b3}return}b6=bJ.isFunction(b5);return this.each(function(b8){var b9,b7=bJ(this);if(this.nodeType!==1){return}if(b6){b9=b5.call(this,b8,b7.val())}else{b9=b5}if(b9==null){b9=""}else{if(typeof b9==="number"){b9+=""}else{if(bJ.isArray(b9)){b9=bJ.map(b9,function(ca){return ca==null?"":ca+""})}}}e=bJ.valHooks[this.type]||bJ.valHooks[this.nodeName.toLowerCase()];if(!e||!("set" in e)||e.set(this,b9,"value")===aG){this.value=b9}})}});bJ.extend({valHooks:{option:{get:function(e){var b3=e.attributes.value;return !b3||b3.specified?e.value:e.text}},select:{get:function(e){var b8,b4,ca=e.options,b6=e.selectedIndex,b5=e.type==="select-one"||b6<0,b9=b5?null:[],b7=b5?b6+1:ca.length,b3=b6<0?b7:b5?b6:0;for(;b3=0});if(!e.length){b3.selectedIndex=-1}return e}}},attr:function(b7,b5,b8){var e,b6,b4,b3=b7.nodeType;if(!b7||b3===3||b3===8||b3===2){return}if(typeof b7.getAttribute===aC){return bJ.prop(b7,b5,b8)}b6=b3!==1||!bJ.isXMLDoc(b7);if(b6){b5=b5.toLowerCase();e=bJ.attrHooks[b5]||(L.test(b5)?bZ:a8)}if(b8!==aG){if(b8===null){bJ.removeAttr(b7,b5)}else{if(e&&b6&&"set" in e&&(b4=e.set(b7,b8,b5))!==aG){return b4}else{b7.setAttribute(b5,b8+"");return b8}}}else{if(e&&b6&&"get" in e&&(b4=e.get(b7,b5))!==null){return b4}else{if(typeof b7.getAttribute!==aC){b4=b7.getAttribute(b5)}return b4==null?aG:b4}}},removeAttr:function(b4,b6){var e,b5,b3=0,b7=b6&&b6.match(ac);if(b7&&b4.nodeType===1){while((e=b7[b3++])){b5=bJ.propFix[e]||e;if(L.test(e)){if(!bP&&aq.test(e)){b4[bJ.camelCase("default-"+e)]=b4[b5]=false}else{b4[b5]=false}}else{bJ.attr(b4,e,"")}b4.removeAttribute(bP?e:b5)}}},attrHooks:{type:{set:function(e,b3){if(!bJ.support.radioValue&&b3==="radio"&&bJ.nodeName(e,"input")){var b4=e.value;e.setAttribute("type",b3);if(b4){e.value=b4}return b3}}}},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(b7,b5,b8){var b4,e,b6,b3=b7.nodeType;if(!b7||b3===3||b3===8||b3===2){return}b6=b3!==1||!bJ.isXMLDoc(b7);if(b6){b5=bJ.propFix[b5]||b5;e=bJ.propHooks[b5]}if(b8!==aG){if(e&&"set" in e&&(b4=e.set(b7,b8,b5))!==aG){return b4}else{return(b7[b5]=b8)}}else{if(e&&"get" in e&&(b4=e.get(b7,b5))!==null){return b4}else{return b7[b5]}}},propHooks:{tabIndex:{get:function(b3){var e=b3.getAttributeNode("tabindex");return e&&e.specified?parseInt(e.value,10):aF.test(b3.nodeName)||D.test(b3.nodeName)&&b3.href?0:aG}}}});bZ={get:function(b5,b3){var b6=bJ.prop(b5,b3),e=typeof b6==="boolean"&&b5.getAttribute(b3),b4=typeof b6==="boolean"?bF&&bP?e!=null:aq.test(b3)?b5[bJ.camelCase("default-"+b3)]:!!e:b5.getAttributeNode(b3);return b4&&b4.value!==false?b3.toLowerCase():aG},set:function(b3,b4,e){if(b4===false){bJ.removeAttr(b3,e)}else{if(bF&&bP||!aq.test(e)){b3.setAttribute(!bP&&bJ.propFix[e]||e,e)}else{b3[bJ.camelCase("default-"+e)]=b3[e]=true}}return e}};if(!bF||!bP){bJ.attrHooks.value={get:function(b4,b3){var e=b4.getAttributeNode(b3);return bJ.nodeName(b4,"input")?b4.defaultValue:e&&e.specified?e.value:aG},set:function(b3,b4,e){if(bJ.nodeName(b3,"input")){b3.defaultValue=b4}else{return a8&&a8.set(b3,b4,e)}}}}if(!bP){a8=bJ.valHooks.button={get:function(b4,b3){var e=b4.getAttributeNode(b3);return e&&(b3==="id"||b3==="name"||b3==="coords"?e.value!=="":e.specified)?e.value:aG},set:function(b4,b5,b3){var e=b4.getAttributeNode(b3);if(!e){b4.setAttributeNode((e=b4.ownerDocument.createAttribute(b3)))}e.value=b5+="";return b3==="value"||b5===b4.getAttribute(b3)?b5:aG}};bJ.attrHooks.contenteditable={get:a8.get,set:function(b3,b4,e){a8.set(b3,b4===""?false:b4,e)}};bJ.each(["width","height"],function(b3,e){bJ.attrHooks[e]=bJ.extend(bJ.attrHooks[e],{set:function(b4,b5){if(b5===""){b4.setAttribute(e,"auto");return b5}}})})}if(!bJ.support.hrefNormalized){bJ.each(["href","src","width","height"],function(b3,e){bJ.attrHooks[e]=bJ.extend(bJ.attrHooks[e],{get:function(b5){var b4=b5.getAttribute(e,2);return b4==null?aG:b4}})});bJ.each(["href","src"],function(b3,e){bJ.propHooks[e]={get:function(b4){return b4.getAttribute(e,4)}}})}if(!bJ.support.style){bJ.attrHooks.style={get:function(e){return e.style.cssText||aG},set:function(e,b3){return(e.style.cssText=b3+"")}}}if(!bJ.support.optSelected){bJ.propHooks.selected=bJ.extend(bJ.propHooks.selected,{get:function(b3){var e=b3.parentNode;if(e){e.selectedIndex;if(e.parentNode){e.parentNode.selectedIndex}}return null}})}if(!bJ.support.enctype){bJ.propFix.enctype="encoding"}if(!bJ.support.checkOn){bJ.each(["radio","checkbox"],function(){bJ.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}})}bJ.each(["radio","checkbox"],function(){bJ.valHooks[this]=bJ.extend(bJ.valHooks[this],{set:function(e,b3){if(bJ.isArray(b3)){return(e.checked=bJ.inArray(bJ(e).val(),b3)>=0)}}})});var bH=/^(?:input|select|textarea)$/i,a3=/^key/,bN=/^(?:mouse|contextmenu)|click/,bB=/^(?:focusinfocus|focusoutblur)$/,bu=/^([^.]*)(?:\.(.+)|)$/;function R(){return true}function X(){return false}bJ.event={global:{},add:function(b6,cb,cg,b8,b7){var b9,ch,ci,b4,cd,ca,cf,b5,ce,e,b3,cc=bJ._data(b6);if(!cc){return}if(cg.handler){b4=cg;cg=b4.handler;b7=b4.selector}if(!cg.guid){cg.guid=bJ.guid++}if(!(ch=cc.events)){ch=cc.events={}}if(!(ca=cc.handle)){ca=cc.handle=function(cj){return typeof bJ!==aC&&(!cj||bJ.event.triggered!==cj.type)?bJ.event.dispatch.apply(ca.elem,arguments):aG};ca.elem=b6}cb=(cb||"").match(ac)||[""];ci=cb.length;while(ci--){b9=bu.exec(cb[ci])||[];ce=b3=b9[1];e=(b9[2]||"").split(".").sort();cd=bJ.event.special[ce]||{};ce=(b7?cd.delegateType:cd.bindType)||ce;cd=bJ.event.special[ce]||{};cf=bJ.extend({type:ce,origType:b3,data:b8,handler:cg,guid:cg.guid,selector:b7,needsContext:b7&&bJ.expr.match.needsContext.test(b7),namespace:e.join(".")},b4);if(!(b5=ch[ce])){b5=ch[ce]=[];b5.delegateCount=0;if(!cd.setup||cd.setup.call(b6,b8,e,ca)===false){if(b6.addEventListener){b6.addEventListener(ce,ca,false)}else{if(b6.attachEvent){b6.attachEvent("on"+ce,ca)}}}}if(cd.add){cd.add.call(b6,cf);if(!cf.handler.guid){cf.handler.guid=cg.guid}}if(b7){b5.splice(b5.delegateCount++,0,cf)}else{b5.push(cf)}bJ.event.global[ce]=true}b6=null},remove:function(b5,cb,ci,b6,ca){var b8,cf,b9,b7,ch,cg,cd,b4,ce,e,b3,cc=bJ.hasData(b5)&&bJ._data(b5);if(!cc||!(cg=cc.events)){return}cb=(cb||"").match(ac)||[""];ch=cb.length;while(ch--){b9=bu.exec(cb[ch])||[];ce=b3=b9[1];e=(b9[2]||"").split(".").sort();if(!ce){for(ce in cg){bJ.event.remove(b5,ce+cb[ch],ci,b6,true)}continue}cd=bJ.event.special[ce]||{};ce=(b6?cd.delegateType:cd.bindType)||ce;b4=cg[ce]||[];b9=b9[2]&&new RegExp("(^|\\.)"+e.join("\\.(?:.*\\.|)")+"(\\.|$)");b7=b8=b4.length;while(b8--){cf=b4[b8];if((ca||b3===cf.origType)&&(!ci||ci.guid===cf.guid)&&(!b9||b9.test(cf.namespace))&&(!b6||b6===cf.selector||b6==="**"&&cf.selector)){b4.splice(b8,1);if(cf.selector){b4.delegateCount--}if(cd.remove){cd.remove.call(b5,cf)}}}if(b7&&!b4.length){if(!cd.teardown||cd.teardown.call(b5,e,cc.handle)===false){bJ.removeEvent(b5,ce,cc.handle)}delete cg[ce]}}if(bJ.isEmptyObject(cg)){delete cc.handle;bJ._removeData(b5,"events")}},trigger:function(b3,ca,b6,ch){var cb,b5,cf,cg,cd,b9,b8,b7=[b6||l],ce=V.call(b3,"type")?b3.type:b3,b4=V.call(b3,"namespace")?b3.namespace.split("."):[];cf=b9=b6=b6||l;if(b6.nodeType===3||b6.nodeType===8){return}if(bB.test(ce+bJ.event.triggered)){return}if(ce.indexOf(".")>=0){b4=ce.split(".");ce=b4.shift();b4.sort()}b5=ce.indexOf(":")<0&&"on"+ce;b3=b3[bJ.expando]?b3:new bJ.Event(ce,typeof b3==="object"&&b3);b3.isTrigger=true;b3.namespace=b4.join(".");b3.namespace_re=b3.namespace?new RegExp("(^|\\.)"+b4.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;b3.result=aG;if(!b3.target){b3.target=b6}ca=ca==null?[b3]:bJ.makeArray(ca,[b3]);cd=bJ.event.special[ce]||{};if(!ch&&cd.trigger&&cd.trigger.apply(b6,ca)===false){return}if(!ch&&!cd.noBubble&&!bJ.isWindow(b6)){cg=cd.delegateType||ce;if(!bB.test(cg+ce)){cf=cf.parentNode}for(;cf;cf=cf.parentNode){b7.push(cf);b9=cf}if(b9===(b6.ownerDocument||l)){b7.push(b9.defaultView||b9.parentWindow||a2)}}b8=0;while((cf=b7[b8++])&&!b3.isPropagationStopped()){b3.type=b8>1?cg:cd.bindType||ce;cb=(bJ._data(cf,"events")||{})[b3.type]&&bJ._data(cf,"handle");if(cb){cb.apply(cf,ca)}cb=b5&&cf[b5];if(cb&&bJ.acceptData(cf)&&cb.apply&&cb.apply(cf,ca)===false){b3.preventDefault()}}b3.type=ce;if(!ch&&!b3.isDefaultPrevented()){if((!cd._default||cd._default.apply(b6.ownerDocument,ca)===false)&&!(ce==="click"&&bJ.nodeName(b6,"a"))&&bJ.acceptData(b6)){if(b5&&b6[ce]&&!bJ.isWindow(b6)){b9=b6[b5];if(b9){b6[b5]=null}bJ.event.triggered=ce;try{b6[ce]()}catch(cc){}bJ.event.triggered=aG;if(b9){b6[b5]=b9}}}}return b3.result},dispatch:function(e){e=bJ.event.fix(e);var b6,b7,cb,b3,b5,ca=[],b9=a4.call(arguments),b4=(bJ._data(this,"events")||{})[e.type]||[],b8=bJ.event.special[e.type]||{};b9[0]=e;e.delegateTarget=this;if(b8.preDispatch&&b8.preDispatch.call(this,e)===false){return}ca=bJ.event.handlers.call(this,e,b4);b6=0;while((b3=ca[b6++])&&!e.isPropagationStopped()){e.currentTarget=b3.elem;b5=0;while((cb=b3.handlers[b5++])&&!e.isImmediatePropagationStopped()){if(!e.namespace_re||e.namespace_re.test(cb.namespace)){e.handleObj=cb;e.data=cb.data;b7=((bJ.event.special[cb.origType]||{}).handle||cb.handler).apply(b3.elem,b9);if(b7!==aG){if((e.result=b7)===false){e.preventDefault();e.stopPropagation()}}}}}if(b8.postDispatch){b8.postDispatch.call(this,e)}return e.result},handlers:function(e,b4){var b3,b9,b7,b6,b8=[],b5=b4.delegateCount,ca=e.target;if(b5&&ca.nodeType&&(!e.button||e.type!=="click")){for(;ca!=this;ca=ca.parentNode||this){if(ca.nodeType===1&&(ca.disabled!==true||e.type!=="click")){b7=[];for(b6=0;b6=0:bJ.find(b3,this,null,[ca]).length}if(b7[b3]){b7.push(b9)}}if(b7.length){b8.push({elem:ca,handlers:b7})}}}}if(b5+~])"+cp+"*"),cP=new RegExp(ck),cQ=new RegExp("^"+cK+"$"),cY={ID:new RegExp("^#("+b3+")"),CLASS:new RegExp("^\\.("+b3+")"),NAME:new RegExp("^\\[name=['\"]?("+b3+")['\"]?\\]"),TAG:new RegExp("^("+b3.replace("w","w*")+")"),ATTR:new RegExp("^"+c2),PSEUDO:new RegExp("^"+ck),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+cp+"*(even|odd|(([+-]|)(\\d*)n|)"+cp+"*(?:([+-]|)"+cp+"*(\\d+)|))"+cp+"*\\)|)","i"),needsContext:new RegExp("^"+cp+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+cp+"*((?:-\\d)?\\d*)"+cp+"*\\)|)(?=[^-]|$)","i")},cW=/[\x20\t\r\n\f]*[+~]/,cM=/^[^{]+\{\s*\[native code/,cO=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,b8=/^(?:input|select|textarea|button)$/i,cl=/^h\d$/i,cL=/'|\\/g,ct=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,cs=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,c1=function(e,di){var dh="0x"+di-65536;return dh!==dh?di:dh<0?String.fromCharCode(dh+65536):String.fromCharCode(dh>>10|55296,dh&1023|56320)};try{cm.call(cI.documentElement.childNodes,0)[0].nodeType}catch(cC){cm=function(dh){var di,e=[];while((di=this[dh++])){e.push(di)}return e}}function cE(e){return cM.test(e+"")}function cz(){var e,dh=[];return(e=function(di,dj){if(dh.push(di+=" ")>cn.cacheLength){delete e[dh.shift()]}return(e[di]=dj)})}function cj(e){e[c5]=true;return e}function cc(dh){var dj=cB.createElement("div");try{return dh(dj)}catch(di){return false}finally{dj=null}}function cv(dp,dh,dt,dv){var du,dl,dm,dr,ds,dk,dj,e,di,dq;if((dh?dh.ownerDocument||dh:cI)!==cB){cV(dh)}dh=dh||cB;dt=dt||[];if(!dp||typeof dp!=="string"){return dt}if((dr=dh.nodeType)!==1&&dr!==9){return[]}if(!cd&&!dv){if((du=cO.exec(dp))){if((dm=du[1])){if(dr===9){dl=dh.getElementById(dm);if(dl&&dl.parentNode){if(dl.id===dm){dt.push(dl);return dt}}else{return dt}}else{if(dh.ownerDocument&&(dl=dh.ownerDocument.getElementById(dm))&&cF(dh,dl)&&dl.id===dm){dt.push(dl);return dt}}}else{if(du[2]){b4.apply(dt,cm.call(dh.getElementsByTagName(dp),0));return dt}else{if((dm=du[3])&&dd.getByClassName&&dh.getElementsByClassName){b4.apply(dt,cm.call(dh.getElementsByClassName(dm),0));return dt}}}}if(dd.qsa&&!cZ.test(dp)){dj=true;e=c5;di=dh;dq=dr===9&&dp;if(dr===1&&dh.nodeName.toLowerCase()!=="object"){dk=cf(dp);if((dj=dh.getAttribute("id"))){e=dj.replace(cL,"\\$&")}else{dh.setAttribute("id",e)}e="[id='"+e+"'] ";ds=dk.length;while(ds--){dk[ds]=e+cg(dk[ds])}di=cW.test(dp)&&dh.parentNode||dh;dq=dk.join(",")}if(dq){try{b4.apply(dt,cm.call(di.querySelectorAll(dq),0));return dt}catch(dn){}finally{if(!dj){dh.removeAttribute("id")}}}}}return dc(dp.replace(cr,"$1"),dh,dt,dv)}cJ=cv.isXML=function(e){var dh=e&&(e.ownerDocument||e).documentElement;return dh?dh.nodeName!=="HTML":false};cV=cv.setDocument=function(e){var dh=e?e.ownerDocument||e:cI;if(dh===cB||dh.nodeType!==9||!dh.documentElement){return cB}cB=dh;co=dh.documentElement;cd=cJ(dh);dd.tagNameNoComments=cc(function(di){di.appendChild(dh.createComment(""));return !di.getElementsByTagName("*").length});dd.attributes=cc(function(dj){dj.innerHTML="";var di=typeof dj.lastChild.getAttribute("multiple");return di!=="boolean"&&di!=="string"});dd.getByClassName=cc(function(di){di.innerHTML="";if(!di.getElementsByClassName||!di.getElementsByClassName("e").length){return false}di.lastChild.className="e";return di.getElementsByClassName("e").length===2});dd.getByName=cc(function(dj){dj.id=c5+0;dj.innerHTML="
            ";co.insertBefore(dj,co.firstChild);var di=dh.getElementsByName&&dh.getElementsByName(c5).length===2+dh.getElementsByName(c5+0).length;dd.getIdNotName=!dh.getElementById(c5);co.removeChild(dj);return di});cn.attrHandle=cc(function(di){di.innerHTML="";return di.firstChild&&typeof di.firstChild.getAttribute!==c9&&di.firstChild.getAttribute("href")==="#"})?{}:{href:function(di){return di.getAttribute("href",2)},type:function(di){return di.getAttribute("type")}};if(dd.getIdNotName){cn.find.ID=function(dk,dj){if(typeof dj.getElementById!==c9&&!cd){var di=dj.getElementById(dk);return di&&di.parentNode?[di]:[]}};cn.filter.ID=function(dj){var di=dj.replace(cs,c1);return function(dk){return dk.getAttribute("id")===di}}}else{cn.find.ID=function(dk,dj){if(typeof dj.getElementById!==c9&&!cd){var di=dj.getElementById(dk);return di?di.id===dk||typeof di.getAttributeNode!==c9&&di.getAttributeNode("id").value===dk?[di]:ch:[]}};cn.filter.ID=function(dj){var di=dj.replace(cs,c1);return function(dl){var dk=typeof dl.getAttributeNode!==c9&&dl.getAttributeNode("id");return dk&&dk.value===di}}}cn.find.TAG=dd.tagNameNoComments?function(di,dj){if(typeof dj.getElementsByTagName!==c9){return dj.getElementsByTagName(di)}}:function(di,dm){var dn,dl=[],dk=0,dj=dm.getElementsByTagName(di);if(di==="*"){while((dn=dj[dk++])){if(dn.nodeType===1){dl.push(dn)}}return dl}return dj};cn.find.NAME=dd.getByName&&function(di,dj){if(typeof dj.getElementsByName!==c9){return dj.getElementsByName(name)}};cn.find.CLASS=dd.getByClassName&&function(dj,di){if(typeof di.getElementsByClassName!==c9&&!cd){return di.getElementsByClassName(dj)}};db=[];cZ=[":focus"];if((dd.qsa=cE(dh.querySelectorAll))){cc(function(di){di.innerHTML="";if(!di.querySelectorAll("[selected]").length){cZ.push("\\["+cp+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)")}if(!di.querySelectorAll(":checked").length){cZ.push(":checked")}});cc(function(di){di.innerHTML="";if(di.querySelectorAll("[i^='']").length){cZ.push("[*^$]="+cp+"*(?:\"\"|'')")}if(!di.querySelectorAll(":enabled").length){cZ.push(":enabled",":disabled")}di.querySelectorAll("*,:x");cZ.push(",.*:")})}if((dd.matchesSelector=cE((ca=co.matchesSelector||co.mozMatchesSelector||co.webkitMatchesSelector||co.oMatchesSelector||co.msMatchesSelector)))){cc(function(di){dd.disconnectedMatch=ca.call(di,"div");ca.call(di,"[s!='']:x");db.push("!=",ck)})}cZ=new RegExp(cZ.join("|"));db=new RegExp(db.join("|"));cF=cE(co.contains)||co.compareDocumentPosition?function(dj,di){var dl=dj.nodeType===9?dj.documentElement:dj,dk=di&&di.parentNode;return dj===dk||!!(dk&&dk.nodeType===1&&(dl.contains?dl.contains(dk):dj.compareDocumentPosition&&dj.compareDocumentPosition(dk)&16))}:function(dj,di){if(di){while((di=di.parentNode)){if(di===dj){return true}}}return false};cD=co.compareDocumentPosition?function(dj,di){var dk;if(dj===di){cT=true;return 0}if((dk=di.compareDocumentPosition&&dj.compareDocumentPosition&&dj.compareDocumentPosition(di))){if(dk&1||dj.parentNode&&dj.parentNode.nodeType===11){if(dj===dh||cF(cI,dj)){return -1}if(di===dh||cF(cI,di)){return 1}return 0}return dk&4?-1:1}return dj.compareDocumentPosition?-1:1}:function(dj,di){var dq,dm=0,dp=dj.parentNode,dl=di.parentNode,dk=[dj],dn=[di];if(dj===di){cT=true;return 0}else{if(!dp||!dl){return dj===dh?-1:di===dh?1:dp?-1:dl?1:0}else{if(dp===dl){return b6(dj,di)}}}dq=dj;while((dq=dq.parentNode)){dk.unshift(dq)}dq=di;while((dq=dq.parentNode)){dn.unshift(dq)}while(dk[dm]===dn[dm]){dm++}return dm?b6(dk[dm],dn[dm]):dk[dm]===cI?-1:dn[dm]===cI?1:0};cT=false;[0,0].sort(cD);dd.detectDuplicates=cT;return cB};cv.matches=function(dh,e){return cv(dh,null,null,e)};cv.matchesSelector=function(di,dk){if((di.ownerDocument||di)!==cB){cV(di)}dk=dk.replace(ct,"='$1']");if(dd.matchesSelector&&!cd&&(!db||!db.test(dk))&&!cZ.test(dk)){try{var dh=ca.call(di,dk);if(dh||dd.disconnectedMatch||di.document&&di.document.nodeType!==11){return dh}}catch(dj){}}return cv(dk,cB,null,[di]).length>0};cv.contains=function(e,dh){if((e.ownerDocument||e)!==cB){cV(e)}return cF(e,dh)};cv.attr=function(dh,e){var di;if((dh.ownerDocument||dh)!==cB){cV(dh)}if(!cd){e=e.toLowerCase()}if((di=cn.attrHandle[e])){return di(dh)}if(cd||dd.attributes){return dh.getAttribute(e)}return((di=dh.getAttributeNode(e))||dh.getAttribute(e))&&dh[e]===true?e:di&&di.specified?di.value:null};cv.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};cv.uniqueSort=function(di){var dj,dk=[],dh=1,e=0;cT=!dd.detectDuplicates;di.sort(cD);if(cT){for(;(dj=di[dh]);dh++){if(dj===di[dh-1]){e=dk.push(dh)}}while(e--){di.splice(dk[e],1)}}return di};function b6(dh,e){var dj=e&&dh,di=dj&&(~e.sourceIndex||cN)-(~dh.sourceIndex||cN);if(di){return di}if(dj){while((dj=dj.nextSibling)){if(dj===e){return -1}}}return dh?1:-1}function cw(e){return function(di){var dh=di.nodeName.toLowerCase();return dh==="input"&&di.type===e}}function b7(e){return function(di){var dh=di.nodeName.toLowerCase();return(dh==="input"||dh==="button")&&di.type===e}}function c3(e){return cj(function(dh){dh=+dh;return cj(function(di,dm){var dk,dj=e([],di.length,dh),dl=dj.length;while(dl--){if(di[(dk=dj[dl])]){di[dk]=!(dm[dk]=di[dk])}}})})}cH=cv.getText=function(dk){var dj,dh="",di=0,e=dk.nodeType;if(!e){for(;(dj=dk[di]);di++){dh+=cH(dj)}}else{if(e===1||e===9||e===11){if(typeof dk.textContent==="string"){return dk.textContent}else{for(dk=dk.firstChild;dk;dk=dk.nextSibling){dh+=cH(dk)}}}else{if(e===3||e===4){return dk.nodeValue}}}return dh};cn=cv.selectors={cacheLength:50,createPseudo:cj,match:cY,find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){e[1]=e[1].replace(cs,c1);e[3]=(e[4]||e[5]||"").replace(cs,c1);if(e[2]==="~="){e[3]=" "+e[3]+" "}return e.slice(0,4)},CHILD:function(e){e[1]=e[1].toLowerCase();if(e[1].slice(0,3)==="nth"){if(!e[3]){cv.error(e[0])}e[4]=+(e[4]?e[5]+(e[6]||1):2*(e[3]==="even"||e[3]==="odd"));e[5]=+((e[7]+e[8])||e[3]==="odd")}else{if(e[3]){cv.error(e[0])}}return e},PSEUDO:function(dh){var e,di=!dh[5]&&dh[2];if(cY.CHILD.test(dh[0])){return null}if(dh[4]){dh[2]=dh[4]}else{if(di&&cP.test(di)&&(e=cf(di,true))&&(e=di.indexOf(")",di.length-e)-di.length)){dh[0]=dh[0].slice(0,e);dh[2]=di.slice(0,e)}}return dh.slice(0,3)}},filter:{TAG:function(e){if(e==="*"){return function(){return true}}e=e.replace(cs,c1).toLowerCase();return function(dh){return dh.nodeName&&dh.nodeName.toLowerCase()===e}},CLASS:function(e){var dh=b5[e+" "];return dh||(dh=new RegExp("(^|"+cp+")"+e+"("+cp+"|$)"))&&b5(e,function(di){return dh.test(di.className||(typeof di.getAttribute!==c9&&di.getAttribute("class"))||"")})},ATTR:function(di,dh,e){return function(dk){var dj=cv.attr(dk,di);if(dj==null){return dh==="!="}if(!dh){return true}dj+="";return dh==="="?dj===e:dh==="!="?dj!==e:dh==="^="?e&&dj.indexOf(e)===0:dh==="*="?e&&dj.indexOf(e)>-1:dh==="$="?e&&dj.slice(-e.length)===e:dh==="~="?(" "+dj+" ").indexOf(e)>-1:dh==="|="?dj===e||dj.slice(0,e.length+1)===e+"-":false}},CHILD:function(dh,dk,dj,dl,di){var dn=dh.slice(0,3)!=="nth",e=dh.slice(-4)!=="last",dm=dk==="of-type";return dl===1&&di===0?function(dp){return !!dp.parentNode}:function(dv,dt,dy){var dp,dB,dw,dA,dx,ds,du=dn!==e?"nextSibling":"previousSibling",dz=dv.parentNode,dr=dm&&dv.nodeName.toLowerCase(),dq=!dy&&!dm;if(dz){if(dn){while(du){dw=dv;while((dw=dw[du])){if(dm?dw.nodeName.toLowerCase()===dr:dw.nodeType===1){return false}}ds=du=dh==="only"&&!ds&&"nextSibling"}return true}ds=[e?dz.firstChild:dz.lastChild];if(e&&dq){dB=dz[c5]||(dz[c5]={});dp=dB[dh]||[];dx=dp[0]===de&&dp[1];dA=dp[0]===de&&dp[2];dw=dx&&dz.childNodes[dx];while((dw=++dx&&dw&&dw[du]||(dA=dx=0)||ds.pop())){if(dw.nodeType===1&&++dA&&dw===dv){dB[dh]=[de,dx,dA];break}}}else{if(dq&&(dp=(dv[c5]||(dv[c5]={}))[dh])&&dp[0]===de){dA=dp[1]}else{while((dw=++dx&&dw&&dw[du]||(dA=dx=0)||ds.pop())){if((dm?dw.nodeName.toLowerCase()===dr:dw.nodeType===1)&&++dA){if(dq){(dw[c5]||(dw[c5]={}))[dh]=[de,dA]}if(dw===dv){break}}}}}dA-=di;return dA===dl||(dA%dl===0&&dA/dl>=0)}}},PSEUDO:function(dj,di){var e,dh=cn.pseudos[dj]||cn.setFilters[dj.toLowerCase()]||cv.error("unsupported pseudo: "+dj);if(dh[c5]){return dh(di)}if(dh.length>1){e=[dj,dj,"",di];return cn.setFilters.hasOwnProperty(dj.toLowerCase())?cj(function(dm,dp){var dl,dk=dh(dm,di),dn=dk.length;while(dn--){dl=b9.call(dm,dk[dn]);dm[dl]=!(dp[dl]=dk[dn])}}):function(dk){return dh(dk,0,e)}}return dh}},pseudos:{not:cj(function(e){var dh=[],di=[],dj=cS(e.replace(cr,"$1"));return dj[c5]?cj(function(dl,dr,dp,dm){var dq,dk=dj(dl,null,dm,[]),dn=dl.length;while(dn--){if((dq=dk[dn])){dl[dn]=!(dr[dn]=dq)}}}):function(dm,dl,dk){dh[0]=dm;dj(dh,null,dk,di);return !di.pop()}}),has:cj(function(e){return function(dh){return cv(e,dh).length>0}}),contains:cj(function(e){return function(dh){return(dh.textContent||dh.innerText||cH(dh)).indexOf(e)>-1}}),lang:cj(function(e){if(!cQ.test(e||"")){cv.error("unsupported lang: "+e)}e=e.replace(cs,c1).toLowerCase();return function(di){var dh;do{if((dh=cd?di.getAttribute("xml:lang")||di.getAttribute("lang"):di.lang)){dh=dh.toLowerCase();return dh===e||dh.indexOf(e+"-")===0}}while((di=di.parentNode)&&di.nodeType===1);return false}}),target:function(e){var dh=da.location&&da.location.hash;return dh&&dh.slice(1)===e.id},root:function(e){return e===co},focus:function(e){return e===cB.activeElement&&(!cB.hasFocus||cB.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===false},disabled:function(e){return e.disabled===true},checked:function(e){var dh=e.nodeName.toLowerCase();return(dh==="input"&&!!e.checked)||(dh==="option"&&!!e.selected)},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling){if(e.nodeName>"@"||e.nodeType===3||e.nodeType===4){return false}}return true},parent:function(e){return !cn.pseudos.empty(e)},header:function(e){return cl.test(e.nodeName)},input:function(e){return b8.test(e.nodeName)},button:function(dh){var e=dh.nodeName.toLowerCase();return e==="input"&&dh.type==="button"||e==="button"},text:function(dh){var e;return dh.nodeName.toLowerCase()==="input"&&dh.type==="text"&&((e=dh.getAttribute("type"))==null||e.toLowerCase()===dh.type)},first:c3(function(){return[0]}),last:c3(function(e,dh){return[dh-1]}),eq:c3(function(e,di,dh){return[dh<0?dh+di:dh]}),even:c3(function(e,di){var dh=0;for(;dh=0;){e.push(dh)}return e}),gt:c3(function(e,dj,di){var dh=di<0?di+dj:di;for(;++dh1?function(dk,dj,dh){var di=e.length;while(di--){if(!e[di](dk,dj,dh)){return false}}return true}:e[0]}function cX(e,dh,di,dj,dm){var dk,dq=[],dl=0,dn=e.length,dp=dh!=null;for(;dl-1){dx[dz]=!(du[dz]=dr)}}}}else{dt=cX(dt===du?dt.splice(dn,dt.length):dt);if(dl){dl(null,du,dt,dw)}else{b4.apply(du,dt)}}})}function c6(dm){var dh,dk,di,dl=dm.length,dq=cn.relative[dm[0].type],dr=dq||cn.relative[" "],dj=dq?1:0,dn=cq(function(ds){return ds===dh},dr,true),dp=cq(function(ds){return b9.call(dh,ds)>-1},dr,true),e=[function(du,dt,ds){return(!dq&&(ds||dt!==dg))||((dh=dt).nodeType?dn(du,dt,ds):dp(du,dt,ds))}];for(;dj1&&df(e),dj>1&&cg(dm.slice(0,dj-1)).replace(cr,"$1"),dk,dj0,dk=dj.length>0,dh=function(dw,dq,dv,du,dC){var dr,ds,dx,dB=[],dA=0,dt="0",dm=dw&&[],dy=dC!=null,dz=dg,dp=dw||dk&&cn.find.TAG("*",dC&&dq.parentNode||dq),dn=(de+=dz==null?1:Math.random()||0.1);if(dy){dg=dq!==cB&&dq;cb=dl}for(;(dr=dp[dt])!=null;dt++){if(dk&&dr){ds=0;while((dx=dj[ds++])){if(dx(dr,dq,dv)){du.push(dr);break}}if(dy){de=dn;cb=++dl}}if(e){if((dr=!dx&&dr)){dA--}if(dw){dm.push(dr)}}}dA+=dt;if(e&&dt!==dA){ds=0;while((dx=di[ds++])){dx(dm,dB,dq,dv)}if(dw){if(dA>0){while(dt--){if(!(dm[dt]||dB[dt])){dB[dt]=c8.call(du)}}}dB=cX(dB)}b4.apply(du,dB);if(dy&&!dw&&dB.length>0&&(dA+di.length)>1){cv.uniqueSort(du)}}if(dy){de=dn;dg=dz}return dm};return e?cj(dh):dh}cS=cv.compile=function(e,dl){var di,dh=[],dk=[],dj=cG[e+" "];if(!dj){if(!dl){dl=cf(e)}di=dl.length;while(di--){dj=c6(dl[di]);if(dj[c5]){dh.push(dj)}else{dk.push(dj)}}dj=cG(e,cU(dk,dh))}return dj};function cy(dh,dk,dj){var di=0,e=dk.length;for(;di2&&(dh=dp[0]).type==="ID"&&e.nodeType===9&&!cd&&cn.relative[dp[1].type]){e=cn.find.ID(dh.matches[0].replace(cs,c1),e)[0];if(!e){return dj}di=di.slice(dp.shift().value.length)}dk=cY.needsContext.test(di)?0:dp.length;while(dk--){dh=dp[dk];if(cn.relative[(dq=dh.type)]){break}if((dn=cn.find[dq])){if((dm=dn(dh.matches[0].replace(cs,c1),cW.test(dp[0].type)&&e.parentNode||e))){dp.splice(dk,1);di=dm.length&&cg(dp);if(!di){b4.apply(dj,cm.call(dm,0));return dj}break}}}}}cS(di,dl)(dm,e,cd,dj,cW.test(di));return dj}cn.pseudos.nth=cn.pseudos.eq;function cR(){}cn.filters=cR.prototype=cn.pseudos;cn.setFilters=new cR();cV();cv.attr=bJ.attr;bJ.find=cv;bJ.expr=cv.selectors;bJ.expr[":"]=bJ.expr.pseudos;bJ.unique=cv.uniqueSort;bJ.text=cv.getText;bJ.isXMLDoc=cv.isXML;bJ.contains=cv.contains})(a2);var aj=/Until$/,bt=/^(?:parents|prev(?:Until|All))/,an=/^.[^:#\[\.,]*$/,y=bJ.expr.match.needsContext,bx={children:true,contents:true,next:true,prev:true};bJ.fn.extend({find:function(b3){var b6,b5,b4,e=this.length;if(typeof b3!=="string"){b4=this;return this.pushStack(bJ(b3).filter(function(){for(b6=0;b61?bJ.unique(b5):b5);b5.selector=(this.selector?this.selector+" ":"")+b3;return b5},has:function(b5){var b4,b3=bJ(b5,this),e=b3.length;return this.filter(function(){for(b4=0;b4=0:bJ.filter(e,this).length>0:this.filter(e).length>0)},closest:function(b6,b5){var b7,b4=0,e=this.length,b3=[],b8=y.test(b6)||typeof b6!=="string"?bJ(b6,b5||this.context):0;for(;b4-1:bJ.find.matchesSelector(b7,b6)){b3.push(b7);break}b7=b7.parentNode}}return this.pushStack(b3.length>1?bJ.unique(b3):b3)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.first().prevAll().length:-1}if(typeof e==="string"){return bJ.inArray(this[0],bJ(e))}return bJ.inArray(e.jquery?e[0]:e,this)},add:function(e,b3){var b5=typeof e==="string"?bJ(e,b3):bJ.makeArray(e&&e.nodeType?[e]:e),b4=bJ.merge(this.get(),b5);return this.pushStack(bJ.unique(b4))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}});bJ.fn.andSelf=bJ.fn.addBack;function aX(b3,e){do{b3=b3[e]}while(b3&&b3.nodeType!==1);return b3}bJ.each({parent:function(b3){var e=b3.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return bJ.dir(e,"parentNode")},parentsUntil:function(b3,e,b4){return bJ.dir(b3,"parentNode",b4)},next:function(e){return aX(e,"nextSibling")},prev:function(e){return aX(e,"previousSibling")},nextAll:function(e){return bJ.dir(e,"nextSibling")},prevAll:function(e){return bJ.dir(e,"previousSibling")},nextUntil:function(b3,e,b4){return bJ.dir(b3,"nextSibling",b4)},prevUntil:function(b3,e,b4){return bJ.dir(b3,"previousSibling",b4)},siblings:function(e){return bJ.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return bJ.sibling(e.firstChild)},contents:function(e){return bJ.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:bJ.merge([],e.childNodes)}},function(e,b3){bJ.fn[e]=function(b6,b4){var b5=bJ.map(this,b3,b6);if(!aj.test(e)){b4=b6}if(b4&&typeof b4==="string"){b5=bJ.filter(b4,b5)}b5=this.length>1&&!bx[e]?bJ.unique(b5):b5;if(this.length>1&&bt.test(e)){b5=b5.reverse()}return this.pushStack(b5)}});bJ.extend({filter:function(b4,e,b3){if(b3){b4=":not("+b4+")"}return e.length===1?bJ.find.matchesSelector(e[0],b4)?[e[0]]:[]:bJ.find.matches(b4,e)},dir:function(b4,b3,b6){var e=[],b5=b4[b3];while(b5&&b5.nodeType!==9&&(b6===aG||b5.nodeType!==1||!bJ(b5).is(b6))){if(b5.nodeType===1){e.push(b5)}b5=b5[b3]}return e},sibling:function(b4,b3){var e=[];for(;b4;b4=b4.nextSibling){if(b4.nodeType===1&&b4!==b3){e.push(b4)}}return e}});function aO(b5,b4,e){b4=b4||0;if(bJ.isFunction(b4)){return bJ.grep(b5,function(b7,b6){var b8=!!b4.call(b7,b6,b7);return b8===e})}else{if(b4.nodeType){return bJ.grep(b5,function(b6){return(b6===b4)===e})}else{if(typeof b4==="string"){var b3=bJ.grep(b5,function(b6){return b6.nodeType===1});if(an.test(b4)){return bJ.filter(b4,b3,!e)}else{b4=bJ.filter(b4,b3)}}}}return bJ.grep(b5,function(b6){return(bJ.inArray(b6,b4)>=0)===e})}function A(e){var b4=d.split("|"),b3=e.createDocumentFragment();if(b3.createElement){while(b4.length){b3.createElement(b4.pop())}}return b3}var d="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",aA=/ jQuery\d+="(?:null|\d+)"/g,J=new RegExp("<(?:"+d+")[\\s/>]","i"),b2=/^\s+/,aD=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,m=/<([\w:]+)/,bX=/\s*$/g,T={option:[1,""],legend:[1,"
            ","
            "],area:[1,"",""],param:[1,"",""],thead:[1,"","
            "],tr:[2,"","
            "],col:[2,"","
            "],td:[3,"","
            "],_default:bJ.support.htmlSerialize?[0,"",""]:[1,"X
            ","
            "]},aS=A(l),j=aS.appendChild(l.createElement("div"));T.optgroup=T.option;T.tbody=T.tfoot=T.colgroup=T.caption=T.thead;T.th=T.td;bJ.fn.extend({text:function(e){return bJ.access(this,function(b3){return b3===aG?bJ.text(this):this.empty().append((this[0]&&this[0].ownerDocument||l).createTextNode(b3))},null,e,arguments.length)},wrapAll:function(e){if(bJ.isFunction(e)){return this.each(function(b4){bJ(this).wrapAll(e.call(this,b4))})}if(this[0]){var b3=bJ(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){b3.insertBefore(this[0])}b3.map(function(){var b4=this;while(b4.firstChild&&b4.firstChild.nodeType===1){b4=b4.firstChild}return b4}).append(this)}return this},wrapInner:function(e){if(bJ.isFunction(e)){return this.each(function(b3){bJ(this).wrapInner(e.call(this,b3))})}return this.each(function(){var b3=bJ(this),b4=b3.contents();if(b4.length){b4.wrapAll(e)}else{b3.append(e)}})},wrap:function(e){var b3=bJ.isFunction(e);return this.each(function(b4){bJ(this).wrapAll(b3?e.call(this,b4):e)})},unwrap:function(){return this.parent().each(function(){if(!bJ.nodeName(this,"body")){bJ(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){this.insertBefore(e,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(e){if(this.parentNode){this.parentNode.insertBefore(e,this)}})},after:function(){return this.domManip(arguments,false,function(e){if(this.parentNode){this.parentNode.insertBefore(e,this.nextSibling)}})},remove:function(e,b5){var b4,b3=0;for(;(b4=this[b3])!=null;b3++){if(!e||bJ.filter(e,[b4]).length>0){if(!b5&&b4.nodeType===1){bJ.cleanData(k(b4))}if(b4.parentNode){if(b5&&bJ.contains(b4.ownerDocument,b4)){bs(k(b4,"script"))}b4.parentNode.removeChild(b4)}}}return this},empty:function(){var b3,e=0;for(;(b3=this[e])!=null;e++){if(b3.nodeType===1){bJ.cleanData(k(b3,false))}while(b3.firstChild){b3.removeChild(b3.firstChild)}if(b3.options&&bJ.nodeName(b3,"select")){b3.options.length=0}}return this},clone:function(b3,e){b3=b3==null?false:b3;e=e==null?b3:e;return this.map(function(){return bJ.clone(this,b3,e)})},html:function(e){return bJ.access(this,function(b6){var b5=this[0]||{},b4=0,b3=this.length;if(b6===aG){return b5.nodeType===1?b5.innerHTML.replace(aA,""):aG}if(typeof b6==="string"&&!al.test(b6)&&(bJ.support.htmlSerialize||!J.test(b6))&&(bJ.support.leadingWhitespace||!b2.test(b6))&&!T[(m.exec(b6)||["",""])[1].toLowerCase()]){b6=b6.replace(aD,"<$1>");try{for(;b4")){ca=b3.cloneNode(true)}else{j.innerHTML=b3.outerHTML;j.removeChild(ca=j.firstChild)}if((!bJ.support.noCloneEvent||!bJ.support.noCloneChecked)&&(b3.nodeType===1||b3.nodeType===11)&&!bJ.isXMLDoc(b3)){b7=k(ca);b8=k(b3);for(b6=0;(b4=b8[b6])!=null;++b6){if(b7[b6]){Q(b4,b7[b6])}}}if(b5){if(e){b8=b8||k(b3);b7=b7||k(ca);for(b6=0;(b4=b8[b6])!=null;b6++){at(b4,b7[b6])}}else{at(b3,ca)}}b7=k(ca,"script");if(b7.length>0){bs(b7,!b9&&k(b3,"script"))}b7=b8=b4=null;return ca},buildFragment:function(b3,b5,ca,cf){var cb,b7,b9,ce,cg,cd,b4,b8=b3.length,b6=A(b5),e=[],cc=0;for(;cc")+b4[2];cb=b4[0];while(cb--){ce=ce.lastChild}if(!bJ.support.leadingWhitespace&&b2.test(b7)){e.push(b5.createTextNode(b2.exec(b7)[0]))}if(!bJ.support.tbody){b7=cg==="table"&&!bX.test(b7)?ce.firstChild:b4[1]===""&&!bX.test(b7)?ce:0;cb=b7&&b7.childNodes.length;while(cb--){if(bJ.nodeName((cd=b7.childNodes[cb]),"tbody")&&!cd.childNodes.length){b7.removeChild(cd)}}}bJ.merge(e,ce.childNodes);ce.textContent="";while(ce.firstChild){ce.removeChild(ce.firstChild)}ce=b6.lastChild}}}}if(ce){b6.removeChild(ce)}if(!bJ.support.appendChecked){bJ.grep(k(e,"input"),bV)}cc=0;while((b7=e[cc++])){if(cf&&bJ.inArray(b7,cf)!==-1){continue}b9=bJ.contains(b7.ownerDocument,b7);ce=k(b6.appendChild(b7),"script");if(b9){bs(ce)}if(ca){cb=0;while((b7=ce[cb++])){if(bz.test(b7.type||"")){ca.push(b7)}}}}ce=null;return b6},cleanData:function(b3,cb){var b5,ca,b4,b6,b7=0,cc=bJ.expando,e=bJ.cache,b8=bJ.support.deleteExpando,b9=bJ.event.special;for(;(b5=b3[b7])!=null;b7++){if(cb||bJ.acceptData(b5)){b4=b5[cc];b6=b4&&e[b4];if(b6){if(b6.events){for(ca in b6.events){if(b9[ca]){bJ.event.remove(b5,ca)}else{bJ.removeEvent(b5,ca,b6.handle)}}}if(e[b4]){delete e[b4];if(b8){delete b5[cc]}else{if(typeof b5.removeAttribute!==aC){b5.removeAttribute(cc)}else{b5[cc]=null}}a6.push(b4)}}}}}});var aE,bo,E,bg=/alpha\([^)]*\)/i,aT=/opacity\s*=\s*([^)]*)/,bn=/^(top|right|bottom|left)$/,F=/^(none|table(?!-c[ea]).+)/,aY=/^margin/,a9=new RegExp("^("+bA+")(.*)$","i"),W=new RegExp("^("+bA+")(?!px)[a-z%]+$","i"),S=new RegExp("^([+-])=("+bA+")","i"),bj={BODY:"block"},bb={position:"absolute",visibility:"hidden",display:"block"},bC={letterSpacing:0,fontWeight:400},bT=["Top","Right","Bottom","Left"],av=["Webkit","O","Moz","ms"];function b(b5,b3){if(b3 in b5){return b3}var b6=b3.charAt(0).toUpperCase()+b3.slice(1),e=b3,b4=av.length;while(b4--){b3=av[b4]+b6;if(b3 in b5){return b3}}return e}function P(b3,e){b3=e||b3;return bJ.css(b3,"display")==="none"||!bJ.contains(b3.ownerDocument,b3)}function p(b8,e){var b9,b6,b7,b3=[],b4=0,b5=b8.length;for(;b41)},show:function(){return p(this,true)},hide:function(){return p(this)},toggle:function(b3){var e=typeof b3==="boolean";return this.each(function(){if(e?b3:P(this)){bJ(this).show()}else{bJ(this).hide()}})}});bJ.extend({cssHooks:{opacity:{get:function(b4,b3){if(b3){var e=E(b4,"opacity");return e===""?"1":e}}}},cssNumber:{columnCount:true,fillOpacity:true,fontWeight:true,lineHeight:true,opacity:true,orphans:true,widows:true,zIndex:true,zoom:true},cssProps:{"float":bJ.support.cssFloat?"cssFloat":"styleFloat"},style:function(b5,b4,cb,b6){if(!b5||b5.nodeType===3||b5.nodeType===8||!b5.style){return}var b9,ca,cc,b7=bJ.camelCase(b4),b3=b5.style;b4=bJ.cssProps[b7]||(bJ.cssProps[b7]=b(b3,b7));cc=bJ.cssHooks[b4]||bJ.cssHooks[b7];if(cb!==aG){ca=typeof cb;if(ca==="string"&&(b9=S.exec(cb))){cb=(b9[1]+1)*b9[2]+parseFloat(bJ.css(b5,b4));ca="number"}if(cb==null||ca==="number"&&isNaN(cb)){return}if(ca==="number"&&!bJ.cssNumber[b7]){cb+="px"}if(!bJ.support.clearCloneStyle&&cb===""&&b4.indexOf("background")===0){b3[b4]="inherit"}if(!cc||!("set" in cc)||(cb=cc.set(b5,cb,b6))!==aG){try{b3[b4]=cb}catch(b8){}}}else{if(cc&&"get" in cc&&(b9=cc.get(b5,false,b6))!==aG){return b9}return b3[b4]}},css:function(b8,b6,b3,b7){var b5,b9,e,b4=bJ.camelCase(b6);b6=bJ.cssProps[b4]||(bJ.cssProps[b4]=b(b8.style,b4));e=bJ.cssHooks[b6]||bJ.cssHooks[b4];if(e&&"get" in e){b9=e.get(b8,true,b3)}if(b9===aG){b9=E(b8,b6,b7)}if(b9==="normal"&&b6 in bC){b9=bC[b6]}if(b3===""||b3){b5=parseFloat(b9);return b3===true||bJ.isNumeric(b5)?b5||0:b9}return b9},swap:function(b7,b6,b8,b5){var b4,b3,e={};for(b3 in b6){e[b3]=b7.style[b3];b7.style[b3]=b6[b3]}b4=b8.apply(b7,b5||[]);for(b3 in b6){b7.style[b3]=e[b3]}return b4}});if(a2.getComputedStyle){bo=function(e){return a2.getComputedStyle(e,null)};E=function(b6,b4,b8){var b5,b3,ca,b7=b8||bo(b6),b9=b7?b7.getPropertyValue(b4)||b7[b4]:aG,e=b6.style;if(b7){if(b9===""&&!bJ.contains(b6.ownerDocument,b6)){b9=bJ.style(b6,b4)}if(W.test(b9)&&aY.test(b4)){b5=e.width;b3=e.minWidth;ca=e.maxWidth;e.minWidth=e.maxWidth=e.width=b9;b9=b7.width;e.width=b5;e.minWidth=b3;e.maxWidth=ca}}return b9}}else{if(l.documentElement.currentStyle){bo=function(e){return e.currentStyle};E=function(b5,b3,b8){var b4,b7,b9,b6=b8||bo(b5),ca=b6?b6[b3]:aG,e=b5.style;if(ca==null&&e&&e[b3]){ca=e[b3]}if(W.test(ca)&&!bn.test(b3)){b4=e.left;b7=b5.runtimeStyle;b9=b7&&b7.left;if(b9){b7.left=b5.currentStyle.left}e.left=b3==="fontSize"?"1em":ca;ca=e.pixelLeft+"px";e.left=b4;if(b9){b7.left=b9}}return ca===""?"auto":ca}}}function aJ(e,b4,b5){var b3=a9.exec(b4);return b3?Math.max(0,b3[1]-(b5||0))+(b3[2]||"px"):b4}function aw(b6,b3,e,b8,b5){var b4=e===(b8?"border":"content")?4:b3==="width"?1:0,b7=0;for(;b4<4;b4+=2){if(e==="margin"){b7+=bJ.css(b6,e+bT[b4],true,b5)}if(b8){if(e==="content"){b7-=bJ.css(b6,"padding"+bT[b4],true,b5)}if(e!=="margin"){b7-=bJ.css(b6,"border"+bT[b4]+"Width",true,b5)}}else{b7+=bJ.css(b6,"padding"+bT[b4],true,b5);if(e!=="padding"){b7+=bJ.css(b6,"border"+bT[b4]+"Width",true,b5)}}}return b7}function u(b6,b3,e){var b5=true,b7=b3==="width"?b6.offsetWidth:b6.offsetHeight,b4=bo(b6),b8=bJ.support.boxSizing&&bJ.css(b6,"boxSizing",false,b4)==="border-box";if(b7<=0||b7==null){b7=E(b6,b3,b4);if(b7<0||b7==null){b7=b6.style[b3]}if(W.test(b7)){return b7}b5=b8&&(bJ.support.boxSizingReliable||b7===b6.style[b3]);b7=parseFloat(b7)||0}return(b7+aw(b6,b3,e||(b8?"border":"content"),b5,b4))+"px"}function bE(b4){var b3=l,e=bj[b4];if(!e){e=a1(b4,b3);if(e==="none"||!e){aE=(aE||bJ("