guy 7 years ago
parent
commit
cf96f485d2
  1. 1665
      dist/base.js
  2. 1819
      dist/bundle.js
  3. 20
      dist/bundle.min.js
  4. 4
      dist/case.js
  5. 150
      dist/core.js
  6. 7
      dist/fix/fix.compact.js
  7. 6
      dist/fix/fix.js
  8. 1228
      src/base/formula/codemirror/codemirror.js
  9. 2
      src/base/sql/codemirrior/sql-mode.js
  10. 284
      src/base/svg/raphael.js
  11. 117
      src/base/tree/ztree/jquery.ztree.core-3.5.js
  12. 34
      src/base/tree/ztree/jquery.ztree.excheck-3.5.js
  13. 4
      src/case/clipboard/clipboard.js
  14. 150
      src/core/jquery.js

1665
dist/base.js vendored

File diff suppressed because it is too large Load Diff

1819
dist/bundle.js vendored

File diff suppressed because it is too large Load Diff

20
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

4
dist/case.js vendored

@ -2627,7 +2627,7 @@ try {// IE8下会抛错
function _interopRequireDefault (obj) {
return obj && obj.__esModule ? obj : {
default: obj
"default": obj
};
}
@ -2861,7 +2861,7 @@ try {// IE8下会抛错
function _interopRequireDefault (obj) {
return obj && obj.__esModule ? obj : {
default: obj
"default": obj
};
}

150
dist/core.js vendored

@ -169,7 +169,7 @@
return this;
// HANDLE: $(#id)
}
} else {
elem = document.getElementById( match[2] );
// Check parentNode to catch when Blackberry 4.6 returns
@ -189,7 +189,7 @@
this.context = document;
this.selector = selector;
return this;
}
// HANDLE: $(expr, $(...))
} else if ( !context || context.jquery ) {
@ -197,9 +197,9 @@
// HANDLE: $(expr, context)
// (which is just equivalent to: $(context).find(expr)
}
} else {
return this.constructor( context ).find( selector );
}
// HANDLE: $(DOMElement)
} else if ( selector.nodeType ) {
@ -1739,10 +1739,10 @@
// The following elements throw uncatchable exceptions if you
// attempt to add expando properties to them.
noData: {
embed: true,
"embed": true,
// Ban all objects except for Flash (which handle expandos)
object: "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
applet: true
"object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
"applet": true
},
hasData: function( elem ) {
@ -2427,8 +2427,8 @@
propFix: {
tabindex: "tabIndex",
readonly: "readOnly",
for: "htmlFor",
class: "className",
"for": "htmlFor",
"class": "className",
maxlength: "maxLength",
cellspacing: "cellSpacing",
cellpadding: "cellPadding",
@ -2460,18 +2460,18 @@
if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
return ret;
}
} else {
return ( elem[ name ] = value );
}
} else {
if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
return ret;
}
} else {
return elem[ name ];
}
}
},
propHooks: {
@ -3780,18 +3780,18 @@
ridentifier = new RegExp( "^" + identifier + "$" ),
matchExpr = {
ID: new RegExp( "^#(" + characterEncoding + ")" ),
CLASS: new RegExp( "^\\.(" + characterEncoding + ")" ),
NAME: new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ),
TAG: new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
ATTR: new RegExp( "^" + attributes ),
PSEUDO: new RegExp( "^" + pseudos ),
CHILD: new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
"ID": new RegExp( "^#(" + characterEncoding + ")" ),
"CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
"NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ),
"TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
"ATTR": new RegExp( "^" + attributes ),
"PSEUDO": new RegExp( "^" + pseudos ),
"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
"*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
"*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
// For use in libraries implementing .is()
// We use this for POS matching in `select`
needsContext: new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
"needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
},
@ -4088,10 +4088,10 @@
}) ?
{} :
{
href: function ( elem ) {
"href": function( elem ) {
return elem.getAttribute( "href", 2 );
},
type: function ( elem ) {
"type": function( elem ) {
return elem.getAttribute("type");
}
};
@ -4525,12 +4525,12 @@
// innerText usage removed for consistency of new lines (see #11153)
if ( typeof elem.textContent === "string" ) {
return elem.textContent;
}
} else {
// Traverse its children
for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
ret += getText( elem );
}
}
} else if ( nodeType === 3 || nodeType === 4 ) {
return elem.nodeValue;
}
@ -4558,7 +4558,7 @@
},
preFilter: {
ATTR: function ( match ) {
"ATTR": function( match ) {
match[1] = match[1].replace( runescape, funescape );
// Move the given value to match[3] whether quoted or unquoted
@ -4571,7 +4571,7 @@
return match.slice( 0, 4 );
},
CHILD: function ( match ) {
"CHILD": function( match ) {
/* matches from matchExpr["CHILD"]
1 type (only|nth|...)
2 what (child|of-type)
@ -4603,7 +4603,7 @@
return match;
},
PSEUDO: function ( match ) {
"PSEUDO": function( match ) {
var excess,
unquoted = !match[5] && match[2];
@ -4634,7 +4634,7 @@
filter: {
TAG: function ( nodeName ) {
"TAG": function( nodeName ) {
if ( nodeName === "*" ) {
return function() { return true; };
}
@ -4645,7 +4645,7 @@
};
},
CLASS: function ( className ) {
"CLASS": function( className ) {
var pattern = classCache[ className + " " ];
return pattern ||
@ -4655,7 +4655,7 @@
});
},
ATTR: function ( name, operator, check ) {
"ATTR": function( name, operator, check ) {
return function( elem ) {
var result = Sizzle.attr( elem, name );
@ -4679,7 +4679,7 @@
};
},
CHILD: function ( type, what, argument, first, last ) {
"CHILD": function( type, what, argument, first, last ) {
var simple = type.slice( 0, 3 ) !== "nth",
forward = type.slice( -4 ) !== "last",
ofType = what === "of-type";
@ -4768,7 +4768,7 @@
};
},
PSEUDO: function ( pseudo, argument ) {
"PSEUDO": function( pseudo, argument ) {
// pseudo-class names are case-insensitive
// http://www.w3.org/TR/selectors/#pseudo-classes
// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
@ -4808,7 +4808,7 @@
pseudos: {
// Potentially complex pseudos
not: markFunction(function ( selector ) {
"not": markFunction(function( selector ) {
// Trim the selector passed to compile
// to avoid treating leading and trailing
// spaces as combinators
@ -4836,13 +4836,13 @@
};
}),
has: markFunction(function ( selector ) {
"has": markFunction(function( selector ) {
return function( elem ) {
return Sizzle( selector, elem ).length > 0;
};
}),
contains: markFunction(function ( text ) {
"contains": markFunction(function( text ) {
return function( elem ) {
return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
};
@ -4855,7 +4855,7 @@
// The matching of C against the element's language value is performed case-insensitively.
// The identifier C does not have to be a valid language name."
// http://www.w3.org/TR/selectors/#lang-pseudo
lang: markFunction( function ( lang ) {
"lang": markFunction( function( lang ) {
// lang value must be a valid identifider
if ( !ridentifier.test(lang || "") ) {
Sizzle.error( "unsupported lang: " + lang );
@ -4877,36 +4877,36 @@
}),
// Miscellaneous
target: function ( elem ) {
"target": function( elem ) {
var hash = window.location && window.location.hash;
return hash && hash.slice( 1 ) === elem.id;
},
root: function ( elem ) {
"root": function( elem ) {
return elem === docElem;
},
focus: function ( elem ) {
"focus": function( elem ) {
return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
},
// Boolean properties
enabled: function ( elem ) {
"enabled": function( elem ) {
return elem.disabled === false;
},
disabled: function ( elem ) {
"disabled": function( elem ) {
return elem.disabled === true;
},
checked: function ( elem ) {
"checked": function( elem ) {
// In CSS3, :checked should return both checked and selected elements
// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
var nodeName = elem.nodeName.toLowerCase();
return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
},
selected: function ( elem ) {
"selected": function( elem ) {
// Accessing this property makes selected-by-default
// options in Safari work properly
if ( elem.parentNode ) {
@ -4917,7 +4917,7 @@
},
// Contents
empty: function ( elem ) {
"empty": function( elem ) {
// http://www.w3.org/TR/selectors/#empty-pseudo
// :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
// not comment, processing instructions, or others
@ -4931,25 +4931,25 @@
return true;
},
parent: function ( elem ) {
"parent": function( elem ) {
return !Expr.pseudos["empty"]( elem );
},
// Element/input types
header: function ( elem ) {
"header": function( elem ) {
return rheader.test( elem.nodeName );
},
input: function ( elem ) {
"input": function( elem ) {
return rinputs.test( elem.nodeName );
},
button: function ( elem ) {
"button": function( elem ) {
var name = elem.nodeName.toLowerCase();
return name === "input" && elem.type === "button" || name === "button";
},
text: function ( elem ) {
"text": function( elem ) {
var attr;
// IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
// use getAttribute instead to test this case
@ -4959,19 +4959,19 @@
},
// Position-in-collection
first: createPositionalPseudo(function () {
"first": createPositionalPseudo(function() {
return [ 0 ];
}),
last: createPositionalPseudo(function ( matchIndexes, length ) {
"last": createPositionalPseudo(function( matchIndexes, length ) {
return [ length - 1 ];
}),
eq: createPositionalPseudo(function ( matchIndexes, length, argument ) {
"eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
return [ argument < 0 ? argument + length : argument ];
}),
even: createPositionalPseudo(function ( matchIndexes, length ) {
"even": createPositionalPseudo(function( matchIndexes, length ) {
var i = 0;
for ( ; i < length; i += 2 ) {
matchIndexes.push( i );
@ -4979,7 +4979,7 @@
return matchIndexes;
}),
odd: createPositionalPseudo(function ( matchIndexes, length ) {
"odd": createPositionalPseudo(function( matchIndexes, length ) {
var i = 1;
for ( ; i < length; i += 2 ) {
matchIndexes.push( i );
@ -4987,7 +4987,7 @@
return matchIndexes;
}),
lt: createPositionalPseudo(function ( matchIndexes, length, argument ) {
"lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
var i = argument < 0 ? argument + length : argument;
for ( ; --i >= 0; ) {
matchIndexes.push( i );
@ -4995,7 +4995,7 @@
return matchIndexes;
}),
gt: createPositionalPseudo(function ( matchIndexes, length, argument ) {
"gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
var i = argument < 0 ? argument + length : argument;
for ( ; ++i < length; ) {
matchIndexes.push( i );
@ -5811,9 +5811,9 @@
if ( isSimple.test( qualifier ) ) {
return jQuery.filter(qualifier, filtered, !keep);
}
} else {
qualifier = jQuery.filter( qualifier, filtered );
}
}
return jQuery.grep(elements, function( elem ) {
@ -6183,7 +6183,7 @@
dataType: "script",
async: false,
global: false,
throws: true
"throws": true
});
} else {
jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) );
@ -6781,22 +6781,22 @@
// Exclude the following css properties to add px
cssNumber: {
columnCount: true,
fillOpacity: true,
fontWeight: true,
lineHeight: true,
opacity: true,
orphans: true,
widows: true,
zIndex: true,
zoom: true
"columnCount": true,
"fillOpacity": true,
"fontWeight": true,
"lineHeight": true,
"opacity": true,
"orphans": true,
"widows": true,
"zIndex": true,
"zoom": true
},
// Add in properties whose names you wish to fix before
// setting or getting the value
cssProps: {
// normalize float css property
float: jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
"float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
},
// Get and set the style property on a DOM Node
@ -7227,7 +7227,7 @@
if ( computed ) {
// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
// Work around by temporarily setting element display to inline-block
return jQuery.swap( elem, { display: "inline-block" },
return jQuery.swap( elem, { "display": "inline-block" },
curCSS, [ elem, "marginRight" ] );
}
}
@ -8734,10 +8734,10 @@
if ( percent < 1 && length ) {
return remaining;
}
} else {
deferred.resolveWith( elem, [ animation ] );
return false;
}
},
animation = deferred.promise({
elem: elem,

7
dist/fix/fix.compact.js vendored

@ -98,7 +98,10 @@
});
});
this._watchers && (this._watchers = []);
this.store && (this.store._parent = null, this.store = null);
if (this.store) {
this.store._parent && (this.store._parent = null);
this.store = null;
}
};
_.each(["_mount"], function (name) {
@ -111,6 +114,7 @@
});
});
if (BI.isIE9Below()) {
_.each(["each", "map", "reduce", "reduceRight", "find", "filter", "reject", "every", "all", "some", "any", "max", "min",
"sortBy", "groupBy", "indexBy", "countBy", "partition",
"keys", "allKeys", "values", "pairs", "invert",
@ -124,5 +128,6 @@
}) : old.apply(this, arguments);
};
});
}
BI.watch = Fix.watch;
}());

6
dist/fix/fix.js vendored

@ -401,10 +401,10 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
} else {
this.model = this.walk(value);
}
try {
def(this.model, "__ob__", this);
} catch (e) {
if (isIE9Below) {
this.model['__ob__'] = this;
} else {
def(this.model, "__ob__", this);
}
}

1228
src/base/formula/codemirror/codemirror.js

File diff suppressed because it is too large Load Diff

2
src/base/sql/codemirrior/sql-mode.js

@ -10,7 +10,7 @@
"use strict";
var client = parserConfig.client || {},
atoms = parserConfig.atoms || {false: true, true: true, null: true},
atoms = parserConfig.atoms || {"false": true, "true": true, "null": true},
builtin = parserConfig.builtin || {},
keywords = parserConfig.keywords || {},
operatorChars = parserConfig.operatorChars || /^[*+\-%<>!=&|~^]/,

284
src/base/svg/raphael.js

@ -68,14 +68,12 @@
errors = [];
current_event = name;
stop = 0;
for (var i = 0, ii = listeners.length; i < ii; i++) {
if ("zIndex" in listeners[i]) {
for (var i = 0, ii = listeners.length; i < ii; i++) if ("zIndex" in listeners[i]) {
indexed.push(listeners[i].zIndex);
if (listeners[i].zIndex < 0) {
queue[listeners[i].zIndex] = listeners[i];
}
}
}
indexed.sort(numsort);
while (indexed[z] < 0) {
l = queue[indexed[z++]];
@ -100,7 +98,7 @@
if (stop) {
break;
}
} while (l);
} while (l)
} else {
queue[l.zIndex] = l;
}
@ -187,7 +185,7 @@
\*/
eve.on = function (name, f) {
name = String(name);
if (typeof f !== "function") {
if (typeof f != "function") {
return function () {};
}
var names = name.split(separator),
@ -197,11 +195,9 @@
e = e.hasOwnProperty(names[i]) && e[names[i]] || (e[names[i]] = {n: {}});
}
e.f = e.f || [];
for (i = 0, ii = e.f.length; i < ii; i++) {
if (e.f[i] == f) {
for (i = 0, ii = e.f.length; i < ii; i++) if (e.f[i] == f) {
return fun;
}
}
e.f.push(f);
return function (zIndex) {
if (+zIndex == +zIndex) {
@ -310,12 +306,10 @@
splice.push(e[names[i]]);
}
} else {
for (key in e) {
if (e[has](key)) {
for (key in e) if (e[has](key)) {
splice.push(e[key]);
}
}
}
cur.splice.apply(cur, splice);
}
}
@ -324,34 +318,26 @@
while (e.n) {
if (f) {
if (e.f) {
for (j = 0, jj = e.f.length; j < jj; j++) {
if (e.f[j] == f) {
for (j = 0, jj = e.f.length; j < jj; j++) if (e.f[j] == f) {
e.f.splice(j, 1);
break;
}
}
!e.f.length && delete e.f;
}
for (key in e.n) {
if (e.n[has](key) && e.n[key].f) {
for (key in e.n) if (e.n[has](key) && e.n[key].f) {
var funcs = e.n[key].f;
for (j = 0, jj = funcs.length; j < jj; j++) {
if (funcs[j] == f) {
for (j = 0, jj = funcs.length; j < jj; j++) if (funcs[j] == f) {
funcs.splice(j, 1);
break;
}
}
!funcs.length && delete e.n[key].f;
}
}
} else {
delete e.f;
for (key in e.n) {
if (e.n[has](key) && e.n[key].f) {
for (key in e.n) if (e.n[has](key) && e.n[key].f) {
delete e.n[key].f;
}
}
}
e = e.n;
}
}
@ -468,17 +454,17 @@
return loaded ? first() : eve.on("raphael.DOMload", first);
} else if (R.is(first, array)) {
return R._engine.create[apply](R, first.splice(0, 3 + R.is(first[0], nu))).add(first);
}
} else {
var args = Array.prototype.slice.call(arguments, 0);
if (R.is(args[args.length - 1], "function")) {
var f = args.pop();
return loaded ? f.call(R._engine.create[apply](R, args)) : eve.on("raphael.DOMload", function () {
f.call(R._engine.create[apply](R, args));
});
}
} else {
return R._engine.create[apply](R, arguments);
}
}
}
R.version = "2.1.4";
R.eve = eve;
@ -535,7 +521,7 @@
appendChild = "appendChild",
apply = "apply",
concat = "concat",
supportsTouch = ("ontouchstart" in g.win) || g.win.DocumentTouch && g.doc instanceof DocumentTouch, // taken from Modernizr touch test
supportsTouch = ('ontouchstart' in g.win) || g.win.DocumentTouch && g.doc instanceof DocumentTouch, //taken from Modernizr touch test
E = "",
S = " ",
Str = String,
@ -563,7 +549,7 @@
push = "push",
ISURL = R._ISURL = /^url\(['"]?(.+?)['"]?\)$/i,
colourRegExp = /^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i,
isnan = {NaN: 1, Infinity: 1, "-Infinity": 1},
isnan = {"NaN": 1, "Infinity": 1, "-Infinity": 1},
bezierrg = /^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,
round = math.round,
setAttribute = "setAttribute",
@ -580,8 +566,8 @@
cy: 0,
fill: "#fff",
"fill-opacity": 1,
font: "10px \"Arial\"",
"font-family": "\"Arial\"",
font: '10px "Arial"',
"font-family": '"Arial"',
"font-size": "10",
"font-style": "normal",
"font-weight": 400,
@ -731,10 +717,10 @@
if (R.type == "VML") {
var d = g.doc.createElement("div"),
b;
d.innerHTML = "<v:shape adj=\"1\"/>";
d.innerHTML = '<v:shape adj="1"/>';
b = d.firstChild;
b.style.behavior = "url(#default#VML)";
if (!(b && typeof b.adj === "object")) {
if (!(b && typeof b.adj == "object")) {
return (R.type = E);
}
d = null;
@ -801,22 +787,20 @@
return o instanceof Array;
}
return (type == "null" && o === null) ||
(type === typeof o && o !== null) ||
(type == typeof o && o !== null) ||
(type == "object" && o === Object(o)) ||
(type == "array" && Array.isArray && Array.isArray(o)) ||
objectToString.call(o).slice(8, -1).toLowerCase() == type;
};
function clone(obj) {
if (typeof obj === "function" || Object(obj) !== obj) {
if (typeof obj == "function" || Object(obj) !== obj) {
return obj;
}
var res = new obj.constructor;
for (var key in obj) {
if (obj[has](key)) {
for (var key in obj) if (obj[has](key)) {
res[key] = clone(obj[key]);
}
}
return res;
}
@ -842,9 +826,9 @@
return 0;
}
return (180 + math.atan2(-y, -x) * 180 / PI + 360) % 360;
}
} else {
return R.angle(x1, y1, x3, y3) - R.angle(x2, y2, x3, y3);
}
};
/*\
* Raphael.rad
@ -885,11 +869,9 @@
tolerance = R.is(tolerance, "finite") ? tolerance : 10;
if (R.is(values, array)) {
var i = values.length;
while (i--) {
if (abs(values[i] - value) <= tolerance) {
while (i--) if (abs(values[i] - value) <= tolerance) {
return values[i];
}
}
} else {
values = +values;
var rem = value % values;
@ -1221,12 +1203,10 @@
return this.join(",").replace(p2s, "$1");
};
function repush(array, item) {
for (var i = 0, ii = array.length; i < ii; i++) {
if (array[i] === item) {
for (var i = 0, ii = array.length; i < ii; i++) if (array[i] === item) {
return array.push(array.splice(i, 1)[0]);
}
}
}
function cacher(f, scope, postprocessor) {
function newf() {
var arg = Array.prototype.slice.call(arguments, 0),
@ -1512,14 +1492,12 @@
}
if (name == "r") {
data.push([b][concat](params));
} else {
while (params.length >= paramCounts[name]) {
} else while (params.length >= paramCounts[name]) {
data.push([b][concat](params.splice(0, paramCounts[name])));
if (!paramCounts[name]) {
break;
}
}
}
});
}
data.toString = R._path2string;
@ -1570,12 +1548,10 @@
};
}
setTimeout(function () {
for (var key in p) {
if (p[has](key) && key != ps) {
for (var key in p) if (p[has](key) && key != ps) {
p[key].sleep--;
!p[key].sleep && delete p[key];
}
}
});
return p[ps];
};
@ -2319,14 +2295,14 @@
m2[1] = 2 * m1[1] - m2[1];
if (recursive) {
return [m2, m3, m4][concat](res);
}
} else {
res = [m2, m3, m4][concat](res).join()[split](",");
var newres = [];
for (var i = 0, ii = res.length; i < ii; i++) {
newres[i] = i % 2 ? rotate(res[i - 1], res[i], rad).y : rotate(res[i], res[i + 1], rad).x;
}
return newres;
}
},
findDotAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {
var t1 = 1 - t;
@ -2405,7 +2381,8 @@
if (pcom == "C" || pcom == "S") { // In "S" case we have to take into account, if the previous command is C/S.
nx = d.x * 2 - d.bx; // And reflect the previous
ny = d.y * 2 - d.by; // command's control point relative to the current point.
} else { // or some else or nothing
}
else { // or some else or nothing
nx = d.x;
ny = d.y;
}
@ -2415,7 +2392,8 @@
if (pcom == "Q" || pcom == "T") { // In "T" case we have to take into account, if the previous command is Q/T.
d.qx = d.x * 2 - d.qx; // And make a reflection similar
d.qy = d.y * 2 - d.qy; // to case "S".
} else { // or something else or nothing
}
else { // or something else or nothing
d.qx = d.x;
d.qy = d.y;
}
@ -2486,7 +2464,8 @@
if (p2) { // the same procedures is done to p2
p2[i] && (pfirst = p2[i][0]);
if (pfirst != "C") {
if (pfirst != "C")
{
pcoms2[i] = pfirst;
i && (pcom = pcoms2[i-1]);
}
@ -2740,16 +2719,16 @@
case "m": return [l, 1, 0, 0, 1, 0, 0];
case "r": if (item.length == 4) {
return [l, 0, item[2], item[3]];
}
} else {
return [l, 0];
}
case "s": if (item.length == 5) {
return [l, 1, 1, item[3], item[4]];
} else if (item.length == 3) {
return [l, 1, 1];
}
} else {
return [l, 1];
}
}
},
equaliseTransform = R._equaliseTransform = function (t1, t2) {
@ -2795,13 +2774,13 @@
width: container.style.pixelWidth || container.offsetWidth,
height: container.style.pixelHeight || container.offsetHeight
};
}
} else {
return {
container: container,
width: y,
height: w
};
}
}
return {
container: 1,
@ -3099,9 +3078,9 @@
return (s.dx || s.dy ? "t" + [s.dx, s.dy] : E) +
(s.scalex != 1 || s.scaley != 1 ? "s" + [s.scalex, s.scaley, 0, 0] : E) +
(s.rotate ? "r" + [s.rotate, 0, 0] : E);
}
} else {
return "m" + [this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)];
}
};
})(Matrix.prototype);
@ -3158,7 +3137,8 @@
return function () {
obj.removeEventListener(type, f, false);
if (supportsTouch && touchMap[type]) {obj.removeEventListener(touchMap[type], _f, false);}
if (supportsTouch && touchMap[type])
obj.removeEventListener(touchMap[type], _f, false);
return true;
};
@ -3515,11 +3495,9 @@
}
if (arguments.length == 1) {
if (R.is(key, "object")) {
for (var i in key) {
if (key[has](i)) {
for (var i in key) if (key[has](i)) {
this.data(i, key[i]);
}
}
return this;
}
eve("raphael.data.get." + this.id, this, data[key], key);
@ -3674,13 +3652,11 @@
\*/
elproto.undrag = function () {
var i = draggable.length;
while (i--) {
if (draggable[i].el == this) {
while (i--) if (draggable[i].el == this) {
this.unmousedown(draggable[i].start);
draggable.splice(i, 1);
eve.unbind("raphael.drag.*." + this.id);
}
}
!draggable.length && R.unmousemove(dragMove).unmouseup(dragUp);
drag = [];
};
@ -4121,8 +4097,8 @@
\*/
elproto.isPointInside = function (x, y) {
var rp = this.realPath = getPath[this.type](this);
if (this.attr("transform") && this.attr("transform").length) {
rp = R.transformPath(rp, this.attr("transform"));
if (this.attr('transform') && this.attr('transform').length) {
rp = R.transformPath(rp, this.attr('transform'));
}
return R.isPointInsidePath(rp, x, y);
};
@ -4240,9 +4216,9 @@
getPointAtSegmentLength = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, length) {
if (length == null) {
return bezlen(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y);
}
} else {
return R.findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, getTatLen(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, length));
}
},
getLengthFactory = function (istotal, subpath) {
return function (path, length, onlystart) {
@ -4551,8 +4527,7 @@
}
if (time < ms) {
var pos = easing(time / ms);
for (var attr in from) {
if (from[has](attr)) {
for (var attr in from) if (from[has](attr)) {
switch (availableAnimAttrs[attr]) {
case nu:
now = +from[attr] + pos * ms * diff[attr];
@ -4612,7 +4587,6 @@
}
set[attr] = now;
}
}
that.attr(set);
(function (id, that, anim) {
setTimeout(function () {
@ -4630,11 +4604,9 @@
that.attr(to);
animationElements.splice(l--, 1);
if (e.repeat > 1 && !e.next) {
for (key in to) {
if (to[has](key)) {
for (key in to) if (to[has](key)) {
init[key] = e.totalOrigin[key];
}
}
e.el.attr(init);
runAnimation(e.anim, e.el, e.anim.percents[0], null, e.totalOrigin, e.repeat - 1);
}
@ -4753,12 +4725,10 @@
this.ms = ms;
this.times = 1;
if (anim) {
for (var attr in anim) {
if (anim[has](attr)) {
for (var attr in anim) if (anim[has](attr)) {
newAnim[toFloat(attr)] = anim[attr];
percents.push(toFloat(attr));
}
}
percents.sort(sortByNumber);
}
this.anim = newAnim;
@ -4850,8 +4820,7 @@
return;
}
if (!isInAnim) {
for (var attr in params) {
if (params[has](attr)) {
for (var attr in params) if (params[has](attr)) {
if (availableAnimAttrs[has](attr) || element.paper.customAttributes[has](attr)) {
from[attr] = element.attr(attr);
(from[attr] == null) && (from[attr] = availableAttrs[attr]);
@ -4958,7 +4927,6 @@
}
}
}
}
var easing = params.easing,
easyeasy = R.easing_formulas[easing];
if (!easyeasy) {
@ -5041,12 +5009,10 @@
var p = {},
json,
attr;
for (attr in params) {
if (params[has](attr) && toFloat(attr) != attr && toFloat(attr) + "%" != attr) {
for (attr in params) if (params[has](attr) && toFloat(attr) != attr && toFloat(attr) + "%" != attr) {
json = true;
p[attr] = params[attr];
}
}
if (!json) {
// if percent-like syntax is used and end-of-all animation callback used
if(callback){
@ -5058,16 +5024,16 @@
lastKey = percent;
}
}
lastKey += "%";
lastKey += '%';
// if already defined callback in the last keyframe, skip
!params[lastKey].callback && (params[lastKey].callback = callback);
}
return new Animation(params, ms);
}
} else {
easing && (p.easing = easing);
callback && (p.callback = callback);
return new Animation({100: p}, ms);
}
};
/*\
* Element.animate
@ -5147,7 +5113,7 @@
if (value != null) {
runAnimation(anim, this, -1, mmin(value, 1));
return this;
}
} else {
len = animationElements.length;
for (; i < len; i++) {
e = animationElements[i];
@ -5165,7 +5131,7 @@
return 0;
}
return out;
}
};
/*\
* Element.pause
@ -5180,13 +5146,11 @@
= (object) original element
\*/
elproto.pause = function (anim) {
for (var i = 0; i < animationElements.length; i++) {
if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) {
for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) {
if (eve("raphael.anim.pause." + this.id, this, animationElements[i].anim) !== false) {
animationElements[i].paused = true;
}
}
}
return this;
};
/*\
@ -5202,15 +5166,13 @@
= (object) original element
\*/
elproto.resume = function (anim) {
for (var i = 0; i < animationElements.length; i++) {
if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) {
for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) {
var e = animationElements[i];
if (eve("raphael.anim.resume." + this.id, this, e.anim) !== false) {
delete e.paused;
this.status(e.anim, e.status);
}
}
}
return this;
};
/*\
@ -5226,22 +5188,18 @@
= (object) original element
\*/
elproto.stop = function (anim) {
for (var i = 0; i < animationElements.length; i++) {
if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) {
for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) {
if (eve("raphael.anim.stop." + this.id, this, animationElements[i].anim) !== false) {
animationElements.splice(i--, 1);
}
}
}
return this;
};
function stopAnimation(paper) {
for (var i = 0; i < animationElements.length; i++) {
if (animationElements[i].el.paper == paper) {
for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.paper == paper) {
animationElements.splice(i--, 1);
}
}
}
eve.on("raphael.remove", stopAnimation);
eve.on("raphael.clear", stopAnimation);
elproto.toString = function () {
@ -5316,8 +5274,7 @@
}
return this;
};
for (var method in elproto) {
if (elproto[has](method)) {
for (var method in elproto) if (elproto[has](method)) {
setproto[method] = (function (methodname) {
return function () {
var arg = arguments;
@ -5327,7 +5284,6 @@
};
})(method);
}
}
setproto.attr = function (name, value) {
if (name && R.is(name, array) && R.is(name[0], "object")) {
for (var j = 0, jj = name.length; j < jj; j++) {
@ -5402,12 +5358,10 @@
= (boolean) `true` if object was found & removed from the set
\*/
setproto.exclude = function (el) {
for (var i = 0, ii = this.length; i < ii; i++) {
if (this[i] == el) {
for (var i = 0, ii = this.length; i < ii; i++) if (this[i] == el) {
this.splice(i, 1);
return true;
}
}
};
setproto.animate = function (params, ms, easing, callback) {
(R.is(easing, "function") || !easing) && (callback = easing || null);
@ -5443,15 +5397,13 @@
y = [],
x2 = [],
y2 = [];
for (var i = this.items.length; i--;) {
if (!this.items[i].removed) {
for (var i = this.items.length; i--;) if (!this.items[i].removed) {
var box = this.items[i].getBBox();
x.push(box.x);
y.push(box.y);
x2.push(box.x + box.width);
y2.push(box.y + box.height);
}
}
x = mmin[apply](0, x);
y = mmin[apply](0, y);
x2 = mmax[apply](0, x2);
@ -5539,11 +5491,9 @@
glyphs: {}
},
family = font.face["font-family"];
for (var prop in font.face) {
if (font.face[has](prop)) {
for (var prop in font.face) if (font.face[has](prop)) {
fontcopy.face[prop] = font.face[prop];
}
}
if (this.fonts[family]) {
this.fonts[family].push(fontcopy);
} else {
@ -5551,8 +5501,7 @@
}
if (!font.svg) {
fontcopy.face["units-per-em"] = toInt(font.face["units-per-em"], 10);
for (var glyph in font.glyphs) {
if (font.glyphs[has](glyph)) {
for (var glyph in font.glyphs) if (font.glyphs[has](glyph)) {
var path = font.glyphs[glyph];
fontcopy.glyphs[glyph] = {
w: path.w,
@ -5562,15 +5511,12 @@
}) + "z"
};
if (path.k) {
for (var k in path.k) {
if (path[has](k)) {
for (var k in path.k) if (path[has](k)) {
fontcopy.glyphs[glyph].k[k] = path.k[k];
}
}
}
}
}
}
return font;
};
/*\
@ -5599,15 +5545,13 @@
var font = R.fonts[family];
if (!font) {
var name = new RegExp("(^|\\s)" + family.replace(/[^\w\d\s+!~.:_-]/g, E) + "(\\s|$)", "i");
for (var fontName in R.fonts) {
if (R.fonts[has](fontName)) {
for (var fontName in R.fonts) if (R.fonts[has](fontName)) {
if (name.test(fontName)) {
font = R.fonts[fontName];
break;
}
}
}
}
var thefont;
if (font) {
for (var i = 0, ii = font.length; i < ii; i++) {
@ -5782,7 +5726,7 @@
if (name in res) {
res = res[name];
}
typeof res === "function" && isFunc && (res = res());
typeof res == "function" && isFunc && (res = res());
}
});
res = (res == null || res == obj ? all : res) + "";
@ -5907,18 +5851,16 @@
};
var $ = function (el, attr) {
if (attr) {
if (typeof el === "string") {
if (typeof el == "string") {
el = $(el);
}
for (var key in attr) {
if (attr[has](key)) {
for (var key in attr) if (attr[has](key)) {
if (key.substring(0, 6) == "xlink:") {
el.setAttributeNS(xlink, key.substring(6), Str(attr[key]));
} else {
el.setAttribute(key, Str(attr[key]));
}
}
}
} else {
el = R._g.doc.createElementNS("http://www.w3.org/2000/svg", el);
el.style && (el.style.webkitTapHighlightColor = "rgba(0,0,0,0)");
@ -6148,13 +6090,11 @@
delete o._.arrows[se + "Type"];
delete o._.arrows[se + "String"];
}
for (attr in markerCounter) {
if (markerCounter[has](attr) && !markerCounter[attr]) {
for (attr in markerCounter) if (markerCounter[has](attr) && !markerCounter[attr]) {
var item = R._g.doc.getElementById(attr);
item && item.parentNode.removeChild(item);
}
}
}
},
dasharray = {
"-": [3, 1],
@ -6179,7 +6119,8 @@
dashes[i] = value[i] * width + ((i % 2) ? 1 : -1) * butt;
}
$(o.node, {"stroke-dasharray": dashes.join(",")});
} else {
}
else {
$(o.node, {"stroke-dasharray": "none"});
}
},
@ -6465,14 +6406,12 @@
}
} else {
tspans = node.getElementsByTagName("tspan");
for (i = 0, ii = tspans.length; i < ii; i++) {
if (i) {
for (i = 0, ii = tspans.length; i < ii; i++) if (i) {
$(tspans[i], {dy: fontSize * leading, x: a.x});
} else {
$(tspans[0], {dy: 0});
}
}
}
$(node, {x: a.x, y: a.y});
el._.dirty = 1;
var bb = el._getBBox(),
@ -6482,9 +6421,9 @@
getRealNode = function (node) {
if (node.parentNode && node.parentNode.tagName.toLowerCase() === "a") {
return node.parentNode;
}
} else {
return node;
}
},
Element = function (node, svg) {
var X = 0,
@ -6781,7 +6720,7 @@
this.removeData();
for (var i in this) {
this[i] = typeof this[i] === "function" ? R._removedFactory(i) : null;
this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null;
}
this.removed = true;
};
@ -6813,7 +6752,7 @@
y: this.node.clientTop,
width: this.node.clientWidth,
height: this.node.clientHeight
};
}
} finally {
bbox = bbox || {};
if(canvasHidden){
@ -6910,11 +6849,9 @@
}
if (name == null) {
var res = {};
for (var a in this.attrs) {
if (this.attrs[has](a)) {
for (var a in this.attrs) if (this.attrs[has](a)) {
res[a] = this.attrs[a];
}
}
res.gradient && res.fill == "none" && (res.fill = res.gradient) && delete res.gradient;
res.transform = this._.transform;
return res;
@ -6956,17 +6893,13 @@
for (var key in params) {
eve("raphael.attr." + key + "." + this.id, this, params[key]);
}
for (key in this.paper.customAttributes) {
if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], "function")) {
for (key in this.paper.customAttributes) if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], "function")) {
var par = this.paper.customAttributes[key].apply(this, [].concat(params[key]));
this.attrs[key] = params[key];
for (var subkey in par) {
if (par[has](subkey)) {
for (var subkey in par) if (par[has](subkey)) {
params[subkey] = par[subkey];
}
}
}
}
setFillAndStroke(this, params);
return this;
};
@ -7270,12 +7203,11 @@
eve("raphael.remove", this);
this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas);
for (var i in this) {
this[i] = typeof this[i] === "function" ? R._removedFactory(i) : null;
this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null;
}
};
var setproto = R.st;
for (var method in elproto) {
if (elproto[has](method) && !setproto[has](method)) {
for (var method in elproto) if (elproto[has](method) && !setproto[has](method)) {
setproto[method] = (function (methodname) {
return function () {
var arg = arguments;
@ -7285,7 +7217,6 @@
};
})(method);
}
}
}));
// ┌─────────────────────────────────────────────────────────────────────┐ \\
@ -7461,11 +7392,9 @@
res = o;
for (var par in params) {
if (params[has](par)) {
for (var par in params) if (params[has](par)) {
a[par] = params[par];
}
}
if (newpath) {
a.path = R._getPath[o.type](o);
o._.dirty = 1;
@ -7519,7 +7448,7 @@
if (o.textpath) {
var textpathStyle = o.textpath.style;
params.font && (textpathStyle.font = params.font);
params["font-family"] && (textpathStyle.fontFamily = "\"" + params["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g, E) + "\"");
params["font-family"] && (textpathStyle.fontFamily = '"' + params["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g, E) + '"');
params["font-size"] && (textpathStyle.fontSize = params["font-size"]);
params["font-weight"] && (textpathStyle.fontWeight = params["font-weight"]);
params["font-style"] && (textpathStyle.fontStyle = params["font-style"]);
@ -7652,12 +7581,10 @@
("x" in params || "y" in params) && (res.path.v = R.format("m{0},{1}l{2},{1}", round(a.x * zoom), round(a.y * zoom), round(a.x * zoom) + 1));
var dirtyattrs = ["x", "y", "text", "font", "font-family", "font-weight", "font-style", "font-size"];
for (var d = 0, dd = dirtyattrs.length; d < dd; d++) {
if (dirtyattrs[d] in params) {
for (var d = 0, dd = dirtyattrs.length; d < dd; d++) if (dirtyattrs[d] in params) {
res._.dirty = 1;
break;
}
}
// text-anchor emulation
switch (a["text-anchor"]) {
@ -7888,7 +7815,8 @@
elproto.auxGetBBox = R.el.getBBox;
elproto.getBBox = function(){
var b = this.auxGetBBox();
if (this.paper && this.paper._viewBoxShift) {
if (this.paper && this.paper._viewBoxShift)
{
var c = {};
var z = 1/this.paper._viewBoxShift.scale;
c.x = b.x - this.paper._viewBoxShift.dx;
@ -7924,7 +7852,7 @@
this.node.parentNode.removeChild(this.node);
this.shape && this.shape.parentNode.removeChild(this.shape);
for (var i in this) {
this[i] = typeof this[i] === "function" ? R._removedFactory(i) : null;
this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null;
}
this.removed = true;
};
@ -7934,11 +7862,9 @@
}
if (name == null) {
var res = {};
for (var a in this.attrs) {
if (this.attrs[has](a)) {
for (var a in this.attrs) if (this.attrs[has](a)) {
res[a] = this.attrs[a];
}
}
res.gradient && res.fill == "none" && (res.fill = res.gradient) && delete res.gradient;
res.transform = this._.transform;
return res;
@ -7978,17 +7904,13 @@
eve("raphael.attr." + key + "." + this.id, this, params[key]);
}
if (params) {
for (key in this.paper.customAttributes) {
if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], "function")) {
for (key in this.paper.customAttributes) if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], "function")) {
var par = this.paper.customAttributes[key].apply(this, [].concat(params[key]));
this.attrs[key] = params[key];
for (var subkey in par) {
if (par[has](subkey)) {
for (var subkey in par) if (par[has](subkey)) {
params[subkey] = par[subkey];
}
}
}
}
// this.paper.canvas.style.display = "none";
if (params.text && this.type == "text") {
this.textpath.string = params.text;
@ -8236,11 +8158,11 @@
try {
!doc.namespaces.rvml && doc.namespaces.add("rvml", "urn:schemas-microsoft-com:vml");
createNode = function (tagName) {
return doc.createElement("<rvml:" + tagName + " class=\"rvml\">");
return doc.createElement('<rvml:' + tagName + ' class="rvml">');
};
} catch (e) {
createNode = function (tagName) {
return doc.createElement("<" + tagName + " xmlns=\"urn:schemas-microsoft.com:vml\" class=\"rvml\">");
return doc.createElement('<' + tagName + ' xmlns="urn:schemas-microsoft.com:vml" class="rvml">');
};
}
};
@ -8300,14 +8222,13 @@
R.eve("raphael.remove", this);
this.canvas.parentNode.removeChild(this.canvas);
for (var i in this) {
this[i] = typeof this[i] === "function" ? R._removedFactory(i) : null;
this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null;
}
return true;
};
var setproto = R.st;
for (var method in elproto) {
if (elproto[has](method) && !setproto[has](method)) {
for (var method in elproto) if (elproto[has](method) && !setproto[has](method)) {
setproto[method] = (function (methodname) {
return function () {
var arg = arguments;
@ -8317,7 +8238,6 @@
};
})(method);
}
}
}));
// ┌────────────────────────────────────────────────────────────────────┐ \\

117
src/base/tree/ztree/jquery.ztree.core-3.5.js

@ -282,7 +282,7 @@
treeEventType: treeEventType,
treeEventCallback: treeEventCallback
};
return proxyResult;
return proxyResult
},
//default init node of core
_initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
@ -292,12 +292,12 @@
n.level = level;
n.tId = setting.treeId + "_" + (++r.zId);
n.parentTId = parentNode ? parentNode.tId : null;
n.open = (typeof n.open === "string") ? tools.eqs(n.open, "true") : !!n.open;
n.open = (typeof n.open == "string") ? tools.eqs(n.open, "true") : !!n.open;
if (n[childKey] && n[childKey].length > 0) {
n.isParent = true;
n.zAsync = true;
} else {
n.isParent = (typeof n.isParent === "string") ? tools.eqs(n.isParent, "true") : !!n.isParent;
n.isParent = (typeof n.isParent == "string") ? tools.eqs(n.isParent, "true") : !!n.isParent;
n.open = (n.isParent && !setting.async.enable) ? n.open : false;
n.zAsync = !n.isParent;
}
@ -355,7 +355,7 @@
_init.nodes.push(initNode);
},
addInitProxy: function(initProxy, isFirst) {
if (isFirst) {
if (!!isFirst) {
_init.proxys.splice(0,0,initProxy);
} else {
_init.proxys.push(initProxy);
@ -477,7 +477,7 @@
result = [];
value = value.toLowerCase();
for (var i = 0, l = nodes.length; i < l; i++) {
if (typeof nodes[i][key] === "string" && nodes[i][key].toLowerCase().indexOf(value) > -1) {
if (typeof nodes[i][key] == "string" && nodes[i][key].toLowerCase().indexOf(value)>-1) {
result.push(nodes[i]);
}
result = result.concat(data.getNodesByParamFuzzy(setting, nodes[i][childKey], key, value));
@ -584,11 +584,13 @@
if (tools.isArray(nodes)) {
for (var i=0, l=nodes.length; i<l; i++) {
r.push(nodes[i]);
if (nodes[i][childKey]) {r = r.concat(data.transformToArrayFormat(setting, nodes[i][childKey]));}
if (nodes[i][childKey])
r = r.concat(data.transformToArrayFormat(setting, nodes[i][childKey]));
}
} else {
r.push(nodes);
if (nodes[childKey]) {r = r.concat(data.transformToArrayFormat(setting, nodes[childKey]));}
if (nodes[childKey])
r = r.concat(data.transformToArrayFormat(setting, nodes[childKey]));
}
return r;
},
@ -607,16 +609,17 @@
}
for (i=0, l=sNodes.length; i<l; i++) {
if (tmpMap[sNodes[i][parentKey]] && sNodes[i][key] != sNodes[i][parentKey]) {
if (!tmpMap[sNodes[i][parentKey]][childKey]) {tmpMap[sNodes[i][parentKey]][childKey] = [];}
if (!tmpMap[sNodes[i][parentKey]][childKey])
tmpMap[sNodes[i][parentKey]][childKey] = [];
tmpMap[sNodes[i][parentKey]][childKey].push(sNodes[i]);
} else {
r.push(sNodes[i]);
}
}
return r;
}
}else {
return [sNodes];
}
}
},
//method of event proxy
@ -638,31 +641,31 @@
o = setting.treeObj;
if (!setting.view.txtSelectedEnable) {
// for can't select text
o.bind("selectstart", function (e) {
var node;
o.bind('selectstart', function(e){
var node
var n = e.originalEvent.srcElement.nodeName.toLowerCase();
return (n === "input" || n === "textarea" );
}).css({
"-moz-user-select":"-moz-none"
});
}
o.bind("click", eventParam, event.proxy);
o.bind("dblclick", eventParam, event.proxy);
o.bind("mouseover", eventParam, event.proxy);
o.bind("mouseout", eventParam, event.proxy);
o.bind("mousedown", eventParam, event.proxy);
o.bind("mouseup", eventParam, event.proxy);
o.bind("contextmenu", eventParam, event.proxy);
o.bind('click', eventParam, event.proxy);
o.bind('dblclick', eventParam, event.proxy);
o.bind('mouseover', eventParam, event.proxy);
o.bind('mouseout', eventParam, event.proxy);
o.bind('mousedown', eventParam, event.proxy);
o.bind('mouseup', eventParam, event.proxy);
o.bind('contextmenu', eventParam, event.proxy);
},
unbindTree: function(setting) {
var o = setting.treeObj;
o.unbind("click", event.proxy)
.unbind("dblclick", event.proxy)
.unbind("mouseover", event.proxy)
.unbind("mouseout", event.proxy)
.unbind("mousedown", event.proxy)
.unbind("mouseup", event.proxy)
.unbind("contextmenu", event.proxy);
o.unbind('click', event.proxy)
.unbind('dblclick', event.proxy)
.unbind('mouseover', event.proxy)
.unbind('mouseout', event.proxy)
.unbind('mousedown', event.proxy)
.unbind('mouseup', event.proxy)
.unbind('contextmenu', event.proxy);
},
doProxy: function(e) {
var results = [];
@ -747,13 +750,13 @@
if (tools.apply(setting.callback.beforeRightClick, [setting.treeId, node], true)) {
tools.apply(setting.callback.onRightClick, [event, setting.treeId, node]);
}
return (typeof setting.callback.onRightClick) !== "function";
return (typeof setting.callback.onRightClick) != "function";
}
},
//method of tools for zTree
tools = {
apply: function(fun, param, defaultValue) {
if ((typeof fun) === "function") {
if ((typeof fun) == "function") {
return fun.apply(zt, param?param:[]);
}
return defaultValue;
@ -777,15 +780,15 @@
return Object.prototype.toString.apply(arr) === "[object Array]";
},
$: function(node, exp, setting) {
if (!!exp && typeof exp !== "string") {
if (!!exp && typeof exp != "string") {
setting = exp;
exp = "";
}
if (typeof node === "string") {
if (typeof node == "string") {
return $(node, setting ? setting.treeObj.get(0).ownerDocument : null);
}
} else {
return $("#" + node.tId + exp, setting ? setting.treeObj : null);
}
},
getMDom: function (setting, curDom, targetExpr) {
if (!curDom) return null;
@ -831,7 +834,7 @@
view.replaceIcoClass(parentNode, target_icoObj, consts.folder.CLOSE);
parentNode.open = false;
target_ulObj.css({
display: "none"
"display": "none"
});
}
@ -877,7 +880,7 @@
view.makeDOMNodeNameAfter(html, setting, node);
data.getAfterA(setting, node, html);
if (node.isParent && node.open) {
view.makeUlHtml(setting, node, html, childHtml.join(""));
view.makeUlHtml(setting, node, html, childHtml.join(''));
}
view.makeDOMNodeMainAfter(html, setting, node);
data.addCreatedNode(setting, node);
@ -898,8 +901,8 @@
}
var childKey = setting.data.key.children,
childHtml = view.appendNodes(setting, node.level+1, node[childKey], node, false, true);
view.makeUlHtml(setting, node, html, childHtml.join(""));
nObj.append(html.join(""));
view.makeUlHtml(setting, node, html, childHtml.join(''));
nObj.append(html.join(''));
},
asyncNode: function(setting, node, isSilent, callback) {
var i, l;
@ -915,7 +918,7 @@
if (node) {
node.isAjaxing = true;
var icoObj = $$(node, consts.id.ICON, setting);
icoObj.attr({style: "", class: consts.className.BUTTON + " " + consts.className.ICO_LOADING});
icoObj.attr({"style":"", "class":consts.className.BUTTON + " " + consts.className.ICO_LOADING});
}
var tmpParam = {};
@ -953,7 +956,7 @@
try {
if (!msg || msg.length == 0) {
newNodes = [];
} else if (typeof msg === "string") {
} else if (typeof msg == "string") {
newNodes = eval("(" + msg + ")");
} else {
newNodes = msg;
@ -969,7 +972,7 @@
view.setNodeLineIcos(setting, node);
if (newNodes && newNodes !== "") {
newNodes = tools.apply(setting.async.dataFilter, [setting.treeId, node, newNodes], newNodes);
view.addNodes(setting, node, newNodes ? tools.clone(newNodes) : [], !!isSilent);
view.addNodes(setting, node, !!newNodes ? tools.clone(newNodes) : [], !!isSilent);
} else {
view.addNodes(setting, node, [], !!isSilent);
}
@ -1011,7 +1014,7 @@
while (root.createdNodes.length>0) {
var node = root.createdNodes.shift();
tools.apply(setting.view.addDiyDom, [setting.treeId, node]);
if (setting.callback.onNodeCreated) {
if (!!setting.callback.onNodeCreated) {
setting.treeObj.trigger(consts.event.NODECREATED, [setting.treeId, node]);
}
}
@ -1025,11 +1028,11 @@
root.createdNodes = [];
var zTreeHtml = view.appendNodes(setting, level, nodes, parentNode, true, openFlag);
if (!parentNode) {
setting.treeObj.append(zTreeHtml.join(""));
setting.treeObj.append(zTreeHtml.join(''));
} else {
var ulObj = $$(parentNode, consts.id.UL, setting);
if (ulObj.get(0)) {
ulObj.append(zTreeHtml.join(""));
ulObj.append(zTreeHtml.join(''));
}
}
view.createNodeCallback(setting);
@ -1113,9 +1116,9 @@
if (!node.parentTId) {
view.expandCollapseNode(setting, node, expandFlag, animateFlag, callback);
return;
}
} else {
view.expandCollapseNode(setting, node, expandFlag, animateFlag);
}
if (node.parentTId) {
view.expandCollapseParentNode(setting, node.getParentNode(), expandFlag, animateFlag, callback);
}
@ -1150,7 +1153,7 @@
},
makeDOMNodeIcon: function(html, setting, node) {
var nameStr = data.getNodeName(setting, node),
name = setting.view.nameIsHTML ? nameStr : nameStr.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
name = setting.view.nameIsHTML ? nameStr : nameStr.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');
html.push("<span id='", node.tId, consts.id.ICON,
"' title='' treeNode", consts.id.ICON," class='", view.makeNodeIcoClass(setting, node),
"' style='", view.makeNodeIcoStyle(setting, node), "'></span><span id='", node.tId, consts.id.SPAN,
@ -1176,15 +1179,15 @@
for (var f in fontcss) {
fontStyle.push(f, ":", fontcss[f], ";");
}
html.push("<a id='", node.tId, consts.id.A, "' class='", consts.className.LEVEL, node.level, "' treeNode", consts.id.A, " onclick=\"", (node.click || ""),
"\" ", ((url != null && url.length > 0) ? "href='" + url + "'" : ""), " target='", view.makeNodeTarget(node), "' style='", fontStyle.join(""),
html.push("<a id='", node.tId, consts.id.A, "' class='", consts.className.LEVEL, node.level,"' treeNode", consts.id.A," onclick=\"", (node.click || ''),
"\" ", ((url != null && url.length > 0) ? "href='" + url + "'" : ""), " target='",view.makeNodeTarget(node),"' style='", fontStyle.join(''),
"'");
if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle) && title) {html.push("title='", title.replace(/'/g, "&#39;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), "'");}
if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle) && title) {html.push("title='", title.replace(/'/g,"&#39;").replace(/</g,'&lt;').replace(/>/g,'&gt;'),"'");}
html.push(">");
},
makeNodeFontCss: function(setting, node) {
var fontCss = tools.apply(setting.view.fontCss, [setting.treeId, node], setting.view.fontCss);
return (fontCss && ((typeof fontCss) !== "function")) ? fontCss : {};
return (fontCss && ((typeof fontCss) != "function")) ? fontCss : {};
},
makeNodeIcoClass: function(setting, node) {
var icoCss = ["ico"];
@ -1196,7 +1199,7 @@
icoCss.push(consts.folder.DOCU);
}
}
return consts.className.BUTTON + " " + icoCss.join("_");
return consts.className.BUTTON + " " + icoCss.join('_');
},
makeNodeIcoStyle: function(setting, node) {
var icoStyle = [];
@ -1207,7 +1210,7 @@
icoStyle.push("width:0px;height:0px;");
}
}
return icoStyle.join("");
return icoStyle.join('');
},
makeNodeLineClass: function(setting, node) {
var lineClass = [];
@ -1229,7 +1232,7 @@
} else {
lineClass.push(consts.folder.DOCU);
}
return view.makeNodeLineClassEx(node) + lineClass.join("_");
return view.makeNodeLineClassEx(node) + lineClass.join('_');
},
makeNodeLineClassEx: function(node) {
return consts.className.BUTTON + " " + consts.className.LEVEL + node.level + " " + consts.className.SWITCH + " ";
@ -1593,7 +1596,7 @@
},
getNodesByFilter: function(filter, isSingle, parentNode, invokeParam) {
isSingle = !!isSingle;
if (!filter || (typeof filter !== "function")) return (isSingle ? null : []);
if (!filter || (typeof filter != "function")) return (isSingle ? null : []);
return data.getNodesByFilter(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), filter, isSingle, invokeParam);
},
getNodeIndex : function(node) {
@ -1640,9 +1643,9 @@
refresh : function() {
this.setting.treeObj.empty();
var root = data.getRoot(setting),
nodes = root[setting.data.key.children];
nodes = root[setting.data.key.children]
data.initRoot(setting);
root[setting.data.key.children] = nodes;
root[setting.data.key.children] = nodes
data.initCache(setting);
view.createNodes(setting, 0, root[setting.data.key.children]);
},
@ -1693,13 +1696,13 @@
view.setNodeFontCss(setting, node);
}
}
};
}
root.treeTools = zTreeTools;
data.setZTreeTools(setting, zTreeTools);
if (root[childKey] && root[childKey].length > 0) {
view.createNodes(setting, 0, root[childKey]);
} else if (setting.async.enable && setting.async.url && setting.async.url !== "") {
} else if (setting.async.enable && setting.async.url && setting.async.url !== '') {
view.asyncNode(setting);
}
return zTreeTools;

34
src/base/tree/ztree/jquery.ztree.excheck-3.5.js

@ -45,8 +45,8 @@
chkDisabledInherit: false,
radioType: _consts.radio.TYPE_LEVEL,
chkboxType: {
Y: "ps",
N: "ps"
"Y": "ps",
"N": "ps"
}
},
data: {
@ -126,20 +126,20 @@
treeEventType: treeEventType,
treeEventCallback: treeEventCallback
};
return proxyResult;
return proxyResult
},
//default init node of excheck
_initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
if (!n) return;
var checkedKey = setting.data.key.checked;
if (typeof n[checkedKey] === "string") n[checkedKey] = tools.eqs(n[checkedKey], "true");
if (typeof n[checkedKey] == "string") n[checkedKey] = tools.eqs(n[checkedKey], "true");
n[checkedKey] = !!n[checkedKey];
n.checkedOld = n[checkedKey];
if (typeof n.nocheck === "string") n.nocheck = tools.eqs(n.nocheck, "true");
if (typeof n.nocheck == "string") n.nocheck = tools.eqs(n.nocheck, "true");
n.nocheck = !!n.nocheck || (setting.check.nocheckInherit && parentNode && !!parentNode.nocheck);
if (typeof n.chkDisabled === "string") n.chkDisabled = tools.eqs(n.chkDisabled, "true");
if (typeof n.chkDisabled == "string") n.chkDisabled = tools.eqs(n.chkDisabled, "true");
n.chkDisabled = !!n.chkDisabled || (setting.check.chkDisabledInherit && parentNode && !!parentNode.chkDisabled);
if (typeof n.halfCheck === "string") n.halfCheck = tools.eqs(n.halfCheck, "true");
if (typeof n.halfCheck == "string") n.halfCheck = tools.eqs(n.halfCheck, "true");
n.halfCheck = !!n.halfCheck;
n.check_Child_State = -1;
n.check_Focus = false;
@ -183,22 +183,22 @@
this.setting.treeObj.trigger(consts.event.CHECK, [null, this.setting.treeId, node]);
}
}
};
}
zTreeTools.checkAllNodes = function(checked) {
view.repairAllChk(this.setting, !!checked);
};
}
zTreeTools.getCheckedNodes = function(checked) {
var childKey = this.setting.data.key.children;
checked = (checked !== false);
return data.getTreeCheckedNodes(this.setting, data.getRoot(this.setting)[childKey], checked);
};
}
zTreeTools.getChangeCheckedNodes = function() {
var childKey = this.setting.data.key.children;
return data.getTreeChangeCheckedNodes(this.setting, data.getRoot(this.setting)[childKey]);
};
}
zTreeTools.setChkDisabled = function(node, disabled, inheritParent, inheritChildren) {
disabled = !!disabled;
@ -206,7 +206,7 @@
inheritChildren = !!inheritChildren;
view.repairSonChkDisabled(this.setting, node, disabled, inheritChildren);
view.repairParentChkDisabled(this.setting, node.getParentNode(), disabled, inheritParent);
};
}
var _updateNode = zTreeTools.updateNode;
zTreeTools.updateNode = function(node, checkTypeFlag) {
@ -219,7 +219,7 @@
view.setChkClass(this.setting, checkObj, node);
view.repairParentChkClassWithSelf(this.setting, node);
}
};
}
},
//method of operate data
_data = {
@ -505,7 +505,7 @@
} else {
obj.show();
}
obj.attr("class", view.makeChkClass(setting, node));
obj.attr('class', view.makeChkClass(setting, node));
},
setParentNodeCheckBox: function(setting, node, value, srcNode) {
var childKey = setting.data.key.children,
@ -604,7 +604,7 @@
if (_createNodes) _createNodes.apply(view, arguments);
if (!nodes) return;
view.repairParentChkClassWithSelf(setting, parentNode);
};
}
var _removeNode = view.removeNode;
view.removeNode = function(setting, node) {
var parentNode = node.getParentNode();
@ -612,7 +612,7 @@
if (!node || !parentNode) return;
view.repairChkClass(setting, parentNode);
view.repairParentChkClass(setting, parentNode);
};
}
var _appendNodes = view.appendNodes;
view.appendNodes = function(setting, level, nodes, parentNode, initFlag, openFlag) {
@ -624,5 +624,5 @@
data.makeChkFlag(setting, parentNode);
}
return html;
};
}
})(jQuery);

4
src/case/clipboard/clipboard.js

@ -403,7 +403,7 @@ try {// IE8下会抛错
function _interopRequireDefault (obj) {
return obj && obj.__esModule ? obj : {
default: obj
"default": obj
};
}
@ -637,7 +637,7 @@ try {// IE8下会抛错
function _interopRequireDefault (obj) {
return obj && obj.__esModule ? obj : {
default: obj
"default": obj
};
}

150
src/core/jquery.js vendored

@ -169,7 +169,7 @@
return this;
// HANDLE: $(#id)
}
} else {
elem = document.getElementById( match[2] );
// Check parentNode to catch when Blackberry 4.6 returns
@ -189,7 +189,7 @@
this.context = document;
this.selector = selector;
return this;
}
// HANDLE: $(expr, $(...))
} else if ( !context || context.jquery ) {
@ -197,9 +197,9 @@
// HANDLE: $(expr, context)
// (which is just equivalent to: $(context).find(expr)
}
} else {
return this.constructor( context ).find( selector );
}
// HANDLE: $(DOMElement)
} else if ( selector.nodeType ) {
@ -1739,10 +1739,10 @@
// The following elements throw uncatchable exceptions if you
// attempt to add expando properties to them.
noData: {
embed: true,
"embed": true,
// Ban all objects except for Flash (which handle expandos)
object: "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
applet: true
"object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
"applet": true
},
hasData: function( elem ) {
@ -2427,8 +2427,8 @@
propFix: {
tabindex: "tabIndex",
readonly: "readOnly",
for: "htmlFor",
class: "className",
"for": "htmlFor",
"class": "className",
maxlength: "maxLength",
cellspacing: "cellSpacing",
cellpadding: "cellPadding",
@ -2460,18 +2460,18 @@
if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
return ret;
}
} else {
return ( elem[ name ] = value );
}
} else {
if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
return ret;
}
} else {
return elem[ name ];
}
}
},
propHooks: {
@ -3780,18 +3780,18 @@
ridentifier = new RegExp( "^" + identifier + "$" ),
matchExpr = {
ID: new RegExp( "^#(" + characterEncoding + ")" ),
CLASS: new RegExp( "^\\.(" + characterEncoding + ")" ),
NAME: new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ),
TAG: new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
ATTR: new RegExp( "^" + attributes ),
PSEUDO: new RegExp( "^" + pseudos ),
CHILD: new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
"ID": new RegExp( "^#(" + characterEncoding + ")" ),
"CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
"NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ),
"TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
"ATTR": new RegExp( "^" + attributes ),
"PSEUDO": new RegExp( "^" + pseudos ),
"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
"*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
"*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
// For use in libraries implementing .is()
// We use this for POS matching in `select`
needsContext: new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
"needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
},
@ -4088,10 +4088,10 @@
}) ?
{} :
{
href: function ( elem ) {
"href": function( elem ) {
return elem.getAttribute( "href", 2 );
},
type: function ( elem ) {
"type": function( elem ) {
return elem.getAttribute("type");
}
};
@ -4525,12 +4525,12 @@
// innerText usage removed for consistency of new lines (see #11153)
if ( typeof elem.textContent === "string" ) {
return elem.textContent;
}
} else {
// Traverse its children
for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
ret += getText( elem );
}
}
} else if ( nodeType === 3 || nodeType === 4 ) {
return elem.nodeValue;
}
@ -4558,7 +4558,7 @@
},
preFilter: {
ATTR: function ( match ) {
"ATTR": function( match ) {
match[1] = match[1].replace( runescape, funescape );
// Move the given value to match[3] whether quoted or unquoted
@ -4571,7 +4571,7 @@
return match.slice( 0, 4 );
},
CHILD: function ( match ) {
"CHILD": function( match ) {
/* matches from matchExpr["CHILD"]
1 type (only|nth|...)
2 what (child|of-type)
@ -4603,7 +4603,7 @@
return match;
},
PSEUDO: function ( match ) {
"PSEUDO": function( match ) {
var excess,
unquoted = !match[5] && match[2];
@ -4634,7 +4634,7 @@
filter: {
TAG: function ( nodeName ) {
"TAG": function( nodeName ) {
if ( nodeName === "*" ) {
return function() { return true; };
}
@ -4645,7 +4645,7 @@
};
},
CLASS: function ( className ) {
"CLASS": function( className ) {
var pattern = classCache[ className + " " ];
return pattern ||
@ -4655,7 +4655,7 @@
});
},
ATTR: function ( name, operator, check ) {
"ATTR": function( name, operator, check ) {
return function( elem ) {
var result = Sizzle.attr( elem, name );
@ -4679,7 +4679,7 @@
};
},
CHILD: function ( type, what, argument, first, last ) {
"CHILD": function( type, what, argument, first, last ) {
var simple = type.slice( 0, 3 ) !== "nth",
forward = type.slice( -4 ) !== "last",
ofType = what === "of-type";
@ -4768,7 +4768,7 @@
};
},
PSEUDO: function ( pseudo, argument ) {
"PSEUDO": function( pseudo, argument ) {
// pseudo-class names are case-insensitive
// http://www.w3.org/TR/selectors/#pseudo-classes
// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
@ -4808,7 +4808,7 @@
pseudos: {
// Potentially complex pseudos
not: markFunction(function ( selector ) {
"not": markFunction(function( selector ) {
// Trim the selector passed to compile
// to avoid treating leading and trailing
// spaces as combinators
@ -4836,13 +4836,13 @@
};
}),
has: markFunction(function ( selector ) {
"has": markFunction(function( selector ) {
return function( elem ) {
return Sizzle( selector, elem ).length > 0;
};
}),
contains: markFunction(function ( text ) {
"contains": markFunction(function( text ) {
return function( elem ) {
return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
};
@ -4855,7 +4855,7 @@
// The matching of C against the element's language value is performed case-insensitively.
// The identifier C does not have to be a valid language name."
// http://www.w3.org/TR/selectors/#lang-pseudo
lang: markFunction( function ( lang ) {
"lang": markFunction( function( lang ) {
// lang value must be a valid identifider
if ( !ridentifier.test(lang || "") ) {
Sizzle.error( "unsupported lang: " + lang );
@ -4877,36 +4877,36 @@
}),
// Miscellaneous
target: function ( elem ) {
"target": function( elem ) {
var hash = window.location && window.location.hash;
return hash && hash.slice( 1 ) === elem.id;
},
root: function ( elem ) {
"root": function( elem ) {
return elem === docElem;
},
focus: function ( elem ) {
"focus": function( elem ) {
return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
},
// Boolean properties
enabled: function ( elem ) {
"enabled": function( elem ) {
return elem.disabled === false;
},
disabled: function ( elem ) {
"disabled": function( elem ) {
return elem.disabled === true;
},
checked: function ( elem ) {
"checked": function( elem ) {
// In CSS3, :checked should return both checked and selected elements
// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
var nodeName = elem.nodeName.toLowerCase();
return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
},
selected: function ( elem ) {
"selected": function( elem ) {
// Accessing this property makes selected-by-default
// options in Safari work properly
if ( elem.parentNode ) {
@ -4917,7 +4917,7 @@
},
// Contents
empty: function ( elem ) {
"empty": function( elem ) {
// http://www.w3.org/TR/selectors/#empty-pseudo
// :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
// not comment, processing instructions, or others
@ -4931,25 +4931,25 @@
return true;
},
parent: function ( elem ) {
"parent": function( elem ) {
return !Expr.pseudos["empty"]( elem );
},
// Element/input types
header: function ( elem ) {
"header": function( elem ) {
return rheader.test( elem.nodeName );
},
input: function ( elem ) {
"input": function( elem ) {
return rinputs.test( elem.nodeName );
},
button: function ( elem ) {
"button": function( elem ) {
var name = elem.nodeName.toLowerCase();
return name === "input" && elem.type === "button" || name === "button";
},
text: function ( elem ) {
"text": function( elem ) {
var attr;
// IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
// use getAttribute instead to test this case
@ -4959,19 +4959,19 @@
},
// Position-in-collection
first: createPositionalPseudo(function () {
"first": createPositionalPseudo(function() {
return [ 0 ];
}),
last: createPositionalPseudo(function ( matchIndexes, length ) {
"last": createPositionalPseudo(function( matchIndexes, length ) {
return [ length - 1 ];
}),
eq: createPositionalPseudo(function ( matchIndexes, length, argument ) {
"eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
return [ argument < 0 ? argument + length : argument ];
}),
even: createPositionalPseudo(function ( matchIndexes, length ) {
"even": createPositionalPseudo(function( matchIndexes, length ) {
var i = 0;
for ( ; i < length; i += 2 ) {
matchIndexes.push( i );
@ -4979,7 +4979,7 @@
return matchIndexes;
}),
odd: createPositionalPseudo(function ( matchIndexes, length ) {
"odd": createPositionalPseudo(function( matchIndexes, length ) {
var i = 1;
for ( ; i < length; i += 2 ) {
matchIndexes.push( i );
@ -4987,7 +4987,7 @@
return matchIndexes;
}),
lt: createPositionalPseudo(function ( matchIndexes, length, argument ) {
"lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
var i = argument < 0 ? argument + length : argument;
for ( ; --i >= 0; ) {
matchIndexes.push( i );
@ -4995,7 +4995,7 @@
return matchIndexes;
}),
gt: createPositionalPseudo(function ( matchIndexes, length, argument ) {
"gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
var i = argument < 0 ? argument + length : argument;
for ( ; ++i < length; ) {
matchIndexes.push( i );
@ -5811,9 +5811,9 @@
if ( isSimple.test( qualifier ) ) {
return jQuery.filter(qualifier, filtered, !keep);
}
} else {
qualifier = jQuery.filter( qualifier, filtered );
}
}
return jQuery.grep(elements, function( elem ) {
@ -6183,7 +6183,7 @@
dataType: "script",
async: false,
global: false,
throws: true
"throws": true
});
} else {
jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) );
@ -6781,22 +6781,22 @@
// Exclude the following css properties to add px
cssNumber: {
columnCount: true,
fillOpacity: true,
fontWeight: true,
lineHeight: true,
opacity: true,
orphans: true,
widows: true,
zIndex: true,
zoom: true
"columnCount": true,
"fillOpacity": true,
"fontWeight": true,
"lineHeight": true,
"opacity": true,
"orphans": true,
"widows": true,
"zIndex": true,
"zoom": true
},
// Add in properties whose names you wish to fix before
// setting or getting the value
cssProps: {
// normalize float css property
float: jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
"float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
},
// Get and set the style property on a DOM Node
@ -7227,7 +7227,7 @@
if ( computed ) {
// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
// Work around by temporarily setting element display to inline-block
return jQuery.swap( elem, { display: "inline-block" },
return jQuery.swap( elem, { "display": "inline-block" },
curCSS, [ elem, "marginRight" ] );
}
}
@ -8734,10 +8734,10 @@
if ( percent < 1 && length ) {
return remaining;
}
} else {
deferred.resolveWith( elem, [ animation ] );
return false;
}
},
animation = deferred.promise({
elem: elem,

Loading…
Cancel
Save