Nuiton-js-commits
Threads by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- 636 discussions
r189 - in sandbox: nuiton-js-font-awesome nuiton-js-jqgrid nuiton-js-jqplot
by echatellier@users.nuiton.org July 22, 2013
by echatellier@users.nuiton.org July 22, 2013
July 22, 2013
Author: echatellier
Date: 2013-07-22 15:41:27 +0200 (Mon, 22 Jul 2013)
New Revision: 189
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/189
Log:
Use released parent
Modified:
sandbox/nuiton-js-font-awesome/pom.xml
sandbox/nuiton-js-jqgrid/pom.xml
sandbox/nuiton-js-jqplot/pom.xml
Modified: sandbox/nuiton-js-font-awesome/pom.xml
===================================================================
(Binary files differ)
Modified: sandbox/nuiton-js-jqgrid/pom.xml
===================================================================
--- sandbox/nuiton-js-jqgrid/pom.xml 2013-07-22 13:41:17 UTC (rev 188)
+++ sandbox/nuiton-js-jqgrid/pom.xml 2013-07-22 13:41:27 UTC (rev 189)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.nuiton.js</groupId>
<artifactId>nuiton-js-lib</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.1</version>
</parent>
<artifactId>nuiton-js-jqgrid</artifactId>
Modified: sandbox/nuiton-js-jqplot/pom.xml
===================================================================
(Binary files differ)
1
0
Author: echatellier
Date: 2013-07-22 15:41:17 +0200 (Mon, 22 Jul 2013)
New Revision: 188
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/188
Log:
Use released parent
Modified:
sandbox/nuiton-js-canjs/pom.xml
Modified: sandbox/nuiton-js-canjs/pom.xml
===================================================================
--- sandbox/nuiton-js-canjs/pom.xml 2013-07-22 13:41:10 UTC (rev 187)
+++ sandbox/nuiton-js-canjs/pom.xml 2013-07-22 13:41:17 UTC (rev 188)
@@ -10,11 +10,11 @@
<parent>
<groupId>org.nuiton.js</groupId>
<artifactId>nuiton-js-lib</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.1</version>
</parent>
<artifactId>nuiton-js-canjs</artifactId>
- <version>1.1.6-1</version>
+ <version>1.1.6-2-SNAPSHOT</version>
<name>Nuiton JS :: CanJS</name>
<description>CanJS jar packaging</description>
Property changes on: sandbox/nuiton-js-canjs/pom.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
1
0
Author: echatellier
Date: 2013-07-22 15:41:10 +0200 (Mon, 22 Jul 2013)
New Revision: 187
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/187
Log:
Use released parent
Modified:
sandbox/nuiton-js-bootstrap/pom.xml
Modified: sandbox/nuiton-js-bootstrap/pom.xml
===================================================================
--- sandbox/nuiton-js-bootstrap/pom.xml 2013-07-22 13:41:01 UTC (rev 186)
+++ sandbox/nuiton-js-bootstrap/pom.xml 2013-07-22 13:41:10 UTC (rev 187)
@@ -10,11 +10,11 @@
<parent>
<groupId>org.nuiton.js</groupId>
<artifactId>nuiton-js-lib</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.1</version>
</parent>
<artifactId>nuiton-js-bootstrap</artifactId>
- <version>2.3.2-1</version>
+ <version>2.3.2-2-SNAPSHOT</version>
<name>Nuiton JS :: Bootstrap</name>
<description>bootstrap packaging</description>
Property changes on: sandbox/nuiton-js-bootstrap/pom.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
1
0
Author: echatellier
Date: 2013-07-22 15:41:01 +0200 (Mon, 22 Jul 2013)
New Revision: 186
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/186
Log:
Use released parent
Modified:
sandbox/nuiton-js-backbone/pom.xml
Modified: sandbox/nuiton-js-backbone/pom.xml
===================================================================
--- sandbox/nuiton-js-backbone/pom.xml 2013-07-22 13:37:33 UTC (rev 185)
+++ sandbox/nuiton-js-backbone/pom.xml 2013-07-22 13:41:01 UTC (rev 186)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.nuiton.js</groupId>
<artifactId>nuiton-js-lib</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.1</version>
</parent>
<artifactId>nuiton-js-backbone</artifactId>
1
0
r185 - in sandbox: nuiton-js-angular nuiton-js-jquery nuiton-js-jquery2 nuiton-js-underscore
by echatellier@users.nuiton.org July 22, 2013
by echatellier@users.nuiton.org July 22, 2013
July 22, 2013
Author: echatellier
Date: 2013-07-22 15:37:33 +0200 (Mon, 22 Jul 2013)
New Revision: 185
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/185
Log:
Move sandbox to next snapshot
Modified:
sandbox/nuiton-js-angular/pom.xml
sandbox/nuiton-js-jquery/pom.xml
sandbox/nuiton-js-jquery2/pom.xml
sandbox/nuiton-js-underscore/pom.xml
Modified: sandbox/nuiton-js-angular/pom.xml
===================================================================
--- sandbox/nuiton-js-angular/pom.xml 2013-07-22 13:28:10 UTC (rev 184)
+++ sandbox/nuiton-js-angular/pom.xml 2013-07-22 13:37:33 UTC (rev 185)
@@ -14,7 +14,7 @@
</parent>
<artifactId>nuiton-js-angular</artifactId>
- <version>1.1.5-1</version>
+ <version>1.1.5-2-SNAPSHOT</version>
<name>Nuiton JS :: Angular</name>
<description>Angular jar packaging</description>
@@ -29,9 +29,9 @@
</licenses>
<scm>
- <connection>scm:svn:http://svn.nuiton.org/svn/nuiton-js/tags/nuiton-js-angular-1.1.5-1</connection>
- <developerConnection>scm:svn:http://svn.nuiton.org/svn/nuiton-js/tags/nuiton-js-angular-1.1.5-1</developerConnection>
- <url>http://www.nuiton.org/repositories/browse/nuiton-js/tags/nuiton-js-angular-…</url>
+ <connection>scm:svn:http://svn.nuiton.org/svn/nuiton-js/tags/nuiton-js-angular-1.1.5-2</connection>
+ <developerConnection>scm:svn:http://svn.nuiton.org/svn/nuiton-js/tags/nuiton-js-angular-1.1.5-2</developerConnection>
+ <url>http://www.nuiton.org/repositories/browse/nuiton-js/tags/nuiton-js-angular-…</url>
</scm>
</project>
Modified: sandbox/nuiton-js-jquery/pom.xml
===================================================================
--- sandbox/nuiton-js-jquery/pom.xml 2013-07-22 13:28:10 UTC (rev 184)
+++ sandbox/nuiton-js-jquery/pom.xml 2013-07-22 13:37:33 UTC (rev 185)
@@ -14,7 +14,7 @@
</parent>
<artifactId>nuiton-js-jquery</artifactId>
- <version>1.10.2-1</version>
+ <version>1.10.2-2-SNAPSHOT</version>
<name>Nuiton JS :: JQuery</name>
<description>JQuery jar packaging</description>
@@ -29,9 +29,9 @@
</licenses>
<scm>
- <connection>scm:svn:http://svn.nuiton.org/svn/nuiton-js/tags/nuiton-js-jquery-1.10.2-1</connection>
- <developerConnection>scm:svn:http://svn.nuiton.org/svn/nuiton-js/tags/nuiton-js-jquery-1.10.2-1</developerConnection>
- <url>http://www.nuiton.org/repositories/browse/nuiton-js/tags/nuiton-js-jquery-1…</url>
+ <connection>scm:svn:http://svn.nuiton.org/svn/nuiton-js/tags/nuiton-js-jquery-1.10.2-2</connection>
+ <developerConnection>scm:svn:http://svn.nuiton.org/svn/nuiton-js/tags/nuiton-js-jquery-1.10.2-2</developerConnection>
+ <url>http://www.nuiton.org/repositories/browse/nuiton-js/tags/nuiton-js-jquery-1…</url>
</scm>
</project>
Modified: sandbox/nuiton-js-jquery2/pom.xml
===================================================================
--- sandbox/nuiton-js-jquery2/pom.xml 2013-07-22 13:28:10 UTC (rev 184)
+++ sandbox/nuiton-js-jquery2/pom.xml 2013-07-22 13:37:33 UTC (rev 185)
@@ -14,7 +14,7 @@
</parent>
<artifactId>nuiton-js-jquery</artifactId>
- <version>2.0.3-1</version>
+ <version>2.0.3-2-SNAPSHOT</version>
<name>Nuiton JS :: JQuery</name>
<description>JQuery jar packaging</description>
@@ -29,9 +29,9 @@
</licenses>
<scm>
- <connection>scm:svn:http://svn.nuiton.org/svn/nuiton-js/tags/nuiton-js-jquery-2.0.3-1</connection>
- <developerConnection>scm:svn:http://svn.nuiton.org/svn/nuiton-js/tags/nuiton-js-jquery-2.0.3-1</developerConnection>
- <url>http://www.nuiton.org/repositories/browse/nuiton-js/tags/nuiton-js-jquery-2…</url>
+ <connection>scm:svn:http://svn.nuiton.org/svn/nuiton-js/tags/nuiton-js-jquery-2.0.3-2</connection>
+ <developerConnection>scm:svn:http://svn.nuiton.org/svn/nuiton-js/tags/nuiton-js-jquery-2.0.3-2</developerConnection>
+ <url>http://www.nuiton.org/repositories/browse/nuiton-js/tags/nuiton-js-jquery-2…</url>
</scm>
</project>
Modified: sandbox/nuiton-js-underscore/pom.xml
===================================================================
--- sandbox/nuiton-js-underscore/pom.xml 2013-07-22 13:28:10 UTC (rev 184)
+++ sandbox/nuiton-js-underscore/pom.xml 2013-07-22 13:37:33 UTC (rev 185)
@@ -14,7 +14,7 @@
</parent>
<artifactId>nuiton-js-underscore</artifactId>
- <version>1.5.1-1</version>
+ <version>1.5.1-2-SNAPSHOT</version>
<name>Nuiton JS :: Underscore.js</name>
<description>Underscore jar packaging</description>
@@ -29,9 +29,9 @@
</licenses>
<scm>
- <connection>scm:svn:http://svn.nuiton.org/svn/nuiton-js/tags/nuiton-js-underscore-1.5.1…</connection>
- <developerConnection>scm:svn:http://svn.nuiton.org/svn/nuiton-js/tags/nuiton-js-underscore-1.5.1…</developerConnection>
- <url>http://www.nuiton.org/repositories/browse/nuiton-js/tags/nuiton-js-undersco…</url>
+ <connection>scm:svn:http://svn.nuiton.org/svn/nuiton-js/tags/nuiton-js-underscore-1.5.1…</connection>
+ <developerConnection>scm:svn:http://svn.nuiton.org/svn/nuiton-js/tags/nuiton-js-underscore-1.5.1…</developerConnection>
+ <url>http://www.nuiton.org/repositories/browse/nuiton-js/tags/nuiton-js-undersco…</url>
</scm>
</project>
1
0
Author: echatellier
Date: 2013-07-22 15:28:10 +0200 (Mon, 22 Jul 2013)
New Revision: 184
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/184
Log:
Tag underscore 1.5.1-1
Added:
tags/nuiton-js-underscore-1.5.1-1/
1
0
Author: echatellier
Date: 2013-07-22 15:27:32 +0200 (Mon, 22 Jul 2013)
New Revision: 183
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/183
Log:
Prepare release
Modified:
sandbox/nuiton-js-underscore/pom.xml
Modified: sandbox/nuiton-js-underscore/pom.xml
===================================================================
--- sandbox/nuiton-js-underscore/pom.xml 2013-07-22 13:24:33 UTC (rev 182)
+++ sandbox/nuiton-js-underscore/pom.xml 2013-07-22 13:27:32 UTC (rev 183)
@@ -10,11 +10,11 @@
<parent>
<groupId>org.nuiton.js</groupId>
<artifactId>nuiton-js-lib</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.1</version>
</parent>
<artifactId>nuiton-js-underscore</artifactId>
- <version>1.5.1-1-SNAPSHOT</version>
+ <version>1.5.1-1</version>
<name>Nuiton JS :: Underscore.js</name>
<description>Underscore jar packaging</description>
1
0
Author: echatellier
Date: 2013-07-22 15:24:33 +0200 (Mon, 22 Jul 2013)
New Revision: 182
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/182
Log:
Tag angular 1.1.5
Added:
tags/nuiton-js-angular-1.1.5-1/
1
0
Author: echatellier
Date: 2013-07-22 15:23:45 +0200 (Mon, 22 Jul 2013)
New Revision: 181
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/181
Log:
Prepare release
Modified:
sandbox/nuiton-js-angular/pom.xml
Modified: sandbox/nuiton-js-angular/pom.xml
===================================================================
--- sandbox/nuiton-js-angular/pom.xml 2013-07-22 13:19:36 UTC (rev 180)
+++ sandbox/nuiton-js-angular/pom.xml 2013-07-22 13:23:45 UTC (rev 181)
@@ -10,11 +10,11 @@
<parent>
<groupId>org.nuiton.js</groupId>
<artifactId>nuiton-js-lib</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.1</version>
</parent>
<artifactId>nuiton-js-angular</artifactId>
- <version>1.1.5-1-SNAPSHOT</version>
+ <version>1.1.5-1</version>
<name>Nuiton JS :: Angular</name>
<description>Angular jar packaging</description>
1
0
Author: echatellier
Date: 2013-07-22 15:19:36 +0200 (Mon, 22 Jul 2013)
New Revision: 180
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/180
Log:
Tag jquery 2.0.3-1
Added:
tags/nuiton-js-jquery-2.0.3-1/
1
0
r179 - in sandbox/nuiton-js-jquery2: . src/main/resources/nuiton-js-jquery
by echatellier@users.nuiton.org July 22, 2013
by echatellier@users.nuiton.org July 22, 2013
July 22, 2013
Author: echatellier
Date: 2013-07-22 15:18:45 +0200 (Mon, 22 Jul 2013)
New Revision: 179
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/179
Log:
Update to jquery 2.0.3
Added:
sandbox/nuiton-js-jquery2/src/main/resources/nuiton-js-jquery/jquery-2.0.3.js
Removed:
sandbox/nuiton-js-jquery2/src/main/resources/nuiton-js-jquery/jquery-1.10.2.js
Modified:
sandbox/nuiton-js-jquery2/pom.xml
Modified: sandbox/nuiton-js-jquery2/pom.xml
===================================================================
--- sandbox/nuiton-js-jquery2/pom.xml 2013-07-22 13:15:21 UTC (rev 178)
+++ sandbox/nuiton-js-jquery2/pom.xml 2013-07-22 13:18:45 UTC (rev 179)
@@ -14,7 +14,7 @@
</parent>
<artifactId>nuiton-js-jquery</artifactId>
- <version>1.10.2-1</version>
+ <version>2.0.3-1</version>
<name>Nuiton JS :: JQuery</name>
<description>JQuery jar packaging</description>
@@ -29,9 +29,9 @@
</licenses>
<scm>
- <connection>scm:svn:http://svn.nuiton.org/svn/nuiton-js/tags/nuiton-js-jquery-1.10.2-1</connection>
- <developerConnection>scm:svn:http://svn.nuiton.org/svn/nuiton-js/tags/nuiton-js-jquery-1.10.2-1</developerConnection>
- <url>http://www.nuiton.org/repositories/browse/nuiton-js/tags/nuiton-js-jquery-1…</url>
+ <connection>scm:svn:http://svn.nuiton.org/svn/nuiton-js/tags/nuiton-js-jquery-2.0.3-1</connection>
+ <developerConnection>scm:svn:http://svn.nuiton.org/svn/nuiton-js/tags/nuiton-js-jquery-2.0.3-1</developerConnection>
+ <url>http://www.nuiton.org/repositories/browse/nuiton-js/tags/nuiton-js-jquery-2…</url>
</scm>
</project>
Deleted: sandbox/nuiton-js-jquery2/src/main/resources/nuiton-js-jquery/jquery-1.10.2.js
===================================================================
--- sandbox/nuiton-js-jquery2/src/main/resources/nuiton-js-jquery/jquery-1.10.2.js 2013-07-22 13:15:21 UTC (rev 178)
+++ sandbox/nuiton-js-jquery2/src/main/resources/nuiton-js-jquery/jquery-1.10.2.js 2013-07-22 13:18:45 UTC (rev 179)
@@ -1,9789 +0,0 @@
-/*! %%Ignore-License
- * jQuery JavaScript Library v1.10.2
- * http://jquery.com/
- *
- * Includes Sizzle.js
- * http://sizzlejs.com/
- *
- * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors
- * Released under the MIT license
- * http://jquery.org/license
- *
- * Date: 2013-07-03T13:48Z
- */
-(function( window, undefined ) {
-
-// Can't do this because several apps including ASP.NET trace
-// the stack via arguments.caller.callee and Firefox dies if
-// you try to trace through "use strict" call chains. (#13335)
-// Support: Firefox 18+
-//"use strict";
-var
- // The deferred used on DOM ready
- readyList,
-
- // A central reference to the root jQuery(document)
- rootjQuery,
-
- // Support: IE<10
- // For `typeof xmlNode.method` instead of `xmlNode.method !== undefined`
- core_strundefined = typeof undefined,
-
- // Use the correct document accordingly with window argument (sandbox)
- location = window.location,
- document = window.document,
- docElem = document.documentElement,
-
- // Map over jQuery in case of overwrite
- _jQuery = window.jQuery,
-
- // Map over the $ in case of overwrite
- _$ = window.$,
-
- // [[Class]] -> type pairs
- class2type = {},
-
- // List of deleted data cache ids, so we can reuse them
- core_deletedIds = [],
-
- core_version = "1.10.2",
-
- // Save a reference to some core methods
- core_concat = core_deletedIds.concat,
- core_push = core_deletedIds.push,
- core_slice = core_deletedIds.slice,
- core_indexOf = core_deletedIds.indexOf,
- core_toString = class2type.toString,
- core_hasOwn = class2type.hasOwnProperty,
- core_trim = core_version.trim,
-
- // Define a local copy of jQuery
- jQuery = function( selector, context ) {
- // The jQuery object is actually just the init constructor 'enhanced'
- return new jQuery.fn.init( selector, context, rootjQuery );
- },
-
- // Used for matching numbers
- core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
-
- // Used for splitting on whitespace
- core_rnotwhite = /\S+/g,
-
- // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
- rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
-
- // A simple way to check for HTML strings
- // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
- // Strict HTML recognition (#11290: must start with <)
- rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
-
- // Match a standalone tag
- rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
-
- // JSON RegExp
- rvalidchars = /^[\],:{}\s]*$/,
- rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
- rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
- rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,
-
- // Matches dashed string for camelizing
- rmsPrefix = /^-ms-/,
- rdashAlpha = /-([\da-z])/gi,
-
- // Used by jQuery.camelCase as callback to replace()
- fcamelCase = function( all, letter ) {
- return letter.toUpperCase();
- },
-
- // The ready event handler
- completed = function( event ) {
-
- // readyState === "complete" is good enough for us to call the dom ready in oldIE
- if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) {
- detach();
- jQuery.ready();
- }
- },
- // Clean-up method for dom ready events
- detach = function() {
- if ( document.addEventListener ) {
- document.removeEventListener( "DOMContentLoaded", completed, false );
- window.removeEventListener( "load", completed, false );
-
- } else {
- document.detachEvent( "onreadystatechange", completed );
- window.detachEvent( "onload", completed );
- }
- };
-
-jQuery.fn = jQuery.prototype = {
- // The current version of jQuery being used
- jquery: core_version,
-
- constructor: jQuery,
- init: function( selector, context, rootjQuery ) {
- var match, elem;
-
- // HANDLE: $(""), $(null), $(undefined), $(false)
- if ( !selector ) {
- return this;
- }
-
- // Handle HTML strings
- if ( typeof selector === "string" ) {
- if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
- // Assume that strings that start and end with <> are HTML and skip the regex check
- match = [ null, selector, null ];
-
- } else {
- match = rquickExpr.exec( selector );
- }
-
- // Match html or make sure no context is specified for #id
- if ( match && (match[1] || !context) ) {
-
- // HANDLE: $(html) -> $(array)
- if ( match[1] ) {
- context = context instanceof jQuery ? context[0] : context;
-
- // scripts is true for back-compat
- jQuery.merge( this, jQuery.parseHTML(
- match[1],
- context && context.nodeType ? context.ownerDocument || context : document,
- true
- ) );
-
- // HANDLE: $(html, props)
- if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
- for ( match in context ) {
- // Properties of context are called as methods if possible
- if ( jQuery.isFunction( this[ match ] ) ) {
- this[ match ]( context[ match ] );
-
- // ...and otherwise set as attributes
- } else {
- this.attr( match, context[ match ] );
- }
- }
- }
-
- return this;
-
- // HANDLE: $(#id)
- } else {
- elem = document.getElementById( match[2] );
-
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- if ( elem && elem.parentNode ) {
- // Handle the case where IE and Opera return items
- // by name instead of ID
- if ( elem.id !== match[2] ) {
- return rootjQuery.find( selector );
- }
-
- // Otherwise, we inject the element directly into the jQuery object
- this.length = 1;
- this[0] = elem;
- }
-
- this.context = document;
- this.selector = selector;
- return this;
- }
-
- // HANDLE: $(expr, $(...))
- } else if ( !context || context.jquery ) {
- return ( context || rootjQuery ).find( selector );
-
- // HANDLE: $(expr, context)
- // (which is just equivalent to: $(context).find(expr)
- } else {
- return this.constructor( context ).find( selector );
- }
-
- // HANDLE: $(DOMElement)
- } else if ( selector.nodeType ) {
- this.context = this[0] = selector;
- this.length = 1;
- return this;
-
- // HANDLE: $(function)
- // Shortcut for document ready
- } else if ( jQuery.isFunction( selector ) ) {
- return rootjQuery.ready( selector );
- }
-
- if ( selector.selector !== undefined ) {
- this.selector = selector.selector;
- this.context = selector.context;
- }
-
- return jQuery.makeArray( selector, this );
- },
-
- // Start with an empty selector
- selector: "",
-
- // The default length of a jQuery object is 0
- length: 0,
-
- toArray: function() {
- return core_slice.call( this );
- },
-
- // Get the Nth element in the matched element set OR
- // Get the whole matched element set as a clean array
- get: function( num ) {
- return num == null ?
-
- // Return a 'clean' array
- this.toArray() :
-
- // Return just the object
- ( num < 0 ? this[ this.length + num ] : this[ num ] );
- },
-
- // Take an array of elements and push it onto the stack
- // (returning the new matched element set)
- pushStack: function( elems ) {
-
- // Build a new jQuery matched element set
- var ret = jQuery.merge( this.constructor(), elems );
-
- // Add the old object onto the stack (as a reference)
- ret.prevObject = this;
- ret.context = this.context;
-
- // Return the newly-formed element set
- return ret;
- },
-
- // Execute a callback for every element in the matched set.
- // (You can seed the arguments with an array of args, but this is
- // only used internally.)
- each: function( callback, args ) {
- return jQuery.each( this, callback, args );
- },
-
- ready: function( fn ) {
- // Add the callback
- jQuery.ready.promise().done( fn );
-
- return this;
- },
-
- slice: function() {
- return this.pushStack( core_slice.apply( this, arguments ) );
- },
-
- first: function() {
- return this.eq( 0 );
- },
-
- last: function() {
- return this.eq( -1 );
- },
-
- eq: function( i ) {
- var len = this.length,
- j = +i + ( i < 0 ? len : 0 );
- return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
- },
-
- map: function( callback ) {
- return this.pushStack( jQuery.map(this, function( elem, i ) {
- return callback.call( elem, i, elem );
- }));
- },
-
- end: function() {
- return this.prevObject || this.constructor(null);
- },
-
- // For internal use only.
- // Behaves like an Array's method, not like a jQuery method.
- push: core_push,
- sort: [].sort,
- splice: [].splice
-};
-
-// Give the init function the jQuery prototype for later instantiation
-jQuery.fn.init.prototype = jQuery.fn;
-
-jQuery.extend = jQuery.fn.extend = function() {
- var src, copyIsArray, copy, name, options, clone,
- target = arguments[0] || {},
- i = 1,
- length = arguments.length,
- deep = false;
-
- // Handle a deep copy situation
- if ( typeof target === "boolean" ) {
- deep = target;
- target = arguments[1] || {};
- // skip the boolean and the target
- i = 2;
- }
-
- // Handle case when target is a string or something (possible in deep copy)
- if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
- target = {};
- }
-
- // extend jQuery itself if only one argument is passed
- if ( length === i ) {
- target = this;
- --i;
- }
-
- for ( ; i < length; i++ ) {
- // Only deal with non-null/undefined values
- if ( (options = arguments[ i ]) != null ) {
- // Extend the base object
- for ( name in options ) {
- src = target[ name ];
- copy = options[ name ];
-
- // Prevent never-ending loop
- if ( target === copy ) {
- continue;
- }
-
- // Recurse if we're merging plain objects or arrays
- if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
- if ( copyIsArray ) {
- copyIsArray = false;
- clone = src && jQuery.isArray(src) ? src : [];
-
- } else {
- clone = src && jQuery.isPlainObject(src) ? src : {};
- }
-
- // Never move original objects, clone them
- target[ name ] = jQuery.extend( deep, clone, copy );
-
- // Don't bring in undefined values
- } else if ( copy !== undefined ) {
- target[ name ] = copy;
- }
- }
- }
- }
-
- // Return the modified object
- return target;
-};
-
-jQuery.extend({
- // Unique for each copy of jQuery on the page
- // Non-digits removed to match rinlinejQuery
- expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ),
-
- noConflict: function( deep ) {
- if ( window.$ === jQuery ) {
- window.$ = _$;
- }
-
- if ( deep && window.jQuery === jQuery ) {
- window.jQuery = _jQuery;
- }
-
- return jQuery;
- },
-
- // Is the DOM ready to be used? Set to true once it occurs.
- isReady: false,
-
- // A counter to track how many items to wait for before
- // the ready event fires. See #6781
- readyWait: 1,
-
- // Hold (or release) the ready event
- holdReady: function( hold ) {
- if ( hold ) {
- jQuery.readyWait++;
- } else {
- jQuery.ready( true );
- }
- },
-
- // Handle when the DOM is ready
- ready: function( wait ) {
-
- // Abort if there are pending holds or we're already ready
- if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
- return;
- }
-
- // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
- if ( !document.body ) {
- return setTimeout( jQuery.ready );
- }
-
- // Remember that the DOM is ready
- jQuery.isReady = true;
-
- // If a normal DOM Ready event fired, decrement, and wait if need be
- if ( wait !== true && --jQuery.readyWait > 0 ) {
- return;
- }
-
- // If there are functions bound, to execute
- readyList.resolveWith( document, [ jQuery ] );
-
- // Trigger any bound ready events
- if ( jQuery.fn.trigger ) {
- jQuery( document ).trigger("ready").off("ready");
- }
- },
-
- // See test/unit/core.js for details concerning isFunction.
- // Since version 1.3, DOM methods and functions like alert
- // aren't supported. They return false on IE (#2968).
- isFunction: function( obj ) {
- return jQuery.type(obj) === "function";
- },
-
- isArray: Array.isArray || function( obj ) {
- return jQuery.type(obj) === "array";
- },
-
- isWindow: function( obj ) {
- /* jshint eqeqeq: false */
- return obj != null && obj == obj.window;
- },
-
- isNumeric: function( obj ) {
- return !isNaN( parseFloat(obj) ) && isFinite( obj );
- },
-
- type: function( obj ) {
- if ( obj == null ) {
- return String( obj );
- }
- return typeof obj === "object" || typeof obj === "function" ?
- class2type[ core_toString.call(obj) ] || "object" :
- typeof obj;
- },
-
- isPlainObject: function( obj ) {
- var key;
-
- // Must be an Object.
- // Because of IE, we also have to check the presence of the constructor property.
- // Make sure that DOM nodes and window objects don't pass through, as well
- if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
- return false;
- }
-
- try {
- // Not own constructor property must be Object
- if ( obj.constructor &&
- !core_hasOwn.call(obj, "constructor") &&
- !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
- return false;
- }
- } catch ( e ) {
- // IE8,9 Will throw exceptions on certain host objects #9897
- return false;
- }
-
- // Support: IE<9
- // Handle iteration over inherited properties before own properties.
- if ( jQuery.support.ownLast ) {
- for ( key in obj ) {
- return core_hasOwn.call( obj, key );
- }
- }
-
- // Own properties are enumerated firstly, so to speed up,
- // if last one is own, then all properties are own.
- for ( key in obj ) {}
-
- return key === undefined || core_hasOwn.call( obj, key );
- },
-
- isEmptyObject: function( obj ) {
- var name;
- for ( name in obj ) {
- return false;
- }
- return true;
- },
-
- error: function( msg ) {
- throw new Error( msg );
- },
-
- // data: string of html
- // context (optional): If specified, the fragment will be created in this context, defaults to document
- // keepScripts (optional): If true, will include scripts passed in the html string
- parseHTML: function( data, context, keepScripts ) {
- if ( !data || typeof data !== "string" ) {
- return null;
- }
- if ( typeof context === "boolean" ) {
- keepScripts = context;
- context = false;
- }
- context = context || document;
-
- var parsed = rsingleTag.exec( data ),
- scripts = !keepScripts && [];
-
- // Single tag
- if ( parsed ) {
- return [ context.createElement( parsed[1] ) ];
- }
-
- parsed = jQuery.buildFragment( [ data ], context, scripts );
- if ( scripts ) {
- jQuery( scripts ).remove();
- }
- return jQuery.merge( [], parsed.childNodes );
- },
-
- parseJSON: function( data ) {
- // Attempt to parse using the native JSON parser first
- if ( window.JSON && window.JSON.parse ) {
- return window.JSON.parse( data );
- }
-
- if ( data === null ) {
- return data;
- }
-
- if ( typeof data === "string" ) {
-
- // Make sure leading/trailing whitespace is removed (IE can't handle it)
- data = jQuery.trim( data );
-
- if ( data ) {
- // Make sure the incoming data is actual JSON
- // Logic borrowed from http://json.org/json2.js
- if ( rvalidchars.test( data.replace( rvalidescape, "@" )
- .replace( rvalidtokens, "]" )
- .replace( rvalidbraces, "")) ) {
-
- return ( new Function( "return " + data ) )();
- }
- }
- }
-
- jQuery.error( "Invalid JSON: " + data );
- },
-
- // Cross-browser xml parsing
- parseXML: function( data ) {
- var xml, tmp;
- if ( !data || typeof data !== "string" ) {
- return null;
- }
- try {
- if ( window.DOMParser ) { // Standard
- tmp = new DOMParser();
- xml = tmp.parseFromString( data , "text/xml" );
- } else { // IE
- xml = new ActiveXObject( "Microsoft.XMLDOM" );
- xml.async = "false";
- xml.loadXML( data );
- }
- } catch( e ) {
- xml = undefined;
- }
- if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
- jQuery.error( "Invalid XML: " + data );
- }
- return xml;
- },
-
- noop: function() {},
-
- // Evaluates a script in a global context
- // Workarounds based on findings by Jim Driscoll
- // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-gl…
- globalEval: function( data ) {
- if ( data && jQuery.trim( data ) ) {
- // We use execScript on Internet Explorer
- // We use an anonymous function so that context is window
- // rather than jQuery in Firefox
- ( window.execScript || function( data ) {
- window[ "eval" ].call( window, data );
- } )( data );
- }
- },
-
- // Convert dashed to camelCase; used by the css and data modules
- // Microsoft forgot to hump their vendor prefix (#9572)
- camelCase: function( string ) {
- return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
- },
-
- nodeName: function( elem, name ) {
- return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
- },
-
- // args is for internal usage only
- each: function( obj, callback, args ) {
- var value,
- i = 0,
- length = obj.length,
- isArray = isArraylike( obj );
-
- if ( args ) {
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback.apply( obj[ i ], args );
-
- if ( value === false ) {
- break;
- }
- }
- } else {
- for ( i in obj ) {
- value = callback.apply( obj[ i ], args );
-
- if ( value === false ) {
- break;
- }
- }
- }
-
- // A special, fast, case for the most common use of each
- } else {
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback.call( obj[ i ], i, obj[ i ] );
-
- if ( value === false ) {
- break;
- }
- }
- } else {
- for ( i in obj ) {
- value = callback.call( obj[ i ], i, obj[ i ] );
-
- if ( value === false ) {
- break;
- }
- }
- }
- }
-
- return obj;
- },
-
- // Use native String.trim function wherever possible
- trim: core_trim && !core_trim.call("\uFEFF\xA0") ?
- function( text ) {
- return text == null ?
- "" :
- core_trim.call( text );
- } :
-
- // Otherwise use our own trimming functionality
- function( text ) {
- return text == null ?
- "" :
- ( text + "" ).replace( rtrim, "" );
- },
-
- // results is for internal usage only
- makeArray: function( arr, results ) {
- var ret = results || [];
-
- if ( arr != null ) {
- if ( isArraylike( Object(arr) ) ) {
- jQuery.merge( ret,
- typeof arr === "string" ?
- [ arr ] : arr
- );
- } else {
- core_push.call( ret, arr );
- }
- }
-
- return ret;
- },
-
- inArray: function( elem, arr, i ) {
- var len;
-
- if ( arr ) {
- if ( core_indexOf ) {
- return core_indexOf.call( arr, elem, i );
- }
-
- len = arr.length;
- i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
-
- for ( ; i < len; i++ ) {
- // Skip accessing in sparse arrays
- if ( i in arr && arr[ i ] === elem ) {
- return i;
- }
- }
- }
-
- return -1;
- },
-
- merge: function( first, second ) {
- var l = second.length,
- i = first.length,
- j = 0;
-
- if ( typeof l === "number" ) {
- for ( ; j < l; j++ ) {
- first[ i++ ] = second[ j ];
- }
- } else {
- while ( second[j] !== undefined ) {
- first[ i++ ] = second[ j++ ];
- }
- }
-
- first.length = i;
-
- return first;
- },
-
- grep: function( elems, callback, inv ) {
- var retVal,
- ret = [],
- i = 0,
- length = elems.length;
- inv = !!inv;
-
- // Go through the array, only saving the items
- // that pass the validator function
- for ( ; i < length; i++ ) {
- retVal = !!callback( elems[ i ], i );
- if ( inv !== retVal ) {
- ret.push( elems[ i ] );
- }
- }
-
- return ret;
- },
-
- // arg is for internal usage only
- map: function( elems, callback, arg ) {
- var value,
- i = 0,
- length = elems.length,
- isArray = isArraylike( elems ),
- ret = [];
-
- // Go through the array, translating each of the items to their
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret[ ret.length ] = value;
- }
- }
-
- // Go through every key on the object,
- } else {
- for ( i in elems ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret[ ret.length ] = value;
- }
- }
- }
-
- // Flatten any nested arrays
- return core_concat.apply( [], ret );
- },
-
- // A global GUID counter for objects
- guid: 1,
-
- // Bind a function to a context, optionally partially applying any
- // arguments.
- proxy: function( fn, context ) {
- var args, proxy, tmp;
-
- if ( typeof context === "string" ) {
- tmp = fn[ context ];
- context = fn;
- fn = tmp;
- }
-
- // Quick check to determine if target is callable, in the spec
- // this throws a TypeError, but we will just return undefined.
- if ( !jQuery.isFunction( fn ) ) {
- return undefined;
- }
-
- // Simulated bind
- args = core_slice.call( arguments, 2 );
- proxy = function() {
- return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) );
- };
-
- // Set the guid of unique handler to the same of original handler, so it can be removed
- proxy.guid = fn.guid = fn.guid || jQuery.guid++;
-
- return proxy;
- },
-
- // Multifunctional method to get and set values of a collection
- // The value/s can optionally be executed if it's a function
- access: function( elems, fn, key, value, chainable, emptyGet, raw ) {
- var i = 0,
- length = elems.length,
- bulk = key == null;
-
- // Sets many values
- if ( jQuery.type( key ) === "object" ) {
- chainable = true;
- for ( i in key ) {
- jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
- }
-
- // Sets one value
- } else if ( value !== undefined ) {
- chainable = true;
-
- if ( !jQuery.isFunction( value ) ) {
- raw = true;
- }
-
- if ( bulk ) {
- // Bulk operations run against the entire set
- if ( raw ) {
- fn.call( elems, value );
- fn = null;
-
- // ...except when executing function values
- } else {
- bulk = fn;
- fn = function( elem, key, value ) {
- return bulk.call( jQuery( elem ), value );
- };
- }
- }
-
- if ( fn ) {
- for ( ; i < length; i++ ) {
- fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
- }
- }
- }
-
- return chainable ?
- elems :
-
- // Gets
- bulk ?
- fn.call( elems ) :
- length ? fn( elems[0], key ) : emptyGet;
- },
-
- now: function() {
- return ( new Date() ).getTime();
- },
-
- // A method for quickly swapping in/out CSS properties to get correct calculations.
- // Note: this method belongs to the css module but it's needed here for the support module.
- // If support gets modularized, this method should be moved back to the css module.
- swap: function( elem, options, callback, args ) {
- var ret, name,
- old = {};
-
- // Remember the old values, and insert the new ones
- for ( name in options ) {
- old[ name ] = elem.style[ name ];
- elem.style[ name ] = options[ name ];
- }
-
- ret = callback.apply( elem, args || [] );
-
- // Revert the old values
- for ( name in options ) {
- elem.style[ name ] = old[ name ];
- }
-
- return ret;
- }
-});
-
-jQuery.ready.promise = function( obj ) {
- if ( !readyList ) {
-
- readyList = jQuery.Deferred();
-
- // Catch cases where $(document).ready() is called after the browser event has already occurred.
- // we once tried to use readyState "interactive" here, but it caused issues like the one
- // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
- if ( document.readyState === "complete" ) {
- // Handle it asynchronously to allow scripts the opportunity to delay ready
- setTimeout( jQuery.ready );
-
- // Standards-based browsers support DOMContentLoaded
- } else if ( document.addEventListener ) {
- // Use the handy event callback
- document.addEventListener( "DOMContentLoaded", completed, false );
-
- // A fallback to window.onload, that will always work
- window.addEventListener( "load", completed, false );
-
- // If IE event model is used
- } else {
- // Ensure firing before onload, maybe late but safe also for iframes
- document.attachEvent( "onreadystatechange", completed );
-
- // A fallback to window.onload, that will always work
- window.attachEvent( "onload", completed );
-
- // If IE and not a frame
- // continually check to see if the document is ready
- var top = false;
-
- try {
- top = window.frameElement == null && document.documentElement;
- } catch(e) {}
-
- if ( top && top.doScroll ) {
- (function doScrollCheck() {
- if ( !jQuery.isReady ) {
-
- try {
- // Use the trick by Diego Perini
- // http://javascript.nwbox.com/IEContentLoaded/
- top.doScroll("left");
- } catch(e) {
- return setTimeout( doScrollCheck, 50 );
- }
-
- // detach all dom ready events
- detach();
-
- // and execute any waiting functions
- jQuery.ready();
- }
- })();
- }
- }
- }
- return readyList.promise( obj );
-};
-
-// Populate the class2type map
-jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
- class2type[ "[object " + name + "]" ] = name.toLowerCase();
-});
-
-function isArraylike( obj ) {
- var length = obj.length,
- type = jQuery.type( obj );
-
- if ( jQuery.isWindow( obj ) ) {
- return false;
- }
-
- if ( obj.nodeType === 1 && length ) {
- return true;
- }
-
- return type === "array" || type !== "function" &&
- ( length === 0 ||
- typeof length === "number" && length > 0 && ( length - 1 ) in obj );
-}
-
-// All jQuery objects should point back to these
-rootjQuery = jQuery(document);
-/*!
- * Sizzle CSS Selector Engine v1.10.2
- * http://sizzlejs.com/
- *
- * Copyright 2013 jQuery Foundation, Inc. and other contributors
- * Released under the MIT license
- * http://jquery.org/license
- *
- * Date: 2013-07-03
- */
-(function( window, undefined ) {
-
-var i,
- support,
- cachedruns,
- Expr,
- getText,
- isXML,
- compile,
- outermostContext,
- sortInput,
-
- // Local document vars
- setDocument,
- document,
- docElem,
- documentIsHTML,
- rbuggyQSA,
- rbuggyMatches,
- matches,
- contains,
-
- // Instance-specific data
- expando = "sizzle" + -(new Date()),
- preferredDoc = window.document,
- dirruns = 0,
- done = 0,
- classCache = createCache(),
- tokenCache = createCache(),
- compilerCache = createCache(),
- hasDuplicate = false,
- sortOrder = function( a, b ) {
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
- }
- return 0;
- },
-
- // General-purpose constants
- strundefined = typeof undefined,
- MAX_NEGATIVE = 1 << 31,
-
- // Instance methods
- hasOwn = ({}).hasOwnProperty,
- arr = [],
- pop = arr.pop,
- push_native = arr.push,
- push = arr.push,
- slice = arr.slice,
- // Use a stripped-down indexOf if we can't use a native one
- indexOf = arr.indexOf || function( elem ) {
- var i = 0,
- len = this.length;
- for ( ; i < len; i++ ) {
- if ( this[i] === elem ) {
- return i;
- }
- }
- return -1;
- },
-
- booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
-
- // Regular expressions
-
- // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
- whitespace = "[\\x20\\t\\r\\n\\f]",
- // http://www.w3.org/TR/css3-syntax/#characters
- characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
-
- // Loosely modeled on CSS identifier characters
- // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
- // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
- identifier = characterEncoding.replace( "w", "w#" ),
-
- // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors
- attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace +
- "*(?:([*^$|!~]?=)" + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",
-
- // Prefer arguments quoted,
- // then not containing pseudos/brackets,
- // then attribute selectors/non-parenthetical expressions,
- // then anything else
- // These preferences are here to reduce the number of selectors
- // needing tokenize in the PSEUDO preFilter
- pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)",
-
- // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
- rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
-
- rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
- rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
-
- rsibling = new RegExp( whitespace + "*[+~]" ),
- rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*)" + whitespace + "*\\]", "g" ),
-
- rpseudo = new RegExp( pseudos ),
- ridentifier = new RegExp( "^" + identifier + "$" ),
-
- matchExpr = {
- "ID": new RegExp( "^#(" + characterEncoding + ")" ),
- "CLASS": new RegExp( "^\\.(" + 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" ),
- "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
- // For use in libraries implementing .is()
- // We use this for POS matching in `select`
- "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
- whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
- },
-
- rnative = /^[^{]+\{\s*\[native \w/,
-
- // Easily-parseable/retrievable ID or TAG or CLASS selectors
- rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
-
- rinputs = /^(?:input|select|textarea|button)$/i,
- rheader = /^h\d$/i,
-
- rescape = /'|\\/g,
-
- // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
- runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
- funescape = function( _, escaped, escapedWhitespace ) {
- var high = "0x" + escaped - 0x10000;
- // NaN means non-codepoint
- // Support: Firefox
- // Workaround erroneous numeric interpretation of +"0x"
- return high !== high || escapedWhitespace ?
- escaped :
- // BMP codepoint
- high < 0 ?
- String.fromCharCode( high + 0x10000 ) :
- // Supplemental Plane codepoint (surrogate pair)
- String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
- };
-
-// Optimize for push.apply( _, NodeList )
-try {
- push.apply(
- (arr = slice.call( preferredDoc.childNodes )),
- preferredDoc.childNodes
- );
- // Support: Android<4.0
- // Detect silently failing push.apply
- arr[ preferredDoc.childNodes.length ].nodeType;
-} catch ( e ) {
- push = { apply: arr.length ?
-
- // Leverage slice if possible
- function( target, els ) {
- push_native.apply( target, slice.call(els) );
- } :
-
- // Support: IE<9
- // Otherwise append directly
- function( target, els ) {
- var j = target.length,
- i = 0;
- // Can't trust NodeList.length
- while ( (target[j++] = els[i++]) ) {}
- target.length = j - 1;
- }
- };
-}
-
-function Sizzle( selector, context, results, seed ) {
- var match, elem, m, nodeType,
- // QSA vars
- i, groups, old, nid, newContext, newSelector;
-
- if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
- setDocument( context );
- }
-
- context = context || document;
- results = results || [];
-
- if ( !selector || typeof selector !== "string" ) {
- return results;
- }
-
- if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {
- return [];
- }
-
- if ( documentIsHTML && !seed ) {
-
- // Shortcuts
- if ( (match = rquickExpr.exec( selector )) ) {
- // Speed-up: Sizzle("#ID")
- if ( (m = match[1]) ) {
- if ( nodeType === 9 ) {
- elem = context.getElementById( m );
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- if ( elem && elem.parentNode ) {
- // Handle the case where IE, Opera, and Webkit return items
- // by name instead of ID
- if ( elem.id === m ) {
- results.push( elem );
- return results;
- }
- } else {
- return results;
- }
- } else {
- // Context is not a document
- if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
- contains( context, elem ) && elem.id === m ) {
- results.push( elem );
- return results;
- }
- }
-
- // Speed-up: Sizzle("TAG")
- } else if ( match[2] ) {
- push.apply( results, context.getElementsByTagName( selector ) );
- return results;
-
- // Speed-up: Sizzle(".CLASS")
- } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) {
- push.apply( results, context.getElementsByClassName( m ) );
- return results;
- }
- }
-
- // QSA path
- if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
- nid = old = expando;
- newContext = context;
- newSelector = nodeType === 9 && selector;
-
- // qSA works strangely on Element-rooted queries
- // We can work around this by specifying an extra ID on the root
- // and working up from there (Thanks to Andrew Dupont for the technique)
- // IE 8 doesn't work on object elements
- if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
- groups = tokenize( selector );
-
- if ( (old = context.getAttribute("id")) ) {
- nid = old.replace( rescape, "\\$&" );
- } else {
- context.setAttribute( "id", nid );
- }
- nid = "[id='" + nid + "'] ";
-
- i = groups.length;
- while ( i-- ) {
- groups[i] = nid + toSelector( groups[i] );
- }
- newContext = rsibling.test( selector ) && context.parentNode || context;
- newSelector = groups.join(",");
- }
-
- if ( newSelector ) {
- try {
- push.apply( results,
- newContext.querySelectorAll( newSelector )
- );
- return results;
- } catch(qsaError) {
- } finally {
- if ( !old ) {
- context.removeAttribute("id");
- }
- }
- }
- }
- }
-
- // All others
- return select( selector.replace( rtrim, "$1" ), context, results, seed );
-}
-
-/**
- * Create key-value caches of limited size
- * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
- * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
- * deleting the oldest entry
- */
-function createCache() {
- var keys = [];
-
- function cache( key, value ) {
- // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
- if ( keys.push( key += " " ) > Expr.cacheLength ) {
- // Only keep the most recent entries
- delete cache[ keys.shift() ];
- }
- return (cache[ key ] = value);
- }
- return cache;
-}
-
-/**
- * Mark a function for special use by Sizzle
- * @param {Function} fn The function to mark
- */
-function markFunction( fn ) {
- fn[ expando ] = true;
- return fn;
-}
-
-/**
- * Support testing using an element
- * @param {Function} fn Passed the created div and expects a boolean result
- */
-function assert( fn ) {
- var div = document.createElement("div");
-
- try {
- return !!fn( div );
- } catch (e) {
- return false;
- } finally {
- // Remove from its parent by default
- if ( div.parentNode ) {
- div.parentNode.removeChild( div );
- }
- // release memory in IE
- div = null;
- }
-}
-
-/**
- * Adds the same handler for all of the specified attrs
- * @param {String} attrs Pipe-separated list of attributes
- * @param {Function} handler The method that will be applied
- */
-function addHandle( attrs, handler ) {
- var arr = attrs.split("|"),
- i = attrs.length;
-
- while ( i-- ) {
- Expr.attrHandle[ arr[i] ] = handler;
- }
-}
-
-/**
- * Checks document order of two siblings
- * @param {Element} a
- * @param {Element} b
- * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
- */
-function siblingCheck( a, b ) {
- var cur = b && a,
- diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
- ( ~b.sourceIndex || MAX_NEGATIVE ) -
- ( ~a.sourceIndex || MAX_NEGATIVE );
-
- // Use IE sourceIndex if available on both nodes
- if ( diff ) {
- return diff;
- }
-
- // Check if b follows a
- if ( cur ) {
- while ( (cur = cur.nextSibling) ) {
- if ( cur === b ) {
- return -1;
- }
- }
- }
-
- return a ? 1 : -1;
-}
-
-/**
- * Returns a function to use in pseudos for input types
- * @param {String} type
- */
-function createInputPseudo( type ) {
- return function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && elem.type === type;
- };
-}
-
-/**
- * Returns a function to use in pseudos for buttons
- * @param {String} type
- */
-function createButtonPseudo( type ) {
- return function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return (name === "input" || name === "button") && elem.type === type;
- };
-}
-
-/**
- * Returns a function to use in pseudos for positionals
- * @param {Function} fn
- */
-function createPositionalPseudo( fn ) {
- return markFunction(function( argument ) {
- argument = +argument;
- return markFunction(function( seed, matches ) {
- var j,
- matchIndexes = fn( [], seed.length, argument ),
- i = matchIndexes.length;
-
- // Match elements found at the specified indexes
- while ( i-- ) {
- if ( seed[ (j = matchIndexes[i]) ] ) {
- seed[j] = !(matches[j] = seed[j]);
- }
- }
- });
- });
-}
-
-/**
- * Detect xml
- * @param {Element|Object} elem An element or a document
- */
-isXML = Sizzle.isXML = function( elem ) {
- // documentElement is verified for cases where it doesn't yet exist
- // (such as loading iframes in IE - #4833)
- var documentElement = elem && (elem.ownerDocument || elem).documentElement;
- return documentElement ? documentElement.nodeName !== "HTML" : false;
-};
-
-// Expose support vars for convenience
-support = Sizzle.support = {};
-
-/**
- * Sets document-related variables once based on the current document
- * @param {Element|Object} [doc] An element or document object to use to set the document
- * @returns {Object} Returns the current document
- */
-setDocument = Sizzle.setDocument = function( node ) {
- var doc = node ? node.ownerDocument || node : preferredDoc,
- parent = doc.defaultView;
-
- // If no document and documentElement is available, return
- if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
- return document;
- }
-
- // Set our document
- document = doc;
- docElem = doc.documentElement;
-
- // Support tests
- documentIsHTML = !isXML( doc );
-
- // Support: IE>8
- // If iframe document is assigned to "document" variable and if iframe has been reloaded,
- // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
- // IE6-8 do not support the defaultView property so parent will be undefined
- if ( parent && parent.attachEvent && parent !== parent.top ) {
- parent.attachEvent( "onbeforeunload", function() {
- setDocument();
- });
- }
-
- /* Attributes
- ---------------------------------------------------------------------- */
-
- // Support: IE<8
- // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans)
- support.attributes = assert(function( div ) {
- div.className = "i";
- return !div.getAttribute("className");
- });
-
- /* getElement(s)By*
- ---------------------------------------------------------------------- */
-
- // Check if getElementsByTagName("*") returns only elements
- support.getElementsByTagName = assert(function( div ) {
- div.appendChild( doc.createComment("") );
- return !div.getElementsByTagName("*").length;
- });
-
- // Check if getElementsByClassName can be trusted
- support.getElementsByClassName = assert(function( div ) {
- div.innerHTML = "<div class='a'></div><div class='a i'></div>";
-
- // Support: Safari<4
- // Catch class over-caching
- div.firstChild.className = "i";
- // Support: Opera<10
- // Catch gEBCN failure to find non-leading classes
- return div.getElementsByClassName("i").length === 2;
- });
-
- // Support: IE<10
- // Check if getElementById returns elements by name
- // The broken getElementById methods don't pick up programatically-set names,
- // so use a roundabout getElementsByName test
- support.getById = assert(function( div ) {
- docElem.appendChild( div ).id = expando;
- return !doc.getElementsByName || !doc.getElementsByName( expando ).length;
- });
-
- // ID find and filter
- if ( support.getById ) {
- Expr.find["ID"] = function( id, context ) {
- if ( typeof context.getElementById !== strundefined && documentIsHTML ) {
- var m = context.getElementById( id );
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- return m && m.parentNode ? [m] : [];
- }
- };
- Expr.filter["ID"] = function( id ) {
- var attrId = id.replace( runescape, funescape );
- return function( elem ) {
- return elem.getAttribute("id") === attrId;
- };
- };
- } else {
- // Support: IE6/7
- // getElementById is not reliable as a find shortcut
- delete Expr.find["ID"];
-
- Expr.filter["ID"] = function( id ) {
- var attrId = id.replace( runescape, funescape );
- return function( elem ) {
- var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
- return node && node.value === attrId;
- };
- };
- }
-
- // Tag
- Expr.find["TAG"] = support.getElementsByTagName ?
- function( tag, context ) {
- if ( typeof context.getElementsByTagName !== strundefined ) {
- return context.getElementsByTagName( tag );
- }
- } :
- function( tag, context ) {
- var elem,
- tmp = [],
- i = 0,
- results = context.getElementsByTagName( tag );
-
- // Filter out possible comments
- if ( tag === "*" ) {
- while ( (elem = results[i++]) ) {
- if ( elem.nodeType === 1 ) {
- tmp.push( elem );
- }
- }
-
- return tmp;
- }
- return results;
- };
-
- // Class
- Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
- if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) {
- return context.getElementsByClassName( className );
- }
- };
-
- /* QSA/matchesSelector
- ---------------------------------------------------------------------- */
-
- // QSA and matchesSelector support
-
- // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
- rbuggyMatches = [];
-
- // qSa(:focus) reports false when true (Chrome 21)
- // We allow this because of a bug in IE8/9 that throws an error
- // whenever `document.activeElement` is accessed on an iframe
- // So, we allow :focus to pass through QSA all the time to avoid the IE error
- // See http://bugs.jquery.com/ticket/13378
- rbuggyQSA = [];
-
- if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {
- // Build QSA regex
- // Regex strategy adopted from Diego Perini
- assert(function( div ) {
- // Select is set to empty string on purpose
- // This is to test IE's treatment of not explicitly
- // setting a boolean content attribute,
- // since its presence should be enough
- // http://bugs.jquery.com/ticket/12359
- div.innerHTML = "<select><option selected=''></option></select>";
-
- // Support: IE8
- // Boolean attributes and "value" are not treated correctly
- if ( !div.querySelectorAll("[selected]").length ) {
- rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
- }
-
- // Webkit/Opera - :checked should return selected option elements
- // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
- // IE8 throws error here and will not see later tests
- if ( !div.querySelectorAll(":checked").length ) {
- rbuggyQSA.push(":checked");
- }
- });
-
- assert(function( div ) {
-
- // Support: Opera 10-12/IE8
- // ^= $= *= and empty values
- // Should not select anything
- // Support: Windows 8 Native Apps
- // The type attribute is restricted during .innerHTML assignment
- var input = doc.createElement("input");
- input.setAttribute( "type", "hidden" );
- div.appendChild( input ).setAttribute( "t", "" );
-
- if ( div.querySelectorAll("[t^='']").length ) {
- rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
- }
-
- // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
- // IE8 throws error here and will not see later tests
- if ( !div.querySelectorAll(":enabled").length ) {
- rbuggyQSA.push( ":enabled", ":disabled" );
- }
-
- // Opera 10-11 does not throw on post-comma invalid pseudos
- div.querySelectorAll("*,:x");
- rbuggyQSA.push(",.*:");
- });
- }
-
- if ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector ||
- docElem.mozMatchesSelector ||
- docElem.oMatchesSelector ||
- docElem.msMatchesSelector) )) ) {
-
- assert(function( div ) {
- // Check to see if it's possible to do matchesSelector
- // on a disconnected node (IE 9)
- support.disconnectedMatch = matches.call( div, "div" );
-
- // This should fail with an exception
- // Gecko does not error, returns false instead
- matches.call( div, "[s!='']:x" );
- rbuggyMatches.push( "!=", pseudos );
- });
- }
-
- rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
- rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
-
- /* Contains
- ---------------------------------------------------------------------- */
-
- // Element contains another
- // Purposefully does not implement inclusive descendent
- // As in, an element does not contain itself
- contains = rnative.test( docElem.contains ) || docElem.compareDocumentPosition ?
- function( a, b ) {
- var adown = a.nodeType === 9 ? a.documentElement : a,
- bup = b && b.parentNode;
- return a === bup || !!( bup && bup.nodeType === 1 && (
- adown.contains ?
- adown.contains( bup ) :
- a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
- ));
- } :
- function( a, b ) {
- if ( b ) {
- while ( (b = b.parentNode) ) {
- if ( b === a ) {
- return true;
- }
- }
- }
- return false;
- };
-
- /* Sorting
- ---------------------------------------------------------------------- */
-
- // Document order sorting
- sortOrder = docElem.compareDocumentPosition ?
- function( a, b ) {
-
- // Flag for duplicate removal
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
- }
-
- var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b );
-
- if ( compare ) {
- // Disconnected nodes
- if ( compare & 1 ||
- (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
-
- // Choose the first element that is related to our preferred document
- if ( a === doc || contains(preferredDoc, a) ) {
- return -1;
- }
- if ( b === doc || contains(preferredDoc, b) ) {
- return 1;
- }
-
- // Maintain original order
- return sortInput ?
- ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
- 0;
- }
-
- return compare & 4 ? -1 : 1;
- }
-
- // Not directly comparable, sort on existence of method
- return a.compareDocumentPosition ? -1 : 1;
- } :
- function( a, b ) {
- var cur,
- i = 0,
- aup = a.parentNode,
- bup = b.parentNode,
- ap = [ a ],
- bp = [ b ];
-
- // Exit early if the nodes are identical
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
-
- // Parentless nodes are either documents or disconnected
- } else if ( !aup || !bup ) {
- return a === doc ? -1 :
- b === doc ? 1 :
- aup ? -1 :
- bup ? 1 :
- sortInput ?
- ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
- 0;
-
- // If the nodes are siblings, we can do a quick check
- } else if ( aup === bup ) {
- return siblingCheck( a, b );
- }
-
- // Otherwise we need full lists of their ancestors for comparison
- cur = a;
- while ( (cur = cur.parentNode) ) {
- ap.unshift( cur );
- }
- cur = b;
- while ( (cur = cur.parentNode) ) {
- bp.unshift( cur );
- }
-
- // Walk down the tree looking for a discrepancy
- while ( ap[i] === bp[i] ) {
- i++;
- }
-
- return i ?
- // Do a sibling check if the nodes have a common ancestor
- siblingCheck( ap[i], bp[i] ) :
-
- // Otherwise nodes in our document sort first
- ap[i] === preferredDoc ? -1 :
- bp[i] === preferredDoc ? 1 :
- 0;
- };
-
- return doc;
-};
-
-Sizzle.matches = function( expr, elements ) {
- return Sizzle( expr, null, null, elements );
-};
-
-Sizzle.matchesSelector = function( elem, expr ) {
- // Set document vars if needed
- if ( ( elem.ownerDocument || elem ) !== document ) {
- setDocument( elem );
- }
-
- // Make sure that attribute selectors are quoted
- expr = expr.replace( rattributeQuotes, "='$1']" );
-
- if ( support.matchesSelector && documentIsHTML &&
- ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
- ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
-
- try {
- var ret = matches.call( elem, expr );
-
- // IE 9's matchesSelector returns false on disconnected nodes
- if ( ret || support.disconnectedMatch ||
- // As well, disconnected nodes are said to be in a document
- // fragment in IE 9
- elem.document && elem.document.nodeType !== 11 ) {
- return ret;
- }
- } catch(e) {}
- }
-
- return Sizzle( expr, document, null, [elem] ).length > 0;
-};
-
-Sizzle.contains = function( context, elem ) {
- // Set document vars if needed
- if ( ( context.ownerDocument || context ) !== document ) {
- setDocument( context );
- }
- return contains( context, elem );
-};
-
-Sizzle.attr = function( elem, name ) {
- // Set document vars if needed
- if ( ( elem.ownerDocument || elem ) !== document ) {
- setDocument( elem );
- }
-
- var fn = Expr.attrHandle[ name.toLowerCase() ],
- // Don't get fooled by Object.prototype properties (jQuery #13807)
- val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
- fn( elem, name, !documentIsHTML ) :
- undefined;
-
- return val === undefined ?
- support.attributes || !documentIsHTML ?
- elem.getAttribute( name ) :
- (val = elem.getAttributeNode(name)) && val.specified ?
- val.value :
- null :
- val;
-};
-
-Sizzle.error = function( msg ) {
- throw new Error( "Syntax error, unrecognized expression: " + msg );
-};
-
-/**
- * Document sorting and removing duplicates
- * @param {ArrayLike} results
- */
-Sizzle.uniqueSort = function( results ) {
- var elem,
- duplicates = [],
- j = 0,
- i = 0;
-
- // Unless we *know* we can detect duplicates, assume their presence
- hasDuplicate = !support.detectDuplicates;
- sortInput = !support.sortStable && results.slice( 0 );
- results.sort( sortOrder );
-
- if ( hasDuplicate ) {
- while ( (elem = results[i++]) ) {
- if ( elem === results[ i ] ) {
- j = duplicates.push( i );
- }
- }
- while ( j-- ) {
- results.splice( duplicates[ j ], 1 );
- }
- }
-
- return results;
-};
-
-/**
- * Utility function for retrieving the text value of an array of DOM nodes
- * @param {Array|Element} elem
- */
-getText = Sizzle.getText = function( elem ) {
- var node,
- ret = "",
- i = 0,
- nodeType = elem.nodeType;
-
- if ( !nodeType ) {
- // If no nodeType, this is expected to be an array
- for ( ; (node = elem[i]); i++ ) {
- // Do not traverse comment nodes
- ret += getText( node );
- }
- } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
- // Use textContent for elements
- // innerText usage removed for consistency of new lines (see #11153)
- if ( typeof elem.textContent === "string" ) {
- return elem.textContent;
- } else {
- // Traverse its children
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
- ret += getText( elem );
- }
- }
- } else if ( nodeType === 3 || nodeType === 4 ) {
- return elem.nodeValue;
- }
- // Do not include comment or processing instruction nodes
-
- return ret;
-};
-
-Expr = Sizzle.selectors = {
-
- // Can be adjusted by the user
- cacheLength: 50,
-
- createPseudo: markFunction,
-
- match: matchExpr,
-
- attrHandle: {},
-
- find: {},
-
- relative: {
- ">": { dir: "parentNode", first: true },
- " ": { dir: "parentNode" },
- "+": { dir: "previousSibling", first: true },
- "~": { dir: "previousSibling" }
- },
-
- preFilter: {
- "ATTR": function( match ) {
- match[1] = match[1].replace( runescape, funescape );
-
- // Move the given value to match[3] whether quoted or unquoted
- match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape );
-
- if ( match[2] === "~=" ) {
- match[3] = " " + match[3] + " ";
- }
-
- return match.slice( 0, 4 );
- },
-
- "CHILD": function( match ) {
- /* matches from matchExpr["CHILD"]
- 1 type (only|nth|...)
- 2 what (child|of-type)
- 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
- 4 xn-component of xn+y argument ([+-]?\d*n|)
- 5 sign of xn-component
- 6 x of xn-component
- 7 sign of y-component
- 8 y of y-component
- */
- match[1] = match[1].toLowerCase();
-
- if ( match[1].slice( 0, 3 ) === "nth" ) {
- // nth-* requires argument
- if ( !match[3] ) {
- Sizzle.error( match[0] );
- }
-
- // numeric x and y parameters for Expr.filter.CHILD
- // remember that false/true cast respectively to 0/1
- match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
- match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
-
- // other types prohibit arguments
- } else if ( match[3] ) {
- Sizzle.error( match[0] );
- }
-
- return match;
- },
-
- "PSEUDO": function( match ) {
- var excess,
- unquoted = !match[5] && match[2];
-
- if ( matchExpr["CHILD"].test( match[0] ) ) {
- return null;
- }
-
- // Accept quoted arguments as-is
- if ( match[3] && match[4] !== undefined ) {
- match[2] = match[4];
-
- // Strip excess characters from unquoted arguments
- } else if ( unquoted && rpseudo.test( unquoted ) &&
- // Get excess from tokenize (recursively)
- (excess = tokenize( unquoted, true )) &&
- // advance to the next closing parenthesis
- (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
-
- // excess is a negative index
- match[0] = match[0].slice( 0, excess );
- match[2] = unquoted.slice( 0, excess );
- }
-
- // Return only captures needed by the pseudo filter method (type and argument)
- return match.slice( 0, 3 );
- }
- },
-
- filter: {
-
- "TAG": function( nodeNameSelector ) {
- var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
- return nodeNameSelector === "*" ?
- function() { return true; } :
- function( elem ) {
- return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
- };
- },
-
- "CLASS": function( className ) {
- var pattern = classCache[ className + " " ];
-
- return pattern ||
- (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
- classCache( className, function( elem ) {
- return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" );
- });
- },
-
- "ATTR": function( name, operator, check ) {
- return function( elem ) {
- var result = Sizzle.attr( elem, name );
-
- if ( result == null ) {
- return operator === "!=";
- }
- if ( !operator ) {
- return true;
- }
-
- result += "";
-
- return operator === "=" ? result === check :
- operator === "!=" ? result !== check :
- operator === "^=" ? check && result.indexOf( check ) === 0 :
- operator === "*=" ? check && result.indexOf( check ) > -1 :
- operator === "$=" ? check && result.slice( -check.length ) === check :
- operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
- operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
- false;
- };
- },
-
- "CHILD": function( type, what, argument, first, last ) {
- var simple = type.slice( 0, 3 ) !== "nth",
- forward = type.slice( -4 ) !== "last",
- ofType = what === "of-type";
-
- return first === 1 && last === 0 ?
-
- // Shortcut for :nth-*(n)
- function( elem ) {
- return !!elem.parentNode;
- } :
-
- function( elem, context, xml ) {
- var cache, outerCache, node, diff, nodeIndex, start,
- dir = simple !== forward ? "nextSibling" : "previousSibling",
- parent = elem.parentNode,
- name = ofType && elem.nodeName.toLowerCase(),
- useCache = !xml && !ofType;
-
- if ( parent ) {
-
- // :(first|last|only)-(child|of-type)
- if ( simple ) {
- while ( dir ) {
- node = elem;
- while ( (node = node[ dir ]) ) {
- if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
- return false;
- }
- }
- // Reverse direction for :only-* (if we haven't yet done so)
- start = dir = type === "only" && !start && "nextSibling";
- }
- return true;
- }
-
- start = [ forward ? parent.firstChild : parent.lastChild ];
-
- // non-xml :nth-child(...) stores cache data on `parent`
- if ( forward && useCache ) {
- // Seek `elem` from a previously-cached index
- outerCache = parent[ expando ] || (parent[ expando ] = {});
- cache = outerCache[ type ] || [];
- nodeIndex = cache[0] === dirruns && cache[1];
- diff = cache[0] === dirruns && cache[2];
- node = nodeIndex && parent.childNodes[ nodeIndex ];
-
- while ( (node = ++nodeIndex && node && node[ dir ] ||
-
- // Fallback to seeking `elem` from the start
- (diff = nodeIndex = 0) || start.pop()) ) {
-
- // When found, cache indexes on `parent` and break
- if ( node.nodeType === 1 && ++diff && node === elem ) {
- outerCache[ type ] = [ dirruns, nodeIndex, diff ];
- break;
- }
- }
-
- // Use previously-cached element index if available
- } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
- diff = cache[1];
-
- // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
- } else {
- // Use the same loop as above to seek `elem` from the start
- while ( (node = ++nodeIndex && node && node[ dir ] ||
- (diff = nodeIndex = 0) || start.pop()) ) {
-
- if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
- // Cache the index of each encountered element
- if ( useCache ) {
- (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
- }
-
- if ( node === elem ) {
- break;
- }
- }
- }
- }
-
- // Incorporate the offset, then check against cycle size
- diff -= last;
- return diff === first || ( diff % first === 0 && diff / first >= 0 );
- }
- };
- },
-
- "PSEUDO": function( pseudo, argument ) {
- // pseudo-class names are case-insensitive
- // http://www.w3.org/TR/selectors/#pseudo-classes
- // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
- // Remember that setFilters inherits from pseudos
- var args,
- fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
- Sizzle.error( "unsupported pseudo: " + pseudo );
-
- // The user may use createPseudo to indicate that
- // arguments are needed to create the filter function
- // just as Sizzle does
- if ( fn[ expando ] ) {
- return fn( argument );
- }
-
- // But maintain support for old signatures
- if ( fn.length > 1 ) {
- args = [ pseudo, pseudo, "", argument ];
- return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
- markFunction(function( seed, matches ) {
- var idx,
- matched = fn( seed, argument ),
- i = matched.length;
- while ( i-- ) {
- idx = indexOf.call( seed, matched[i] );
- seed[ idx ] = !( matches[ idx ] = matched[i] );
- }
- }) :
- function( elem ) {
- return fn( elem, 0, args );
- };
- }
-
- return fn;
- }
- },
-
- pseudos: {
- // Potentially complex pseudos
- "not": markFunction(function( selector ) {
- // Trim the selector passed to compile
- // to avoid treating leading and trailing
- // spaces as combinators
- var input = [],
- results = [],
- matcher = compile( selector.replace( rtrim, "$1" ) );
-
- return matcher[ expando ] ?
- markFunction(function( seed, matches, context, xml ) {
- var elem,
- unmatched = matcher( seed, null, xml, [] ),
- i = seed.length;
-
- // Match elements unmatched by `matcher`
- while ( i-- ) {
- if ( (elem = unmatched[i]) ) {
- seed[i] = !(matches[i] = elem);
- }
- }
- }) :
- function( elem, context, xml ) {
- input[0] = elem;
- matcher( input, null, xml, results );
- return !results.pop();
- };
- }),
-
- "has": markFunction(function( selector ) {
- return function( elem ) {
- return Sizzle( selector, elem ).length > 0;
- };
- }),
-
- "contains": markFunction(function( text ) {
- return function( elem ) {
- return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
- };
- }),
-
- // "Whether an element is represented by a :lang() selector
- // is based solely on the element's language value
- // being equal to the identifier C,
- // or beginning with the identifier C immediately followed by "-".
- // The matching of C against the element's language value is performed case-insensitively.
- // The identifier C does not have to be a valid language name."
- // http://www.w3.org/TR/selectors/#lang-pseudo
- "lang": markFunction( function( lang ) {
- // lang value must be a valid identifier
- if ( !ridentifier.test(lang || "") ) {
- Sizzle.error( "unsupported lang: " + lang );
- }
- lang = lang.replace( runescape, funescape ).toLowerCase();
- return function( elem ) {
- var elemLang;
- do {
- if ( (elemLang = documentIsHTML ?
- elem.lang :
- elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
-
- elemLang = elemLang.toLowerCase();
- return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
- }
- } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
- return false;
- };
- }),
-
- // Miscellaneous
- "target": function( elem ) {
- var hash = window.location && window.location.hash;
- return hash && hash.slice( 1 ) === elem.id;
- },
-
- "root": function( elem ) {
- return elem === docElem;
- },
-
- "focus": function( elem ) {
- return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
- },
-
- // Boolean properties
- "enabled": function( elem ) {
- return elem.disabled === false;
- },
-
- "disabled": function( elem ) {
- return elem.disabled === true;
- },
-
- "checked": function( elem ) {
- // In CSS3, :checked should return both checked and selected elements
- // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
- var nodeName = elem.nodeName.toLowerCase();
- return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
- },
-
- "selected": function( elem ) {
- // Accessing this property makes selected-by-default
- // options in Safari work properly
- if ( elem.parentNode ) {
- elem.parentNode.selectedIndex;
- }
-
- return elem.selected === true;
- },
-
- // Contents
- "empty": function( elem ) {
- // http://www.w3.org/TR/selectors/#empty-pseudo
- // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
- // not comment, processing instructions, or others
- // Thanks to Diego Perini for the nodeName shortcut
- // Greater than "@" means alpha characters (specifically not starting with "#" or "?")
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
- if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) {
- return false;
- }
- }
- return true;
- },
-
- "parent": function( elem ) {
- return !Expr.pseudos["empty"]( elem );
- },
-
- // Element/input types
- "header": function( elem ) {
- return rheader.test( elem.nodeName );
- },
-
- "input": function( elem ) {
- return rinputs.test( elem.nodeName );
- },
-
- "button": function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && elem.type === "button" || name === "button";
- },
-
- "text": function( elem ) {
- var attr;
- // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
- // use getAttribute instead to test this case
- return elem.nodeName.toLowerCase() === "input" &&
- elem.type === "text" &&
- ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type );
- },
-
- // Position-in-collection
- "first": createPositionalPseudo(function() {
- return [ 0 ];
- }),
-
- "last": createPositionalPseudo(function( matchIndexes, length ) {
- return [ length - 1 ];
- }),
-
- "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
- return [ argument < 0 ? argument + length : argument ];
- }),
-
- "even": createPositionalPseudo(function( matchIndexes, length ) {
- var i = 0;
- for ( ; i < length; i += 2 ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "odd": createPositionalPseudo(function( matchIndexes, length ) {
- var i = 1;
- for ( ; i < length; i += 2 ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
- var i = argument < 0 ? argument + length : argument;
- for ( ; --i >= 0; ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
- var i = argument < 0 ? argument + length : argument;
- for ( ; ++i < length; ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- })
- }
-};
-
-Expr.pseudos["nth"] = Expr.pseudos["eq"];
-
-// Add button/input type pseudos
-for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
- Expr.pseudos[ i ] = createInputPseudo( i );
-}
-for ( i in { submit: true, reset: true } ) {
- Expr.pseudos[ i ] = createButtonPseudo( i );
-}
-
-// Easy API for creating new setFilters
-function setFilters() {}
-setFilters.prototype = Expr.filters = Expr.pseudos;
-Expr.setFilters = new setFilters();
-
-function tokenize( selector, parseOnly ) {
- var matched, match, tokens, type,
- soFar, groups, preFilters,
- cached = tokenCache[ selector + " " ];
-
- if ( cached ) {
- return parseOnly ? 0 : cached.slice( 0 );
- }
-
- soFar = selector;
- groups = [];
- preFilters = Expr.preFilter;
-
- while ( soFar ) {
-
- // Comma and first run
- if ( !matched || (match = rcomma.exec( soFar )) ) {
- if ( match ) {
- // Don't consume trailing commas as valid
- soFar = soFar.slice( match[0].length ) || soFar;
- }
- groups.push( tokens = [] );
- }
-
- matched = false;
-
- // Combinators
- if ( (match = rcombinators.exec( soFar )) ) {
- matched = match.shift();
- tokens.push({
- value: matched,
- // Cast descendant combinators to space
- type: match[0].replace( rtrim, " " )
- });
- soFar = soFar.slice( matched.length );
- }
-
- // Filters
- for ( type in Expr.filter ) {
- if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
- (match = preFilters[ type ]( match ))) ) {
- matched = match.shift();
- tokens.push({
- value: matched,
- type: type,
- matches: match
- });
- soFar = soFar.slice( matched.length );
- }
- }
-
- if ( !matched ) {
- break;
- }
- }
-
- // Return the length of the invalid excess
- // if we're just parsing
- // Otherwise, throw an error or return tokens
- return parseOnly ?
- soFar.length :
- soFar ?
- Sizzle.error( selector ) :
- // Cache the tokens
- tokenCache( selector, groups ).slice( 0 );
-}
-
-function toSelector( tokens ) {
- var i = 0,
- len = tokens.length,
- selector = "";
- for ( ; i < len; i++ ) {
- selector += tokens[i].value;
- }
- return selector;
-}
-
-function addCombinator( matcher, combinator, base ) {
- var dir = combinator.dir,
- checkNonElements = base && dir === "parentNode",
- doneName = done++;
-
- return combinator.first ?
- // Check against closest ancestor/preceding element
- function( elem, context, xml ) {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- return matcher( elem, context, xml );
- }
- }
- } :
-
- // Check against all ancestor/preceding elements
- function( elem, context, xml ) {
- var data, cache, outerCache,
- dirkey = dirruns + " " + doneName;
-
- // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
- if ( xml ) {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- if ( matcher( elem, context, xml ) ) {
- return true;
- }
- }
- }
- } else {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- outerCache = elem[ expando ] || (elem[ expando ] = {});
- if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) {
- if ( (data = cache[1]) === true || data === cachedruns ) {
- return data === true;
- }
- } else {
- cache = outerCache[ dir ] = [ dirkey ];
- cache[1] = matcher( elem, context, xml ) || cachedruns;
- if ( cache[1] === true ) {
- return true;
- }
- }
- }
- }
- }
- };
-}
-
-function elementMatcher( matchers ) {
- return matchers.length > 1 ?
- function( elem, context, xml ) {
- var i = matchers.length;
- while ( i-- ) {
- if ( !matchers[i]( elem, context, xml ) ) {
- return false;
- }
- }
- return true;
- } :
- matchers[0];
-}
-
-function condense( unmatched, map, filter, context, xml ) {
- var elem,
- newUnmatched = [],
- i = 0,
- len = unmatched.length,
- mapped = map != null;
-
- for ( ; i < len; i++ ) {
- if ( (elem = unmatched[i]) ) {
- if ( !filter || filter( elem, context, xml ) ) {
- newUnmatched.push( elem );
- if ( mapped ) {
- map.push( i );
- }
- }
- }
- }
-
- return newUnmatched;
-}
-
-function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
- if ( postFilter && !postFilter[ expando ] ) {
- postFilter = setMatcher( postFilter );
- }
- if ( postFinder && !postFinder[ expando ] ) {
- postFinder = setMatcher( postFinder, postSelector );
- }
- return markFunction(function( seed, results, context, xml ) {
- var temp, i, elem,
- preMap = [],
- postMap = [],
- preexisting = results.length,
-
- // Get initial elements from seed or context
- elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
-
- // Prefilter to get matcher input, preserving a map for seed-results synchronization
- matcherIn = preFilter && ( seed || !selector ) ?
- condense( elems, preMap, preFilter, context, xml ) :
- elems,
-
- matcherOut = matcher ?
- // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
- postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
-
- // ...intermediate processing is necessary
- [] :
-
- // ...otherwise use results directly
- results :
- matcherIn;
-
- // Find primary matches
- if ( matcher ) {
- matcher( matcherIn, matcherOut, context, xml );
- }
-
- // Apply postFilter
- if ( postFilter ) {
- temp = condense( matcherOut, postMap );
- postFilter( temp, [], context, xml );
-
- // Un-match failing elements by moving them back to matcherIn
- i = temp.length;
- while ( i-- ) {
- if ( (elem = temp[i]) ) {
- matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
- }
- }
- }
-
- if ( seed ) {
- if ( postFinder || preFilter ) {
- if ( postFinder ) {
- // Get the final matcherOut by condensing this intermediate into postFinder contexts
- temp = [];
- i = matcherOut.length;
- while ( i-- ) {
- if ( (elem = matcherOut[i]) ) {
- // Restore matcherIn since elem is not yet a final match
- temp.push( (matcherIn[i] = elem) );
- }
- }
- postFinder( null, (matcherOut = []), temp, xml );
- }
-
- // Move matched elements from seed to results to keep them synchronized
- i = matcherOut.length;
- while ( i-- ) {
- if ( (elem = matcherOut[i]) &&
- (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {
-
- seed[temp] = !(results[temp] = elem);
- }
- }
- }
-
- // Add elements to results, through postFinder if defined
- } else {
- matcherOut = condense(
- matcherOut === results ?
- matcherOut.splice( preexisting, matcherOut.length ) :
- matcherOut
- );
- if ( postFinder ) {
- postFinder( null, results, matcherOut, xml );
- } else {
- push.apply( results, matcherOut );
- }
- }
- });
-}
-
-function matcherFromTokens( tokens ) {
- var checkContext, matcher, j,
- len = tokens.length,
- leadingRelative = Expr.relative[ tokens[0].type ],
- implicitRelative = leadingRelative || Expr.relative[" "],
- i = leadingRelative ? 1 : 0,
-
- // The foundational matcher ensures that elements are reachable from top-level context(s)
- matchContext = addCombinator( function( elem ) {
- return elem === checkContext;
- }, implicitRelative, true ),
- matchAnyContext = addCombinator( function( elem ) {
- return indexOf.call( checkContext, elem ) > -1;
- }, implicitRelative, true ),
- matchers = [ function( elem, context, xml ) {
- return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
- (checkContext = context).nodeType ?
- matchContext( elem, context, xml ) :
- matchAnyContext( elem, context, xml ) );
- } ];
-
- for ( ; i < len; i++ ) {
- if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
- matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
- } else {
- matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
-
- // Return special upon seeing a positional matcher
- if ( matcher[ expando ] ) {
- // Find the next relative operator (if any) for proper handling
- j = ++i;
- for ( ; j < len; j++ ) {
- if ( Expr.relative[ tokens[j].type ] ) {
- break;
- }
- }
- return setMatcher(
- i > 1 && elementMatcher( matchers ),
- i > 1 && toSelector(
- // If the preceding token was a descendant combinator, insert an implicit any-element `*`
- tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
- ).replace( rtrim, "$1" ),
- matcher,
- i < j && matcherFromTokens( tokens.slice( i, j ) ),
- j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
- j < len && toSelector( tokens )
- );
- }
- matchers.push( matcher );
- }
- }
-
- return elementMatcher( matchers );
-}
-
-function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
- // A counter to specify which element is currently being matched
- var matcherCachedRuns = 0,
- bySet = setMatchers.length > 0,
- byElement = elementMatchers.length > 0,
- superMatcher = function( seed, context, xml, results, expandContext ) {
- var elem, j, matcher,
- setMatched = [],
- matchedCount = 0,
- i = "0",
- unmatched = seed && [],
- outermost = expandContext != null,
- contextBackup = outermostContext,
- // We must always have either seed elements or context
- elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ),
- // Use integer dirruns iff this is the outermost matcher
- dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1);
-
- if ( outermost ) {
- outermostContext = context !== document && context;
- cachedruns = matcherCachedRuns;
- }
-
- // Add elements passing elementMatchers directly to results
- // Keep `i` a string if there are no elements so `matchedCount` will be "00" below
- for ( ; (elem = elems[i]) != null; i++ ) {
- if ( byElement && elem ) {
- j = 0;
- while ( (matcher = elementMatchers[j++]) ) {
- if ( matcher( elem, context, xml ) ) {
- results.push( elem );
- break;
- }
- }
- if ( outermost ) {
- dirruns = dirrunsUnique;
- cachedruns = ++matcherCachedRuns;
- }
- }
-
- // Track unmatched elements for set filters
- if ( bySet ) {
- // They will have gone through all possible matchers
- if ( (elem = !matcher && elem) ) {
- matchedCount--;
- }
-
- // Lengthen the array for every element, matched or not
- if ( seed ) {
- unmatched.push( elem );
- }
- }
- }
-
- // Apply set filters to unmatched elements
- matchedCount += i;
- if ( bySet && i !== matchedCount ) {
- j = 0;
- while ( (matcher = setMatchers[j++]) ) {
- matcher( unmatched, setMatched, context, xml );
- }
-
- if ( seed ) {
- // Reintegrate element matches to eliminate the need for sorting
- if ( matchedCount > 0 ) {
- while ( i-- ) {
- if ( !(unmatched[i] || setMatched[i]) ) {
- setMatched[i] = pop.call( results );
- }
- }
- }
-
- // Discard index placeholder values to get only actual matches
- setMatched = condense( setMatched );
- }
-
- // Add matches to results
- push.apply( results, setMatched );
-
- // Seedless set matches succeeding multiple successful matchers stipulate sorting
- if ( outermost && !seed && setMatched.length > 0 &&
- ( matchedCount + setMatchers.length ) > 1 ) {
-
- Sizzle.uniqueSort( results );
- }
- }
-
- // Override manipulation of globals by nested matchers
- if ( outermost ) {
- dirruns = dirrunsUnique;
- outermostContext = contextBackup;
- }
-
- return unmatched;
- };
-
- return bySet ?
- markFunction( superMatcher ) :
- superMatcher;
-}
-
-compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {
- var i,
- setMatchers = [],
- elementMatchers = [],
- cached = compilerCache[ selector + " " ];
-
- if ( !cached ) {
- // Generate a function of recursive functions that can be used to check each element
- if ( !group ) {
- group = tokenize( selector );
- }
- i = group.length;
- while ( i-- ) {
- cached = matcherFromTokens( group[i] );
- if ( cached[ expando ] ) {
- setMatchers.push( cached );
- } else {
- elementMatchers.push( cached );
- }
- }
-
- // Cache the compiled function
- cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
- }
- return cached;
-};
-
-function multipleContexts( selector, contexts, results ) {
- var i = 0,
- len = contexts.length;
- for ( ; i < len; i++ ) {
- Sizzle( selector, contexts[i], results );
- }
- return results;
-}
-
-function select( selector, context, results, seed ) {
- var i, tokens, token, type, find,
- match = tokenize( selector );
-
- if ( !seed ) {
- // Try to minimize operations if there is only one group
- if ( match.length === 1 ) {
-
- // Take a shortcut and set the context if the root selector is an ID
- tokens = match[0] = match[0].slice( 0 );
- if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
- support.getById && context.nodeType === 9 && documentIsHTML &&
- Expr.relative[ tokens[1].type ] ) {
-
- context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
- if ( !context ) {
- return results;
- }
- selector = selector.slice( tokens.shift().value.length );
- }
-
- // Fetch a seed set for right-to-left matching
- i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
- while ( i-- ) {
- token = tokens[i];
-
- // Abort if we hit a combinator
- if ( Expr.relative[ (type = token.type) ] ) {
- break;
- }
- if ( (find = Expr.find[ type ]) ) {
- // Search, expanding context for leading sibling combinators
- if ( (seed = find(
- token.matches[0].replace( runescape, funescape ),
- rsibling.test( tokens[0].type ) && context.parentNode || context
- )) ) {
-
- // If seed is empty or no tokens remain, we can return early
- tokens.splice( i, 1 );
- selector = seed.length && toSelector( tokens );
- if ( !selector ) {
- push.apply( results, seed );
- return results;
- }
-
- break;
- }
- }
- }
- }
- }
-
- // Compile and execute a filtering function
- // Provide `match` to avoid retokenization if we modified the selector above
- compile( selector, match )(
- seed,
- context,
- !documentIsHTML,
- results,
- rsibling.test( selector )
- );
- return results;
-}
-
-// One-time assignments
-
-// Sort stability
-support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
-
-// Support: Chrome<14
-// Always assume duplicates if they aren't passed to the comparison function
-support.detectDuplicates = hasDuplicate;
-
-// Initialize against the default document
-setDocument();
-
-// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
-// Detached nodes confoundingly follow *each other*
-support.sortDetached = assert(function( div1 ) {
- // Should return 1, but returns 4 (following)
- return div1.compareDocumentPosition( document.createElement("div") ) & 1;
-});
-
-// Support: IE<8
-// Prevent attribute/property "interpolation"
-// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
-if ( !assert(function( div ) {
- div.innerHTML = "<a href='#'></a>";
- return div.firstChild.getAttribute("href") === "#" ;
-}) ) {
- addHandle( "type|href|height|width", function( elem, name, isXML ) {
- if ( !isXML ) {
- return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
- }
- });
-}
-
-// Support: IE<9
-// Use defaultValue in place of getAttribute("value")
-if ( !support.attributes || !assert(function( div ) {
- div.innerHTML = "<input/>";
- div.firstChild.setAttribute( "value", "" );
- return div.firstChild.getAttribute( "value" ) === "";
-}) ) {
- addHandle( "value", function( elem, name, isXML ) {
- if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
- return elem.defaultValue;
- }
- });
-}
-
-// Support: IE<9
-// Use getAttributeNode to fetch booleans when getAttribute lies
-if ( !assert(function( div ) {
- return div.getAttribute("disabled") == null;
-}) ) {
- addHandle( booleans, function( elem, name, isXML ) {
- var val;
- if ( !isXML ) {
- return (val = elem.getAttributeNode( name )) && val.specified ?
- val.value :
- elem[ name ] === true ? name.toLowerCase() : null;
- }
- });
-}
-
-jQuery.find = Sizzle;
-jQuery.expr = Sizzle.selectors;
-jQuery.expr[":"] = jQuery.expr.pseudos;
-jQuery.unique = Sizzle.uniqueSort;
-jQuery.text = Sizzle.getText;
-jQuery.isXMLDoc = Sizzle.isXML;
-jQuery.contains = Sizzle.contains;
-
-
-})( window );
-// String to Object options format cache
-var optionsCache = {};
-
-// Convert String-formatted options into Object-formatted ones and store in cache
-function createOptions( options ) {
- var object = optionsCache[ options ] = {};
- jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) {
- object[ flag ] = true;
- });
- return object;
-}
-
-/*
- * Create a callback list using the following parameters:
- *
- * options: an optional list of space-separated options that will change how
- * the callback list behaves or a more traditional option object
- *
- * By default a callback list will act like an event callback list and can be
- * "fired" multiple times.
- *
- * Possible options:
- *
- * once: will ensure the callback list can only be fired once (like a Deferred)
- *
- * memory: will keep track of previous values and will call any callback added
- * after the list has been fired right away with the latest "memorized"
- * values (like a Deferred)
- *
- * unique: will ensure a callback can only be added once (no duplicate in the list)
- *
- * stopOnFalse: interrupt callings when a callback returns false
- *
- */
-jQuery.Callbacks = function( options ) {
-
- // Convert options from String-formatted to Object-formatted if needed
- // (we check in cache first)
- options = typeof options === "string" ?
- ( optionsCache[ options ] || createOptions( options ) ) :
- jQuery.extend( {}, options );
-
- var // Flag to know if list is currently firing
- firing,
- // Last fire value (for non-forgettable lists)
- memory,
- // Flag to know if list was already fired
- fired,
- // End of the loop when firing
- firingLength,
- // Index of currently firing callback (modified by remove if needed)
- firingIndex,
- // First callback to fire (used internally by add and fireWith)
- firingStart,
- // Actual callback list
- list = [],
- // Stack of fire calls for repeatable lists
- stack = !options.once && [],
- // Fire callbacks
- fire = function( data ) {
- memory = options.memory && data;
- fired = true;
- firingIndex = firingStart || 0;
- firingStart = 0;
- firingLength = list.length;
- firing = true;
- for ( ; list && firingIndex < firingLength; firingIndex++ ) {
- if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
- memory = false; // To prevent further calls using add
- break;
- }
- }
- firing = false;
- if ( list ) {
- if ( stack ) {
- if ( stack.length ) {
- fire( stack.shift() );
- }
- } else if ( memory ) {
- list = [];
- } else {
- self.disable();
- }
- }
- },
- // Actual Callbacks object
- self = {
- // Add a callback or a collection of callbacks to the list
- add: function() {
- if ( list ) {
- // First, we save the current length
- var start = list.length;
- (function add( args ) {
- jQuery.each( args, function( _, arg ) {
- var type = jQuery.type( arg );
- if ( type === "function" ) {
- if ( !options.unique || !self.has( arg ) ) {
- list.push( arg );
- }
- } else if ( arg && arg.length && type !== "string" ) {
- // Inspect recursively
- add( arg );
- }
- });
- })( arguments );
- // Do we need to add the callbacks to the
- // current firing batch?
- if ( firing ) {
- firingLength = list.length;
- // With memory, if we're not firing then
- // we should call right away
- } else if ( memory ) {
- firingStart = start;
- fire( memory );
- }
- }
- return this;
- },
- // Remove a callback from the list
- remove: function() {
- if ( list ) {
- jQuery.each( arguments, function( _, arg ) {
- var index;
- while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
- list.splice( index, 1 );
- // Handle firing indexes
- if ( firing ) {
- if ( index <= firingLength ) {
- firingLength--;
- }
- if ( index <= firingIndex ) {
- firingIndex--;
- }
- }
- }
- });
- }
- return this;
- },
- // Check if a given callback is in the list.
- // If no argument is given, return whether or not list has callbacks attached.
- has: function( fn ) {
- return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );
- },
- // Remove all callbacks from the list
- empty: function() {
- list = [];
- firingLength = 0;
- return this;
- },
- // Have the list do nothing anymore
- disable: function() {
- list = stack = memory = undefined;
- return this;
- },
- // Is it disabled?
- disabled: function() {
- return !list;
- },
- // Lock the list in its current state
- lock: function() {
- stack = undefined;
- if ( !memory ) {
- self.disable();
- }
- return this;
- },
- // Is it locked?
- locked: function() {
- return !stack;
- },
- // Call all callbacks with the given context and arguments
- fireWith: function( context, args ) {
- if ( list && ( !fired || stack ) ) {
- args = args || [];
- args = [ context, args.slice ? args.slice() : args ];
- if ( firing ) {
- stack.push( args );
- } else {
- fire( args );
- }
- }
- return this;
- },
- // Call all the callbacks with the given arguments
- fire: function() {
- self.fireWith( this, arguments );
- return this;
- },
- // To know if the callbacks have already been called at least once
- fired: function() {
- return !!fired;
- }
- };
-
- return self;
-};
-jQuery.extend({
-
- Deferred: function( func ) {
- var tuples = [
- // action, add listener, listener list, final state
- [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
- [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
- [ "notify", "progress", jQuery.Callbacks("memory") ]
- ],
- state = "pending",
- promise = {
- state: function() {
- return state;
- },
- always: function() {
- deferred.done( arguments ).fail( arguments );
- return this;
- },
- then: function( /* fnDone, fnFail, fnProgress */ ) {
- var fns = arguments;
- return jQuery.Deferred(function( newDefer ) {
- jQuery.each( tuples, function( i, tuple ) {
- var action = tuple[ 0 ],
- fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
- // deferred[ done | fail | progress ] for forwarding actions to newDefer
- deferred[ tuple[1] ](function() {
- var returned = fn && fn.apply( this, arguments );
- if ( returned && jQuery.isFunction( returned.promise ) ) {
- returned.promise()
- .done( newDefer.resolve )
- .fail( newDefer.reject )
- .progress( newDefer.notify );
- } else {
- newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
- }
- });
- });
- fns = null;
- }).promise();
- },
- // Get a promise for this deferred
- // If obj is provided, the promise aspect is added to the object
- promise: function( obj ) {
- return obj != null ? jQuery.extend( obj, promise ) : promise;
- }
- },
- deferred = {};
-
- // Keep pipe for back-compat
- promise.pipe = promise.then;
-
- // Add list-specific methods
- jQuery.each( tuples, function( i, tuple ) {
- var list = tuple[ 2 ],
- stateString = tuple[ 3 ];
-
- // promise[ done | fail | progress ] = list.add
- promise[ tuple[1] ] = list.add;
-
- // Handle state
- if ( stateString ) {
- list.add(function() {
- // state = [ resolved | rejected ]
- state = stateString;
-
- // [ reject_list | resolve_list ].disable; progress_list.lock
- }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
- }
-
- // deferred[ resolve | reject | notify ]
- deferred[ tuple[0] ] = function() {
- deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
- return this;
- };
- deferred[ tuple[0] + "With" ] = list.fireWith;
- });
-
- // Make the deferred a promise
- promise.promise( deferred );
-
- // Call given func if any
- if ( func ) {
- func.call( deferred, deferred );
- }
-
- // All done!
- return deferred;
- },
-
- // Deferred helper
- when: function( subordinate /* , ..., subordinateN */ ) {
- var i = 0,
- resolveValues = core_slice.call( arguments ),
- length = resolveValues.length,
-
- // the count of uncompleted subordinates
- remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
-
- // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
- deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
-
- // Update function for both resolve and progress values
- updateFunc = function( i, contexts, values ) {
- return function( value ) {
- contexts[ i ] = this;
- values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value;
- if( values === progressValues ) {
- deferred.notifyWith( contexts, values );
- } else if ( !( --remaining ) ) {
- deferred.resolveWith( contexts, values );
- }
- };
- },
-
- progressValues, progressContexts, resolveContexts;
-
- // add listeners to Deferred subordinates; treat others as resolved
- if ( length > 1 ) {
- progressValues = new Array( length );
- progressContexts = new Array( length );
- resolveContexts = new Array( length );
- for ( ; i < length; i++ ) {
- if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
- resolveValues[ i ].promise()
- .done( updateFunc( i, resolveContexts, resolveValues ) )
- .fail( deferred.reject )
- .progress( updateFunc( i, progressContexts, progressValues ) );
- } else {
- --remaining;
- }
- }
- }
-
- // if we're not waiting on anything, resolve the master
- if ( !remaining ) {
- deferred.resolveWith( resolveContexts, resolveValues );
- }
-
- return deferred.promise();
- }
-});
-jQuery.support = (function( support ) {
-
- var all, a, input, select, fragment, opt, eventName, isSupported, i,
- div = document.createElement("div");
-
- // Setup
- div.setAttribute( "className", "t" );
- div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
-
- // Finish early in limited (non-browser) environments
- all = div.getElementsByTagName("*") || [];
- a = div.getElementsByTagName("a")[ 0 ];
- if ( !a || !a.style || !all.length ) {
- return support;
- }
-
- // First batch of tests
- select = document.createElement("select");
- opt = select.appendChild( document.createElement("option") );
- input = div.getElementsByTagName("input")[ 0 ];
-
- a.style.cssText = "top:1px;float:left;opacity:.5";
-
- // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
- support.getSetAttribute = div.className !== "t";
-
- // IE strips leading whitespace when .innerHTML is used
- support.leadingWhitespace = div.firstChild.nodeType === 3;
-
- // Make sure that tbody elements aren't automatically inserted
- // IE will insert them into empty tables
- support.tbody = !div.getElementsByTagName("tbody").length;
-
- // Make sure that link elements get serialized correctly by innerHTML
- // This requires a wrapper element in IE
- support.htmlSerialize = !!div.getElementsByTagName("link").length;
-
- // Get the style information from getAttribute
- // (IE uses .cssText instead)
- support.style = /top/.test( a.getAttribute("style") );
-
- // Make sure that URLs aren't manipulated
- // (IE normalizes it by default)
- support.hrefNormalized = a.getAttribute("href") === "/a";
-
- // Make sure that element opacity exists
- // (IE uses filter instead)
- // Use a regex to work around a WebKit issue. See #5145
- support.opacity = /^0.5/.test( a.style.opacity );
-
- // Verify style float existence
- // (IE uses styleFloat instead of cssFloat)
- support.cssFloat = !!a.style.cssFloat;
-
- // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
- support.checkOn = !!input.value;
-
- // Make sure that a selected-by-default option has a working selected property.
- // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
- support.optSelected = opt.selected;
-
- // Tests for enctype support on a form (#6743)
- support.enctype = !!document.createElement("form").enctype;
-
- // Makes sure cloning an html5 element does not cause problems
- // Where outerHTML is undefined, this still works
- support.html5Clone = document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>";
-
- // Will be defined later
- support.inlineBlockNeedsLayout = false;
- support.shrinkWrapBlocks = false;
- support.pixelPosition = false;
- support.deleteExpando = true;
- support.noCloneEvent = true;
- support.reliableMarginRight = true;
- support.boxSizingReliable = true;
-
- // Make sure checked status is properly cloned
- input.checked = true;
- support.noCloneChecked = input.cloneNode( true ).checked;
-
- // Make sure that the options inside disabled selects aren't marked as disabled
- // (WebKit marks them as disabled)
- select.disabled = true;
- support.optDisabled = !opt.disabled;
-
- // Support: IE<9
- try {
- delete div.test;
- } catch( e ) {
- support.deleteExpando = false;
- }
-
- // Check if we can trust getAttribute("value")
- input = document.createElement("input");
- input.setAttribute( "value", "" );
- support.input = input.getAttribute( "value" ) === "";
-
- // Check if an input maintains its value after becoming a radio
- input.value = "t";
- input.setAttribute( "type", "radio" );
- support.radioValue = input.value === "t";
-
- // #11217 - WebKit loses check when the name is after the checked attribute
- input.setAttribute( "checked", "t" );
- input.setAttribute( "name", "t" );
-
- fragment = document.createDocumentFragment();
- fragment.appendChild( input );
-
- // Check if a disconnected checkbox will retain its checked
- // value of true after appended to the DOM (IE6/7)
- support.appendChecked = input.checked;
-
- // WebKit doesn't clone checked state correctly in fragments
- support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
-
- // Support: IE<9
- // Opera does not clone events (and typeof div.attachEvent === undefined).
- // IE9-10 clones events bound via attachEvent, but they don't trigger with .click()
- if ( div.attachEvent ) {
- div.attachEvent( "onclick", function() {
- support.noCloneEvent = false;
- });
-
- div.cloneNode( true ).click();
- }
-
- // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event)
- // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)
- for ( i in { submit: true, change: true, focusin: true }) {
- div.setAttribute( eventName = "on" + i, "t" );
-
- support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false;
- }
-
- div.style.backgroundClip = "content-box";
- div.cloneNode( true ).style.backgroundClip = "";
- support.clearCloneStyle = div.style.backgroundClip === "content-box";
-
- // Support: IE<9
- // Iteration over object's inherited properties before its own.
- for ( i in jQuery( support ) ) {
- break;
- }
- support.ownLast = i !== "0";
-
- // Run tests that need a body at doc ready
- jQuery(function() {
- var container, marginDiv, tds,
- divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",
- body = document.getElementsByTagName("body")[0];
-
- if ( !body ) {
- // Return for frameset docs that don't have a body
- return;
- }
-
- container = document.createElement("div");
- container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";
-
- body.appendChild( container ).appendChild( div );
-
- // Support: IE8
- // Check if table cells still have offsetWidth/Height when they are set
- // to display:none and there are still other visible table cells in a
- // table row; if so, offsetWidth/Height are not reliable for use when
- // determining if an element has been hidden directly using
- // display:none (it is still safe to use offsets if a parent element is
- // hidden; don safety goggles and see bug #4512 for more information).
- div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
- tds = div.getElementsByTagName("td");
- tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none";
- isSupported = ( tds[ 0 ].offsetHeight === 0 );
-
- tds[ 0 ].style.display = "";
- tds[ 1 ].style.display = "none";
-
- // Support: IE8
- // Check if empty table cells still have offsetWidth/Height
- support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
-
- // Check box-sizing and margin behavior.
- div.innerHTML = "";
- div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;";
-
- // Workaround failing boxSizing test due to offsetWidth returning wrong value
- // with some non-1 values of body zoom, ticket #13543
- jQuery.swap( body, body.style.zoom != null ? { zoom: 1 } : {}, function() {
- support.boxSizing = div.offsetWidth === 4;
- });
-
- // Use window.getComputedStyle because jsdom on node.js will break without it.
- if ( window.getComputedStyle ) {
- support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
- support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
-
- // Check if div with explicit width and no margin-right incorrectly
- // gets computed margin-right based on width of container. (#3333)
- // Fails in WebKit before Feb 2011 nightlies
- // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
- marginDiv = div.appendChild( document.createElement("div") );
- marginDiv.style.cssText = div.style.cssText = divReset;
- marginDiv.style.marginRight = marginDiv.style.width = "0";
- div.style.width = "1px";
-
- support.reliableMarginRight =
- !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );
- }
-
- if ( typeof div.style.zoom !== core_strundefined ) {
- // Support: IE<8
- // Check if natively block-level elements act like inline-block
- // elements when setting their display to 'inline' and giving
- // them layout
- div.innerHTML = "";
- div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
- support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
-
- // Support: IE6
- // Check if elements with layout shrink-wrap their children
- div.style.display = "block";
- div.innerHTML = "<div></div>";
- div.firstChild.style.width = "5px";
- support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
-
- if ( support.inlineBlockNeedsLayout ) {
- // Prevent IE 6 from affecting layout for positioned elements #11048
- // Prevent IE from shrinking the body in IE 7 mode #12869
- // Support: IE<8
- body.style.zoom = 1;
- }
- }
-
- body.removeChild( container );
-
- // Null elements to avoid leaks in IE
- container = div = tds = marginDiv = null;
- });
-
- // Null elements to avoid leaks in IE
- all = select = fragment = opt = a = input = null;
-
- return support;
-})({});
-
-var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
- rmultiDash = /([A-Z])/g;
-
-function internalData( elem, name, data, pvt /* Internal Use Only */ ){
- if ( !jQuery.acceptData( elem ) ) {
- return;
- }
-
- var ret, thisCache,
- internalKey = jQuery.expando,
-
- // We have to handle DOM nodes and JS objects differently because IE6-7
- // can't GC object references properly across the DOM-JS boundary
- isNode = elem.nodeType,
-
- // Only DOM nodes need the global jQuery cache; JS object data is
- // attached directly to the object so GC can occur automatically
- cache = isNode ? jQuery.cache : elem,
-
- // Only defining an ID for JS objects if its cache already exists allows
- // the code to shortcut on the same path as a DOM node with no cache
- id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;
-
- // Avoid doing any more work than we need to when trying to get data on an
- // object that has no data at all
- if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) {
- return;
- }
-
- if ( !id ) {
- // Only DOM nodes need a new unique ID for each element since their data
- // ends up in the global cache
- if ( isNode ) {
- id = elem[ internalKey ] = core_deletedIds.pop() || jQuery.guid++;
- } else {
- id = internalKey;
- }
- }
-
- if ( !cache[ id ] ) {
- // Avoid exposing jQuery metadata on plain JS objects when the object
- // is serialized using JSON.stringify
- cache[ id ] = isNode ? {} : { toJSON: jQuery.noop };
- }
-
- // An object can be passed to jQuery.data instead of a key/value pair; this gets
- // shallow copied over onto the existing cache
- if ( typeof name === "object" || typeof name === "function" ) {
- if ( pvt ) {
- cache[ id ] = jQuery.extend( cache[ id ], name );
- } else {
- cache[ id ].data = jQuery.extend( cache[ id ].data, name );
- }
- }
-
- thisCache = cache[ id ];
-
- // jQuery data() is stored in a separate object inside the object's internal data
- // cache in order to avoid key collisions between internal data and user-defined
- // data.
- if ( !pvt ) {
- if ( !thisCache.data ) {
- thisCache.data = {};
- }
-
- thisCache = thisCache.data;
- }
-
- if ( data !== undefined ) {
- thisCache[ jQuery.camelCase( name ) ] = data;
- }
-
- // Check for both converted-to-camel and non-converted data property names
- // If a data property was specified
- if ( typeof name === "string" ) {
-
- // First Try to find as-is property data
- ret = thisCache[ name ];
-
- // Test for null|undefined property data
- if ( ret == null ) {
-
- // Try to find the camelCased property
- ret = thisCache[ jQuery.camelCase( name ) ];
- }
- } else {
- ret = thisCache;
- }
-
- return ret;
-}
-
-function internalRemoveData( elem, name, pvt ) {
- if ( !jQuery.acceptData( elem ) ) {
- return;
- }
-
- var thisCache, i,
- isNode = elem.nodeType,
-
- // See jQuery.data for more information
- cache = isNode ? jQuery.cache : elem,
- id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
-
- // If there is already no cache entry for this object, there is no
- // purpose in continuing
- if ( !cache[ id ] ) {
- return;
- }
-
- if ( name ) {
-
- thisCache = pvt ? cache[ id ] : cache[ id ].data;
-
- if ( thisCache ) {
-
- // Support array or space separated string names for data keys
- if ( !jQuery.isArray( name ) ) {
-
- // try the string as a key before any manipulation
- if ( name in thisCache ) {
- name = [ name ];
- } else {
-
- // split the camel cased version by spaces unless a key with the spaces exists
- name = jQuery.camelCase( name );
- if ( name in thisCache ) {
- name = [ name ];
- } else {
- name = name.split(" ");
- }
- }
- } else {
- // If "name" is an array of keys...
- // When data is initially created, via ("key", "val") signature,
- // keys will be converted to camelCase.
- // Since there is no way to tell _how_ a key was added, remove
- // both plain key and camelCase key. #12786
- // This will only penalize the array argument path.
- name = name.concat( jQuery.map( name, jQuery.camelCase ) );
- }
-
- i = name.length;
- while ( i-- ) {
- delete thisCache[ name[i] ];
- }
-
- // If there is no data left in the cache, we want to continue
- // and let the cache object itself get destroyed
- if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) {
- return;
- }
- }
- }
-
- // See jQuery.data for more information
- if ( !pvt ) {
- delete cache[ id ].data;
-
- // Don't destroy the parent cache unless the internal data object
- // had been the only thing left in it
- if ( !isEmptyDataObject( cache[ id ] ) ) {
- return;
- }
- }
-
- // Destroy the cache
- if ( isNode ) {
- jQuery.cleanData( [ elem ], true );
-
- // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
- /* jshint eqeqeq: false */
- } else if ( jQuery.support.deleteExpando || cache != cache.window ) {
- /* jshint eqeqeq: true */
- delete cache[ id ];
-
- // When all else fails, null
- } else {
- cache[ id ] = null;
- }
-}
-
-jQuery.extend({
- cache: {},
-
- // The following elements throw uncatchable exceptions if you
- // attempt to add expando properties to them.
- noData: {
- "applet": true,
- "embed": true,
- // Ban all objects except for Flash (which handle expandos)
- "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
- },
-
- hasData: function( elem ) {
- elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
- return !!elem && !isEmptyDataObject( elem );
- },
-
- data: function( elem, name, data ) {
- return internalData( elem, name, data );
- },
-
- removeData: function( elem, name ) {
- return internalRemoveData( elem, name );
- },
-
- // For internal use only.
- _data: function( elem, name, data ) {
- return internalData( elem, name, data, true );
- },
-
- _removeData: function( elem, name ) {
- return internalRemoveData( elem, name, true );
- },
-
- // A method for determining if a DOM node can handle the data expando
- acceptData: function( elem ) {
- // Do not set data on non-element because it will not be cleared (#8335).
- if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) {
- return false;
- }
-
- var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ];
-
- // nodes accept data unless otherwise specified; rejection can be conditional
- return !noData || noData !== true && elem.getAttribute("classid") === noData;
- }
-});
-
-jQuery.fn.extend({
- data: function( key, value ) {
- var attrs, name,
- data = null,
- i = 0,
- elem = this[0];
-
- // Special expections of .data basically thwart jQuery.access,
- // so implement the relevant behavior ourselves
-
- // Gets all values
- if ( key === undefined ) {
- if ( this.length ) {
- data = jQuery.data( elem );
-
- if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
- attrs = elem.attributes;
- for ( ; i < attrs.length; i++ ) {
- name = attrs[i].name;
-
- if ( name.indexOf("data-") === 0 ) {
- name = jQuery.camelCase( name.slice(5) );
-
- dataAttr( elem, name, data[ name ] );
- }
- }
- jQuery._data( elem, "parsedAttrs", true );
- }
- }
-
- return data;
- }
-
- // Sets multiple values
- if ( typeof key === "object" ) {
- return this.each(function() {
- jQuery.data( this, key );
- });
- }
-
- return arguments.length > 1 ?
-
- // Sets one value
- this.each(function() {
- jQuery.data( this, key, value );
- }) :
-
- // Gets one value
- // Try to fetch any internally stored data first
- elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null;
- },
-
- removeData: function( key ) {
- return this.each(function() {
- jQuery.removeData( this, key );
- });
- }
-});
-
-function dataAttr( elem, key, data ) {
- // If nothing was found internally, try to fetch any
- // data from the HTML5 data-* attribute
- if ( data === undefined && elem.nodeType === 1 ) {
-
- var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
-
- data = elem.getAttribute( name );
-
- if ( typeof data === "string" ) {
- try {
- data = data === "true" ? true :
- data === "false" ? false :
- data === "null" ? null :
- // Only convert to a number if it doesn't change the string
- +data + "" === data ? +data :
- rbrace.test( data ) ? jQuery.parseJSON( data ) :
- data;
- } catch( e ) {}
-
- // Make sure we set the data so it isn't changed later
- jQuery.data( elem, key, data );
-
- } else {
- data = undefined;
- }
- }
-
- return data;
-}
-
-// checks a cache object for emptiness
-function isEmptyDataObject( obj ) {
- var name;
- for ( name in obj ) {
-
- // if the public data object is empty, the private is still empty
- if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
- continue;
- }
- if ( name !== "toJSON" ) {
- return false;
- }
- }
-
- return true;
-}
-jQuery.extend({
- queue: function( elem, type, data ) {
- var queue;
-
- if ( elem ) {
- type = ( type || "fx" ) + "queue";
- queue = jQuery._data( elem, type );
-
- // Speed up dequeue by getting out quickly if this is just a lookup
- if ( data ) {
- if ( !queue || jQuery.isArray(data) ) {
- queue = jQuery._data( elem, type, jQuery.makeArray(data) );
- } else {
- queue.push( data );
- }
- }
- return queue || [];
- }
- },
-
- dequeue: function( elem, type ) {
- type = type || "fx";
-
- var queue = jQuery.queue( elem, type ),
- startLength = queue.length,
- fn = queue.shift(),
- hooks = jQuery._queueHooks( elem, type ),
- next = function() {
- jQuery.dequeue( elem, type );
- };
-
- // If the fx queue is dequeued, always remove the progress sentinel
- if ( fn === "inprogress" ) {
- fn = queue.shift();
- startLength--;
- }
-
- if ( fn ) {
-
- // Add a progress sentinel to prevent the fx queue from being
- // automatically dequeued
- if ( type === "fx" ) {
- queue.unshift( "inprogress" );
- }
-
- // clear up the last queue stop function
- delete hooks.stop;
- fn.call( elem, next, hooks );
- }
-
- if ( !startLength && hooks ) {
- hooks.empty.fire();
- }
- },
-
- // not intended for public consumption - generates a queueHooks object, or returns the current one
- _queueHooks: function( elem, type ) {
- var key = type + "queueHooks";
- return jQuery._data( elem, key ) || jQuery._data( elem, key, {
- empty: jQuery.Callbacks("once memory").add(function() {
- jQuery._removeData( elem, type + "queue" );
- jQuery._removeData( elem, key );
- })
- });
- }
-});
-
-jQuery.fn.extend({
- queue: function( type, data ) {
- var setter = 2;
-
- if ( typeof type !== "string" ) {
- data = type;
- type = "fx";
- setter--;
- }
-
- if ( arguments.length < setter ) {
- return jQuery.queue( this[0], type );
- }
-
- return data === undefined ?
- this :
- this.each(function() {
- var queue = jQuery.queue( this, type, data );
-
- // ensure a hooks for this queue
- jQuery._queueHooks( this, type );
-
- if ( type === "fx" && queue[0] !== "inprogress" ) {
- jQuery.dequeue( this, type );
- }
- });
- },
- dequeue: function( type ) {
- return this.each(function() {
- jQuery.dequeue( this, type );
- });
- },
- // Based off of the plugin by Clint Helfers, with permission.
- // http://blindsignals.com/index.php/2009/07/jquery-delay/
- delay: function( time, type ) {
- time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
- type = type || "fx";
-
- return this.queue( type, function( next, hooks ) {
- var timeout = setTimeout( next, time );
- hooks.stop = function() {
- clearTimeout( timeout );
- };
- });
- },
- clearQueue: function( type ) {
- return this.queue( type || "fx", [] );
- },
- // Get a promise resolved when queues of a certain type
- // are emptied (fx is the type by default)
- promise: function( type, obj ) {
- var tmp,
- count = 1,
- defer = jQuery.Deferred(),
- elements = this,
- i = this.length,
- resolve = function() {
- if ( !( --count ) ) {
- defer.resolveWith( elements, [ elements ] );
- }
- };
-
- if ( typeof type !== "string" ) {
- obj = type;
- type = undefined;
- }
- type = type || "fx";
-
- while( i-- ) {
- tmp = jQuery._data( elements[ i ], type + "queueHooks" );
- if ( tmp && tmp.empty ) {
- count++;
- tmp.empty.add( resolve );
- }
- }
- resolve();
- return defer.promise( obj );
- }
-});
-var nodeHook, boolHook,
- rclass = /[\t\r\n\f]/g,
- rreturn = /\r/g,
- rfocusable = /^(?:input|select|textarea|button|object)$/i,
- rclickable = /^(?:a|area)$/i,
- ruseDefault = /^(?:checked|selected)$/i,
- getSetAttribute = jQuery.support.getSetAttribute,
- getSetInput = jQuery.support.input;
-
-jQuery.fn.extend({
- attr: function( name, value ) {
- return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
- },
-
- removeAttr: function( name ) {
- return this.each(function() {
- jQuery.removeAttr( this, name );
- });
- },
-
- prop: function( name, value ) {
- return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
- },
-
- removeProp: function( name ) {
- name = jQuery.propFix[ name ] || name;
- return this.each(function() {
- // try/catch handles cases where IE balks (such as removing a property on window)
- try {
- this[ name ] = undefined;
- delete this[ name ];
- } catch( e ) {}
- });
- },
-
- addClass: function( value ) {
- var classes, elem, cur, clazz, j,
- i = 0,
- len = this.length,
- proceed = typeof value === "string" && value;
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( j ) {
- jQuery( this ).addClass( value.call( this, j, this.className ) );
- });
- }
-
- if ( proceed ) {
- // The disjunction here is for better compressibility (see removeClass)
- classes = ( value || "" ).match( core_rnotwhite ) || [];
-
- for ( ; i < len; i++ ) {
- elem = this[ i ];
- cur = elem.nodeType === 1 && ( elem.className ?
- ( " " + elem.className + " " ).replace( rclass, " " ) :
- " "
- );
-
- if ( cur ) {
- j = 0;
- while ( (clazz = classes[j++]) ) {
- if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
- cur += clazz + " ";
- }
- }
- elem.className = jQuery.trim( cur );
-
- }
- }
- }
-
- return this;
- },
-
- removeClass: function( value ) {
- var classes, elem, cur, clazz, j,
- i = 0,
- len = this.length,
- proceed = arguments.length === 0 || typeof value === "string" && value;
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( j ) {
- jQuery( this ).removeClass( value.call( this, j, this.className ) );
- });
- }
- if ( proceed ) {
- classes = ( value || "" ).match( core_rnotwhite ) || [];
-
- for ( ; i < len; i++ ) {
- elem = this[ i ];
- // This expression is here for better compressibility (see addClass)
- cur = elem.nodeType === 1 && ( elem.className ?
- ( " " + elem.className + " " ).replace( rclass, " " ) :
- ""
- );
-
- if ( cur ) {
- j = 0;
- while ( (clazz = classes[j++]) ) {
- // Remove *all* instances
- while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
- cur = cur.replace( " " + clazz + " ", " " );
- }
- }
- elem.className = value ? jQuery.trim( cur ) : "";
- }
- }
- }
-
- return this;
- },
-
- toggleClass: function( value, stateVal ) {
- var type = typeof value;
-
- if ( typeof stateVal === "boolean" && type === "string" ) {
- return stateVal ? this.addClass( value ) : this.removeClass( value );
- }
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( i ) {
- jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
- });
- }
-
- return this.each(function() {
- if ( type === "string" ) {
- // toggle individual class names
- var className,
- i = 0,
- self = jQuery( this ),
- classNames = value.match( core_rnotwhite ) || [];
-
- while ( (className = classNames[ i++ ]) ) {
- // check each className given, space separated list
- if ( self.hasClass( className ) ) {
- self.removeClass( className );
- } else {
- self.addClass( className );
- }
- }
-
- // Toggle whole class name
- } else if ( type === core_strundefined || type === "boolean" ) {
- if ( this.className ) {
- // store className if set
- jQuery._data( this, "__className__", this.className );
- }
-
- // If the element has a class name or if we're passed "false",
- // then remove the whole classname (if there was one, the above saved it).
- // Otherwise bring back whatever was previously saved (if anything),
- // falling back to the empty string if nothing was stored.
- this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
- }
- });
- },
-
- hasClass: function( selector ) {
- var className = " " + selector + " ",
- i = 0,
- l = this.length;
- for ( ; i < l; i++ ) {
- if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
- return true;
- }
- }
-
- return false;
- },
-
- val: function( value ) {
- var ret, hooks, isFunction,
- elem = this[0];
-
- if ( !arguments.length ) {
- if ( elem ) {
- hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
-
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
- return ret;
- }
-
- ret = elem.value;
-
- return typeof ret === "string" ?
- // handle most common string cases
- ret.replace(rreturn, "") :
- // handle cases where value is null/undef or number
- ret == null ? "" : ret;
- }
-
- return;
- }
-
- isFunction = jQuery.isFunction( value );
-
- return this.each(function( i ) {
- var val;
-
- if ( this.nodeType !== 1 ) {
- return;
- }
-
- if ( isFunction ) {
- val = value.call( this, i, jQuery( this ).val() );
- } else {
- val = value;
- }
-
- // Treat null/undefined as ""; convert numbers to string
- if ( val == null ) {
- val = "";
- } else if ( typeof val === "number" ) {
- val += "";
- } else if ( jQuery.isArray( val ) ) {
- val = jQuery.map(val, function ( value ) {
- return value == null ? "" : value + "";
- });
- }
-
- hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
-
- // If set returns undefined, fall back to normal setting
- if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
- this.value = val;
- }
- });
- }
-});
-
-jQuery.extend({
- valHooks: {
- option: {
- get: function( elem ) {
- // Use proper attribute retrieval(#6932, #12072)
- var val = jQuery.find.attr( elem, "value" );
- return val != null ?
- val :
- elem.text;
- }
- },
- select: {
- get: function( elem ) {
- var value, option,
- options = elem.options,
- index = elem.selectedIndex,
- one = elem.type === "select-one" || index < 0,
- values = one ? null : [],
- max = one ? index + 1 : options.length,
- i = index < 0 ?
- max :
- one ? index : 0;
-
- // Loop through all the selected options
- for ( ; i < max; i++ ) {
- option = options[ i ];
-
- // oldIE doesn't update selected after form reset (#2551)
- if ( ( option.selected || i === index ) &&
- // Don't return options that are disabled or in a disabled optgroup
- ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
- ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
-
- // Get the specific value for the option
- value = jQuery( option ).val();
-
- // We don't need an array for one selects
- if ( one ) {
- return value;
- }
-
- // Multi-Selects return an array
- values.push( value );
- }
- }
-
- return values;
- },
-
- set: function( elem, value ) {
- var optionSet, option,
- options = elem.options,
- values = jQuery.makeArray( value ),
- i = options.length;
-
- while ( i-- ) {
- option = options[ i ];
- if ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) {
- optionSet = true;
- }
- }
-
- // force browsers to behave consistently when non-matching value is set
- if ( !optionSet ) {
- elem.selectedIndex = -1;
- }
- return values;
- }
- }
- },
-
- attr: function( elem, name, value ) {
- var hooks, ret,
- nType = elem.nodeType;
-
- // don't get/set attributes on text, comment and attribute nodes
- if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
- return;
- }
-
- // Fallback to prop when attributes are not supported
- if ( typeof elem.getAttribute === core_strundefined ) {
- return jQuery.prop( elem, name, value );
- }
-
- // All attributes are lowercase
- // Grab necessary hook if one is defined
- if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
- name = name.toLowerCase();
- hooks = jQuery.attrHooks[ name ] ||
- ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );
- }
-
- if ( value !== undefined ) {
-
- if ( value === null ) {
- jQuery.removeAttr( elem, name );
-
- } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
- return ret;
-
- } else {
- elem.setAttribute( name, value + "" );
- return value;
- }
-
- } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
- return ret;
-
- } else {
- ret = jQuery.find.attr( elem, name );
-
- // Non-existent attributes return null, we normalize to undefined
- return ret == null ?
- undefined :
- ret;
- }
- },
-
- removeAttr: function( elem, value ) {
- var name, propName,
- i = 0,
- attrNames = value && value.match( core_rnotwhite );
-
- if ( attrNames && elem.nodeType === 1 ) {
- while ( (name = attrNames[i++]) ) {
- propName = jQuery.propFix[ name ] || name;
-
- // Boolean attributes get special treatment (#10870)
- if ( jQuery.expr.match.bool.test( name ) ) {
- // Set corresponding property to false
- if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
- elem[ propName ] = false;
- // Support: IE<9
- // Also clear defaultChecked/defaultSelected (if appropriate)
- } else {
- elem[ jQuery.camelCase( "default-" + name ) ] =
- elem[ propName ] = false;
- }
-
- // See #9699 for explanation of this approach (setting first, then removal)
- } else {
- jQuery.attr( elem, name, "" );
- }
-
- elem.removeAttribute( getSetAttribute ? name : propName );
- }
- }
- },
-
- attrHooks: {
- type: {
- set: function( elem, value ) {
- if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
- // Setting the type on a radio button after the value resets the value in IE6-9
- // Reset value to default in case type is set after value during creation
- var val = elem.value;
- elem.setAttribute( "type", value );
- if ( val ) {
- elem.value = val;
- }
- return value;
- }
- }
- }
- },
-
- propFix: {
- "for": "htmlFor",
- "class": "className"
- },
-
- prop: function( elem, name, value ) {
- var ret, hooks, notxml,
- nType = elem.nodeType;
-
- // don't get/set properties on text, comment and attribute nodes
- if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
- return;
- }
-
- notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
-
- if ( notxml ) {
- // Fix name and attach hooks
- name = jQuery.propFix[ name ] || name;
- hooks = jQuery.propHooks[ name ];
- }
-
- if ( value !== undefined ) {
- return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?
- ret :
- ( elem[ name ] = value );
-
- } else {
- return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ?
- ret :
- elem[ name ];
- }
- },
-
- propHooks: {
- tabIndex: {
- get: function( elem ) {
- // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
- // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabind…
- // Use proper attribute retrieval(#12072)
- var tabindex = jQuery.find.attr( elem, "tabindex" );
-
- return tabindex ?
- parseInt( tabindex, 10 ) :
- rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
- 0 :
- -1;
- }
- }
- }
-});
-
-// Hooks for boolean attributes
-boolHook = {
- set: function( elem, value, name ) {
- if ( value === false ) {
- // Remove boolean attributes when set to false
- jQuery.removeAttr( elem, name );
- } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
- // IE<8 needs the *property* name
- elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );
-
- // Use defaultChecked and defaultSelected for oldIE
- } else {
- elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true;
- }
-
- return name;
- }
-};
-jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
- var getter = jQuery.expr.attrHandle[ name ] || jQuery.find.attr;
-
- jQuery.expr.attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ?
- function( elem, name, isXML ) {
- var fn = jQuery.expr.attrHandle[ name ],
- ret = isXML ?
- undefined :
- /* jshint eqeqeq: false */
- (jQuery.expr.attrHandle[ name ] = undefined) !=
- getter( elem, name, isXML ) ?
-
- name.toLowerCase() :
- null;
- jQuery.expr.attrHandle[ name ] = fn;
- return ret;
- } :
- function( elem, name, isXML ) {
- return isXML ?
- undefined :
- elem[ jQuery.camelCase( "default-" + name ) ] ?
- name.toLowerCase() :
- null;
- };
-});
-
-// fix oldIE attroperties
-if ( !getSetInput || !getSetAttribute ) {
- jQuery.attrHooks.value = {
- set: function( elem, value, name ) {
- if ( jQuery.nodeName( elem, "input" ) ) {
- // Does not return so that setAttribute is also used
- elem.defaultValue = value;
- } else {
- // Use nodeHook if defined (#1954); otherwise setAttribute is fine
- return nodeHook && nodeHook.set( elem, value, name );
- }
- }
- };
-}
-
-// IE6/7 do not support getting/setting some attributes with get/setAttribute
-if ( !getSetAttribute ) {
-
- // Use this for any attribute in IE6/7
- // This fixes almost every IE6/7 issue
- nodeHook = {
- set: function( elem, value, name ) {
- // Set the existing or create a new attribute node
- var ret = elem.getAttributeNode( name );
- if ( !ret ) {
- elem.setAttributeNode(
- (ret = elem.ownerDocument.createAttribute( name ))
- );
- }
-
- ret.value = value += "";
-
- // Break association with cloned elements by also using setAttribute (#9646)
- return name === "value" || value === elem.getAttribute( name ) ?
- value :
- undefined;
- }
- };
- jQuery.expr.attrHandle.id = jQuery.expr.attrHandle.name = jQuery.expr.attrHandle.coords =
- // Some attributes are constructed with empty-string values when not defined
- function( elem, name, isXML ) {
- var ret;
- return isXML ?
- undefined :
- (ret = elem.getAttributeNode( name )) && ret.value !== "" ?
- ret.value :
- null;
- };
- jQuery.valHooks.button = {
- get: function( elem, name ) {
- var ret = elem.getAttributeNode( name );
- return ret && ret.specified ?
- ret.value :
- undefined;
- },
- set: nodeHook.set
- };
-
- // Set contenteditable to false on removals(#10429)
- // Setting to empty string throws an error as an invalid value
- jQuery.attrHooks.contenteditable = {
- set: function( elem, value, name ) {
- nodeHook.set( elem, value === "" ? false : value, name );
- }
- };
-
- // Set width and height to auto instead of 0 on empty string( Bug #8150 )
- // This is for removals
- jQuery.each([ "width", "height" ], function( i, name ) {
- jQuery.attrHooks[ name ] = {
- set: function( elem, value ) {
- if ( value === "" ) {
- elem.setAttribute( name, "auto" );
- return value;
- }
- }
- };
- });
-}
-
-
-// Some attributes require a special call on IE
-// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
-if ( !jQuery.support.hrefNormalized ) {
- // href/src property should get the full normalized URL (#10299/#12915)
- jQuery.each([ "href", "src" ], function( i, name ) {
- jQuery.propHooks[ name ] = {
- get: function( elem ) {
- return elem.getAttribute( name, 4 );
- }
- };
- });
-}
-
-if ( !jQuery.support.style ) {
- jQuery.attrHooks.style = {
- get: function( elem ) {
- // Return undefined in the case of empty string
- // Note: IE uppercases css property names, but if we were to .toLowerCase()
- // .cssText, that would destroy case senstitivity in URL's, like in "background"
- return elem.style.cssText || undefined;
- },
- set: function( elem, value ) {
- return ( elem.style.cssText = value + "" );
- }
- };
-}
-
-// Safari mis-reports the default selected property of an option
-// Accessing the parent's selectedIndex property fixes it
-if ( !jQuery.support.optSelected ) {
- jQuery.propHooks.selected = {
- get: function( elem ) {
- var parent = elem.parentNode;
-
- if ( parent ) {
- parent.selectedIndex;
-
- // Make sure that it also works with optgroups, see #5701
- if ( parent.parentNode ) {
- parent.parentNode.selectedIndex;
- }
- }
- return null;
- }
- };
-}
-
-jQuery.each([
- "tabIndex",
- "readOnly",
- "maxLength",
- "cellSpacing",
- "cellPadding",
- "rowSpan",
- "colSpan",
- "useMap",
- "frameBorder",
- "contentEditable"
-], function() {
- jQuery.propFix[ this.toLowerCase() ] = this;
-});
-
-// IE6/7 call enctype encoding
-if ( !jQuery.support.enctype ) {
- jQuery.propFix.enctype = "encoding";
-}
-
-// Radios and checkboxes getter/setter
-jQuery.each([ "radio", "checkbox" ], function() {
- jQuery.valHooks[ this ] = {
- set: function( elem, value ) {
- if ( jQuery.isArray( value ) ) {
- return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
- }
- }
- };
- if ( !jQuery.support.checkOn ) {
- jQuery.valHooks[ this ].get = function( elem ) {
- // Support: Webkit
- // "" is returned instead of "on" if a value isn't specified
- return elem.getAttribute("value") === null ? "on" : elem.value;
- };
- }
-});
-var rformElems = /^(?:input|select|textarea)$/i,
- rkeyEvent = /^key/,
- rmouseEvent = /^(?:mouse|contextmenu)|click/,
- rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
- rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
-
-function returnTrue() {
- return true;
-}
-
-function returnFalse() {
- return false;
-}
-
-function safeActiveElement() {
- try {
- return document.activeElement;
- } catch ( err ) { }
-}
-
-/*
- * Helper functions for managing events -- not part of the public interface.
- * Props to Dean Edwards' addEvent library for many of the ideas.
- */
-jQuery.event = {
-
- global: {},
-
- add: function( elem, types, handler, data, selector ) {
- var tmp, events, t, handleObjIn,
- special, eventHandle, handleObj,
- handlers, type, namespaces, origType,
- elemData = jQuery._data( elem );
-
- // Don't attach events to noData or text/comment nodes (but allow plain objects)
- if ( !elemData ) {
- return;
- }
-
- // Caller can pass in an object of custom data in lieu of the handler
- if ( handler.handler ) {
- handleObjIn = handler;
- handler = handleObjIn.handler;
- selector = handleObjIn.selector;
- }
-
- // Make sure that the handler has a unique ID, used to find/remove it later
- if ( !handler.guid ) {
- handler.guid = jQuery.guid++;
- }
-
- // Init the element's event structure and main handler, if this is the first
- if ( !(events = elemData.events) ) {
- events = elemData.events = {};
- }
- if ( !(eventHandle = elemData.handle) ) {
- eventHandle = elemData.handle = function( e ) {
- // Discard the second event of a jQuery.event.trigger() and
- // when an event is called after a page has unloaded
- return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ?
- jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
- undefined;
- };
- // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
- eventHandle.elem = elem;
- }
-
- // Handle multiple events separated by a space
- types = ( types || "" ).match( core_rnotwhite ) || [""];
- t = types.length;
- while ( t-- ) {
- tmp = rtypenamespace.exec( types[t] ) || [];
- type = origType = tmp[1];
- namespaces = ( tmp[2] || "" ).split( "." ).sort();
-
- // There *must* be a type, no attaching namespace-only handlers
- if ( !type ) {
- continue;
- }
-
- // If event changes its type, use the special event handlers for the changed type
- special = jQuery.event.special[ type ] || {};
-
- // If selector defined, determine special event api type, otherwise given type
- type = ( selector ? special.delegateType : special.bindType ) || type;
-
- // Update special based on newly reset type
- special = jQuery.event.special[ type ] || {};
-
- // handleObj is passed to all event handlers
- handleObj = jQuery.extend({
- type: type,
- origType: origType,
- data: data,
- handler: handler,
- guid: handler.guid,
- selector: selector,
- needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
- namespace: namespaces.join(".")
- }, handleObjIn );
-
- // Init the event handler queue if we're the first
- if ( !(handlers = events[ type ]) ) {
- handlers = events[ type ] = [];
- handlers.delegateCount = 0;
-
- // Only use addEventListener/attachEvent if the special events handler returns false
- if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
- // Bind the global event handler to the element
- if ( elem.addEventListener ) {
- elem.addEventListener( type, eventHandle, false );
-
- } else if ( elem.attachEvent ) {
- elem.attachEvent( "on" + type, eventHandle );
- }
- }
- }
-
- if ( special.add ) {
- special.add.call( elem, handleObj );
-
- if ( !handleObj.handler.guid ) {
- handleObj.handler.guid = handler.guid;
- }
- }
-
- // Add to the element's handler list, delegates in front
- if ( selector ) {
- handlers.splice( handlers.delegateCount++, 0, handleObj );
- } else {
- handlers.push( handleObj );
- }
-
- // Keep track of which events have ever been used, for event optimization
- jQuery.event.global[ type ] = true;
- }
-
- // Nullify elem to prevent memory leaks in IE
- elem = null;
- },
-
- // Detach an event or set of events from an element
- remove: function( elem, types, handler, selector, mappedTypes ) {
- var j, handleObj, tmp,
- origCount, t, events,
- special, handlers, type,
- namespaces, origType,
- elemData = jQuery.hasData( elem ) && jQuery._data( elem );
-
- if ( !elemData || !(events = elemData.events) ) {
- return;
- }
-
- // Once for each type.namespace in types; type may be omitted
- types = ( types || "" ).match( core_rnotwhite ) || [""];
- t = types.length;
- while ( t-- ) {
- tmp = rtypenamespace.exec( types[t] ) || [];
- type = origType = tmp[1];
- namespaces = ( tmp[2] || "" ).split( "." ).sort();
-
- // Unbind all events (on this namespace, if provided) for the element
- if ( !type ) {
- for ( type in events ) {
- jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
- }
- continue;
- }
-
- special = jQuery.event.special[ type ] || {};
- type = ( selector ? special.delegateType : special.bindType ) || type;
- handlers = events[ type ] || [];
- tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" );
-
- // Remove matching events
- origCount = j = handlers.length;
- while ( j-- ) {
- handleObj = handlers[ j ];
-
- if ( ( mappedTypes || origType === handleObj.origType ) &&
- ( !handler || handler.guid === handleObj.guid ) &&
- ( !tmp || tmp.test( handleObj.namespace ) ) &&
- ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
- handlers.splice( j, 1 );
-
- if ( handleObj.selector ) {
- handlers.delegateCount--;
- }
- if ( special.remove ) {
- special.remove.call( elem, handleObj );
- }
- }
- }
-
- // Remove generic event handler if we removed something and no more handlers exist
- // (avoids potential for endless recursion during removal of special event handlers)
- if ( origCount && !handlers.length ) {
- if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
- jQuery.removeEvent( elem, type, elemData.handle );
- }
-
- delete events[ type ];
- }
- }
-
- // Remove the expando if it's no longer used
- if ( jQuery.isEmptyObject( events ) ) {
- delete elemData.handle;
-
- // removeData also checks for emptiness and clears the expando if empty
- // so use it instead of delete
- jQuery._removeData( elem, "events" );
- }
- },
-
- trigger: function( event, data, elem, onlyHandlers ) {
- var handle, ontype, cur,
- bubbleType, special, tmp, i,
- eventPath = [ elem || document ],
- type = core_hasOwn.call( event, "type" ) ? event.type : event,
- namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : [];
-
- cur = tmp = elem = elem || document;
-
- // Don't do events on text and comment nodes
- if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
- return;
- }
-
- // focus/blur morphs to focusin/out; ensure we're not firing them right now
- if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
- return;
- }
-
- if ( type.indexOf(".") >= 0 ) {
- // Namespaced trigger; create a regexp to match event type in handle()
- namespaces = type.split(".");
- type = namespaces.shift();
- namespaces.sort();
- }
- ontype = type.indexOf(":") < 0 && "on" + type;
-
- // Caller can pass in a jQuery.Event object, Object, or just an event type string
- event = event[ jQuery.expando ] ?
- event :
- new jQuery.Event( type, typeof event === "object" && event );
-
- // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
- event.isTrigger = onlyHandlers ? 2 : 3;
- event.namespace = namespaces.join(".");
- event.namespace_re = event.namespace ?
- new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :
- null;
-
- // Clean up the event in case it is being reused
- event.result = undefined;
- if ( !event.target ) {
- event.target = elem;
- }
-
- // Clone any incoming data and prepend the event, creating the handler arg list
- data = data == null ?
- [ event ] :
- jQuery.makeArray( data, [ event ] );
-
- // Allow special events to draw outside the lines
- special = jQuery.event.special[ type ] || {};
- if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
- return;
- }
-
- // Determine event propagation path in advance, per W3C events spec (#9951)
- // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
- if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
-
- bubbleType = special.delegateType || type;
- if ( !rfocusMorph.test( bubbleType + type ) ) {
- cur = cur.parentNode;
- }
- for ( ; cur; cur = cur.parentNode ) {
- eventPath.push( cur );
- tmp = cur;
- }
-
- // Only add window if we got to document (e.g., not plain obj or detached DOM)
- if ( tmp === (elem.ownerDocument || document) ) {
- eventPath.push( tmp.defaultView || tmp.parentWindow || window );
- }
- }
-
- // Fire handlers on the event path
- i = 0;
- while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {
-
- event.type = i > 1 ?
- bubbleType :
- special.bindType || type;
-
- // jQuery handler
- handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
- if ( handle ) {
- handle.apply( cur, data );
- }
-
- // Native handler
- handle = ontype && cur[ ontype ];
- if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {
- event.preventDefault();
- }
- }
- event.type = type;
-
- // If nobody prevented the default action, do it now
- if ( !onlyHandlers && !event.isDefaultPrevented() ) {
-
- if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) &&
- jQuery.acceptData( elem ) ) {
-
- // Call a native DOM method on the target with the same name name as the event.
- // Can't use an .isFunction() check here because IE6/7 fails that test.
- // Don't do default actions on window, that's where global variables be (#6170)
- if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {
-
- // Don't re-trigger an onFOO event when we call its FOO() method
- tmp = elem[ ontype ];
-
- if ( tmp ) {
- elem[ ontype ] = null;
- }
-
- // Prevent re-triggering of the same event, since we already bubbled it above
- jQuery.event.triggered = type;
- try {
- elem[ type ]();
- } catch ( e ) {
- // IE<9 dies on focus/blur to hidden element (#1486,#12518)
- // only reproducible on winXP IE8 native, not IE9 in IE8 mode
- }
- jQuery.event.triggered = undefined;
-
- if ( tmp ) {
- elem[ ontype ] = tmp;
- }
- }
- }
- }
-
- return event.result;
- },
-
- dispatch: function( event ) {
-
- // Make a writable jQuery.Event from the native event object
- event = jQuery.event.fix( event );
-
- var i, ret, handleObj, matched, j,
- handlerQueue = [],
- args = core_slice.call( arguments ),
- handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [],
- special = jQuery.event.special[ event.type ] || {};
-
- // Use the fix-ed jQuery.Event rather than the (read-only) native event
- args[0] = event;
- event.delegateTarget = this;
-
- // Call the preDispatch hook for the mapped type, and let it bail if desired
- if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
- return;
- }
-
- // Determine handlers
- handlerQueue = jQuery.event.handlers.call( this, event, handlers );
-
- // Run delegates first; they may want to stop propagation beneath us
- i = 0;
- while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {
- event.currentTarget = matched.elem;
-
- j = 0;
- while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {
-
- // Triggered event must either 1) have no namespace, or
- // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
- if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {
-
- event.handleObj = handleObj;
- event.data = handleObj.data;
-
- ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
- .apply( matched.elem, args );
-
- if ( ret !== undefined ) {
- if ( (event.result = ret) === false ) {
- event.preventDefault();
- event.stopPropagation();
- }
- }
- }
- }
- }
-
- // Call the postDispatch hook for the mapped type
- if ( special.postDispatch ) {
- special.postDispatch.call( this, event );
- }
-
- return event.result;
- },
-
- handlers: function( event, handlers ) {
- var sel, handleObj, matches, i,
- handlerQueue = [],
- delegateCount = handlers.delegateCount,
- cur = event.target;
-
- // Find delegate handlers
- // Black-hole SVG <use> instance trees (#13180)
- // Avoid non-left-click bubbling in Firefox (#3861)
- if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {
-
- /* jshint eqeqeq: false */
- for ( ; cur != this; cur = cur.parentNode || this ) {
- /* jshint eqeqeq: true */
-
- // Don't check non-elements (#13208)
- // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
- if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) {
- matches = [];
- for ( i = 0; i < delegateCount; i++ ) {
- handleObj = handlers[ i ];
-
- // Don't conflict with Object.prototype properties (#13203)
- sel = handleObj.selector + " ";
-
- if ( matches[ sel ] === undefined ) {
- matches[ sel ] = handleObj.needsContext ?
- jQuery( sel, this ).index( cur ) >= 0 :
- jQuery.find( sel, this, null, [ cur ] ).length;
- }
- if ( matches[ sel ] ) {
- matches.push( handleObj );
- }
- }
- if ( matches.length ) {
- handlerQueue.push({ elem: cur, handlers: matches });
- }
- }
- }
- }
-
- // Add the remaining (directly-bound) handlers
- if ( delegateCount < handlers.length ) {
- handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });
- }
-
- return handlerQueue;
- },
-
- fix: function( event ) {
- if ( event[ jQuery.expando ] ) {
- return event;
- }
-
- // Create a writable copy of the event object and normalize some properties
- var i, prop, copy,
- type = event.type,
- originalEvent = event,
- fixHook = this.fixHooks[ type ];
-
- if ( !fixHook ) {
- this.fixHooks[ type ] = fixHook =
- rmouseEvent.test( type ) ? this.mouseHooks :
- rkeyEvent.test( type ) ? this.keyHooks :
- {};
- }
- copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
-
- event = new jQuery.Event( originalEvent );
-
- i = copy.length;
- while ( i-- ) {
- prop = copy[ i ];
- event[ prop ] = originalEvent[ prop ];
- }
-
- // Support: IE<9
- // Fix target property (#1925)
- if ( !event.target ) {
- event.target = originalEvent.srcElement || document;
- }
-
- // Support: Chrome 23+, Safari?
- // Target should not be a text node (#504, #13143)
- if ( event.target.nodeType === 3 ) {
- event.target = event.target.parentNode;
- }
-
- // Support: IE<9
- // For mouse/key events, metaKey==false if it's undefined (#3368, #11328)
- event.metaKey = !!event.metaKey;
-
- return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
- },
-
- // Includes some event props shared by KeyEvent and MouseEvent
- props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
-
- fixHooks: {},
-
- keyHooks: {
- props: "char charCode key keyCode".split(" "),
- filter: function( event, original ) {
-
- // Add which for key events
- if ( event.which == null ) {
- event.which = original.charCode != null ? original.charCode : original.keyCode;
- }
-
- return event;
- }
- },
-
- mouseHooks: {
- props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
- filter: function( event, original ) {
- var body, eventDoc, doc,
- button = original.button,
- fromElement = original.fromElement;
-
- // Calculate pageX/Y if missing and clientX/Y available
- if ( event.pageX == null && original.clientX != null ) {
- eventDoc = event.target.ownerDocument || document;
- doc = eventDoc.documentElement;
- body = eventDoc.body;
-
- event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
- event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
- }
-
- // Add relatedTarget, if necessary
- if ( !event.relatedTarget && fromElement ) {
- event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
- }
-
- // Add which for click: 1 === left; 2 === middle; 3 === right
- // Note: button is not normalized, so don't use it
- if ( !event.which && button !== undefined ) {
- event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
- }
-
- return event;
- }
- },
-
- special: {
- load: {
- // Prevent triggered image.load events from bubbling to window.load
- noBubble: true
- },
- focus: {
- // Fire native event if possible so blur/focus sequence is correct
- trigger: function() {
- if ( this !== safeActiveElement() && this.focus ) {
- try {
- this.focus();
- return false;
- } catch ( e ) {
- // Support: IE<9
- // If we error on focus to hidden element (#1486, #12518),
- // let .trigger() run the handlers
- }
- }
- },
- delegateType: "focusin"
- },
- blur: {
- trigger: function() {
- if ( this === safeActiveElement() && this.blur ) {
- this.blur();
- return false;
- }
- },
- delegateType: "focusout"
- },
- click: {
- // For checkbox, fire native event so checked state will be right
- trigger: function() {
- if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) {
- this.click();
- return false;
- }
- },
-
- // For cross-browser consistency, don't fire native .click() on links
- _default: function( event ) {
- return jQuery.nodeName( event.target, "a" );
- }
- },
-
- beforeunload: {
- postDispatch: function( event ) {
-
- // Even when returnValue equals to undefined Firefox will still show alert
- if ( event.result !== undefined ) {
- event.originalEvent.returnValue = event.result;
- }
- }
- }
- },
-
- simulate: function( type, elem, event, bubble ) {
- // Piggyback on a donor event to simulate a different one.
- // Fake originalEvent to avoid donor's stopPropagation, but if the
- // simulated event prevents default then we do the same on the donor.
- var e = jQuery.extend(
- new jQuery.Event(),
- event,
- {
- type: type,
- isSimulated: true,
- originalEvent: {}
- }
- );
- if ( bubble ) {
- jQuery.event.trigger( e, null, elem );
- } else {
- jQuery.event.dispatch.call( elem, e );
- }
- if ( e.isDefaultPrevented() ) {
- event.preventDefault();
- }
- }
-};
-
-jQuery.removeEvent = document.removeEventListener ?
- function( elem, type, handle ) {
- if ( elem.removeEventListener ) {
- elem.removeEventListener( type, handle, false );
- }
- } :
- function( elem, type, handle ) {
- var name = "on" + type;
-
- if ( elem.detachEvent ) {
-
- // #8545, #7054, preventing memory leaks for custom events in IE6-8
- // detachEvent needed property on element, by name of that event, to properly expose it to GC
- if ( typeof elem[ name ] === core_strundefined ) {
- elem[ name ] = null;
- }
-
- elem.detachEvent( name, handle );
- }
- };
-
-jQuery.Event = function( src, props ) {
- // Allow instantiation without the 'new' keyword
- if ( !(this instanceof jQuery.Event) ) {
- return new jQuery.Event( src, props );
- }
-
- // Event object
- if ( src && src.type ) {
- this.originalEvent = src;
- this.type = src.type;
-
- // Events bubbling up the document may have been marked as prevented
- // by a handler lower down the tree; reflect the correct value.
- this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
- src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
-
- // Event type
- } else {
- this.type = src;
- }
-
- // Put explicitly provided properties onto the event object
- if ( props ) {
- jQuery.extend( this, props );
- }
-
- // Create a timestamp if incoming event doesn't have one
- this.timeStamp = src && src.timeStamp || jQuery.now();
-
- // Mark it as fixed
- this[ jQuery.expando ] = true;
-};
-
-// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
-// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-bindin…
-jQuery.Event.prototype = {
- isDefaultPrevented: returnFalse,
- isPropagationStopped: returnFalse,
- isImmediatePropagationStopped: returnFalse,
-
- preventDefault: function() {
- var e = this.originalEvent;
-
- this.isDefaultPrevented = returnTrue;
- if ( !e ) {
- return;
- }
-
- // If preventDefault exists, run it on the original event
- if ( e.preventDefault ) {
- e.preventDefault();
-
- // Support: IE
- // Otherwise set the returnValue property of the original event to false
- } else {
- e.returnValue = false;
- }
- },
- stopPropagation: function() {
- var e = this.originalEvent;
-
- this.isPropagationStopped = returnTrue;
- if ( !e ) {
- return;
- }
- // If stopPropagation exists, run it on the original event
- if ( e.stopPropagation ) {
- e.stopPropagation();
- }
-
- // Support: IE
- // Set the cancelBubble property of the original event to true
- e.cancelBubble = true;
- },
- stopImmediatePropagation: function() {
- this.isImmediatePropagationStopped = returnTrue;
- this.stopPropagation();
- }
-};
-
-// Create mouseenter/leave events using mouseover/out and event-time checks
-jQuery.each({
- mouseenter: "mouseover",
- mouseleave: "mouseout"
-}, function( orig, fix ) {
- jQuery.event.special[ orig ] = {
- delegateType: fix,
- bindType: fix,
-
- handle: function( event ) {
- var ret,
- target = this,
- related = event.relatedTarget,
- handleObj = event.handleObj;
-
- // For mousenter/leave call the handler if related is outside the target.
- // NB: No relatedTarget if the mouse left/entered the browser window
- if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
- event.type = handleObj.origType;
- ret = handleObj.handler.apply( this, arguments );
- event.type = fix;
- }
- return ret;
- }
- };
-});
-
-// IE submit delegation
-if ( !jQuery.support.submitBubbles ) {
-
- jQuery.event.special.submit = {
- setup: function() {
- // Only need this for delegated form submit events
- if ( jQuery.nodeName( this, "form" ) ) {
- return false;
- }
-
- // Lazy-add a submit handler when a descendant form may potentially be submitted
- jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
- // Node name check avoids a VML-related crash in IE (#9807)
- var elem = e.target,
- form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
- if ( form && !jQuery._data( form, "submitBubbles" ) ) {
- jQuery.event.add( form, "submit._submit", function( event ) {
- event._submit_bubble = true;
- });
- jQuery._data( form, "submitBubbles", true );
- }
- });
- // return undefined since we don't need an event listener
- },
-
- postDispatch: function( event ) {
- // If form was submitted by the user, bubble the event up the tree
- if ( event._submit_bubble ) {
- delete event._submit_bubble;
- if ( this.parentNode && !event.isTrigger ) {
- jQuery.event.simulate( "submit", this.parentNode, event, true );
- }
- }
- },
-
- teardown: function() {
- // Only need this for delegated form submit events
- if ( jQuery.nodeName( this, "form" ) ) {
- return false;
- }
-
- // Remove delegated handlers; cleanData eventually reaps submit handlers attached above
- jQuery.event.remove( this, "._submit" );
- }
- };
-}
-
-// IE change delegation and checkbox/radio fix
-if ( !jQuery.support.changeBubbles ) {
-
- jQuery.event.special.change = {
-
- setup: function() {
-
- if ( rformElems.test( this.nodeName ) ) {
- // IE doesn't fire change on a check/radio until blur; trigger it on click
- // after a propertychange. Eat the blur-change in special.change.handle.
- // This still fires onchange a second time for check/radio after blur.
- if ( this.type === "checkbox" || this.type === "radio" ) {
- jQuery.event.add( this, "propertychange._change", function( event ) {
- if ( event.originalEvent.propertyName === "checked" ) {
- this._just_changed = true;
- }
- });
- jQuery.event.add( this, "click._change", function( event ) {
- if ( this._just_changed && !event.isTrigger ) {
- this._just_changed = false;
- }
- // Allow triggered, simulated change events (#11500)
- jQuery.event.simulate( "change", this, event, true );
- });
- }
- return false;
- }
- // Delegated event; lazy-add a change handler on descendant inputs
- jQuery.event.add( this, "beforeactivate._change", function( e ) {
- var elem = e.target;
-
- if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) {
- jQuery.event.add( elem, "change._change", function( event ) {
- if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
- jQuery.event.simulate( "change", this.parentNode, event, true );
- }
- });
- jQuery._data( elem, "changeBubbles", true );
- }
- });
- },
-
- handle: function( event ) {
- var elem = event.target;
-
- // Swallow native change events from checkbox/radio, we already triggered them above
- if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
- return event.handleObj.handler.apply( this, arguments );
- }
- },
-
- teardown: function() {
- jQuery.event.remove( this, "._change" );
-
- return !rformElems.test( this.nodeName );
- }
- };
-}
-
-// Create "bubbling" focus and blur events
-if ( !jQuery.support.focusinBubbles ) {
- jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
-
- // Attach a single capturing handler while someone wants focusin/focusout
- var attaches = 0,
- handler = function( event ) {
- jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
- };
-
- jQuery.event.special[ fix ] = {
- setup: function() {
- if ( attaches++ === 0 ) {
- document.addEventListener( orig, handler, true );
- }
- },
- teardown: function() {
- if ( --attaches === 0 ) {
- document.removeEventListener( orig, handler, true );
- }
- }
- };
- });
-}
-
-jQuery.fn.extend({
-
- on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
- var type, origFn;
-
- // Types can be a map of types/handlers
- if ( typeof types === "object" ) {
- // ( types-Object, selector, data )
- if ( typeof selector !== "string" ) {
- // ( types-Object, data )
- data = data || selector;
- selector = undefined;
- }
- for ( type in types ) {
- this.on( type, selector, data, types[ type ], one );
- }
- return this;
- }
-
- if ( data == null && fn == null ) {
- // ( types, fn )
- fn = selector;
- data = selector = undefined;
- } else if ( fn == null ) {
- if ( typeof selector === "string" ) {
- // ( types, selector, fn )
- fn = data;
- data = undefined;
- } else {
- // ( types, data, fn )
- fn = data;
- data = selector;
- selector = undefined;
- }
- }
- if ( fn === false ) {
- fn = returnFalse;
- } else if ( !fn ) {
- return this;
- }
-
- if ( one === 1 ) {
- origFn = fn;
- fn = function( event ) {
- // Can use an empty set, since event contains the info
- jQuery().off( event );
- return origFn.apply( this, arguments );
- };
- // Use same guid so caller can remove using origFn
- fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
- }
- return this.each( function() {
- jQuery.event.add( this, types, fn, data, selector );
- });
- },
- one: function( types, selector, data, fn ) {
- return this.on( types, selector, data, fn, 1 );
- },
- off: function( types, selector, fn ) {
- var handleObj, type;
- if ( types && types.preventDefault && types.handleObj ) {
- // ( event ) dispatched jQuery.Event
- handleObj = types.handleObj;
- jQuery( types.delegateTarget ).off(
- handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
- handleObj.selector,
- handleObj.handler
- );
- return this;
- }
- if ( typeof types === "object" ) {
- // ( types-object [, selector] )
- for ( type in types ) {
- this.off( type, selector, types[ type ] );
- }
- return this;
- }
- if ( selector === false || typeof selector === "function" ) {
- // ( types [, fn] )
- fn = selector;
- selector = undefined;
- }
- if ( fn === false ) {
- fn = returnFalse;
- }
- return this.each(function() {
- jQuery.event.remove( this, types, fn, selector );
- });
- },
-
- trigger: function( type, data ) {
- return this.each(function() {
- jQuery.event.trigger( type, data, this );
- });
- },
- triggerHandler: function( type, data ) {
- var elem = this[0];
- if ( elem ) {
- return jQuery.event.trigger( type, data, elem, true );
- }
- }
-});
-var isSimple = /^.[^:#\[\.,]*$/,
- rparentsprev = /^(?:parents|prev(?:Until|All))/,
- rneedsContext = jQuery.expr.match.needsContext,
- // methods guaranteed to produce a unique set when starting from a unique set
- guaranteedUnique = {
- children: true,
- contents: true,
- next: true,
- prev: true
- };
-
-jQuery.fn.extend({
- find: function( selector ) {
- var i,
- ret = [],
- self = this,
- len = self.length;
-
- if ( typeof selector !== "string" ) {
- return this.pushStack( jQuery( selector ).filter(function() {
- for ( i = 0; i < len; i++ ) {
- if ( jQuery.contains( self[ i ], this ) ) {
- return true;
- }
- }
- }) );
- }
-
- for ( i = 0; i < len; i++ ) {
- jQuery.find( selector, self[ i ], ret );
- }
-
- // Needed because $( selector, context ) becomes $( context ).find( selector )
- ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
- ret.selector = this.selector ? this.selector + " " + selector : selector;
- return ret;
- },
-
- has: function( target ) {
- var i,
- targets = jQuery( target, this ),
- len = targets.length;
-
- return this.filter(function() {
- for ( i = 0; i < len; i++ ) {
- if ( jQuery.contains( this, targets[i] ) ) {
- return true;
- }
- }
- });
- },
-
- not: function( selector ) {
- return this.pushStack( winnow(this, selector || [], true) );
- },
-
- filter: function( selector ) {
- return this.pushStack( winnow(this, selector || [], false) );
- },
-
- is: function( selector ) {
- return !!winnow(
- this,
-
- // If this is a positional/relative selector, check membership in the returned set
- // so $("p:first").is("p:last") won't return true for a doc with two "p".
- typeof selector === "string" && rneedsContext.test( selector ) ?
- jQuery( selector ) :
- selector || [],
- false
- ).length;
- },
-
- closest: function( selectors, context ) {
- var cur,
- i = 0,
- l = this.length,
- ret = [],
- pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
- jQuery( selectors, context || this.context ) :
- 0;
-
- for ( ; i < l; i++ ) {
- for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {
- // Always skip document fragments
- if ( cur.nodeType < 11 && (pos ?
- pos.index(cur) > -1 :
-
- // Don't pass non-elements to Sizzle
- cur.nodeType === 1 &&
- jQuery.find.matchesSelector(cur, selectors)) ) {
-
- cur = ret.push( cur );
- break;
- }
- }
- }
-
- return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret );
- },
-
- // Determine the position of an element within
- // the matched set of elements
- index: function( elem ) {
-
- // No argument, return index in parent
- if ( !elem ) {
- return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1;
- }
-
- // index in selector
- if ( typeof elem === "string" ) {
- return jQuery.inArray( this[0], jQuery( elem ) );
- }
-
- // Locate the position of the desired element
- return jQuery.inArray(
- // If it receives a jQuery object, the first element is used
- elem.jquery ? elem[0] : elem, this );
- },
-
- add: function( selector, context ) {
- var set = typeof selector === "string" ?
- jQuery( selector, context ) :
- jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
- all = jQuery.merge( this.get(), set );
-
- return this.pushStack( jQuery.unique(all) );
- },
-
- addBack: function( selector ) {
- return this.add( selector == null ?
- this.prevObject : this.prevObject.filter(selector)
- );
- }
-});
-
-function sibling( cur, dir ) {
- do {
- cur = cur[ dir ];
- } while ( cur && cur.nodeType !== 1 );
-
- return cur;
-}
-
-jQuery.each({
- parent: function( elem ) {
- var parent = elem.parentNode;
- return parent && parent.nodeType !== 11 ? parent : null;
- },
- parents: function( elem ) {
- return jQuery.dir( elem, "parentNode" );
- },
- parentsUntil: function( elem, i, until ) {
- return jQuery.dir( elem, "parentNode", until );
- },
- next: function( elem ) {
- return sibling( elem, "nextSibling" );
- },
- prev: function( elem ) {
- return sibling( elem, "previousSibling" );
- },
- nextAll: function( elem ) {
- return jQuery.dir( elem, "nextSibling" );
- },
- prevAll: function( elem ) {
- return jQuery.dir( elem, "previousSibling" );
- },
- nextUntil: function( elem, i, until ) {
- return jQuery.dir( elem, "nextSibling", until );
- },
- prevUntil: function( elem, i, until ) {
- return jQuery.dir( elem, "previousSibling", until );
- },
- siblings: function( elem ) {
- return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
- },
- children: function( elem ) {
- return jQuery.sibling( elem.firstChild );
- },
- contents: function( elem ) {
- return jQuery.nodeName( elem, "iframe" ) ?
- elem.contentDocument || elem.contentWindow.document :
- jQuery.merge( [], elem.childNodes );
- }
-}, function( name, fn ) {
- jQuery.fn[ name ] = function( until, selector ) {
- var ret = jQuery.map( this, fn, until );
-
- if ( name.slice( -5 ) !== "Until" ) {
- selector = until;
- }
-
- if ( selector && typeof selector === "string" ) {
- ret = jQuery.filter( selector, ret );
- }
-
- if ( this.length > 1 ) {
- // Remove duplicates
- if ( !guaranteedUnique[ name ] ) {
- ret = jQuery.unique( ret );
- }
-
- // Reverse order for parents* and prev-derivatives
- if ( rparentsprev.test( name ) ) {
- ret = ret.reverse();
- }
- }
-
- return this.pushStack( ret );
- };
-});
-
-jQuery.extend({
- filter: function( expr, elems, not ) {
- var elem = elems[ 0 ];
-
- if ( not ) {
- expr = ":not(" + expr + ")";
- }
-
- return elems.length === 1 && elem.nodeType === 1 ?
- jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
- jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
- return elem.nodeType === 1;
- }));
- },
-
- dir: function( elem, dir, until ) {
- var matched = [],
- cur = elem[ dir ];
-
- while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
- if ( cur.nodeType === 1 ) {
- matched.push( cur );
- }
- cur = cur[dir];
- }
- return matched;
- },
-
- sibling: function( n, elem ) {
- var r = [];
-
- for ( ; n; n = n.nextSibling ) {
- if ( n.nodeType === 1 && n !== elem ) {
- r.push( n );
- }
- }
-
- return r;
- }
-});
-
-// Implement the identical functionality for filter and not
-function winnow( elements, qualifier, not ) {
- if ( jQuery.isFunction( qualifier ) ) {
- return jQuery.grep( elements, function( elem, i ) {
- /* jshint -W018 */
- return !!qualifier.call( elem, i, elem ) !== not;
- });
-
- }
-
- if ( qualifier.nodeType ) {
- return jQuery.grep( elements, function( elem ) {
- return ( elem === qualifier ) !== not;
- });
-
- }
-
- if ( typeof qualifier === "string" ) {
- if ( isSimple.test( qualifier ) ) {
- return jQuery.filter( qualifier, elements, not );
- }
-
- qualifier = jQuery.filter( qualifier, elements );
- }
-
- return jQuery.grep( elements, function( elem ) {
- return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not;
- });
-}
-function createSafeFragment( document ) {
- var list = nodeNames.split( "|" ),
- safeFrag = document.createDocumentFragment();
-
- if ( safeFrag.createElement ) {
- while ( list.length ) {
- safeFrag.createElement(
- list.pop()
- );
- }
- }
- return safeFrag;
-}
-
-var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
- "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
- rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
- rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
- rleadingWhitespace = /^\s+/,
- rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
- rtagName = /<([\w:]+)/,
- rtbody = /<tbody/i,
- rhtml = /<|&#?\w+;/,
- rnoInnerhtml = /<(?:script|style|link)/i,
- manipulation_rcheckableType = /^(?:checkbox|radio)$/i,
- // checked="checked" or checked
- rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
- rscriptType = /^$|\/(?:java|ecma)script/i,
- rscriptTypeMasked = /^true\/(.*)/,
- rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
-
- // We have to close these tags to support XHTML (#13200)
- wrapMap = {
- option: [ 1, "<select multiple='multiple'>", "</select>" ],
- legend: [ 1, "<fieldset>", "</fieldset>" ],
- area: [ 1, "<map>", "</map>" ],
- param: [ 1, "<object>", "</object>" ],
- thead: [ 1, "<table>", "</table>" ],
- tr: [ 2, "<table><tbody>", "</tbody></table>" ],
- col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
- td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
-
- // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
- // unless wrapped in a div with non-breaking characters in front of it.
- _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ]
- },
- safeFragment = createSafeFragment( document ),
- fragmentDiv = safeFragment.appendChild( document.createElement("div") );
-
-wrapMap.optgroup = wrapMap.option;
-wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
-wrapMap.th = wrapMap.td;
-
-jQuery.fn.extend({
- text: function( value ) {
- return jQuery.access( this, function( value ) {
- return value === undefined ?
- jQuery.text( this ) :
- this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
- }, null, value, arguments.length );
- },
-
- append: function() {
- return this.domManip( arguments, function( elem ) {
- if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
- var target = manipulationTarget( this, elem );
- target.appendChild( elem );
- }
- });
- },
-
- prepend: function() {
- return this.domManip( arguments, function( elem ) {
- if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
- var target = manipulationTarget( this, elem );
- target.insertBefore( elem, target.firstChild );
- }
- });
- },
-
- before: function() {
- return this.domManip( arguments, function( elem ) {
- if ( this.parentNode ) {
- this.parentNode.insertBefore( elem, this );
- }
- });
- },
-
- after: function() {
- return this.domManip( arguments, function( elem ) {
- if ( this.parentNode ) {
- this.parentNode.insertBefore( elem, this.nextSibling );
- }
- });
- },
-
- // keepData is for internal use only--do not document
- remove: function( selector, keepData ) {
- var elem,
- elems = selector ? jQuery.filter( selector, this ) : this,
- i = 0;
-
- for ( ; (elem = elems[i]) != null; i++ ) {
-
- if ( !keepData && elem.nodeType === 1 ) {
- jQuery.cleanData( getAll( elem ) );
- }
-
- if ( elem.parentNode ) {
- if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {
- setGlobalEval( getAll( elem, "script" ) );
- }
- elem.parentNode.removeChild( elem );
- }
- }
-
- return this;
- },
-
- empty: function() {
- var elem,
- i = 0;
-
- for ( ; (elem = this[i]) != null; i++ ) {
- // Remove element nodes and prevent memory leaks
- if ( elem.nodeType === 1 ) {
- jQuery.cleanData( getAll( elem, false ) );
- }
-
- // Remove any remaining nodes
- while ( elem.firstChild ) {
- elem.removeChild( elem.firstChild );
- }
-
- // If this is a select, ensure that it displays empty (#12336)
- // Support: IE<9
- if ( elem.options && jQuery.nodeName( elem, "select" ) ) {
- elem.options.length = 0;
- }
- }
-
- return this;
- },
-
- clone: function( dataAndEvents, deepDataAndEvents ) {
- dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
- deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
-
- return this.map( function () {
- return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
- });
- },
-
- html: function( value ) {
- return jQuery.access( this, function( value ) {
- var elem = this[0] || {},
- i = 0,
- l = this.length;
-
- if ( value === undefined ) {
- return elem.nodeType === 1 ?
- elem.innerHTML.replace( rinlinejQuery, "" ) :
- undefined;
- }
-
- // See if we can take a shortcut and just use innerHTML
- if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
- ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) &&
- ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
- !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) {
-
- value = value.replace( rxhtmlTag, "<$1></$2>" );
-
- try {
- for (; i < l; i++ ) {
- // Remove element nodes and prevent memory leaks
- elem = this[i] || {};
- if ( elem.nodeType === 1 ) {
- jQuery.cleanData( getAll( elem, false ) );
- elem.innerHTML = value;
- }
- }
-
- elem = 0;
-
- // If using innerHTML throws an exception, use the fallback method
- } catch(e) {}
- }
-
- if ( elem ) {
- this.empty().append( value );
- }
- }, null, value, arguments.length );
- },
-
- replaceWith: function() {
- var
- // Snapshot the DOM in case .domManip sweeps something relevant into its fragment
- args = jQuery.map( this, function( elem ) {
- return [ elem.nextSibling, elem.parentNode ];
- }),
- i = 0;
-
- // Make the changes, replacing each context element with the new content
- this.domManip( arguments, function( elem ) {
- var next = args[ i++ ],
- parent = args[ i++ ];
-
- if ( parent ) {
- // Don't use the snapshot next if it has moved (#13810)
- if ( next && next.parentNode !== parent ) {
- next = this.nextSibling;
- }
- jQuery( this ).remove();
- parent.insertBefore( elem, next );
- }
- // Allow new content to include elements from the context set
- }, true );
-
- // Force removal if there was no new content (e.g., from empty arguments)
- return i ? this : this.remove();
- },
-
- detach: function( selector ) {
- return this.remove( selector, true );
- },
-
- domManip: function( args, callback, allowIntersection ) {
-
- // Flatten any nested arrays
- args = core_concat.apply( [], args );
-
- var first, node, hasScripts,
- scripts, doc, fragment,
- i = 0,
- l = this.length,
- set = this,
- iNoClone = l - 1,
- value = args[0],
- isFunction = jQuery.isFunction( value );
-
- // We can't cloneNode fragments that contain checked, in WebKit
- if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) {
- return this.each(function( index ) {
- var self = set.eq( index );
- if ( isFunction ) {
- args[0] = value.call( this, index, self.html() );
- }
- self.domManip( args, callback, allowIntersection );
- });
- }
-
- if ( l ) {
- fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, !allowIntersection && this );
- first = fragment.firstChild;
-
- if ( fragment.childNodes.length === 1 ) {
- fragment = first;
- }
-
- if ( first ) {
- scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
- hasScripts = scripts.length;
-
- // Use the original fragment for the last item instead of the first because it can end up
- // being emptied incorrectly in certain situations (#8070).
- for ( ; i < l; i++ ) {
- node = fragment;
-
- if ( i !== iNoClone ) {
- node = jQuery.clone( node, true, true );
-
- // Keep references to cloned scripts for later restoration
- if ( hasScripts ) {
- jQuery.merge( scripts, getAll( node, "script" ) );
- }
- }
-
- callback.call( this[i], node, i );
- }
-
- if ( hasScripts ) {
- doc = scripts[ scripts.length - 1 ].ownerDocument;
-
- // Reenable scripts
- jQuery.map( scripts, restoreScript );
-
- // Evaluate executable scripts on first document insertion
- for ( i = 0; i < hasScripts; i++ ) {
- node = scripts[ i ];
- if ( rscriptType.test( node.type || "" ) &&
- !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
-
- if ( node.src ) {
- // Hope ajax is available...
- jQuery._evalUrl( node.src );
- } else {
- jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) );
- }
- }
- }
- }
-
- // Fix #11809: Avoid leaking memory
- fragment = first = null;
- }
- }
-
- return this;
- }
-});
-
-// Support: IE<8
-// Manipulating tables requires a tbody
-function manipulationTarget( elem, content ) {
- return jQuery.nodeName( elem, "table" ) &&
- jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, "tr" ) ?
-
- elem.getElementsByTagName("tbody")[0] ||
- elem.appendChild( elem.ownerDocument.createElement("tbody") ) :
- elem;
-}
-
-// Replace/restore the type attribute of script elements for safe DOM manipulation
-function disableScript( elem ) {
- elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type;
- return elem;
-}
-function restoreScript( elem ) {
- var match = rscriptTypeMasked.exec( elem.type );
- if ( match ) {
- elem.type = match[1];
- } else {
- elem.removeAttribute("type");
- }
- return elem;
-}
-
-// Mark scripts as having already been evaluated
-function setGlobalEval( elems, refElements ) {
- var elem,
- i = 0;
- for ( ; (elem = elems[i]) != null; i++ ) {
- jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) );
- }
-}
-
-function cloneCopyEvent( src, dest ) {
-
- if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
- return;
- }
-
- var type, i, l,
- oldData = jQuery._data( src ),
- curData = jQuery._data( dest, oldData ),
- events = oldData.events;
-
- if ( events ) {
- delete curData.handle;
- curData.events = {};
-
- for ( type in events ) {
- for ( i = 0, l = events[ type ].length; i < l; i++ ) {
- jQuery.event.add( dest, type, events[ type ][ i ] );
- }
- }
- }
-
- // make the cloned public data object a copy from the original
- if ( curData.data ) {
- curData.data = jQuery.extend( {}, curData.data );
- }
-}
-
-function fixCloneNodeIssues( src, dest ) {
- var nodeName, e, data;
-
- // We do not need to do anything for non-Elements
- if ( dest.nodeType !== 1 ) {
- return;
- }
-
- nodeName = dest.nodeName.toLowerCase();
-
- // IE6-8 copies events bound via attachEvent when using cloneNode.
- if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) {
- data = jQuery._data( dest );
-
- for ( e in data.events ) {
- jQuery.removeEvent( dest, e, data.handle );
- }
-
- // Event data gets referenced instead of copied if the expando gets copied too
- dest.removeAttribute( jQuery.expando );
- }
-
- // IE blanks contents when cloning scripts, and tries to evaluate newly-set text
- if ( nodeName === "script" && dest.text !== src.text ) {
- disableScript( dest ).text = src.text;
- restoreScript( dest );
-
- // IE6-10 improperly clones children of object elements using classid.
- // IE10 throws NoModificationAllowedError if parent is null, #12132.
- } else if ( nodeName === "object" ) {
- if ( dest.parentNode ) {
- dest.outerHTML = src.outerHTML;
- }
-
- // This path appears unavoidable for IE9. When cloning an object
- // element in IE9, the outerHTML strategy above is not sufficient.
- // If the src has innerHTML and the destination does not,
- // copy the src.innerHTML into the dest.innerHTML. #10324
- if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) {
- dest.innerHTML = src.innerHTML;
- }
-
- } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) {
- // IE6-8 fails to persist the checked state of a cloned checkbox
- // or radio button. Worse, IE6-7 fail to give the cloned element
- // a checked appearance if the defaultChecked value isn't also set
-
- dest.defaultChecked = dest.checked = src.checked;
-
- // IE6-7 get confused and end up setting the value of a cloned
- // checkbox/radio button to an empty string instead of "on"
- if ( dest.value !== src.value ) {
- dest.value = src.value;
- }
-
- // IE6-8 fails to return the selected option to the default selected
- // state when cloning options
- } else if ( nodeName === "option" ) {
- dest.defaultSelected = dest.selected = src.defaultSelected;
-
- // IE6-8 fails to set the defaultValue to the correct value when
- // cloning other types of input fields
- } else if ( nodeName === "input" || nodeName === "textarea" ) {
- dest.defaultValue = src.defaultValue;
- }
-}
-
-jQuery.each({
- appendTo: "append",
- prependTo: "prepend",
- insertBefore: "before",
- insertAfter: "after",
- replaceAll: "replaceWith"
-}, function( name, original ) {
- jQuery.fn[ name ] = function( selector ) {
- var elems,
- i = 0,
- ret = [],
- insert = jQuery( selector ),
- last = insert.length - 1;
-
- for ( ; i <= last; i++ ) {
- elems = i === last ? this : this.clone(true);
- jQuery( insert[i] )[ original ]( elems );
-
- // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()
- core_push.apply( ret, elems.get() );
- }
-
- return this.pushStack( ret );
- };
-});
-
-function getAll( context, tag ) {
- var elems, elem,
- i = 0,
- found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) :
- typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) :
- undefined;
-
- if ( !found ) {
- for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) {
- if ( !tag || jQuery.nodeName( elem, tag ) ) {
- found.push( elem );
- } else {
- jQuery.merge( found, getAll( elem, tag ) );
- }
- }
- }
-
- return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
- jQuery.merge( [ context ], found ) :
- found;
-}
-
-// Used in buildFragment, fixes the defaultChecked property
-function fixDefaultChecked( elem ) {
- if ( manipulation_rcheckableType.test( elem.type ) ) {
- elem.defaultChecked = elem.checked;
- }
-}
-
-jQuery.extend({
- clone: function( elem, dataAndEvents, deepDataAndEvents ) {
- var destElements, node, clone, i, srcElements,
- inPage = jQuery.contains( elem.ownerDocument, elem );
-
- if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
- clone = elem.cloneNode( true );
-
- // IE<=8 does not properly clone detached, unknown element nodes
- } else {
- fragmentDiv.innerHTML = elem.outerHTML;
- fragmentDiv.removeChild( clone = fragmentDiv.firstChild );
- }
-
- if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
- (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
-
- // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
- destElements = getAll( clone );
- srcElements = getAll( elem );
-
- // Fix all IE cloning issues
- for ( i = 0; (node = srcElements[i]) != null; ++i ) {
- // Ensure that the destination node is not null; Fixes #9587
- if ( destElements[i] ) {
- fixCloneNodeIssues( node, destElements[i] );
- }
- }
- }
-
- // Copy the events from the original to the clone
- if ( dataAndEvents ) {
- if ( deepDataAndEvents ) {
- srcElements = srcElements || getAll( elem );
- destElements = destElements || getAll( clone );
-
- for ( i = 0; (node = srcElements[i]) != null; i++ ) {
- cloneCopyEvent( node, destElements[i] );
- }
- } else {
- cloneCopyEvent( elem, clone );
- }
- }
-
- // Preserve script evaluation history
- destElements = getAll( clone, "script" );
- if ( destElements.length > 0 ) {
- setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
- }
-
- destElements = srcElements = node = null;
-
- // Return the cloned set
- return clone;
- },
-
- buildFragment: function( elems, context, scripts, selection ) {
- var j, elem, contains,
- tmp, tag, tbody, wrap,
- l = elems.length,
-
- // Ensure a safe fragment
- safe = createSafeFragment( context ),
-
- nodes = [],
- i = 0;
-
- for ( ; i < l; i++ ) {
- elem = elems[ i ];
-
- if ( elem || elem === 0 ) {
-
- // Add nodes directly
- if ( jQuery.type( elem ) === "object" ) {
- jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
-
- // Convert non-html into a text node
- } else if ( !rhtml.test( elem ) ) {
- nodes.push( context.createTextNode( elem ) );
-
- // Convert html into DOM nodes
- } else {
- tmp = tmp || safe.appendChild( context.createElement("div") );
-
- // Deserialize a standard representation
- tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase();
- wrap = wrapMap[ tag ] || wrapMap._default;
-
- tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2];
-
- // Descend through wrappers to the right content
- j = wrap[0];
- while ( j-- ) {
- tmp = tmp.lastChild;
- }
-
- // Manually add leading whitespace removed by IE
- if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
- nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) );
- }
-
- // Remove IE's autoinserted <tbody> from table fragments
- if ( !jQuery.support.tbody ) {
-
- // String was a <table>, *may* have spurious <tbody>
- elem = tag === "table" && !rtbody.test( elem ) ?
- tmp.firstChild :
-
- // String was a bare <thead> or <tfoot>
- wrap[1] === "<table>" && !rtbody.test( elem ) ?
- tmp :
- 0;
-
- j = elem && elem.childNodes.length;
- while ( j-- ) {
- if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) {
- elem.removeChild( tbody );
- }
- }
- }
-
- jQuery.merge( nodes, tmp.childNodes );
-
- // Fix #12392 for WebKit and IE > 9
- tmp.textContent = "";
-
- // Fix #12392 for oldIE
- while ( tmp.firstChild ) {
- tmp.removeChild( tmp.firstChild );
- }
-
- // Remember the top-level container for proper cleanup
- tmp = safe.lastChild;
- }
- }
- }
-
- // Fix #11356: Clear elements from fragment
- if ( tmp ) {
- safe.removeChild( tmp );
- }
-
- // Reset defaultChecked for any radios and checkboxes
- // about to be appended to the DOM in IE 6/7 (#8060)
- if ( !jQuery.support.appendChecked ) {
- jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked );
- }
-
- i = 0;
- while ( (elem = nodes[ i++ ]) ) {
-
- // #4087 - If origin and destination elements are the same, and this is
- // that element, do not do anything
- if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {
- continue;
- }
-
- contains = jQuery.contains( elem.ownerDocument, elem );
-
- // Append to fragment
- tmp = getAll( safe.appendChild( elem ), "script" );
-
- // Preserve script evaluation history
- if ( contains ) {
- setGlobalEval( tmp );
- }
-
- // Capture executables
- if ( scripts ) {
- j = 0;
- while ( (elem = tmp[ j++ ]) ) {
- if ( rscriptType.test( elem.type || "" ) ) {
- scripts.push( elem );
- }
- }
- }
- }
-
- tmp = null;
-
- return safe;
- },
-
- cleanData: function( elems, /* internal */ acceptData ) {
- var elem, type, id, data,
- i = 0,
- internalKey = jQuery.expando,
- cache = jQuery.cache,
- deleteExpando = jQuery.support.deleteExpando,
- special = jQuery.event.special;
-
- for ( ; (elem = elems[i]) != null; i++ ) {
-
- if ( acceptData || jQuery.acceptData( elem ) ) {
-
- id = elem[ internalKey ];
- data = id && cache[ id ];
-
- if ( data ) {
- if ( data.events ) {
- for ( type in data.events ) {
- if ( special[ type ] ) {
- jQuery.event.remove( elem, type );
-
- // This is a shortcut to avoid jQuery.event.remove's overhead
- } else {
- jQuery.removeEvent( elem, type, data.handle );
- }
- }
- }
-
- // Remove cache only if it was not already removed by jQuery.event.remove
- if ( cache[ id ] ) {
-
- delete cache[ id ];
-
- // IE does not allow us to delete expando properties from nodes,
- // nor does it have a removeAttribute function on Document nodes;
- // we must handle all of these cases
- if ( deleteExpando ) {
- delete elem[ internalKey ];
-
- } else if ( typeof elem.removeAttribute !== core_strundefined ) {
- elem.removeAttribute( internalKey );
-
- } else {
- elem[ internalKey ] = null;
- }
-
- core_deletedIds.push( id );
- }
- }
- }
- }
- },
-
- _evalUrl: function( url ) {
- return jQuery.ajax({
- url: url,
- type: "GET",
- dataType: "script",
- async: false,
- global: false,
- "throws": true
- });
- }
-});
-jQuery.fn.extend({
- wrapAll: function( html ) {
- if ( jQuery.isFunction( html ) ) {
- return this.each(function(i) {
- jQuery(this).wrapAll( html.call(this, i) );
- });
- }
-
- if ( this[0] ) {
- // The elements to wrap the target around
- var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
-
- if ( this[0].parentNode ) {
- wrap.insertBefore( this[0] );
- }
-
- wrap.map(function() {
- var elem = this;
-
- while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
- elem = elem.firstChild;
- }
-
- return elem;
- }).append( this );
- }
-
- return this;
- },
-
- wrapInner: function( html ) {
- if ( jQuery.isFunction( html ) ) {
- return this.each(function(i) {
- jQuery(this).wrapInner( html.call(this, i) );
- });
- }
-
- return this.each(function() {
- var self = jQuery( this ),
- contents = self.contents();
-
- if ( contents.length ) {
- contents.wrapAll( html );
-
- } else {
- self.append( html );
- }
- });
- },
-
- wrap: function( html ) {
- var isFunction = jQuery.isFunction( html );
-
- return this.each(function(i) {
- jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
- });
- },
-
- unwrap: function() {
- return this.parent().each(function() {
- if ( !jQuery.nodeName( this, "body" ) ) {
- jQuery( this ).replaceWith( this.childNodes );
- }
- }).end();
- }
-});
-var iframe, getStyles, curCSS,
- ralpha = /alpha\([^)]*\)/i,
- ropacity = /opacity\s*=\s*([^)]*)/,
- rposition = /^(top|right|bottom|left)$/,
- // swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
- // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
- rdisplayswap = /^(none|table(?!-c[ea]).+)/,
- rmargin = /^margin/,
- rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ),
- rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ),
- rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ),
- elemdisplay = { BODY: "block" },
-
- cssShow = { position: "absolute", visibility: "hidden", display: "block" },
- cssNormalTransform = {
- letterSpacing: 0,
- fontWeight: 400
- },
-
- cssExpand = [ "Top", "Right", "Bottom", "Left" ],
- cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];
-
-// return a css property mapped to a potentially vendor prefixed property
-function vendorPropName( style, name ) {
-
- // shortcut for names that are not vendor prefixed
- if ( name in style ) {
- return name;
- }
-
- // check for vendor prefixed names
- var capName = name.charAt(0).toUpperCase() + name.slice(1),
- origName = name,
- i = cssPrefixes.length;
-
- while ( i-- ) {
- name = cssPrefixes[ i ] + capName;
- if ( name in style ) {
- return name;
- }
- }
-
- return origName;
-}
-
-function isHidden( elem, el ) {
- // isHidden might be called from jQuery#filter function;
- // in that case, element will be second argument
- elem = el || elem;
- return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
-}
-
-function showHide( elements, show ) {
- var display, elem, hidden,
- values = [],
- index = 0,
- length = elements.length;
-
- for ( ; index < length; index++ ) {
- elem = elements[ index ];
- if ( !elem.style ) {
- continue;
- }
-
- values[ index ] = jQuery._data( elem, "olddisplay" );
- display = elem.style.display;
- if ( show ) {
- // Reset the inline display of this element to learn if it is
- // being hidden by cascaded rules or not
- if ( !values[ index ] && display === "none" ) {
- elem.style.display = "";
- }
-
- // Set elements which have been overridden with display: none
- // in a stylesheet to whatever the default browser style is
- // for such an element
- if ( elem.style.display === "" && isHidden( elem ) ) {
- values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) );
- }
- } else {
-
- if ( !values[ index ] ) {
- hidden = isHidden( elem );
-
- if ( display && display !== "none" || !hidden ) {
- jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) );
- }
- }
- }
- }
-
- // Set the display of most of the elements in a second loop
- // to avoid the constant reflow
- for ( index = 0; index < length; index++ ) {
- elem = elements[ index ];
- if ( !elem.style ) {
- continue;
- }
- if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
- elem.style.display = show ? values[ index ] || "" : "none";
- }
- }
-
- return elements;
-}
-
-jQuery.fn.extend({
- css: function( name, value ) {
- return jQuery.access( this, function( elem, name, value ) {
- var len, styles,
- map = {},
- i = 0;
-
- if ( jQuery.isArray( name ) ) {
- styles = getStyles( elem );
- len = name.length;
-
- for ( ; i < len; i++ ) {
- map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
- }
-
- return map;
- }
-
- return value !== undefined ?
- jQuery.style( elem, name, value ) :
- jQuery.css( elem, name );
- }, name, value, arguments.length > 1 );
- },
- show: function() {
- return showHide( this, true );
- },
- hide: function() {
- return showHide( this );
- },
- toggle: function( state ) {
- if ( typeof state === "boolean" ) {
- return state ? this.show() : this.hide();
- }
-
- return this.each(function() {
- if ( isHidden( this ) ) {
- jQuery( this ).show();
- } else {
- jQuery( this ).hide();
- }
- });
- }
-});
-
-jQuery.extend({
- // Add in style property hooks for overriding the default
- // behavior of getting and setting a style property
- cssHooks: {
- opacity: {
- get: function( elem, computed ) {
- if ( computed ) {
- // We should always get a number back from opacity
- var ret = curCSS( elem, "opacity" );
- return ret === "" ? "1" : ret;
- }
- }
- }
- },
-
- // Don't automatically add "px" to these possibly-unitless properties
- cssNumber: {
- "columnCount": true,
- "fillOpacity": true,
- "fontWeight": true,
- "lineHeight": true,
- "opacity": true,
- "order": true,
- "orphans": true,
- "widows": true,
- "zIndex": true,
- "zoom": true
- },
-
- // Add in properties whose names you wish to fix before
- // setting or getting the value
- cssProps: {
- // normalize float css property
- "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
- },
-
- // Get and set the style property on a DOM Node
- style: function( elem, name, value, extra ) {
- // Don't set styles on text and comment nodes
- if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
- return;
- }
-
- // Make sure that we're working with the right name
- var ret, type, hooks,
- origName = jQuery.camelCase( name ),
- style = elem.style;
-
- name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
-
- // gets hook for the prefixed version
- // followed by the unprefixed version
- hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
-
- // Check if we're setting a value
- if ( value !== undefined ) {
- type = typeof value;
-
- // convert relative number strings (+= or -=) to relative numbers. #7345
- if ( type === "string" && (ret = rrelNum.exec( value )) ) {
- value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
- // Fixes bug #9237
- type = "number";
- }
-
- // Make sure that NaN and null values aren't set. See: #7116
- if ( value == null || type === "number" && isNaN( value ) ) {
- return;
- }
-
- // If a number was passed in, add 'px' to the (except for certain CSS properties)
- if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
- value += "px";
- }
-
- // Fixes #8908, it can be done more correctly by specifing setters in cssHooks,
- // but it would mean to define eight (for every problematic property) identical functions
- if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) {
- style[ name ] = "inherit";
- }
-
- // If a hook was provided, use that value, otherwise just set the specified value
- if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
-
- // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
- // Fixes bug #5509
- try {
- style[ name ] = value;
- } catch(e) {}
- }
-
- } else {
- // If a hook was provided get the non-computed value from there
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
- return ret;
- }
-
- // Otherwise just get the value from the style object
- return style[ name ];
- }
- },
-
- css: function( elem, name, extra, styles ) {
- var num, val, hooks,
- origName = jQuery.camelCase( name );
-
- // Make sure that we're working with the right name
- name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
-
- // gets hook for the prefixed version
- // followed by the unprefixed version
- hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
-
- // If a hook was provided get the computed value from there
- if ( hooks && "get" in hooks ) {
- val = hooks.get( elem, true, extra );
- }
-
- // Otherwise, if a way to get the computed value exists, use that
- if ( val === undefined ) {
- val = curCSS( elem, name, styles );
- }
-
- //convert "normal" to computed value
- if ( val === "normal" && name in cssNormalTransform ) {
- val = cssNormalTransform[ name ];
- }
-
- // Return, converting to number if forced or a qualifier was provided and val looks numeric
- if ( extra === "" || extra ) {
- num = parseFloat( val );
- return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;
- }
- return val;
- }
-});
-
-// NOTE: we've included the "window" in window.getComputedStyle
-// because jsdom on node.js will break without it.
-if ( window.getComputedStyle ) {
- getStyles = function( elem ) {
- return window.getComputedStyle( elem, null );
- };
-
- curCSS = function( elem, name, _computed ) {
- var width, minWidth, maxWidth,
- computed = _computed || getStyles( elem ),
-
- // getPropertyValue is only needed for .css('filter') in IE9, see #12537
- ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined,
- style = elem.style;
-
- if ( computed ) {
-
- if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
- ret = jQuery.style( elem, name );
- }
-
- // A tribute to the "awesome hack by Dean Edwards"
- // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right
- // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
- // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
- if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
-
- // Remember the original values
- width = style.width;
- minWidth = style.minWidth;
- maxWidth = style.maxWidth;
-
- // Put in the new values to get a computed value out
- style.minWidth = style.maxWidth = style.width = ret;
- ret = computed.width;
-
- // Revert the changed values
- style.width = width;
- style.minWidth = minWidth;
- style.maxWidth = maxWidth;
- }
- }
-
- return ret;
- };
-} else if ( document.documentElement.currentStyle ) {
- getStyles = function( elem ) {
- return elem.currentStyle;
- };
-
- curCSS = function( elem, name, _computed ) {
- var left, rs, rsLeft,
- computed = _computed || getStyles( elem ),
- ret = computed ? computed[ name ] : undefined,
- style = elem.style;
-
- // Avoid setting ret to empty string here
- // so we don't default to auto
- if ( ret == null && style && style[ name ] ) {
- ret = style[ name ];
- }
-
- // From the awesome hack by Dean Edwards
- // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
-
- // If we're not dealing with a regular pixel number
- // but a number that has a weird ending, we need to convert it to pixels
- // but not position css attributes, as those are proportional to the parent element instead
- // and we can't measure the parent instead because it might trigger a "stacking dolls" problem
- if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {
-
- // Remember the original values
- left = style.left;
- rs = elem.runtimeStyle;
- rsLeft = rs && rs.left;
-
- // Put in the new values to get a computed value out
- if ( rsLeft ) {
- rs.left = elem.currentStyle.left;
- }
- style.left = name === "fontSize" ? "1em" : ret;
- ret = style.pixelLeft + "px";
-
- // Revert the changed values
- style.left = left;
- if ( rsLeft ) {
- rs.left = rsLeft;
- }
- }
-
- return ret === "" ? "auto" : ret;
- };
-}
-
-function setPositiveNumber( elem, value, subtract ) {
- var matches = rnumsplit.exec( value );
- return matches ?
- // Guard against undefined "subtract", e.g., when used as in cssHooks
- Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
- value;
-}
-
-function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
- var i = extra === ( isBorderBox ? "border" : "content" ) ?
- // If we already have the right measurement, avoid augmentation
- 4 :
- // Otherwise initialize for horizontal or vertical properties
- name === "width" ? 1 : 0,
-
- val = 0;
-
- for ( ; i < 4; i += 2 ) {
- // both box models exclude margin, so add it if we want it
- if ( extra === "margin" ) {
- val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
- }
-
- if ( isBorderBox ) {
- // border-box includes padding, so remove it if we want content
- if ( extra === "content" ) {
- val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
- }
-
- // at this point, extra isn't border nor margin, so remove border
- if ( extra !== "margin" ) {
- val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
- }
- } else {
- // at this point, extra isn't content, so add padding
- val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
-
- // at this point, extra isn't content nor padding, so add border
- if ( extra !== "padding" ) {
- val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
- }
- }
- }
-
- return val;
-}
-
-function getWidthOrHeight( elem, name, extra ) {
-
- // Start with offset property, which is equivalent to the border-box value
- var valueIsBorderBox = true,
- val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
- styles = getStyles( elem ),
- isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
-
- // some non-html elements return undefined for offsetWidth, so check for null/undefined
- // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
- // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
- if ( val <= 0 || val == null ) {
- // Fall back to computed then uncomputed css if necessary
- val = curCSS( elem, name, styles );
- if ( val < 0 || val == null ) {
- val = elem.style[ name ];
- }
-
- // Computed unit is not pixels. Stop here and return.
- if ( rnumnonpx.test(val) ) {
- return val;
- }
-
- // we need the check for style in case a browser which returns unreliable values
- // for getComputedStyle silently falls back to the reliable elem.style
- valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] );
-
- // Normalize "", auto, and prepare for extra
- val = parseFloat( val ) || 0;
- }
-
- // use the active box-sizing model to add/subtract irrelevant styles
- return ( val +
- augmentWidthOrHeight(
- elem,
- name,
- extra || ( isBorderBox ? "border" : "content" ),
- valueIsBorderBox,
- styles
- )
- ) + "px";
-}
-
-// Try to determine the default display value of an element
-function css_defaultDisplay( nodeName ) {
- var doc = document,
- display = elemdisplay[ nodeName ];
-
- if ( !display ) {
- display = actualDisplay( nodeName, doc );
-
- // If the simple way fails, read from inside an iframe
- if ( display === "none" || !display ) {
- // Use the already-created iframe if possible
- iframe = ( iframe ||
- jQuery("<iframe frameborder='0' width='0' height='0'/>")
- .css( "cssText", "display:block !important" )
- ).appendTo( doc.documentElement );
-
- // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
- doc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document;
- doc.write("<!doctype html><html><body>");
- doc.close();
-
- display = actualDisplay( nodeName, doc );
- iframe.detach();
- }
-
- // Store the correct default display
- elemdisplay[ nodeName ] = display;
- }
-
- return display;
-}
-
-// Called ONLY from within css_defaultDisplay
-function actualDisplay( name, doc ) {
- var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
- display = jQuery.css( elem[0], "display" );
- elem.remove();
- return display;
-}
-
-jQuery.each([ "height", "width" ], function( i, name ) {
- jQuery.cssHooks[ name ] = {
- get: function( elem, computed, extra ) {
- if ( computed ) {
- // certain elements can have dimension info if we invisibly show them
- // however, it must have a current display style that would benefit from this
- return elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, "display" ) ) ?
- jQuery.swap( elem, cssShow, function() {
- return getWidthOrHeight( elem, name, extra );
- }) :
- getWidthOrHeight( elem, name, extra );
- }
- },
-
- set: function( elem, value, extra ) {
- var styles = extra && getStyles( elem );
- return setPositiveNumber( elem, value, extra ?
- augmentWidthOrHeight(
- elem,
- name,
- extra,
- jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
- styles
- ) : 0
- );
- }
- };
-});
-
-if ( !jQuery.support.opacity ) {
- jQuery.cssHooks.opacity = {
- get: function( elem, computed ) {
- // IE uses filters for opacity
- return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
- ( 0.01 * parseFloat( RegExp.$1 ) ) + "" :
- computed ? "1" : "";
- },
-
- set: function( elem, value ) {
- var style = elem.style,
- currentStyle = elem.currentStyle,
- opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
- filter = currentStyle && currentStyle.filter || style.filter || "";
-
- // IE has trouble with opacity if it does not have layout
- // Force it by setting the zoom level
- style.zoom = 1;
-
- // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
- // if value === "", then remove inline opacity #12685
- if ( ( value >= 1 || value === "" ) &&
- jQuery.trim( filter.replace( ralpha, "" ) ) === "" &&
- style.removeAttribute ) {
-
- // Setting style.filter to null, "" & " " still leave "filter:" in the cssText
- // if "filter:" is present at all, clearType is disabled, we want to avoid this
- // style.removeAttribute is IE Only, but so apparently is this code path...
- style.removeAttribute( "filter" );
-
- // if there is no filter style applied in a css rule or unset inline opacity, we are done
- if ( value === "" || currentStyle && !currentStyle.filter ) {
- return;
- }
- }
-
- // otherwise, set new filter values
- style.filter = ralpha.test( filter ) ?
- filter.replace( ralpha, opacity ) :
- filter + " " + opacity;
- }
- };
-}
-
-// These hooks cannot be added until DOM ready because the support test
-// for it is not run until after DOM ready
-jQuery(function() {
- if ( !jQuery.support.reliableMarginRight ) {
- jQuery.cssHooks.marginRight = {
- get: function( elem, computed ) {
- if ( computed ) {
- // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
- // Work around by temporarily setting element display to inline-block
- return jQuery.swap( elem, { "display": "inline-block" },
- curCSS, [ elem, "marginRight" ] );
- }
- }
- };
- }
-
- // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
- // getComputedStyle returns percent when specified for top/left/bottom/right
- // rather than make the css module depend on the offset module, we just check for it here
- if ( !jQuery.support.pixelPosition && jQuery.fn.position ) {
- jQuery.each( [ "top", "left" ], function( i, prop ) {
- jQuery.cssHooks[ prop ] = {
- get: function( elem, computed ) {
- if ( computed ) {
- computed = curCSS( elem, prop );
- // if curCSS returns percentage, fallback to offset
- return rnumnonpx.test( computed ) ?
- jQuery( elem ).position()[ prop ] + "px" :
- computed;
- }
- }
- };
- });
- }
-
-});
-
-if ( jQuery.expr && jQuery.expr.filters ) {
- jQuery.expr.filters.hidden = function( elem ) {
- // Support: Opera <= 12.12
- // Opera reports offsetWidths and offsetHeights less than zero on some elements
- return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 ||
- (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
- };
-
- jQuery.expr.filters.visible = function( elem ) {
- return !jQuery.expr.filters.hidden( elem );
- };
-}
-
-// These hooks are used by animate to expand properties
-jQuery.each({
- margin: "",
- padding: "",
- border: "Width"
-}, function( prefix, suffix ) {
- jQuery.cssHooks[ prefix + suffix ] = {
- expand: function( value ) {
- var i = 0,
- expanded = {},
-
- // assumes a single number if not a string
- parts = typeof value === "string" ? value.split(" ") : [ value ];
-
- for ( ; i < 4; i++ ) {
- expanded[ prefix + cssExpand[ i ] + suffix ] =
- parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
- }
-
- return expanded;
- }
- };
-
- if ( !rmargin.test( prefix ) ) {
- jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
- }
-});
-var r20 = /%20/g,
- rbracket = /\[\]$/,
- rCRLF = /\r?\n/g,
- rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
- rsubmittable = /^(?:input|select|textarea|keygen)/i;
-
-jQuery.fn.extend({
- serialize: function() {
- return jQuery.param( this.serializeArray() );
- },
- serializeArray: function() {
- return this.map(function(){
- // Can add propHook for "elements" to filter or add form elements
- var elements = jQuery.prop( this, "elements" );
- return elements ? jQuery.makeArray( elements ) : this;
- })
- .filter(function(){
- var type = this.type;
- // Use .is(":disabled") so that fieldset[disabled] works
- return this.name && !jQuery( this ).is( ":disabled" ) &&
- rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
- ( this.checked || !manipulation_rcheckableType.test( type ) );
- })
- .map(function( i, elem ){
- var val = jQuery( this ).val();
-
- return val == null ?
- null :
- jQuery.isArray( val ) ?
- jQuery.map( val, function( val ){
- return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
- }) :
- { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
- }).get();
- }
-});
-
-//Serialize an array of form elements or a set of
-//key/values into a query string
-jQuery.param = function( a, traditional ) {
- var prefix,
- s = [],
- add = function( key, value ) {
- // If value is a function, invoke it and return its value
- value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
- s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
- };
-
- // Set traditional to true for jQuery <= 1.3.2 behavior.
- if ( traditional === undefined ) {
- traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
- }
-
- // If an array was passed in, assume that it is an array of form elements.
- if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
- // Serialize the form elements
- jQuery.each( a, function() {
- add( this.name, this.value );
- });
-
- } else {
- // If traditional, encode the "old" way (the way 1.3.2 or older
- // did it), otherwise encode params recursively.
- for ( prefix in a ) {
- buildParams( prefix, a[ prefix ], traditional, add );
- }
- }
-
- // Return the resulting serialization
- return s.join( "&" ).replace( r20, "+" );
-};
-
-function buildParams( prefix, obj, traditional, add ) {
- var name;
-
- if ( jQuery.isArray( obj ) ) {
- // Serialize array item.
- jQuery.each( obj, function( i, v ) {
- if ( traditional || rbracket.test( prefix ) ) {
- // Treat each array item as a scalar.
- add( prefix, v );
-
- } else {
- // Item is non-scalar (array or object), encode its numeric index.
- buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
- }
- });
-
- } else if ( !traditional && jQuery.type( obj ) === "object" ) {
- // Serialize object item.
- for ( name in obj ) {
- buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
- }
-
- } else {
- // Serialize scalar item.
- add( prefix, obj );
- }
-}
-jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
- "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
- "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
-
- // Handle event binding
- jQuery.fn[ name ] = function( data, fn ) {
- return arguments.length > 0 ?
- this.on( name, null, data, fn ) :
- this.trigger( name );
- };
-});
-
-jQuery.fn.extend({
- hover: function( fnOver, fnOut ) {
- return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
- },
-
- bind: function( types, data, fn ) {
- return this.on( types, null, data, fn );
- },
- unbind: function( types, fn ) {
- return this.off( types, null, fn );
- },
-
- delegate: function( selector, types, data, fn ) {
- return this.on( types, selector, data, fn );
- },
- undelegate: function( selector, types, fn ) {
- // ( namespace ) or ( selector, types [, fn] )
- return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
- }
-});
-var
- // Document location
- ajaxLocParts,
- ajaxLocation,
- ajax_nonce = jQuery.now(),
-
- ajax_rquery = /\?/,
- rhash = /#.*$/,
- rts = /([?&])_=[^&]*/,
- rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
- // #7653, #8125, #8152: local protocol detection
- rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
- rnoContent = /^(?:GET|HEAD)$/,
- rprotocol = /^\/\//,
- rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
-
- // Keep a copy of the old load method
- _load = jQuery.fn.load,
-
- /* Prefilters
- * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
- * 2) These are called:
- * - BEFORE asking for a transport
- * - AFTER param serialization (s.data is a string if s.processData is true)
- * 3) key is the dataType
- * 4) the catchall symbol "*" can be used
- * 5) execution will start with transport dataType and THEN continue down to "*" if needed
- */
- prefilters = {},
-
- /* Transports bindings
- * 1) key is the dataType
- * 2) the catchall symbol "*" can be used
- * 3) selection will start with transport dataType and THEN go to "*" if needed
- */
- transports = {},
-
- // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
- allTypes = "*/".concat("*");
-
-// #8138, IE may throw an exception when accessing
-// a field from window.location if document.domain has been set
-try {
- ajaxLocation = location.href;
-} catch( e ) {
- // Use the href attribute of an A element
- // since IE will modify it given document.location
- ajaxLocation = document.createElement( "a" );
- ajaxLocation.href = "";
- ajaxLocation = ajaxLocation.href;
-}
-
-// Segment location into parts
-ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
-
-// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
-function addToPrefiltersOrTransports( structure ) {
-
- // dataTypeExpression is optional and defaults to "*"
- return function( dataTypeExpression, func ) {
-
- if ( typeof dataTypeExpression !== "string" ) {
- func = dataTypeExpression;
- dataTypeExpression = "*";
- }
-
- var dataType,
- i = 0,
- dataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || [];
-
- if ( jQuery.isFunction( func ) ) {
- // For each dataType in the dataTypeExpression
- while ( (dataType = dataTypes[i++]) ) {
- // Prepend if requested
- if ( dataType[0] === "+" ) {
- dataType = dataType.slice( 1 ) || "*";
- (structure[ dataType ] = structure[ dataType ] || []).unshift( func );
-
- // Otherwise append
- } else {
- (structure[ dataType ] = structure[ dataType ] || []).push( func );
- }
- }
- }
- };
-}
-
-// Base inspection function for prefilters and transports
-function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
-
- var inspected = {},
- seekingTransport = ( structure === transports );
-
- function inspect( dataType ) {
- var selected;
- inspected[ dataType ] = true;
- jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
- var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
- if( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
- options.dataTypes.unshift( dataTypeOrTransport );
- inspect( dataTypeOrTransport );
- return false;
- } else if ( seekingTransport ) {
- return !( selected = dataTypeOrTransport );
- }
- });
- return selected;
- }
-
- return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
-}
-
-// A special extend for ajax options
-// that takes "flat" options (not to be deep extended)
-// Fixes #9887
-function ajaxExtend( target, src ) {
- var deep, key,
- flatOptions = jQuery.ajaxSettings.flatOptions || {};
-
- for ( key in src ) {
- if ( src[ key ] !== undefined ) {
- ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];
- }
- }
- if ( deep ) {
- jQuery.extend( true, target, deep );
- }
-
- return target;
-}
-
-jQuery.fn.load = function( url, params, callback ) {
- if ( typeof url !== "string" && _load ) {
- return _load.apply( this, arguments );
- }
-
- var selector, response, type,
- self = this,
- off = url.indexOf(" ");
-
- if ( off >= 0 ) {
- selector = url.slice( off, url.length );
- url = url.slice( 0, off );
- }
-
- // If it's a function
- if ( jQuery.isFunction( params ) ) {
-
- // We assume that it's the callback
- callback = params;
- params = undefined;
-
- // Otherwise, build a param string
- } else if ( params && typeof params === "object" ) {
- type = "POST";
- }
-
- // If we have elements to modify, make the request
- if ( self.length > 0 ) {
- jQuery.ajax({
- url: url,
-
- // if "type" variable is undefined, then "GET" method will be used
- type: type,
- dataType: "html",
- data: params
- }).done(function( responseText ) {
-
- // Save response for use in complete callback
- response = arguments;
-
- self.html( selector ?
-
- // If a selector was specified, locate the right elements in a dummy div
- // Exclude scripts to avoid IE 'Permission Denied' errors
- jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) :
-
- // Otherwise use the full result
- responseText );
-
- }).complete( callback && function( jqXHR, status ) {
- self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
- });
- }
-
- return this;
-};
-
-// Attach a bunch of functions for handling common AJAX events
-jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ){
- jQuery.fn[ type ] = function( fn ){
- return this.on( type, fn );
- };
-});
-
-jQuery.extend({
-
- // Counter for holding the number of active queries
- active: 0,
-
- // Last-Modified header cache for next request
- lastModified: {},
- etag: {},
-
- ajaxSettings: {
- url: ajaxLocation,
- type: "GET",
- isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
- global: true,
- processData: true,
- async: true,
- contentType: "application/x-www-form-urlencoded; charset=UTF-8",
- /*
- timeout: 0,
- data: null,
- dataType: null,
- username: null,
- password: null,
- cache: null,
- throws: false,
- traditional: false,
- headers: {},
- */
-
- accepts: {
- "*": allTypes,
- text: "text/plain",
- html: "text/html",
- xml: "application/xml, text/xml",
- json: "application/json, text/javascript"
- },
-
- contents: {
- xml: /xml/,
- html: /html/,
- json: /json/
- },
-
- responseFields: {
- xml: "responseXML",
- text: "responseText",
- json: "responseJSON"
- },
-
- // Data converters
- // Keys separate source (or catchall "*") and destination types with a single space
- converters: {
-
- // Convert anything to text
- "* text": String,
-
- // Text to html (true = no transformation)
- "text html": true,
-
- // Evaluate text as a json expression
- "text json": jQuery.parseJSON,
-
- // Parse text as xml
- "text xml": jQuery.parseXML
- },
-
- // For options that shouldn't be deep extended:
- // you can add your own custom options here if
- // and when you create one that shouldn't be
- // deep extended (see ajaxExtend)
- flatOptions: {
- url: true,
- context: true
- }
- },
-
- // Creates a full fledged settings object into target
- // with both ajaxSettings and settings fields.
- // If target is omitted, writes into ajaxSettings.
- ajaxSetup: function( target, settings ) {
- return settings ?
-
- // Building a settings object
- ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
-
- // Extending ajaxSettings
- ajaxExtend( jQuery.ajaxSettings, target );
- },
-
- ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
- ajaxTransport: addToPrefiltersOrTransports( transports ),
-
- // Main method
- ajax: function( url, options ) {
-
- // If url is an object, simulate pre-1.5 signature
- if ( typeof url === "object" ) {
- options = url;
- url = undefined;
- }
-
- // Force options to be an object
- options = options || {};
-
- var // Cross-domain detection vars
- parts,
- // Loop variable
- i,
- // URL without anti-cache param
- cacheURL,
- // Response headers as string
- responseHeadersString,
- // timeout handle
- timeoutTimer,
-
- // To know if global events are to be dispatched
- fireGlobals,
-
- transport,
- // Response headers
- responseHeaders,
- // Create the final options object
- s = jQuery.ajaxSetup( {}, options ),
- // Callbacks context
- callbackContext = s.context || s,
- // Context for global events is callbackContext if it is a DOM node or jQuery collection
- globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?
- jQuery( callbackContext ) :
- jQuery.event,
- // Deferreds
- deferred = jQuery.Deferred(),
- completeDeferred = jQuery.Callbacks("once memory"),
- // Status-dependent callbacks
- statusCode = s.statusCode || {},
- // Headers (they are sent all at once)
- requestHeaders = {},
- requestHeadersNames = {},
- // The jqXHR state
- state = 0,
- // Default abort message
- strAbort = "canceled",
- // Fake xhr
- jqXHR = {
- readyState: 0,
-
- // Builds headers hashtable if needed
- getResponseHeader: function( key ) {
- var match;
- if ( state === 2 ) {
- if ( !responseHeaders ) {
- responseHeaders = {};
- while ( (match = rheaders.exec( responseHeadersString )) ) {
- responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
- }
- }
- match = responseHeaders[ key.toLowerCase() ];
- }
- return match == null ? null : match;
- },
-
- // Raw string
- getAllResponseHeaders: function() {
- return state === 2 ? responseHeadersString : null;
- },
-
- // Caches the header
- setRequestHeader: function( name, value ) {
- var lname = name.toLowerCase();
- if ( !state ) {
- name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
- requestHeaders[ name ] = value;
- }
- return this;
- },
-
- // Overrides response content-type header
- overrideMimeType: function( type ) {
- if ( !state ) {
- s.mimeType = type;
- }
- return this;
- },
-
- // Status-dependent callbacks
- statusCode: function( map ) {
- var code;
- if ( map ) {
- if ( state < 2 ) {
- for ( code in map ) {
- // Lazy-add the new callback in a way that preserves old ones
- statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
- }
- } else {
- // Execute the appropriate callbacks
- jqXHR.always( map[ jqXHR.status ] );
- }
- }
- return this;
- },
-
- // Cancel the request
- abort: function( statusText ) {
- var finalText = statusText || strAbort;
- if ( transport ) {
- transport.abort( finalText );
- }
- done( 0, finalText );
- return this;
- }
- };
-
- // Attach deferreds
- deferred.promise( jqXHR ).complete = completeDeferred.add;
- jqXHR.success = jqXHR.done;
- jqXHR.error = jqXHR.fail;
-
- // Remove hash character (#7531: and string promotion)
- // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
- // Handle falsy url in the settings object (#10093: consistency with old signature)
- // We also use the url parameter if available
- s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
-
- // Alias method option to type as per ticket #12004
- s.type = options.method || options.type || s.method || s.type;
-
- // Extract dataTypes list
- s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( core_rnotwhite ) || [""];
-
- // A cross-domain request is in order when we have a protocol:host:port mismatch
- if ( s.crossDomain == null ) {
- parts = rurl.exec( s.url.toLowerCase() );
- s.crossDomain = !!( parts &&
- ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
- ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==
- ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) )
- );
- }
-
- // Convert data if not already a string
- if ( s.data && s.processData && typeof s.data !== "string" ) {
- s.data = jQuery.param( s.data, s.traditional );
- }
-
- // Apply prefilters
- inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
-
- // If request was aborted inside a prefilter, stop there
- if ( state === 2 ) {
- return jqXHR;
- }
-
- // We can fire global events as of now if asked to
- fireGlobals = s.global;
-
- // Watch for a new set of requests
- if ( fireGlobals && jQuery.active++ === 0 ) {
- jQuery.event.trigger("ajaxStart");
- }
-
- // Uppercase the type
- s.type = s.type.toUpperCase();
-
- // Determine if request has content
- s.hasContent = !rnoContent.test( s.type );
-
- // Save the URL in case we're toying with the If-Modified-Since
- // and/or If-None-Match header later on
- cacheURL = s.url;
-
- // More options handling for requests with no content
- if ( !s.hasContent ) {
-
- // If data is available, append data to url
- if ( s.data ) {
- cacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
- // #9682: remove data so that it's not used in an eventual retry
- delete s.data;
- }
-
- // Add anti-cache in url if needed
- if ( s.cache === false ) {
- s.url = rts.test( cacheURL ) ?
-
- // If there is already a '_' parameter, set its value
- cacheURL.replace( rts, "$1_=" + ajax_nonce++ ) :
-
- // Otherwise add one to the end
- cacheURL + ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ajax_nonce++;
- }
- }
-
- // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
- if ( s.ifModified ) {
- if ( jQuery.lastModified[ cacheURL ] ) {
- jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
- }
- if ( jQuery.etag[ cacheURL ] ) {
- jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
- }
- }
-
- // Set the correct header, if data is being sent
- if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
- jqXHR.setRequestHeader( "Content-Type", s.contentType );
- }
-
- // Set the Accepts header for the server, depending on the dataType
- jqXHR.setRequestHeader(
- "Accept",
- s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
- s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
- s.accepts[ "*" ]
- );
-
- // Check for headers option
- for ( i in s.headers ) {
- jqXHR.setRequestHeader( i, s.headers[ i ] );
- }
-
- // Allow custom headers/mimetypes and early abort
- if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
- // Abort if not done already and return
- return jqXHR.abort();
- }
-
- // aborting is no longer a cancellation
- strAbort = "abort";
-
- // Install callbacks on deferreds
- for ( i in { success: 1, error: 1, complete: 1 } ) {
- jqXHR[ i ]( s[ i ] );
- }
-
- // Get transport
- transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
-
- // If no transport, we auto-abort
- if ( !transport ) {
- done( -1, "No Transport" );
- } else {
- jqXHR.readyState = 1;
-
- // Send global event
- if ( fireGlobals ) {
- globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
- }
- // Timeout
- if ( s.async && s.timeout > 0 ) {
- timeoutTimer = setTimeout(function() {
- jqXHR.abort("timeout");
- }, s.timeout );
- }
-
- try {
- state = 1;
- transport.send( requestHeaders, done );
- } catch ( e ) {
- // Propagate exception as error if not done
- if ( state < 2 ) {
- done( -1, e );
- // Simply rethrow otherwise
- } else {
- throw e;
- }
- }
- }
-
- // Callback for when everything is done
- function done( status, nativeStatusText, responses, headers ) {
- var isSuccess, success, error, response, modified,
- statusText = nativeStatusText;
-
- // Called once
- if ( state === 2 ) {
- return;
- }
-
- // State is "done" now
- state = 2;
-
- // Clear timeout if it exists
- if ( timeoutTimer ) {
- clearTimeout( timeoutTimer );
- }
-
- // Dereference transport for early garbage collection
- // (no matter how long the jqXHR object will be used)
- transport = undefined;
-
- // Cache response headers
- responseHeadersString = headers || "";
-
- // Set readyState
- jqXHR.readyState = status > 0 ? 4 : 0;
-
- // Determine if successful
- isSuccess = status >= 200 && status < 300 || status === 304;
-
- // Get response data
- if ( responses ) {
- response = ajaxHandleResponses( s, jqXHR, responses );
- }
-
- // Convert no matter what (that way responseXXX fields are always set)
- response = ajaxConvert( s, response, jqXHR, isSuccess );
-
- // If successful, handle type chaining
- if ( isSuccess ) {
-
- // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
- if ( s.ifModified ) {
- modified = jqXHR.getResponseHeader("Last-Modified");
- if ( modified ) {
- jQuery.lastModified[ cacheURL ] = modified;
- }
- modified = jqXHR.getResponseHeader("etag");
- if ( modified ) {
- jQuery.etag[ cacheURL ] = modified;
- }
- }
-
- // if no content
- if ( status === 204 || s.type === "HEAD" ) {
- statusText = "nocontent";
-
- // if not modified
- } else if ( status === 304 ) {
- statusText = "notmodified";
-
- // If we have data, let's convert it
- } else {
- statusText = response.state;
- success = response.data;
- error = response.error;
- isSuccess = !error;
- }
- } else {
- // We extract error from statusText
- // then normalize statusText and status for non-aborts
- error = statusText;
- if ( status || !statusText ) {
- statusText = "error";
- if ( status < 0 ) {
- status = 0;
- }
- }
- }
-
- // Set data for the fake xhr object
- jqXHR.status = status;
- jqXHR.statusText = ( nativeStatusText || statusText ) + "";
-
- // Success/Error
- if ( isSuccess ) {
- deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
- } else {
- deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
- }
-
- // Status-dependent callbacks
- jqXHR.statusCode( statusCode );
- statusCode = undefined;
-
- if ( fireGlobals ) {
- globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
- [ jqXHR, s, isSuccess ? success : error ] );
- }
-
- // Complete
- completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
-
- if ( fireGlobals ) {
- globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
- // Handle the global AJAX counter
- if ( !( --jQuery.active ) ) {
- jQuery.event.trigger("ajaxStop");
- }
- }
- }
-
- return jqXHR;
- },
-
- getJSON: function( url, data, callback ) {
- return jQuery.get( url, data, callback, "json" );
- },
-
- getScript: function( url, callback ) {
- return jQuery.get( url, undefined, callback, "script" );
- }
-});
-
-jQuery.each( [ "get", "post" ], function( i, method ) {
- jQuery[ method ] = function( url, data, callback, type ) {
- // shift arguments if data argument was omitted
- if ( jQuery.isFunction( data ) ) {
- type = type || callback;
- callback = data;
- data = undefined;
- }
-
- return jQuery.ajax({
- url: url,
- type: method,
- dataType: type,
- data: data,
- success: callback
- });
- };
-});
-
-/* Handles responses to an ajax request:
- * - finds the right dataType (mediates between content-type and expected dataType)
- * - returns the corresponding response
- */
-function ajaxHandleResponses( s, jqXHR, responses ) {
- var firstDataType, ct, finalDataType, type,
- contents = s.contents,
- dataTypes = s.dataTypes;
-
- // Remove auto dataType and get content-type in the process
- while( dataTypes[ 0 ] === "*" ) {
- dataTypes.shift();
- if ( ct === undefined ) {
- ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
- }
- }
-
- // Check if we're dealing with a known content-type
- if ( ct ) {
- for ( type in contents ) {
- if ( contents[ type ] && contents[ type ].test( ct ) ) {
- dataTypes.unshift( type );
- break;
- }
- }
- }
-
- // Check to see if we have a response for the expected dataType
- if ( dataTypes[ 0 ] in responses ) {
- finalDataType = dataTypes[ 0 ];
- } else {
- // Try convertible dataTypes
- for ( type in responses ) {
- if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
- finalDataType = type;
- break;
- }
- if ( !firstDataType ) {
- firstDataType = type;
- }
- }
- // Or just use first one
- finalDataType = finalDataType || firstDataType;
- }
-
- // If we found a dataType
- // We add the dataType to the list if needed
- // and return the corresponding response
- if ( finalDataType ) {
- if ( finalDataType !== dataTypes[ 0 ] ) {
- dataTypes.unshift( finalDataType );
- }
- return responses[ finalDataType ];
- }
-}
-
-/* Chain conversions given the request and the original response
- * Also sets the responseXXX fields on the jqXHR instance
- */
-function ajaxConvert( s, response, jqXHR, isSuccess ) {
- var conv2, current, conv, tmp, prev,
- converters = {},
- // Work with a copy of dataTypes in case we need to modify it for conversion
- dataTypes = s.dataTypes.slice();
-
- // Create converters map with lowercased keys
- if ( dataTypes[ 1 ] ) {
- for ( conv in s.converters ) {
- converters[ conv.toLowerCase() ] = s.converters[ conv ];
- }
- }
-
- current = dataTypes.shift();
-
- // Convert to each sequential dataType
- while ( current ) {
-
- if ( s.responseFields[ current ] ) {
- jqXHR[ s.responseFields[ current ] ] = response;
- }
-
- // Apply the dataFilter if provided
- if ( !prev && isSuccess && s.dataFilter ) {
- response = s.dataFilter( response, s.dataType );
- }
-
- prev = current;
- current = dataTypes.shift();
-
- if ( current ) {
-
- // There's only work to do if current dataType is non-auto
- if ( current === "*" ) {
-
- current = prev;
-
- // Convert response if prev dataType is non-auto and differs from current
- } else if ( prev !== "*" && prev !== current ) {
-
- // Seek a direct converter
- conv = converters[ prev + " " + current ] || converters[ "* " + current ];
-
- // If none found, seek a pair
- if ( !conv ) {
- for ( conv2 in converters ) {
-
- // If conv2 outputs current
- tmp = conv2.split( " " );
- if ( tmp[ 1 ] === current ) {
-
- // If prev can be converted to accepted input
- conv = converters[ prev + " " + tmp[ 0 ] ] ||
- converters[ "* " + tmp[ 0 ] ];
- if ( conv ) {
- // Condense equivalence converters
- if ( conv === true ) {
- conv = converters[ conv2 ];
-
- // Otherwise, insert the intermediate dataType
- } else if ( converters[ conv2 ] !== true ) {
- current = tmp[ 0 ];
- dataTypes.unshift( tmp[ 1 ] );
- }
- break;
- }
- }
- }
- }
-
- // Apply converter (if not an equivalence)
- if ( conv !== true ) {
-
- // Unless errors are allowed to bubble, catch and return them
- if ( conv && s[ "throws" ] ) {
- response = conv( response );
- } else {
- try {
- response = conv( response );
- } catch ( e ) {
- return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
- }
- }
- }
- }
- }
- }
-
- return { state: "success", data: response };
-}
-// Install script dataType
-jQuery.ajaxSetup({
- accepts: {
- script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
- },
- contents: {
- script: /(?:java|ecma)script/
- },
- converters: {
- "text script": function( text ) {
- jQuery.globalEval( text );
- return text;
- }
- }
-});
-
-// Handle cache's special case and global
-jQuery.ajaxPrefilter( "script", function( s ) {
- if ( s.cache === undefined ) {
- s.cache = false;
- }
- if ( s.crossDomain ) {
- s.type = "GET";
- s.global = false;
- }
-});
-
-// Bind script tag hack transport
-jQuery.ajaxTransport( "script", function(s) {
-
- // This transport only deals with cross domain requests
- if ( s.crossDomain ) {
-
- var script,
- head = document.head || jQuery("head")[0] || document.documentElement;
-
- return {
-
- send: function( _, callback ) {
-
- script = document.createElement("script");
-
- script.async = true;
-
- if ( s.scriptCharset ) {
- script.charset = s.scriptCharset;
- }
-
- script.src = s.url;
-
- // Attach handlers for all browsers
- script.onload = script.onreadystatechange = function( _, isAbort ) {
-
- if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
-
- // Handle memory leak in IE
- script.onload = script.onreadystatechange = null;
-
- // Remove the script
- if ( script.parentNode ) {
- script.parentNode.removeChild( script );
- }
-
- // Dereference the script
- script = null;
-
- // Callback if not abort
- if ( !isAbort ) {
- callback( 200, "success" );
- }
- }
- };
-
- // Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending
- // Use native DOM manipulation to avoid our domManip AJAX trickery
- head.insertBefore( script, head.firstChild );
- },
-
- abort: function() {
- if ( script ) {
- script.onload( undefined, true );
- }
- }
- };
- }
-});
-var oldCallbacks = [],
- rjsonp = /(=)\?(?=&|$)|\?\?/;
-
-// Default jsonp settings
-jQuery.ajaxSetup({
- jsonp: "callback",
- jsonpCallback: function() {
- var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( ajax_nonce++ ) );
- this[ callback ] = true;
- return callback;
- }
-});
-
-// Detect, normalize options and install callbacks for jsonp requests
-jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
-
- var callbackName, overwritten, responseContainer,
- jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
- "url" :
- typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data"
- );
-
- // Handle iff the expected data type is "jsonp" or we have a parameter to set
- if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
-
- // Get callback name, remembering preexisting value associated with it
- callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
- s.jsonpCallback() :
- s.jsonpCallback;
-
- // Insert callback into url or form data
- if ( jsonProp ) {
- s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
- } else if ( s.jsonp !== false ) {
- s.url += ( ajax_rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
- }
-
- // Use data converter to retrieve json after script execution
- s.converters["script json"] = function() {
- if ( !responseContainer ) {
- jQuery.error( callbackName + " was not called" );
- }
- return responseContainer[ 0 ];
- };
-
- // force json dataType
- s.dataTypes[ 0 ] = "json";
-
- // Install callback
- overwritten = window[ callbackName ];
- window[ callbackName ] = function() {
- responseContainer = arguments;
- };
-
- // Clean-up function (fires after converters)
- jqXHR.always(function() {
- // Restore preexisting value
- window[ callbackName ] = overwritten;
-
- // Save back as free
- if ( s[ callbackName ] ) {
- // make sure that re-using the options doesn't screw things around
- s.jsonpCallback = originalSettings.jsonpCallback;
-
- // save the callback name for future use
- oldCallbacks.push( callbackName );
- }
-
- // Call if it was a function and we have a response
- if ( responseContainer && jQuery.isFunction( overwritten ) ) {
- overwritten( responseContainer[ 0 ] );
- }
-
- responseContainer = overwritten = undefined;
- });
-
- // Delegate to script
- return "script";
- }
-});
-var xhrCallbacks, xhrSupported,
- xhrId = 0,
- // #5280: Internet Explorer will keep connections alive if we don't abort on unload
- xhrOnUnloadAbort = window.ActiveXObject && function() {
- // Abort all pending requests
- var key;
- for ( key in xhrCallbacks ) {
- xhrCallbacks[ key ]( undefined, true );
- }
- };
-
-// Functions to create xhrs
-function createStandardXHR() {
- try {
- return new window.XMLHttpRequest();
- } catch( e ) {}
-}
-
-function createActiveXHR() {
- try {
- return new window.ActiveXObject("Microsoft.XMLHTTP");
- } catch( e ) {}
-}
-
-// Create the request object
-// (This is still attached to ajaxSettings for backward compatibility)
-jQuery.ajaxSettings.xhr = window.ActiveXObject ?
- /* Microsoft failed to properly
- * implement the XMLHttpRequest in IE7 (can't request local files),
- * so we use the ActiveXObject when it is available
- * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
- * we need a fallback.
- */
- function() {
- return !this.isLocal && createStandardXHR() || createActiveXHR();
- } :
- // For all other browsers, use the standard XMLHttpRequest object
- createStandardXHR;
-
-// Determine support properties
-xhrSupported = jQuery.ajaxSettings.xhr();
-jQuery.support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
-xhrSupported = jQuery.support.ajax = !!xhrSupported;
-
-// Create transport if the browser can provide an xhr
-if ( xhrSupported ) {
-
- jQuery.ajaxTransport(function( s ) {
- // Cross domain only allowed if supported through XMLHttpRequest
- if ( !s.crossDomain || jQuery.support.cors ) {
-
- var callback;
-
- return {
- send: function( headers, complete ) {
-
- // Get a new xhr
- var handle, i,
- xhr = s.xhr();
-
- // Open the socket
- // Passing null username, generates a login popup on Opera (#2865)
- if ( s.username ) {
- xhr.open( s.type, s.url, s.async, s.username, s.password );
- } else {
- xhr.open( s.type, s.url, s.async );
- }
-
- // Apply custom fields if provided
- if ( s.xhrFields ) {
- for ( i in s.xhrFields ) {
- xhr[ i ] = s.xhrFields[ i ];
- }
- }
-
- // Override mime type if needed
- if ( s.mimeType && xhr.overrideMimeType ) {
- xhr.overrideMimeType( s.mimeType );
- }
-
- // X-Requested-With header
- // For cross-domain requests, seeing as conditions for a preflight are
- // akin to a jigsaw puzzle, we simply never set it to be sure.
- // (it can always be set on a per-request basis or even using ajaxSetup)
- // For same-domain requests, won't change header if already provided.
- if ( !s.crossDomain && !headers["X-Requested-With"] ) {
- headers["X-Requested-With"] = "XMLHttpRequest";
- }
-
- // Need an extra try/catch for cross domain requests in Firefox 3
- try {
- for ( i in headers ) {
- xhr.setRequestHeader( i, headers[ i ] );
- }
- } catch( err ) {}
-
- // Do send the request
- // This may raise an exception which is actually
- // handled in jQuery.ajax (so no try/catch here)
- xhr.send( ( s.hasContent && s.data ) || null );
-
- // Listener
- callback = function( _, isAbort ) {
- var status, responseHeaders, statusText, responses;
-
- // Firefox throws exceptions when accessing properties
- // of an xhr when a network error occurred
- // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0…
- try {
-
- // Was never called and is aborted or complete
- if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
-
- // Only called once
- callback = undefined;
-
- // Do not keep as active anymore
- if ( handle ) {
- xhr.onreadystatechange = jQuery.noop;
- if ( xhrOnUnloadAbort ) {
- delete xhrCallbacks[ handle ];
- }
- }
-
- // If it's an abort
- if ( isAbort ) {
- // Abort it manually if needed
- if ( xhr.readyState !== 4 ) {
- xhr.abort();
- }
- } else {
- responses = {};
- status = xhr.status;
- responseHeaders = xhr.getAllResponseHeaders();
-
- // When requesting binary data, IE6-9 will throw an exception
- // on any attempt to access responseText (#11426)
- if ( typeof xhr.responseText === "string" ) {
- responses.text = xhr.responseText;
- }
-
- // Firefox throws an exception when accessing
- // statusText for faulty cross-domain requests
- try {
- statusText = xhr.statusText;
- } catch( e ) {
- // We normalize with Webkit giving an empty statusText
- statusText = "";
- }
-
- // Filter status for non standard behaviors
-
- // If the request is local and we have data: assume a success
- // (success with no data won't get notified, that's the best we
- // can do given current implementations)
- if ( !status && s.isLocal && !s.crossDomain ) {
- status = responses.text ? 200 : 404;
- // IE - #1450: sometimes returns 1223 when it should be 204
- } else if ( status === 1223 ) {
- status = 204;
- }
- }
- }
- } catch( firefoxAccessException ) {
- if ( !isAbort ) {
- complete( -1, firefoxAccessException );
- }
- }
-
- // Call complete if needed
- if ( responses ) {
- complete( status, statusText, responses, responseHeaders );
- }
- };
-
- if ( !s.async ) {
- // if we're in sync mode we fire the callback
- callback();
- } else if ( xhr.readyState === 4 ) {
- // (IE6 & IE7) if it's in cache and has been
- // retrieved directly we need to fire the callback
- setTimeout( callback );
- } else {
- handle = ++xhrId;
- if ( xhrOnUnloadAbort ) {
- // Create the active xhrs callbacks list if needed
- // and attach the unload handler
- if ( !xhrCallbacks ) {
- xhrCallbacks = {};
- jQuery( window ).unload( xhrOnUnloadAbort );
- }
- // Add to list of active xhrs callbacks
- xhrCallbacks[ handle ] = callback;
- }
- xhr.onreadystatechange = callback;
- }
- },
-
- abort: function() {
- if ( callback ) {
- callback( undefined, true );
- }
- }
- };
- }
- });
-}
-var fxNow, timerId,
- rfxtypes = /^(?:toggle|show|hide)$/,
- rfxnum = new RegExp( "^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i" ),
- rrun = /queueHooks$/,
- animationPrefilters = [ defaultPrefilter ],
- tweeners = {
- "*": [function( prop, value ) {
- var tween = this.createTween( prop, value ),
- target = tween.cur(),
- parts = rfxnum.exec( value ),
- unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
-
- // Starting value computation is required for potential unit mismatches
- start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) &&
- rfxnum.exec( jQuery.css( tween.elem, prop ) ),
- scale = 1,
- maxIterations = 20;
-
- if ( start && start[ 3 ] !== unit ) {
- // Trust units reported by jQuery.css
- unit = unit || start[ 3 ];
-
- // Make sure we update the tween properties later on
- parts = parts || [];
-
- // Iteratively approximate from a nonzero starting point
- start = +target || 1;
-
- do {
- // If previous iteration zeroed out, double until we get *something*
- // Use a string for doubling factor so we don't accidentally see scale as unchanged below
- scale = scale || ".5";
-
- // Adjust and apply
- start = start / scale;
- jQuery.style( tween.elem, prop, start + unit );
-
- // Update scale, tolerating zero or NaN from tween.cur()
- // And breaking the loop if scale is unchanged or perfect, or if we've just had enough
- } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
- }
-
- // Update tween properties
- if ( parts ) {
- start = tween.start = +start || +target || 0;
- tween.unit = unit;
- // If a +=/-= token was provided, we're doing a relative animation
- tween.end = parts[ 1 ] ?
- start + ( parts[ 1 ] + 1 ) * parts[ 2 ] :
- +parts[ 2 ];
- }
-
- return tween;
- }]
- };
-
-// Animations created synchronously will run synchronously
-function createFxNow() {
- setTimeout(function() {
- fxNow = undefined;
- });
- return ( fxNow = jQuery.now() );
-}
-
-function createTween( value, prop, animation ) {
- var tween,
- collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),
- index = 0,
- length = collection.length;
- for ( ; index < length; index++ ) {
- if ( (tween = collection[ index ].call( animation, prop, value )) ) {
-
- // we're done with this property
- return tween;
- }
- }
-}
-
-function Animation( elem, properties, options ) {
- var result,
- stopped,
- index = 0,
- length = animationPrefilters.length,
- deferred = jQuery.Deferred().always( function() {
- // don't match elem in the :animated selector
- delete tick.elem;
- }),
- tick = function() {
- if ( stopped ) {
- return false;
- }
- var currentTime = fxNow || createFxNow(),
- remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
- // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)
- temp = remaining / animation.duration || 0,
- percent = 1 - temp,
- index = 0,
- length = animation.tweens.length;
-
- for ( ; index < length ; index++ ) {
- animation.tweens[ index ].run( percent );
- }
-
- deferred.notifyWith( elem, [ animation, percent, remaining ]);
-
- if ( percent < 1 && length ) {
- return remaining;
- } else {
- deferred.resolveWith( elem, [ animation ] );
- return false;
- }
- },
- animation = deferred.promise({
- elem: elem,
- props: jQuery.extend( {}, properties ),
- opts: jQuery.extend( true, { specialEasing: {} }, options ),
- originalProperties: properties,
- originalOptions: options,
- startTime: fxNow || createFxNow(),
- duration: options.duration,
- tweens: [],
- createTween: function( prop, end ) {
- var tween = jQuery.Tween( elem, animation.opts, prop, end,
- animation.opts.specialEasing[ prop ] || animation.opts.easing );
- animation.tweens.push( tween );
- return tween;
- },
- stop: function( gotoEnd ) {
- var index = 0,
- // if we are going to the end, we want to run all the tweens
- // otherwise we skip this part
- length = gotoEnd ? animation.tweens.length : 0;
- if ( stopped ) {
- return this;
- }
- stopped = true;
- for ( ; index < length ; index++ ) {
- animation.tweens[ index ].run( 1 );
- }
-
- // resolve when we played the last frame
- // otherwise, reject
- if ( gotoEnd ) {
- deferred.resolveWith( elem, [ animation, gotoEnd ] );
- } else {
- deferred.rejectWith( elem, [ animation, gotoEnd ] );
- }
- return this;
- }
- }),
- props = animation.props;
-
- propFilter( props, animation.opts.specialEasing );
-
- for ( ; index < length ; index++ ) {
- result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );
- if ( result ) {
- return result;
- }
- }
-
- jQuery.map( props, createTween, animation );
-
- if ( jQuery.isFunction( animation.opts.start ) ) {
- animation.opts.start.call( elem, animation );
- }
-
- jQuery.fx.timer(
- jQuery.extend( tick, {
- elem: elem,
- anim: animation,
- queue: animation.opts.queue
- })
- );
-
- // attach callbacks from options
- return animation.progress( animation.opts.progress )
- .done( animation.opts.done, animation.opts.complete )
- .fail( animation.opts.fail )
- .always( animation.opts.always );
-}
-
-function propFilter( props, specialEasing ) {
- var index, name, easing, value, hooks;
-
- // camelCase, specialEasing and expand cssHook pass
- for ( index in props ) {
- name = jQuery.camelCase( index );
- easing = specialEasing[ name ];
- value = props[ index ];
- if ( jQuery.isArray( value ) ) {
- easing = value[ 1 ];
- value = props[ index ] = value[ 0 ];
- }
-
- if ( index !== name ) {
- props[ name ] = value;
- delete props[ index ];
- }
-
- hooks = jQuery.cssHooks[ name ];
- if ( hooks && "expand" in hooks ) {
- value = hooks.expand( value );
- delete props[ name ];
-
- // not quite $.extend, this wont overwrite keys already present.
- // also - reusing 'index' from above because we have the correct "name"
- for ( index in value ) {
- if ( !( index in props ) ) {
- props[ index ] = value[ index ];
- specialEasing[ index ] = easing;
- }
- }
- } else {
- specialEasing[ name ] = easing;
- }
- }
-}
-
-jQuery.Animation = jQuery.extend( Animation, {
-
- tweener: function( props, callback ) {
- if ( jQuery.isFunction( props ) ) {
- callback = props;
- props = [ "*" ];
- } else {
- props = props.split(" ");
- }
-
- var prop,
- index = 0,
- length = props.length;
-
- for ( ; index < length ; index++ ) {
- prop = props[ index ];
- tweeners[ prop ] = tweeners[ prop ] || [];
- tweeners[ prop ].unshift( callback );
- }
- },
-
- prefilter: function( callback, prepend ) {
- if ( prepend ) {
- animationPrefilters.unshift( callback );
- } else {
- animationPrefilters.push( callback );
- }
- }
-});
-
-function defaultPrefilter( elem, props, opts ) {
- /* jshint validthis: true */
- var prop, value, toggle, tween, hooks, oldfire,
- anim = this,
- orig = {},
- style = elem.style,
- hidden = elem.nodeType && isHidden( elem ),
- dataShow = jQuery._data( elem, "fxshow" );
-
- // handle queue: false promises
- if ( !opts.queue ) {
- hooks = jQuery._queueHooks( elem, "fx" );
- if ( hooks.unqueued == null ) {
- hooks.unqueued = 0;
- oldfire = hooks.empty.fire;
- hooks.empty.fire = function() {
- if ( !hooks.unqueued ) {
- oldfire();
- }
- };
- }
- hooks.unqueued++;
-
- anim.always(function() {
- // doing this makes sure that the complete handler will be called
- // before this completes
- anim.always(function() {
- hooks.unqueued--;
- if ( !jQuery.queue( elem, "fx" ).length ) {
- hooks.empty.fire();
- }
- });
- });
- }
-
- // height/width overflow pass
- if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
- // Make sure that nothing sneaks out
- // Record all 3 overflow attributes because IE does not
- // change the overflow attribute when overflowX and
- // overflowY are set to the same value
- opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
-
- // Set display property to inline-block for height/width
- // animations on inline elements that are having width/height animated
- if ( jQuery.css( elem, "display" ) === "inline" &&
- jQuery.css( elem, "float" ) === "none" ) {
-
- // inline-level elements accept inline-block;
- // block-level elements need to be inline with layout
- if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) {
- style.display = "inline-block";
-
- } else {
- style.zoom = 1;
- }
- }
- }
-
- if ( opts.overflow ) {
- style.overflow = "hidden";
- if ( !jQuery.support.shrinkWrapBlocks ) {
- anim.always(function() {
- style.overflow = opts.overflow[ 0 ];
- style.overflowX = opts.overflow[ 1 ];
- style.overflowY = opts.overflow[ 2 ];
- });
- }
- }
-
-
- // show/hide pass
- for ( prop in props ) {
- value = props[ prop ];
- if ( rfxtypes.exec( value ) ) {
- delete props[ prop ];
- toggle = toggle || value === "toggle";
- if ( value === ( hidden ? "hide" : "show" ) ) {
- continue;
- }
- orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
- }
- }
-
- if ( !jQuery.isEmptyObject( orig ) ) {
- if ( dataShow ) {
- if ( "hidden" in dataShow ) {
- hidden = dataShow.hidden;
- }
- } else {
- dataShow = jQuery._data( elem, "fxshow", {} );
- }
-
- // store state if its toggle - enables .stop().toggle() to "reverse"
- if ( toggle ) {
- dataShow.hidden = !hidden;
- }
- if ( hidden ) {
- jQuery( elem ).show();
- } else {
- anim.done(function() {
- jQuery( elem ).hide();
- });
- }
- anim.done(function() {
- var prop;
- jQuery._removeData( elem, "fxshow" );
- for ( prop in orig ) {
- jQuery.style( elem, prop, orig[ prop ] );
- }
- });
- for ( prop in orig ) {
- tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
-
- if ( !( prop in dataShow ) ) {
- dataShow[ prop ] = tween.start;
- if ( hidden ) {
- tween.end = tween.start;
- tween.start = prop === "width" || prop === "height" ? 1 : 0;
- }
- }
- }
- }
-}
-
-function Tween( elem, options, prop, end, easing ) {
- return new Tween.prototype.init( elem, options, prop, end, easing );
-}
-jQuery.Tween = Tween;
-
-Tween.prototype = {
- constructor: Tween,
- init: function( elem, options, prop, end, easing, unit ) {
- this.elem = elem;
- this.prop = prop;
- this.easing = easing || "swing";
- this.options = options;
- this.start = this.now = this.cur();
- this.end = end;
- this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
- },
- cur: function() {
- var hooks = Tween.propHooks[ this.prop ];
-
- return hooks && hooks.get ?
- hooks.get( this ) :
- Tween.propHooks._default.get( this );
- },
- run: function( percent ) {
- var eased,
- hooks = Tween.propHooks[ this.prop ];
-
- if ( this.options.duration ) {
- this.pos = eased = jQuery.easing[ this.easing ](
- percent, this.options.duration * percent, 0, 1, this.options.duration
- );
- } else {
- this.pos = eased = percent;
- }
- this.now = ( this.end - this.start ) * eased + this.start;
-
- if ( this.options.step ) {
- this.options.step.call( this.elem, this.now, this );
- }
-
- if ( hooks && hooks.set ) {
- hooks.set( this );
- } else {
- Tween.propHooks._default.set( this );
- }
- return this;
- }
-};
-
-Tween.prototype.init.prototype = Tween.prototype;
-
-Tween.propHooks = {
- _default: {
- get: function( tween ) {
- var result;
-
- if ( tween.elem[ tween.prop ] != null &&
- (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
- return tween.elem[ tween.prop ];
- }
-
- // passing an empty string as a 3rd parameter to .css will automatically
- // attempt a parseFloat and fallback to a string if the parse fails
- // so, simple values such as "10px" are parsed to Float.
- // complex values such as "rotate(1rad)" are returned as is.
- result = jQuery.css( tween.elem, tween.prop, "" );
- // Empty strings, null, undefined and "auto" are converted to 0.
- return !result || result === "auto" ? 0 : result;
- },
- set: function( tween ) {
- // use step hook for back compat - use cssHook if its there - use .style if its
- // available and use plain properties where available
- if ( jQuery.fx.step[ tween.prop ] ) {
- jQuery.fx.step[ tween.prop ]( tween );
- } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
- jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
- } else {
- tween.elem[ tween.prop ] = tween.now;
- }
- }
- }
-};
-
-// Support: IE <=9
-// Panic based approach to setting things on disconnected nodes
-
-Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
- set: function( tween ) {
- if ( tween.elem.nodeType && tween.elem.parentNode ) {
- tween.elem[ tween.prop ] = tween.now;
- }
- }
-};
-
-jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {
- var cssFn = jQuery.fn[ name ];
- jQuery.fn[ name ] = function( speed, easing, callback ) {
- return speed == null || typeof speed === "boolean" ?
- cssFn.apply( this, arguments ) :
- this.animate( genFx( name, true ), speed, easing, callback );
- };
-});
-
-jQuery.fn.extend({
- fadeTo: function( speed, to, easing, callback ) {
-
- // show any hidden elements after setting opacity to 0
- return this.filter( isHidden ).css( "opacity", 0 ).show()
-
- // animate to the value specified
- .end().animate({ opacity: to }, speed, easing, callback );
- },
- animate: function( prop, speed, easing, callback ) {
- var empty = jQuery.isEmptyObject( prop ),
- optall = jQuery.speed( speed, easing, callback ),
- doAnimation = function() {
- // Operate on a copy of prop so per-property easing won't be lost
- var anim = Animation( this, jQuery.extend( {}, prop ), optall );
-
- // Empty animations, or finishing resolves immediately
- if ( empty || jQuery._data( this, "finish" ) ) {
- anim.stop( true );
- }
- };
- doAnimation.finish = doAnimation;
-
- return empty || optall.queue === false ?
- this.each( doAnimation ) :
- this.queue( optall.queue, doAnimation );
- },
- stop: function( type, clearQueue, gotoEnd ) {
- var stopQueue = function( hooks ) {
- var stop = hooks.stop;
- delete hooks.stop;
- stop( gotoEnd );
- };
-
- if ( typeof type !== "string" ) {
- gotoEnd = clearQueue;
- clearQueue = type;
- type = undefined;
- }
- if ( clearQueue && type !== false ) {
- this.queue( type || "fx", [] );
- }
-
- return this.each(function() {
- var dequeue = true,
- index = type != null && type + "queueHooks",
- timers = jQuery.timers,
- data = jQuery._data( this );
-
- if ( index ) {
- if ( data[ index ] && data[ index ].stop ) {
- stopQueue( data[ index ] );
- }
- } else {
- for ( index in data ) {
- if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
- stopQueue( data[ index ] );
- }
- }
- }
-
- for ( index = timers.length; index--; ) {
- if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
- timers[ index ].anim.stop( gotoEnd );
- dequeue = false;
- timers.splice( index, 1 );
- }
- }
-
- // start the next in the queue if the last step wasn't forced
- // timers currently will call their complete callbacks, which will dequeue
- // but only if they were gotoEnd
- if ( dequeue || !gotoEnd ) {
- jQuery.dequeue( this, type );
- }
- });
- },
- finish: function( type ) {
- if ( type !== false ) {
- type = type || "fx";
- }
- return this.each(function() {
- var index,
- data = jQuery._data( this ),
- queue = data[ type + "queue" ],
- hooks = data[ type + "queueHooks" ],
- timers = jQuery.timers,
- length = queue ? queue.length : 0;
-
- // enable finishing flag on private data
- data.finish = true;
-
- // empty the queue first
- jQuery.queue( this, type, [] );
-
- if ( hooks && hooks.stop ) {
- hooks.stop.call( this, true );
- }
-
- // look for any active animations, and finish them
- for ( index = timers.length; index--; ) {
- if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
- timers[ index ].anim.stop( true );
- timers.splice( index, 1 );
- }
- }
-
- // look for any animations in the old queue and finish them
- for ( index = 0; index < length; index++ ) {
- if ( queue[ index ] && queue[ index ].finish ) {
- queue[ index ].finish.call( this );
- }
- }
-
- // turn off finishing flag
- delete data.finish;
- });
- }
-});
-
-// Generate parameters to create a standard animation
-function genFx( type, includeWidth ) {
- var which,
- attrs = { height: type },
- i = 0;
-
- // if we include width, step value is 1 to do all cssExpand values,
- // if we don't include width, step value is 2 to skip over Left and Right
- includeWidth = includeWidth? 1 : 0;
- for( ; i < 4 ; i += 2 - includeWidth ) {
- which = cssExpand[ i ];
- attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
- }
-
- if ( includeWidth ) {
- attrs.opacity = attrs.width = type;
- }
-
- return attrs;
-}
-
-// Generate shortcuts for custom animations
-jQuery.each({
- slideDown: genFx("show"),
- slideUp: genFx("hide"),
- slideToggle: genFx("toggle"),
- fadeIn: { opacity: "show" },
- fadeOut: { opacity: "hide" },
- fadeToggle: { opacity: "toggle" }
-}, function( name, props ) {
- jQuery.fn[ name ] = function( speed, easing, callback ) {
- return this.animate( props, speed, easing, callback );
- };
-});
-
-jQuery.speed = function( speed, easing, fn ) {
- var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
- complete: fn || !fn && easing ||
- jQuery.isFunction( speed ) && speed,
- duration: speed,
- easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
- };
-
- opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
- opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
-
- // normalize opt.queue - true/undefined/null -> "fx"
- if ( opt.queue == null || opt.queue === true ) {
- opt.queue = "fx";
- }
-
- // Queueing
- opt.old = opt.complete;
-
- opt.complete = function() {
- if ( jQuery.isFunction( opt.old ) ) {
- opt.old.call( this );
- }
-
- if ( opt.queue ) {
- jQuery.dequeue( this, opt.queue );
- }
- };
-
- return opt;
-};
-
-jQuery.easing = {
- linear: function( p ) {
- return p;
- },
- swing: function( p ) {
- return 0.5 - Math.cos( p*Math.PI ) / 2;
- }
-};
-
-jQuery.timers = [];
-jQuery.fx = Tween.prototype.init;
-jQuery.fx.tick = function() {
- var timer,
- timers = jQuery.timers,
- i = 0;
-
- fxNow = jQuery.now();
-
- for ( ; i < timers.length; i++ ) {
- timer = timers[ i ];
- // Checks the timer has not already been removed
- if ( !timer() && timers[ i ] === timer ) {
- timers.splice( i--, 1 );
- }
- }
-
- if ( !timers.length ) {
- jQuery.fx.stop();
- }
- fxNow = undefined;
-};
-
-jQuery.fx.timer = function( timer ) {
- if ( timer() && jQuery.timers.push( timer ) ) {
- jQuery.fx.start();
- }
-};
-
-jQuery.fx.interval = 13;
-
-jQuery.fx.start = function() {
- if ( !timerId ) {
- timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );
- }
-};
-
-jQuery.fx.stop = function() {
- clearInterval( timerId );
- timerId = null;
-};
-
-jQuery.fx.speeds = {
- slow: 600,
- fast: 200,
- // Default speed
- _default: 400
-};
-
-// Back Compat <1.8 extension point
-jQuery.fx.step = {};
-
-if ( jQuery.expr && jQuery.expr.filters ) {
- jQuery.expr.filters.animated = function( elem ) {
- return jQuery.grep(jQuery.timers, function( fn ) {
- return elem === fn.elem;
- }).length;
- };
-}
-jQuery.fn.offset = function( options ) {
- if ( arguments.length ) {
- return options === undefined ?
- this :
- this.each(function( i ) {
- jQuery.offset.setOffset( this, options, i );
- });
- }
-
- var docElem, win,
- box = { top: 0, left: 0 },
- elem = this[ 0 ],
- doc = elem && elem.ownerDocument;
-
- if ( !doc ) {
- return;
- }
-
- docElem = doc.documentElement;
-
- // Make sure it's not a disconnected DOM node
- if ( !jQuery.contains( docElem, elem ) ) {
- return box;
- }
-
- // If we don't have gBCR, just use 0,0 rather than error
- // BlackBerry 5, iOS 3 (original iPhone)
- if ( typeof elem.getBoundingClientRect !== core_strundefined ) {
- box = elem.getBoundingClientRect();
- }
- win = getWindow( doc );
- return {
- top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ),
- left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )
- };
-};
-
-jQuery.offset = {
-
- setOffset: function( elem, options, i ) {
- var position = jQuery.css( elem, "position" );
-
- // set position first, in-case top/left are set even on static elem
- if ( position === "static" ) {
- elem.style.position = "relative";
- }
-
- var curElem = jQuery( elem ),
- curOffset = curElem.offset(),
- curCSSTop = jQuery.css( elem, "top" ),
- curCSSLeft = jQuery.css( elem, "left" ),
- calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
- props = {}, curPosition = {}, curTop, curLeft;
-
- // need to be able to calculate position if either top or left is auto and position is either absolute or fixed
- if ( calculatePosition ) {
- curPosition = curElem.position();
- curTop = curPosition.top;
- curLeft = curPosition.left;
- } else {
- curTop = parseFloat( curCSSTop ) || 0;
- curLeft = parseFloat( curCSSLeft ) || 0;
- }
-
- if ( jQuery.isFunction( options ) ) {
- options = options.call( elem, i, curOffset );
- }
-
- if ( options.top != null ) {
- props.top = ( options.top - curOffset.top ) + curTop;
- }
- if ( options.left != null ) {
- props.left = ( options.left - curOffset.left ) + curLeft;
- }
-
- if ( "using" in options ) {
- options.using.call( elem, props );
- } else {
- curElem.css( props );
- }
- }
-};
-
-
-jQuery.fn.extend({
-
- position: function() {
- if ( !this[ 0 ] ) {
- return;
- }
-
- var offsetParent, offset,
- parentOffset = { top: 0, left: 0 },
- elem = this[ 0 ];
-
- // fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent
- if ( jQuery.css( elem, "position" ) === "fixed" ) {
- // we assume that getBoundingClientRect is available when computed position is fixed
- offset = elem.getBoundingClientRect();
- } else {
- // Get *real* offsetParent
- offsetParent = this.offsetParent();
-
- // Get correct offsets
- offset = this.offset();
- if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
- parentOffset = offsetParent.offset();
- }
-
- // Add offsetParent borders
- parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
- parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
- }
-
- // Subtract parent offsets and element margins
- // note: when an element has margin: auto the offsetLeft and marginLeft
- // are the same in Safari causing offset.left to incorrectly be 0
- return {
- top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
- left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true)
- };
- },
-
- offsetParent: function() {
- return this.map(function() {
- var offsetParent = this.offsetParent || docElem;
- while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position") === "static" ) ) {
- offsetParent = offsetParent.offsetParent;
- }
- return offsetParent || docElem;
- });
- }
-});
-
-
-// Create scrollLeft and scrollTop methods
-jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) {
- var top = /Y/.test( prop );
-
- jQuery.fn[ method ] = function( val ) {
- return jQuery.access( this, function( elem, method, val ) {
- var win = getWindow( elem );
-
- if ( val === undefined ) {
- return win ? (prop in win) ? win[ prop ] :
- win.document.documentElement[ method ] :
- elem[ method ];
- }
-
- if ( win ) {
- win.scrollTo(
- !top ? val : jQuery( win ).scrollLeft(),
- top ? val : jQuery( win ).scrollTop()
- );
-
- } else {
- elem[ method ] = val;
- }
- }, method, val, arguments.length, null );
- };
-});
-
-function getWindow( elem ) {
- return jQuery.isWindow( elem ) ?
- elem :
- elem.nodeType === 9 ?
- elem.defaultView || elem.parentWindow :
- false;
-}
-// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
-jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
- jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
- // margin is only for outerHeight, outerWidth
- jQuery.fn[ funcName ] = function( margin, value ) {
- var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
- extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
-
- return jQuery.access( this, function( elem, type, value ) {
- var doc;
-
- if ( jQuery.isWindow( elem ) ) {
- // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
- // isn't a whole lot we can do. See pull request at this URL for discussion:
- // https://github.com/jquery/jquery/pull/764
- return elem.document.documentElement[ "client" + name ];
- }
-
- // Get document width or height
- if ( elem.nodeType === 9 ) {
- doc = elem.documentElement;
-
- // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest
- // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.
- return Math.max(
- elem.body[ "scroll" + name ], doc[ "scroll" + name ],
- elem.body[ "offset" + name ], doc[ "offset" + name ],
- doc[ "client" + name ]
- );
- }
-
- return value === undefined ?
- // Get width or height on the element, requesting but not forcing parseFloat
- jQuery.css( elem, type, extra ) :
-
- // Set width or height on the element
- jQuery.style( elem, type, value, extra );
- }, type, chainable ? margin : undefined, chainable, null );
- };
- });
-});
-// Limit scope pollution from any deprecated API
-// (function() {
-
-// The number of elements contained in the matched element set
-jQuery.fn.size = function() {
- return this.length;
-};
-
-jQuery.fn.andSelf = jQuery.fn.addBack;
-
-// })();
-if ( typeof module === "object" && module && typeof module.exports === "object" ) {
- // Expose jQuery as module.exports in loaders that implement the Node
- // module pattern (including browserify). Do not create the global, since
- // the user will be storing it themselves locally, and globals are frowned
- // upon in the Node module world.
- module.exports = jQuery;
-} else {
- // Otherwise expose jQuery to the global object as usual
- window.jQuery = window.$ = jQuery;
-
- // Register as a named AMD module, since jQuery can be concatenated with other
- // files that may use define, but not via a proper concatenation script that
- // understands anonymous AMD modules. A named AMD is safest and most robust
- // way to register. Lowercase jquery is used because AMD module names are
- // derived from file names, and jQuery is normally delivered in a lowercase
- // file name. Do this after creating the global so that if an AMD module wants
- // to call noConflict to hide this version of jQuery, it will work.
- if ( typeof define === "function" && define.amd ) {
- define( "jquery", [], function () { return jQuery; } );
- }
-}
-
-})( window );
Added: sandbox/nuiton-js-jquery2/src/main/resources/nuiton-js-jquery/jquery-2.0.3.js
===================================================================
--- sandbox/nuiton-js-jquery2/src/main/resources/nuiton-js-jquery/jquery-2.0.3.js (rev 0)
+++ sandbox/nuiton-js-jquery2/src/main/resources/nuiton-js-jquery/jquery-2.0.3.js 2013-07-22 13:18:45 UTC (rev 179)
@@ -0,0 +1,8829 @@
+/*! %%Ignore-License
+ * jQuery JavaScript Library v2.0.3
+ * http://jquery.com/
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ *
+ * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2013-07-03T13:30Z
+ */
+(function( window, undefined ) {
+
+// Can't do this because several apps including ASP.NET trace
+// the stack via arguments.caller.callee and Firefox dies if
+// you try to trace through "use strict" call chains. (#13335)
+// Support: Firefox 18+
+//"use strict";
+var
+ // A central reference to the root jQuery(document)
+ rootjQuery,
+
+ // The deferred used on DOM ready
+ readyList,
+
+ // Support: IE9
+ // For `typeof xmlNode.method` instead of `xmlNode.method !== undefined`
+ core_strundefined = typeof undefined,
+
+ // Use the correct document accordingly with window argument (sandbox)
+ location = window.location,
+ document = window.document,
+ docElem = document.documentElement,
+
+ // Map over jQuery in case of overwrite
+ _jQuery = window.jQuery,
+
+ // Map over the $ in case of overwrite
+ _$ = window.$,
+
+ // [[Class]] -> type pairs
+ class2type = {},
+
+ // List of deleted data cache ids, so we can reuse them
+ core_deletedIds = [],
+
+ core_version = "2.0.3",
+
+ // Save a reference to some core methods
+ core_concat = core_deletedIds.concat,
+ core_push = core_deletedIds.push,
+ core_slice = core_deletedIds.slice,
+ core_indexOf = core_deletedIds.indexOf,
+ core_toString = class2type.toString,
+ core_hasOwn = class2type.hasOwnProperty,
+ core_trim = core_version.trim,
+
+ // Define a local copy of jQuery
+ jQuery = function( selector, context ) {
+ // The jQuery object is actually just the init constructor 'enhanced'
+ return new jQuery.fn.init( selector, context, rootjQuery );
+ },
+
+ // Used for matching numbers
+ core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
+
+ // Used for splitting on whitespace
+ core_rnotwhite = /\S+/g,
+
+ // A simple way to check for HTML strings
+ // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
+ // Strict HTML recognition (#11290: must start with <)
+ rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
+
+ // Match a standalone tag
+ rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
+
+ // Matches dashed string for camelizing
+ rmsPrefix = /^-ms-/,
+ rdashAlpha = /-([\da-z])/gi,
+
+ // Used by jQuery.camelCase as callback to replace()
+ fcamelCase = function( all, letter ) {
+ return letter.toUpperCase();
+ },
+
+ // The ready event handler and self cleanup method
+ completed = function() {
+ document.removeEventListener( "DOMContentLoaded", completed, false );
+ window.removeEventListener( "load", completed, false );
+ jQuery.ready();
+ };
+
+jQuery.fn = jQuery.prototype = {
+ // The current version of jQuery being used
+ jquery: core_version,
+
+ constructor: jQuery,
+ init: function( selector, context, rootjQuery ) {
+ var match, elem;
+
+ // HANDLE: $(""), $(null), $(undefined), $(false)
+ if ( !selector ) {
+ return this;
+ }
+
+ // Handle HTML strings
+ if ( typeof selector === "string" ) {
+ if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
+ // Assume that strings that start and end with <> are HTML and skip the regex check
+ match = [ null, selector, null ];
+
+ } else {
+ match = rquickExpr.exec( selector );
+ }
+
+ // Match html or make sure no context is specified for #id
+ if ( match && (match[1] || !context) ) {
+
+ // HANDLE: $(html) -> $(array)
+ if ( match[1] ) {
+ context = context instanceof jQuery ? context[0] : context;
+
+ // scripts is true for back-compat
+ jQuery.merge( this, jQuery.parseHTML(
+ match[1],
+ context && context.nodeType ? context.ownerDocument || context : document,
+ true
+ ) );
+
+ // HANDLE: $(html, props)
+ if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
+ for ( match in context ) {
+ // Properties of context are called as methods if possible
+ if ( jQuery.isFunction( this[ match ] ) ) {
+ this[ match ]( context[ match ] );
+
+ // ...and otherwise set as attributes
+ } else {
+ this.attr( match, context[ match ] );
+ }
+ }
+ }
+
+ return this;
+
+ // HANDLE: $(#id)
+ } else {
+ elem = document.getElementById( match[2] );
+
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ if ( elem && elem.parentNode ) {
+ // Inject the element directly into the jQuery object
+ this.length = 1;
+ this[0] = elem;
+ }
+
+ this.context = document;
+ this.selector = selector;
+ return this;
+ }
+
+ // HANDLE: $(expr, $(...))
+ } else if ( !context || context.jquery ) {
+ return ( context || rootjQuery ).find( selector );
+
+ // HANDLE: $(expr, context)
+ // (which is just equivalent to: $(context).find(expr)
+ } else {
+ return this.constructor( context ).find( selector );
+ }
+
+ // HANDLE: $(DOMElement)
+ } else if ( selector.nodeType ) {
+ this.context = this[0] = selector;
+ this.length = 1;
+ return this;
+
+ // HANDLE: $(function)
+ // Shortcut for document ready
+ } else if ( jQuery.isFunction( selector ) ) {
+ return rootjQuery.ready( selector );
+ }
+
+ if ( selector.selector !== undefined ) {
+ this.selector = selector.selector;
+ this.context = selector.context;
+ }
+
+ return jQuery.makeArray( selector, this );
+ },
+
+ // Start with an empty selector
+ selector: "",
+
+ // The default length of a jQuery object is 0
+ length: 0,
+
+ toArray: function() {
+ return core_slice.call( this );
+ },
+
+ // Get the Nth element in the matched element set OR
+ // Get the whole matched element set as a clean array
+ get: function( num ) {
+ return num == null ?
+
+ // Return a 'clean' array
+ this.toArray() :
+
+ // Return just the object
+ ( num < 0 ? this[ this.length + num ] : this[ num ] );
+ },
+
+ // Take an array of elements and push it onto the stack
+ // (returning the new matched element set)
+ pushStack: function( elems ) {
+
+ // Build a new jQuery matched element set
+ var ret = jQuery.merge( this.constructor(), elems );
+
+ // Add the old object onto the stack (as a reference)
+ ret.prevObject = this;
+ ret.context = this.context;
+
+ // Return the newly-formed element set
+ return ret;
+ },
+
+ // Execute a callback for every element in the matched set.
+ // (You can seed the arguments with an array of args, but this is
+ // only used internally.)
+ each: function( callback, args ) {
+ return jQuery.each( this, callback, args );
+ },
+
+ ready: function( fn ) {
+ // Add the callback
+ jQuery.ready.promise().done( fn );
+
+ return this;
+ },
+
+ slice: function() {
+ return this.pushStack( core_slice.apply( this, arguments ) );
+ },
+
+ first: function() {
+ return this.eq( 0 );
+ },
+
+ last: function() {
+ return this.eq( -1 );
+ },
+
+ eq: function( i ) {
+ var len = this.length,
+ j = +i + ( i < 0 ? len : 0 );
+ return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
+ },
+
+ map: function( callback ) {
+ return this.pushStack( jQuery.map(this, function( elem, i ) {
+ return callback.call( elem, i, elem );
+ }));
+ },
+
+ end: function() {
+ return this.prevObject || this.constructor(null);
+ },
+
+ // For internal use only.
+ // Behaves like an Array's method, not like a jQuery method.
+ push: core_push,
+ sort: [].sort,
+ splice: [].splice
+};
+
+// Give the init function the jQuery prototype for later instantiation
+jQuery.fn.init.prototype = jQuery.fn;
+
+jQuery.extend = jQuery.fn.extend = function() {
+ var options, name, src, copy, copyIsArray, clone,
+ target = arguments[0] || {},
+ i = 1,
+ length = arguments.length,
+ deep = false;
+
+ // Handle a deep copy situation
+ if ( typeof target === "boolean" ) {
+ deep = target;
+ target = arguments[1] || {};
+ // skip the boolean and the target
+ i = 2;
+ }
+
+ // Handle case when target is a string or something (possible in deep copy)
+ if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+ target = {};
+ }
+
+ // extend jQuery itself if only one argument is passed
+ if ( length === i ) {
+ target = this;
+ --i;
+ }
+
+ for ( ; i < length; i++ ) {
+ // Only deal with non-null/undefined values
+ if ( (options = arguments[ i ]) != null ) {
+ // Extend the base object
+ for ( name in options ) {
+ src = target[ name ];
+ copy = options[ name ];
+
+ // Prevent never-ending loop
+ if ( target === copy ) {
+ continue;
+ }
+
+ // Recurse if we're merging plain objects or arrays
+ if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+ if ( copyIsArray ) {
+ copyIsArray = false;
+ clone = src && jQuery.isArray(src) ? src : [];
+
+ } else {
+ clone = src && jQuery.isPlainObject(src) ? src : {};
+ }
+
+ // Never move original objects, clone them
+ target[ name ] = jQuery.extend( deep, clone, copy );
+
+ // Don't bring in undefined values
+ } else if ( copy !== undefined ) {
+ target[ name ] = copy;
+ }
+ }
+ }
+ }
+
+ // Return the modified object
+ return target;
+};
+
+jQuery.extend({
+ // Unique for each copy of jQuery on the page
+ expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ),
+
+ noConflict: function( deep ) {
+ if ( window.$ === jQuery ) {
+ window.$ = _$;
+ }
+
+ if ( deep && window.jQuery === jQuery ) {
+ window.jQuery = _jQuery;
+ }
+
+ return jQuery;
+ },
+
+ // Is the DOM ready to be used? Set to true once it occurs.
+ isReady: false,
+
+ // A counter to track how many items to wait for before
+ // the ready event fires. See #6781
+ readyWait: 1,
+
+ // Hold (or release) the ready event
+ holdReady: function( hold ) {
+ if ( hold ) {
+ jQuery.readyWait++;
+ } else {
+ jQuery.ready( true );
+ }
+ },
+
+ // Handle when the DOM is ready
+ ready: function( wait ) {
+
+ // Abort if there are pending holds or we're already ready
+ if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
+ return;
+ }
+
+ // Remember that the DOM is ready
+ jQuery.isReady = true;
+
+ // If a normal DOM Ready event fired, decrement, and wait if need be
+ if ( wait !== true && --jQuery.readyWait > 0 ) {
+ return;
+ }
+
+ // If there are functions bound, to execute
+ readyList.resolveWith( document, [ jQuery ] );
+
+ // Trigger any bound ready events
+ if ( jQuery.fn.trigger ) {
+ jQuery( document ).trigger("ready").off("ready");
+ }
+ },
+
+ // See test/unit/core.js for details concerning isFunction.
+ // Since version 1.3, DOM methods and functions like alert
+ // aren't supported. They return false on IE (#2968).
+ isFunction: function( obj ) {
+ return jQuery.type(obj) === "function";
+ },
+
+ isArray: Array.isArray,
+
+ isWindow: function( obj ) {
+ return obj != null && obj === obj.window;
+ },
+
+ isNumeric: function( obj ) {
+ return !isNaN( parseFloat(obj) ) && isFinite( obj );
+ },
+
+ type: function( obj ) {
+ if ( obj == null ) {
+ return String( obj );
+ }
+ // Support: Safari <= 5.1 (functionish RegExp)
+ return typeof obj === "object" || typeof obj === "function" ?
+ class2type[ core_toString.call(obj) ] || "object" :
+ typeof obj;
+ },
+
+ isPlainObject: function( obj ) {
+ // Not plain objects:
+ // - Any object or value whose internal [[Class]] property is not "[object Object]"
+ // - DOM nodes
+ // - window
+ if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+ return false;
+ }
+
+ // Support: Firefox <20
+ // The try/catch suppresses exceptions thrown when attempting to access
+ // the "constructor" property of certain host objects, ie. |window.location|
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=814622
+ try {
+ if ( obj.constructor &&
+ !core_hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) {
+ return false;
+ }
+ } catch ( e ) {
+ return false;
+ }
+
+ // If the function hasn't returned already, we're confident that
+ // |obj| is a plain object, created by {} or constructed with new Object
+ return true;
+ },
+
+ isEmptyObject: function( obj ) {
+ var name;
+ for ( name in obj ) {
+ return false;
+ }
+ return true;
+ },
+
+ error: function( msg ) {
+ throw new Error( msg );
+ },
+
+ // data: string of html
+ // context (optional): If specified, the fragment will be created in this context, defaults to document
+ // keepScripts (optional): If true, will include scripts passed in the html string
+ parseHTML: function( data, context, keepScripts ) {
+ if ( !data || typeof data !== "string" ) {
+ return null;
+ }
+ if ( typeof context === "boolean" ) {
+ keepScripts = context;
+ context = false;
+ }
+ context = context || document;
+
+ var parsed = rsingleTag.exec( data ),
+ scripts = !keepScripts && [];
+
+ // Single tag
+ if ( parsed ) {
+ return [ context.createElement( parsed[1] ) ];
+ }
+
+ parsed = jQuery.buildFragment( [ data ], context, scripts );
+
+ if ( scripts ) {
+ jQuery( scripts ).remove();
+ }
+
+ return jQuery.merge( [], parsed.childNodes );
+ },
+
+ parseJSON: JSON.parse,
+
+ // Cross-browser xml parsing
+ parseXML: function( data ) {
+ var xml, tmp;
+ if ( !data || typeof data !== "string" ) {
+ return null;
+ }
+
+ // Support: IE9
+ try {
+ tmp = new DOMParser();
+ xml = tmp.parseFromString( data , "text/xml" );
+ } catch ( e ) {
+ xml = undefined;
+ }
+
+ if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
+ jQuery.error( "Invalid XML: " + data );
+ }
+ return xml;
+ },
+
+ noop: function() {},
+
+ // Evaluates a script in a global context
+ globalEval: function( code ) {
+ var script,
+ indirect = eval;
+
+ code = jQuery.trim( code );
+
+ if ( code ) {
+ // If the code includes a valid, prologue position
+ // strict mode pragma, execute code by injecting a
+ // script tag into the document.
+ if ( code.indexOf("use strict") === 1 ) {
+ script = document.createElement("script");
+ script.text = code;
+ document.head.appendChild( script ).parentNode.removeChild( script );
+ } else {
+ // Otherwise, avoid the DOM node creation, insertion
+ // and removal by using an indirect global eval
+ indirect( code );
+ }
+ }
+ },
+
+ // Convert dashed to camelCase; used by the css and data modules
+ // Microsoft forgot to hump their vendor prefix (#9572)
+ camelCase: function( string ) {
+ return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+ },
+
+ nodeName: function( elem, name ) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
+ },
+
+ // args is for internal usage only
+ each: function( obj, callback, args ) {
+ var value,
+ i = 0,
+ length = obj.length,
+ isArray = isArraylike( obj );
+
+ if ( args ) {
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback.apply( obj[ i ], args );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( i in obj ) {
+ value = callback.apply( obj[ i ], args );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ }
+
+ // A special, fast, case for the most common use of each
+ } else {
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback.call( obj[ i ], i, obj[ i ] );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( i in obj ) {
+ value = callback.call( obj[ i ], i, obj[ i ] );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ }
+ }
+
+ return obj;
+ },
+
+ trim: function( text ) {
+ return text == null ? "" : core_trim.call( text );
+ },
+
+ // results is for internal usage only
+ makeArray: function( arr, results ) {
+ var ret = results || [];
+
+ if ( arr != null ) {
+ if ( isArraylike( Object(arr) ) ) {
+ jQuery.merge( ret,
+ typeof arr === "string" ?
+ [ arr ] : arr
+ );
+ } else {
+ core_push.call( ret, arr );
+ }
+ }
+
+ return ret;
+ },
+
+ inArray: function( elem, arr, i ) {
+ return arr == null ? -1 : core_indexOf.call( arr, elem, i );
+ },
+
+ merge: function( first, second ) {
+ var l = second.length,
+ i = first.length,
+ j = 0;
+
+ if ( typeof l === "number" ) {
+ for ( ; j < l; j++ ) {
+ first[ i++ ] = second[ j ];
+ }
+ } else {
+ while ( second[j] !== undefined ) {
+ first[ i++ ] = second[ j++ ];
+ }
+ }
+
+ first.length = i;
+
+ return first;
+ },
+
+ grep: function( elems, callback, inv ) {
+ var retVal,
+ ret = [],
+ i = 0,
+ length = elems.length;
+ inv = !!inv;
+
+ // Go through the array, only saving the items
+ // that pass the validator function
+ for ( ; i < length; i++ ) {
+ retVal = !!callback( elems[ i ], i );
+ if ( inv !== retVal ) {
+ ret.push( elems[ i ] );
+ }
+ }
+
+ return ret;
+ },
+
+ // arg is for internal usage only
+ map: function( elems, callback, arg ) {
+ var value,
+ i = 0,
+ length = elems.length,
+ isArray = isArraylike( elems ),
+ ret = [];
+
+ // Go through the array, translating each of the items to their
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret[ ret.length ] = value;
+ }
+ }
+
+ // Go through every key on the object,
+ } else {
+ for ( i in elems ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret[ ret.length ] = value;
+ }
+ }
+ }
+
+ // Flatten any nested arrays
+ return core_concat.apply( [], ret );
+ },
+
+ // A global GUID counter for objects
+ guid: 1,
+
+ // Bind a function to a context, optionally partially applying any
+ // arguments.
+ proxy: function( fn, context ) {
+ var tmp, args, proxy;
+
+ if ( typeof context === "string" ) {
+ tmp = fn[ context ];
+ context = fn;
+ fn = tmp;
+ }
+
+ // Quick check to determine if target is callable, in the spec
+ // this throws a TypeError, but we will just return undefined.
+ if ( !jQuery.isFunction( fn ) ) {
+ return undefined;
+ }
+
+ // Simulated bind
+ args = core_slice.call( arguments, 2 );
+ proxy = function() {
+ return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) );
+ };
+
+ // Set the guid of unique handler to the same of original handler, so it can be removed
+ proxy.guid = fn.guid = fn.guid || jQuery.guid++;
+
+ return proxy;
+ },
+
+ // Multifunctional method to get and set values of a collection
+ // The value/s can optionally be executed if it's a function
+ access: function( elems, fn, key, value, chainable, emptyGet, raw ) {
+ var i = 0,
+ length = elems.length,
+ bulk = key == null;
+
+ // Sets many values
+ if ( jQuery.type( key ) === "object" ) {
+ chainable = true;
+ for ( i in key ) {
+ jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
+ }
+
+ // Sets one value
+ } else if ( value !== undefined ) {
+ chainable = true;
+
+ if ( !jQuery.isFunction( value ) ) {
+ raw = true;
+ }
+
+ if ( bulk ) {
+ // Bulk operations run against the entire set
+ if ( raw ) {
+ fn.call( elems, value );
+ fn = null;
+
+ // ...except when executing function values
+ } else {
+ bulk = fn;
+ fn = function( elem, key, value ) {
+ return bulk.call( jQuery( elem ), value );
+ };
+ }
+ }
+
+ if ( fn ) {
+ for ( ; i < length; i++ ) {
+ fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
+ }
+ }
+ }
+
+ return chainable ?
+ elems :
+
+ // Gets
+ bulk ?
+ fn.call( elems ) :
+ length ? fn( elems[0], key ) : emptyGet;
+ },
+
+ now: Date.now,
+
+ // A method for quickly swapping in/out CSS properties to get correct calculations.
+ // Note: this method belongs to the css module but it's needed here for the support module.
+ // If support gets modularized, this method should be moved back to the css module.
+ swap: function( elem, options, callback, args ) {
+ var ret, name,
+ old = {};
+
+ // Remember the old values, and insert the new ones
+ for ( name in options ) {
+ old[ name ] = elem.style[ name ];
+ elem.style[ name ] = options[ name ];
+ }
+
+ ret = callback.apply( elem, args || [] );
+
+ // Revert the old values
+ for ( name in options ) {
+ elem.style[ name ] = old[ name ];
+ }
+
+ return ret;
+ }
+});
+
+jQuery.ready.promise = function( obj ) {
+ if ( !readyList ) {
+
+ readyList = jQuery.Deferred();
+
+ // Catch cases where $(document).ready() is called after the browser event has already occurred.
+ // we once tried to use readyState "interactive" here, but it caused issues like the one
+ // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
+ if ( document.readyState === "complete" ) {
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
+ setTimeout( jQuery.ready );
+
+ } else {
+
+ // Use the handy event callback
+ document.addEventListener( "DOMContentLoaded", completed, false );
+
+ // A fallback to window.onload, that will always work
+ window.addEventListener( "load", completed, false );
+ }
+ }
+ return readyList.promise( obj );
+};
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
+ class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+function isArraylike( obj ) {
+ var length = obj.length,
+ type = jQuery.type( obj );
+
+ if ( jQuery.isWindow( obj ) ) {
+ return false;
+ }
+
+ if ( obj.nodeType === 1 && length ) {
+ return true;
+ }
+
+ return type === "array" || type !== "function" &&
+ ( length === 0 ||
+ typeof length === "number" && length > 0 && ( length - 1 ) in obj );
+}
+
+// All jQuery objects should point back to these
+rootjQuery = jQuery(document);
+/*!
+ * Sizzle CSS Selector Engine v1.9.4-pre
+ * http://sizzlejs.com/
+ *
+ * Copyright 2013 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2013-06-03
+ */
+(function( window, undefined ) {
+
+var i,
+ support,
+ cachedruns,
+ Expr,
+ getText,
+ isXML,
+ compile,
+ outermostContext,
+ sortInput,
+
+ // Local document vars
+ setDocument,
+ document,
+ docElem,
+ documentIsHTML,
+ rbuggyQSA,
+ rbuggyMatches,
+ matches,
+ contains,
+
+ // Instance-specific data
+ expando = "sizzle" + -(new Date()),
+ preferredDoc = window.document,
+ dirruns = 0,
+ done = 0,
+ classCache = createCache(),
+ tokenCache = createCache(),
+ compilerCache = createCache(),
+ hasDuplicate = false,
+ sortOrder = function( a, b ) {
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+ return 0;
+ },
+
+ // General-purpose constants
+ strundefined = typeof undefined,
+ MAX_NEGATIVE = 1 << 31,
+
+ // Instance methods
+ hasOwn = ({}).hasOwnProperty,
+ arr = [],
+ pop = arr.pop,
+ push_native = arr.push,
+ push = arr.push,
+ slice = arr.slice,
+ // Use a stripped-down indexOf if we can't use a native one
+ indexOf = arr.indexOf || function( elem ) {
+ var i = 0,
+ len = this.length;
+ for ( ; i < len; i++ ) {
+ if ( this[i] === elem ) {
+ return i;
+ }
+ }
+ return -1;
+ },
+
+ booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
+
+ // Regular expressions
+
+ // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
+ whitespace = "[\\x20\\t\\r\\n\\f]",
+ // http://www.w3.org/TR/css3-syntax/#characters
+ characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
+
+ // Loosely modeled on CSS identifier characters
+ // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
+ // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
+ identifier = characterEncoding.replace( "w", "w#" ),
+
+ // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors
+ attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace +
+ "*(?:([*^$|!~]?=)" + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",
+
+ // Prefer arguments quoted,
+ // then not containing pseudos/brackets,
+ // then attribute selectors/non-parenthetical expressions,
+ // then anything else
+ // These preferences are here to reduce the number of selectors
+ // needing tokenize in the PSEUDO preFilter
+ pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)",
+
+ // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
+ rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
+
+ rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
+ rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
+
+ rsibling = new RegExp( whitespace + "*[+~]" ),
+ rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*)" + whitespace + "*\\]", "g" ),
+
+ rpseudo = new RegExp( pseudos ),
+ ridentifier = new RegExp( "^" + identifier + "$" ),
+
+ matchExpr = {
+ "ID": new RegExp( "^#(" + characterEncoding + ")" ),
+ "CLASS": new RegExp( "^\\.(" + 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" ),
+ "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
+ // For use in libraries implementing .is()
+ // We use this for POS matching in `select`
+ "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
+ whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
+ },
+
+ rnative = /^[^{]+\{\s*\[native \w/,
+
+ // Easily-parseable/retrievable ID or TAG or CLASS selectors
+ rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
+
+ rinputs = /^(?:input|select|textarea|button)$/i,
+ rheader = /^h\d$/i,
+
+ rescape = /'|\\/g,
+
+ // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
+ runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
+ funescape = function( _, escaped, escapedWhitespace ) {
+ var high = "0x" + escaped - 0x10000;
+ // NaN means non-codepoint
+ // Support: Firefox
+ // Workaround erroneous numeric interpretation of +"0x"
+ return high !== high || escapedWhitespace ?
+ escaped :
+ // BMP codepoint
+ high < 0 ?
+ String.fromCharCode( high + 0x10000 ) :
+ // Supplemental Plane codepoint (surrogate pair)
+ String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
+ };
+
+// Optimize for push.apply( _, NodeList )
+try {
+ push.apply(
+ (arr = slice.call( preferredDoc.childNodes )),
+ preferredDoc.childNodes
+ );
+ // Support: Android<4.0
+ // Detect silently failing push.apply
+ arr[ preferredDoc.childNodes.length ].nodeType;
+} catch ( e ) {
+ push = { apply: arr.length ?
+
+ // Leverage slice if possible
+ function( target, els ) {
+ push_native.apply( target, slice.call(els) );
+ } :
+
+ // Support: IE<9
+ // Otherwise append directly
+ function( target, els ) {
+ var j = target.length,
+ i = 0;
+ // Can't trust NodeList.length
+ while ( (target[j++] = els[i++]) ) {}
+ target.length = j - 1;
+ }
+ };
+}
+
+function Sizzle( selector, context, results, seed ) {
+ var match, elem, m, nodeType,
+ // QSA vars
+ i, groups, old, nid, newContext, newSelector;
+
+ if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
+ setDocument( context );
+ }
+
+ context = context || document;
+ results = results || [];
+
+ if ( !selector || typeof selector !== "string" ) {
+ return results;
+ }
+
+ if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {
+ return [];
+ }
+
+ if ( documentIsHTML && !seed ) {
+
+ // Shortcuts
+ if ( (match = rquickExpr.exec( selector )) ) {
+ // Speed-up: Sizzle("#ID")
+ if ( (m = match[1]) ) {
+ if ( nodeType === 9 ) {
+ elem = context.getElementById( m );
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ if ( elem && elem.parentNode ) {
+ // Handle the case where IE, Opera, and Webkit return items
+ // by name instead of ID
+ if ( elem.id === m ) {
+ results.push( elem );
+ return results;
+ }
+ } else {
+ return results;
+ }
+ } else {
+ // Context is not a document
+ if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
+ contains( context, elem ) && elem.id === m ) {
+ results.push( elem );
+ return results;
+ }
+ }
+
+ // Speed-up: Sizzle("TAG")
+ } else if ( match[2] ) {
+ push.apply( results, context.getElementsByTagName( selector ) );
+ return results;
+
+ // Speed-up: Sizzle(".CLASS")
+ } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) {
+ push.apply( results, context.getElementsByClassName( m ) );
+ return results;
+ }
+ }
+
+ // QSA path
+ if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
+ nid = old = expando;
+ newContext = context;
+ newSelector = nodeType === 9 && selector;
+
+ // qSA works strangely on Element-rooted queries
+ // We can work around this by specifying an extra ID on the root
+ // and working up from there (Thanks to Andrew Dupont for the technique)
+ // IE 8 doesn't work on object elements
+ if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+ groups = tokenize( selector );
+
+ if ( (old = context.getAttribute("id")) ) {
+ nid = old.replace( rescape, "\\$&" );
+ } else {
+ context.setAttribute( "id", nid );
+ }
+ nid = "[id='" + nid + "'] ";
+
+ i = groups.length;
+ while ( i-- ) {
+ groups[i] = nid + toSelector( groups[i] );
+ }
+ newContext = rsibling.test( selector ) && context.parentNode || context;
+ newSelector = groups.join(",");
+ }
+
+ if ( newSelector ) {
+ try {
+ push.apply( results,
+ newContext.querySelectorAll( newSelector )
+ );
+ return results;
+ } catch(qsaError) {
+ } finally {
+ if ( !old ) {
+ context.removeAttribute("id");
+ }
+ }
+ }
+ }
+ }
+
+ // All others
+ return select( selector.replace( rtrim, "$1" ), context, results, seed );
+}
+
+/**
+ * Create key-value caches of limited size
+ * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
+ * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
+ * deleting the oldest entry
+ */
+function createCache() {
+ var keys = [];
+
+ function cache( key, value ) {
+ // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
+ if ( keys.push( key += " " ) > Expr.cacheLength ) {
+ // Only keep the most recent entries
+ delete cache[ keys.shift() ];
+ }
+ return (cache[ key ] = value);
+ }
+ return cache;
+}
+
+/**
+ * Mark a function for special use by Sizzle
+ * @param {Function} fn The function to mark
+ */
+function markFunction( fn ) {
+ fn[ expando ] = true;
+ return fn;
+}
+
+/**
+ * Support testing using an element
+ * @param {Function} fn Passed the created div and expects a boolean result
+ */
+function assert( fn ) {
+ var div = document.createElement("div");
+
+ try {
+ return !!fn( div );
+ } catch (e) {
+ return false;
+ } finally {
+ // Remove from its parent by default
+ if ( div.parentNode ) {
+ div.parentNode.removeChild( div );
+ }
+ // release memory in IE
+ div = null;
+ }
+}
+
+/**
+ * Adds the same handler for all of the specified attrs
+ * @param {String} attrs Pipe-separated list of attributes
+ * @param {Function} handler The method that will be applied
+ */
+function addHandle( attrs, handler ) {
+ var arr = attrs.split("|"),
+ i = attrs.length;
+
+ while ( i-- ) {
+ Expr.attrHandle[ arr[i] ] = handler;
+ }
+}
+
+/**
+ * Checks document order of two siblings
+ * @param {Element} a
+ * @param {Element} b
+ * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
+ */
+function siblingCheck( a, b ) {
+ var cur = b && a,
+ diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
+ ( ~b.sourceIndex || MAX_NEGATIVE ) -
+ ( ~a.sourceIndex || MAX_NEGATIVE );
+
+ // Use IE sourceIndex if available on both nodes
+ if ( diff ) {
+ return diff;
+ }
+
+ // Check if b follows a
+ if ( cur ) {
+ while ( (cur = cur.nextSibling) ) {
+ if ( cur === b ) {
+ return -1;
+ }
+ }
+ }
+
+ return a ? 1 : -1;
+}
+
+/**
+ * Returns a function to use in pseudos for input types
+ * @param {String} type
+ */
+function createInputPseudo( type ) {
+ return function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return name === "input" && elem.type === type;
+ };
+}
+
+/**
+ * Returns a function to use in pseudos for buttons
+ * @param {String} type
+ */
+function createButtonPseudo( type ) {
+ return function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return (name === "input" || name === "button") && elem.type === type;
+ };
+}
+
+/**
+ * Returns a function to use in pseudos for positionals
+ * @param {Function} fn
+ */
+function createPositionalPseudo( fn ) {
+ return markFunction(function( argument ) {
+ argument = +argument;
+ return markFunction(function( seed, matches ) {
+ var j,
+ matchIndexes = fn( [], seed.length, argument ),
+ i = matchIndexes.length;
+
+ // Match elements found at the specified indexes
+ while ( i-- ) {
+ if ( seed[ (j = matchIndexes[i]) ] ) {
+ seed[j] = !(matches[j] = seed[j]);
+ }
+ }
+ });
+ });
+}
+
+/**
+ * Detect xml
+ * @param {Element|Object} elem An element or a document
+ */
+isXML = Sizzle.isXML = function( elem ) {
+ // documentElement is verified for cases where it doesn't yet exist
+ // (such as loading iframes in IE - #4833)
+ var documentElement = elem && (elem.ownerDocument || elem).documentElement;
+ return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+// Expose support vars for convenience
+support = Sizzle.support = {};
+
+/**
+ * Sets document-related variables once based on the current document
+ * @param {Element|Object} [doc] An element or document object to use to set the document
+ * @returns {Object} Returns the current document
+ */
+setDocument = Sizzle.setDocument = function( node ) {
+ var doc = node ? node.ownerDocument || node : preferredDoc,
+ parent = doc.defaultView;
+
+ // If no document and documentElement is available, return
+ if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
+ return document;
+ }
+
+ // Set our document
+ document = doc;
+ docElem = doc.documentElement;
+
+ // Support tests
+ documentIsHTML = !isXML( doc );
+
+ // Support: IE>8
+ // If iframe document is assigned to "document" variable and if iframe has been reloaded,
+ // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
+ // IE6-8 do not support the defaultView property so parent will be undefined
+ if ( parent && parent.attachEvent && parent !== parent.top ) {
+ parent.attachEvent( "onbeforeunload", function() {
+ setDocument();
+ });
+ }
+
+ /* Attributes
+ ---------------------------------------------------------------------- */
+
+ // Support: IE<8
+ // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans)
+ support.attributes = assert(function( div ) {
+ div.className = "i";
+ return !div.getAttribute("className");
+ });
+
+ /* getElement(s)By*
+ ---------------------------------------------------------------------- */
+
+ // Check if getElementsByTagName("*") returns only elements
+ support.getElementsByTagName = assert(function( div ) {
+ div.appendChild( doc.createComment("") );
+ return !div.getElementsByTagName("*").length;
+ });
+
+ // Check if getElementsByClassName can be trusted
+ support.getElementsByClassName = assert(function( div ) {
+ div.innerHTML = "<div class='a'></div><div class='a i'></div>";
+
+ // Support: Safari<4
+ // Catch class over-caching
+ div.firstChild.className = "i";
+ // Support: Opera<10
+ // Catch gEBCN failure to find non-leading classes
+ return div.getElementsByClassName("i").length === 2;
+ });
+
+ // Support: IE<10
+ // Check if getElementById returns elements by name
+ // The broken getElementById methods don't pick up programatically-set names,
+ // so use a roundabout getElementsByName test
+ support.getById = assert(function( div ) {
+ docElem.appendChild( div ).id = expando;
+ return !doc.getElementsByName || !doc.getElementsByName( expando ).length;
+ });
+
+ // ID find and filter
+ if ( support.getById ) {
+ Expr.find["ID"] = function( id, context ) {
+ if ( typeof context.getElementById !== strundefined && documentIsHTML ) {
+ var m = context.getElementById( id );
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ return m && m.parentNode ? [m] : [];
+ }
+ };
+ Expr.filter["ID"] = function( id ) {
+ var attrId = id.replace( runescape, funescape );
+ return function( elem ) {
+ return elem.getAttribute("id") === attrId;
+ };
+ };
+ } else {
+ // Support: IE6/7
+ // getElementById is not reliable as a find shortcut
+ delete Expr.find["ID"];
+
+ Expr.filter["ID"] = function( id ) {
+ var attrId = id.replace( runescape, funescape );
+ return function( elem ) {
+ var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
+ return node && node.value === attrId;
+ };
+ };
+ }
+
+ // Tag
+ Expr.find["TAG"] = support.getElementsByTagName ?
+ function( tag, context ) {
+ if ( typeof context.getElementsByTagName !== strundefined ) {
+ return context.getElementsByTagName( tag );
+ }
+ } :
+ function( tag, context ) {
+ var elem,
+ tmp = [],
+ i = 0,
+ results = context.getElementsByTagName( tag );
+
+ // Filter out possible comments
+ if ( tag === "*" ) {
+ while ( (elem = results[i++]) ) {
+ if ( elem.nodeType === 1 ) {
+ tmp.push( elem );
+ }
+ }
+
+ return tmp;
+ }
+ return results;
+ };
+
+ // Class
+ Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
+ if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) {
+ return context.getElementsByClassName( className );
+ }
+ };
+
+ /* QSA/matchesSelector
+ ---------------------------------------------------------------------- */
+
+ // QSA and matchesSelector support
+
+ // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
+ rbuggyMatches = [];
+
+ // qSa(:focus) reports false when true (Chrome 21)
+ // We allow this because of a bug in IE8/9 that throws an error
+ // whenever `document.activeElement` is accessed on an iframe
+ // So, we allow :focus to pass through QSA all the time to avoid the IE error
+ // See http://bugs.jquery.com/ticket/13378
+ rbuggyQSA = [];
+
+ if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {
+ // Build QSA regex
+ // Regex strategy adopted from Diego Perini
+ assert(function( div ) {
+ // Select is set to empty string on purpose
+ // This is to test IE's treatment of not explicitly
+ // setting a boolean content attribute,
+ // since its presence should be enough
+ // http://bugs.jquery.com/ticket/12359
+ div.innerHTML = "<select><option selected=''></option></select>";
+
+ // Support: IE8
+ // Boolean attributes and "value" are not treated correctly
+ if ( !div.querySelectorAll("[selected]").length ) {
+ rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
+ }
+
+ // Webkit/Opera - :checked should return selected option elements
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+ // IE8 throws error here and will not see later tests
+ if ( !div.querySelectorAll(":checked").length ) {
+ rbuggyQSA.push(":checked");
+ }
+ });
+
+ assert(function( div ) {
+
+ // Support: Opera 10-12/IE8
+ // ^= $= *= and empty values
+ // Should not select anything
+ // Support: Windows 8 Native Apps
+ // The type attribute is restricted during .innerHTML assignment
+ var input = doc.createElement("input");
+ input.setAttribute( "type", "hidden" );
+ div.appendChild( input ).setAttribute( "t", "" );
+
+ if ( div.querySelectorAll("[t^='']").length ) {
+ rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
+ }
+
+ // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
+ // IE8 throws error here and will not see later tests
+ if ( !div.querySelectorAll(":enabled").length ) {
+ rbuggyQSA.push( ":enabled", ":disabled" );
+ }
+
+ // Opera 10-11 does not throw on post-comma invalid pseudos
+ div.querySelectorAll("*,:x");
+ rbuggyQSA.push(",.*:");
+ });
+ }
+
+ if ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector ||
+ docElem.mozMatchesSelector ||
+ docElem.oMatchesSelector ||
+ docElem.msMatchesSelector) )) ) {
+
+ assert(function( div ) {
+ // Check to see if it's possible to do matchesSelector
+ // on a disconnected node (IE 9)
+ support.disconnectedMatch = matches.call( div, "div" );
+
+ // This should fail with an exception
+ // Gecko does not error, returns false instead
+ matches.call( div, "[s!='']:x" );
+ rbuggyMatches.push( "!=", pseudos );
+ });
+ }
+
+ rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
+ rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
+
+ /* Contains
+ ---------------------------------------------------------------------- */
+
+ // Element contains another
+ // Purposefully does not implement inclusive descendent
+ // As in, an element does not contain itself
+ contains = rnative.test( docElem.contains ) || docElem.compareDocumentPosition ?
+ function( a, b ) {
+ var adown = a.nodeType === 9 ? a.documentElement : a,
+ bup = b && b.parentNode;
+ return a === bup || !!( bup && bup.nodeType === 1 && (
+ adown.contains ?
+ adown.contains( bup ) :
+ a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
+ ));
+ } :
+ function( a, b ) {
+ if ( b ) {
+ while ( (b = b.parentNode) ) {
+ if ( b === a ) {
+ return true;
+ }
+ }
+ }
+ return false;
+ };
+
+ /* Sorting
+ ---------------------------------------------------------------------- */
+
+ // Document order sorting
+ sortOrder = docElem.compareDocumentPosition ?
+ function( a, b ) {
+
+ // Flag for duplicate removal
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+
+ var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b );
+
+ if ( compare ) {
+ // Disconnected nodes
+ if ( compare & 1 ||
+ (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
+
+ // Choose the first element that is related to our preferred document
+ if ( a === doc || contains(preferredDoc, a) ) {
+ return -1;
+ }
+ if ( b === doc || contains(preferredDoc, b) ) {
+ return 1;
+ }
+
+ // Maintain original order
+ return sortInput ?
+ ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
+ 0;
+ }
+
+ return compare & 4 ? -1 : 1;
+ }
+
+ // Not directly comparable, sort on existence of method
+ return a.compareDocumentPosition ? -1 : 1;
+ } :
+ function( a, b ) {
+ var cur,
+ i = 0,
+ aup = a.parentNode,
+ bup = b.parentNode,
+ ap = [ a ],
+ bp = [ b ];
+
+ // Exit early if the nodes are identical
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+
+ // Parentless nodes are either documents or disconnected
+ } else if ( !aup || !bup ) {
+ return a === doc ? -1 :
+ b === doc ? 1 :
+ aup ? -1 :
+ bup ? 1 :
+ sortInput ?
+ ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
+ 0;
+
+ // If the nodes are siblings, we can do a quick check
+ } else if ( aup === bup ) {
+ return siblingCheck( a, b );
+ }
+
+ // Otherwise we need full lists of their ancestors for comparison
+ cur = a;
+ while ( (cur = cur.parentNode) ) {
+ ap.unshift( cur );
+ }
+ cur = b;
+ while ( (cur = cur.parentNode) ) {
+ bp.unshift( cur );
+ }
+
+ // Walk down the tree looking for a discrepancy
+ while ( ap[i] === bp[i] ) {
+ i++;
+ }
+
+ return i ?
+ // Do a sibling check if the nodes have a common ancestor
+ siblingCheck( ap[i], bp[i] ) :
+
+ // Otherwise nodes in our document sort first
+ ap[i] === preferredDoc ? -1 :
+ bp[i] === preferredDoc ? 1 :
+ 0;
+ };
+
+ return doc;
+};
+
+Sizzle.matches = function( expr, elements ) {
+ return Sizzle( expr, null, null, elements );
+};
+
+Sizzle.matchesSelector = function( elem, expr ) {
+ // Set document vars if needed
+ if ( ( elem.ownerDocument || elem ) !== document ) {
+ setDocument( elem );
+ }
+
+ // Make sure that attribute selectors are quoted
+ expr = expr.replace( rattributeQuotes, "='$1']" );
+
+ if ( support.matchesSelector && documentIsHTML &&
+ ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
+ ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
+
+ try {
+ var ret = matches.call( elem, expr );
+
+ // IE 9's matchesSelector returns false on disconnected nodes
+ if ( ret || support.disconnectedMatch ||
+ // As well, disconnected nodes are said to be in a document
+ // fragment in IE 9
+ elem.document && elem.document.nodeType !== 11 ) {
+ return ret;
+ }
+ } catch(e) {}
+ }
+
+ return Sizzle( expr, document, null, [elem] ).length > 0;
+};
+
+Sizzle.contains = function( context, elem ) {
+ // Set document vars if needed
+ if ( ( context.ownerDocument || context ) !== document ) {
+ setDocument( context );
+ }
+ return contains( context, elem );
+};
+
+Sizzle.attr = function( elem, name ) {
+ // Set document vars if needed
+ if ( ( elem.ownerDocument || elem ) !== document ) {
+ setDocument( elem );
+ }
+
+ var fn = Expr.attrHandle[ name.toLowerCase() ],
+ // Don't get fooled by Object.prototype properties (jQuery #13807)
+ val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
+ fn( elem, name, !documentIsHTML ) :
+ undefined;
+
+ return val === undefined ?
+ support.attributes || !documentIsHTML ?
+ elem.getAttribute( name ) :
+ (val = elem.getAttributeNode(name)) && val.specified ?
+ val.value :
+ null :
+ val;
+};
+
+Sizzle.error = function( msg ) {
+ throw new Error( "Syntax error, unrecognized expression: " + msg );
+};
+
+/**
+ * Document sorting and removing duplicates
+ * @param {ArrayLike} results
+ */
+Sizzle.uniqueSort = function( results ) {
+ var elem,
+ duplicates = [],
+ j = 0,
+ i = 0;
+
+ // Unless we *know* we can detect duplicates, assume their presence
+ hasDuplicate = !support.detectDuplicates;
+ sortInput = !support.sortStable && results.slice( 0 );
+ results.sort( sortOrder );
+
+ if ( hasDuplicate ) {
+ while ( (elem = results[i++]) ) {
+ if ( elem === results[ i ] ) {
+ j = duplicates.push( i );
+ }
+ }
+ while ( j-- ) {
+ results.splice( duplicates[ j ], 1 );
+ }
+ }
+
+ return results;
+};
+
+/**
+ * Utility function for retrieving the text value of an array of DOM nodes
+ * @param {Array|Element} elem
+ */
+getText = Sizzle.getText = function( elem ) {
+ var node,
+ ret = "",
+ i = 0,
+ nodeType = elem.nodeType;
+
+ if ( !nodeType ) {
+ // If no nodeType, this is expected to be an array
+ for ( ; (node = elem[i]); i++ ) {
+ // Do not traverse comment nodes
+ ret += getText( node );
+ }
+ } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
+ // Use textContent for elements
+ // innerText usage removed for consistency of new lines (see #11153)
+ if ( typeof elem.textContent === "string" ) {
+ return elem.textContent;
+ } else {
+ // Traverse its children
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+ ret += getText( elem );
+ }
+ }
+ } else if ( nodeType === 3 || nodeType === 4 ) {
+ return elem.nodeValue;
+ }
+ // Do not include comment or processing instruction nodes
+
+ return ret;
+};
+
+Expr = Sizzle.selectors = {
+
+ // Can be adjusted by the user
+ cacheLength: 50,
+
+ createPseudo: markFunction,
+
+ match: matchExpr,
+
+ attrHandle: {},
+
+ find: {},
+
+ relative: {
+ ">": { dir: "parentNode", first: true },
+ " ": { dir: "parentNode" },
+ "+": { dir: "previousSibling", first: true },
+ "~": { dir: "previousSibling" }
+ },
+
+ preFilter: {
+ "ATTR": function( match ) {
+ match[1] = match[1].replace( runescape, funescape );
+
+ // Move the given value to match[3] whether quoted or unquoted
+ match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape );
+
+ if ( match[2] === "~=" ) {
+ match[3] = " " + match[3] + " ";
+ }
+
+ return match.slice( 0, 4 );
+ },
+
+ "CHILD": function( match ) {
+ /* matches from matchExpr["CHILD"]
+ 1 type (only|nth|...)
+ 2 what (child|of-type)
+ 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
+ 4 xn-component of xn+y argument ([+-]?\d*n|)
+ 5 sign of xn-component
+ 6 x of xn-component
+ 7 sign of y-component
+ 8 y of y-component
+ */
+ match[1] = match[1].toLowerCase();
+
+ if ( match[1].slice( 0, 3 ) === "nth" ) {
+ // nth-* requires argument
+ if ( !match[3] ) {
+ Sizzle.error( match[0] );
+ }
+
+ // numeric x and y parameters for Expr.filter.CHILD
+ // remember that false/true cast respectively to 0/1
+ match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
+ match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
+
+ // other types prohibit arguments
+ } else if ( match[3] ) {
+ Sizzle.error( match[0] );
+ }
+
+ return match;
+ },
+
+ "PSEUDO": function( match ) {
+ var excess,
+ unquoted = !match[5] && match[2];
+
+ if ( matchExpr["CHILD"].test( match[0] ) ) {
+ return null;
+ }
+
+ // Accept quoted arguments as-is
+ if ( match[3] && match[4] !== undefined ) {
+ match[2] = match[4];
+
+ // Strip excess characters from unquoted arguments
+ } else if ( unquoted && rpseudo.test( unquoted ) &&
+ // Get excess from tokenize (recursively)
+ (excess = tokenize( unquoted, true )) &&
+ // advance to the next closing parenthesis
+ (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
+
+ // excess is a negative index
+ match[0] = match[0].slice( 0, excess );
+ match[2] = unquoted.slice( 0, excess );
+ }
+
+ // Return only captures needed by the pseudo filter method (type and argument)
+ return match.slice( 0, 3 );
+ }
+ },
+
+ filter: {
+
+ "TAG": function( nodeNameSelector ) {
+ var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
+ return nodeNameSelector === "*" ?
+ function() { return true; } :
+ function( elem ) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
+ };
+ },
+
+ "CLASS": function( className ) {
+ var pattern = classCache[ className + " " ];
+
+ return pattern ||
+ (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
+ classCache( className, function( elem ) {
+ return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" );
+ });
+ },
+
+ "ATTR": function( name, operator, check ) {
+ return function( elem ) {
+ var result = Sizzle.attr( elem, name );
+
+ if ( result == null ) {
+ return operator === "!=";
+ }
+ if ( !operator ) {
+ return true;
+ }
+
+ result += "";
+
+ return operator === "=" ? result === check :
+ operator === "!=" ? result !== check :
+ operator === "^=" ? check && result.indexOf( check ) === 0 :
+ operator === "*=" ? check && result.indexOf( check ) > -1 :
+ operator === "$=" ? check && result.slice( -check.length ) === check :
+ operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
+ operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
+ false;
+ };
+ },
+
+ "CHILD": function( type, what, argument, first, last ) {
+ var simple = type.slice( 0, 3 ) !== "nth",
+ forward = type.slice( -4 ) !== "last",
+ ofType = what === "of-type";
+
+ return first === 1 && last === 0 ?
+
+ // Shortcut for :nth-*(n)
+ function( elem ) {
+ return !!elem.parentNode;
+ } :
+
+ function( elem, context, xml ) {
+ var cache, outerCache, node, diff, nodeIndex, start,
+ dir = simple !== forward ? "nextSibling" : "previousSibling",
+ parent = elem.parentNode,
+ name = ofType && elem.nodeName.toLowerCase(),
+ useCache = !xml && !ofType;
+
+ if ( parent ) {
+
+ // :(first|last|only)-(child|of-type)
+ if ( simple ) {
+ while ( dir ) {
+ node = elem;
+ while ( (node = node[ dir ]) ) {
+ if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
+ return false;
+ }
+ }
+ // Reverse direction for :only-* (if we haven't yet done so)
+ start = dir = type === "only" && !start && "nextSibling";
+ }
+ return true;
+ }
+
+ start = [ forward ? parent.firstChild : parent.lastChild ];
+
+ // non-xml :nth-child(...) stores cache data on `parent`
+ if ( forward && useCache ) {
+ // Seek `elem` from a previously-cached index
+ outerCache = parent[ expando ] || (parent[ expando ] = {});
+ cache = outerCache[ type ] || [];
+ nodeIndex = cache[0] === dirruns && cache[1];
+ diff = cache[0] === dirruns && cache[2];
+ node = nodeIndex && parent.childNodes[ nodeIndex ];
+
+ while ( (node = ++nodeIndex && node && node[ dir ] ||
+
+ // Fallback to seeking `elem` from the start
+ (diff = nodeIndex = 0) || start.pop()) ) {
+
+ // When found, cache indexes on `parent` and break
+ if ( node.nodeType === 1 && ++diff && node === elem ) {
+ outerCache[ type ] = [ dirruns, nodeIndex, diff ];
+ break;
+ }
+ }
+
+ // Use previously-cached element index if available
+ } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
+ diff = cache[1];
+
+ // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
+ } else {
+ // Use the same loop as above to seek `elem` from the start
+ while ( (node = ++nodeIndex && node && node[ dir ] ||
+ (diff = nodeIndex = 0) || start.pop()) ) {
+
+ if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
+ // Cache the index of each encountered element
+ if ( useCache ) {
+ (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
+ }
+
+ if ( node === elem ) {
+ break;
+ }
+ }
+ }
+ }
+
+ // Incorporate the offset, then check against cycle size
+ diff -= last;
+ return diff === first || ( diff % first === 0 && diff / first >= 0 );
+ }
+ };
+ },
+
+ "PSEUDO": function( pseudo, argument ) {
+ // pseudo-class names are case-insensitive
+ // http://www.w3.org/TR/selectors/#pseudo-classes
+ // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
+ // Remember that setFilters inherits from pseudos
+ var args,
+ fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
+ Sizzle.error( "unsupported pseudo: " + pseudo );
+
+ // The user may use createPseudo to indicate that
+ // arguments are needed to create the filter function
+ // just as Sizzle does
+ if ( fn[ expando ] ) {
+ return fn( argument );
+ }
+
+ // But maintain support for old signatures
+ if ( fn.length > 1 ) {
+ args = [ pseudo, pseudo, "", argument ];
+ return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
+ markFunction(function( seed, matches ) {
+ var idx,
+ matched = fn( seed, argument ),
+ i = matched.length;
+ while ( i-- ) {
+ idx = indexOf.call( seed, matched[i] );
+ seed[ idx ] = !( matches[ idx ] = matched[i] );
+ }
+ }) :
+ function( elem ) {
+ return fn( elem, 0, args );
+ };
+ }
+
+ return fn;
+ }
+ },
+
+ pseudos: {
+ // Potentially complex pseudos
+ "not": markFunction(function( selector ) {
+ // Trim the selector passed to compile
+ // to avoid treating leading and trailing
+ // spaces as combinators
+ var input = [],
+ results = [],
+ matcher = compile( selector.replace( rtrim, "$1" ) );
+
+ return matcher[ expando ] ?
+ markFunction(function( seed, matches, context, xml ) {
+ var elem,
+ unmatched = matcher( seed, null, xml, [] ),
+ i = seed.length;
+
+ // Match elements unmatched by `matcher`
+ while ( i-- ) {
+ if ( (elem = unmatched[i]) ) {
+ seed[i] = !(matches[i] = elem);
+ }
+ }
+ }) :
+ function( elem, context, xml ) {
+ input[0] = elem;
+ matcher( input, null, xml, results );
+ return !results.pop();
+ };
+ }),
+
+ "has": markFunction(function( selector ) {
+ return function( elem ) {
+ return Sizzle( selector, elem ).length > 0;
+ };
+ }),
+
+ "contains": markFunction(function( text ) {
+ return function( elem ) {
+ return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
+ };
+ }),
+
+ // "Whether an element is represented by a :lang() selector
+ // is based solely on the element's language value
+ // being equal to the identifier C,
+ // or beginning with the identifier C immediately followed by "-".
+ // The matching of C against the element's language value is performed case-insensitively.
+ // The identifier C does not have to be a valid language name."
+ // http://www.w3.org/TR/selectors/#lang-pseudo
+ "lang": markFunction( function( lang ) {
+ // lang value must be a valid identifier
+ if ( !ridentifier.test(lang || "") ) {
+ Sizzle.error( "unsupported lang: " + lang );
+ }
+ lang = lang.replace( runescape, funescape ).toLowerCase();
+ return function( elem ) {
+ var elemLang;
+ do {
+ if ( (elemLang = documentIsHTML ?
+ elem.lang :
+ elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
+
+ elemLang = elemLang.toLowerCase();
+ return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
+ }
+ } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
+ return false;
+ };
+ }),
+
+ // Miscellaneous
+ "target": function( elem ) {
+ var hash = window.location && window.location.hash;
+ return hash && hash.slice( 1 ) === elem.id;
+ },
+
+ "root": function( elem ) {
+ return elem === docElem;
+ },
+
+ "focus": function( elem ) {
+ return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
+ },
+
+ // Boolean properties
+ "enabled": function( elem ) {
+ return elem.disabled === false;
+ },
+
+ "disabled": function( elem ) {
+ return elem.disabled === true;
+ },
+
+ "checked": function( elem ) {
+ // In CSS3, :checked should return both checked and selected elements
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+ var nodeName = elem.nodeName.toLowerCase();
+ return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
+ },
+
+ "selected": function( elem ) {
+ // Accessing this property makes selected-by-default
+ // options in Safari work properly
+ if ( elem.parentNode ) {
+ elem.parentNode.selectedIndex;
+ }
+
+ return elem.selected === true;
+ },
+
+ // Contents
+ "empty": function( elem ) {
+ // http://www.w3.org/TR/selectors/#empty-pseudo
+ // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
+ // not comment, processing instructions, or others
+ // Thanks to Diego Perini for the nodeName shortcut
+ // Greater than "@" means alpha characters (specifically not starting with "#" or "?")
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+ if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) {
+ return false;
+ }
+ }
+ return true;
+ },
+
+ "parent": function( elem ) {
+ return !Expr.pseudos["empty"]( elem );
+ },
+
+ // Element/input types
+ "header": function( elem ) {
+ return rheader.test( elem.nodeName );
+ },
+
+ "input": function( elem ) {
+ return rinputs.test( elem.nodeName );
+ },
+
+ "button": function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return name === "input" && elem.type === "button" || name === "button";
+ },
+
+ "text": function( elem ) {
+ var attr;
+ // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
+ // use getAttribute instead to test this case
+ return elem.nodeName.toLowerCase() === "input" &&
+ elem.type === "text" &&
+ ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type );
+ },
+
+ // Position-in-collection
+ "first": createPositionalPseudo(function() {
+ return [ 0 ];
+ }),
+
+ "last": createPositionalPseudo(function( matchIndexes, length ) {
+ return [ length - 1 ];
+ }),
+
+ "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ return [ argument < 0 ? argument + length : argument ];
+ }),
+
+ "even": createPositionalPseudo(function( matchIndexes, length ) {
+ var i = 0;
+ for ( ; i < length; i += 2 ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "odd": createPositionalPseudo(function( matchIndexes, length ) {
+ var i = 1;
+ for ( ; i < length; i += 2 ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ var i = argument < 0 ? argument + length : argument;
+ for ( ; --i >= 0; ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ var i = argument < 0 ? argument + length : argument;
+ for ( ; ++i < length; ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ })
+ }
+};
+
+Expr.pseudos["nth"] = Expr.pseudos["eq"];
+
+// Add button/input type pseudos
+for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
+ Expr.pseudos[ i ] = createInputPseudo( i );
+}
+for ( i in { submit: true, reset: true } ) {
+ Expr.pseudos[ i ] = createButtonPseudo( i );
+}
+
+// Easy API for creating new setFilters
+function setFilters() {}
+setFilters.prototype = Expr.filters = Expr.pseudos;
+Expr.setFilters = new setFilters();
+
+function tokenize( selector, parseOnly ) {
+ var matched, match, tokens, type,
+ soFar, groups, preFilters,
+ cached = tokenCache[ selector + " " ];
+
+ if ( cached ) {
+ return parseOnly ? 0 : cached.slice( 0 );
+ }
+
+ soFar = selector;
+ groups = [];
+ preFilters = Expr.preFilter;
+
+ while ( soFar ) {
+
+ // Comma and first run
+ if ( !matched || (match = rcomma.exec( soFar )) ) {
+ if ( match ) {
+ // Don't consume trailing commas as valid
+ soFar = soFar.slice( match[0].length ) || soFar;
+ }
+ groups.push( tokens = [] );
+ }
+
+ matched = false;
+
+ // Combinators
+ if ( (match = rcombinators.exec( soFar )) ) {
+ matched = match.shift();
+ tokens.push({
+ value: matched,
+ // Cast descendant combinators to space
+ type: match[0].replace( rtrim, " " )
+ });
+ soFar = soFar.slice( matched.length );
+ }
+
+ // Filters
+ for ( type in Expr.filter ) {
+ if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
+ (match = preFilters[ type ]( match ))) ) {
+ matched = match.shift();
+ tokens.push({
+ value: matched,
+ type: type,
+ matches: match
+ });
+ soFar = soFar.slice( matched.length );
+ }
+ }
+
+ if ( !matched ) {
+ break;
+ }
+ }
+
+ // Return the length of the invalid excess
+ // if we're just parsing
+ // Otherwise, throw an error or return tokens
+ return parseOnly ?
+ soFar.length :
+ soFar ?
+ Sizzle.error( selector ) :
+ // Cache the tokens
+ tokenCache( selector, groups ).slice( 0 );
+}
+
+function toSelector( tokens ) {
+ var i = 0,
+ len = tokens.length,
+ selector = "";
+ for ( ; i < len; i++ ) {
+ selector += tokens[i].value;
+ }
+ return selector;
+}
+
+function addCombinator( matcher, combinator, base ) {
+ var dir = combinator.dir,
+ checkNonElements = base && dir === "parentNode",
+ doneName = done++;
+
+ return combinator.first ?
+ // Check against closest ancestor/preceding element
+ function( elem, context, xml ) {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ return matcher( elem, context, xml );
+ }
+ }
+ } :
+
+ // Check against all ancestor/preceding elements
+ function( elem, context, xml ) {
+ var data, cache, outerCache,
+ dirkey = dirruns + " " + doneName;
+
+ // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
+ if ( xml ) {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ if ( matcher( elem, context, xml ) ) {
+ return true;
+ }
+ }
+ }
+ } else {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ outerCache = elem[ expando ] || (elem[ expando ] = {});
+ if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) {
+ if ( (data = cache[1]) === true || data === cachedruns ) {
+ return data === true;
+ }
+ } else {
+ cache = outerCache[ dir ] = [ dirkey ];
+ cache[1] = matcher( elem, context, xml ) || cachedruns;
+ if ( cache[1] === true ) {
+ return true;
+ }
+ }
+ }
+ }
+ }
+ };
+}
+
+function elementMatcher( matchers ) {
+ return matchers.length > 1 ?
+ function( elem, context, xml ) {
+ var i = matchers.length;
+ while ( i-- ) {
+ if ( !matchers[i]( elem, context, xml ) ) {
+ return false;
+ }
+ }
+ return true;
+ } :
+ matchers[0];
+}
+
+function condense( unmatched, map, filter, context, xml ) {
+ var elem,
+ newUnmatched = [],
+ i = 0,
+ len = unmatched.length,
+ mapped = map != null;
+
+ for ( ; i < len; i++ ) {
+ if ( (elem = unmatched[i]) ) {
+ if ( !filter || filter( elem, context, xml ) ) {
+ newUnmatched.push( elem );
+ if ( mapped ) {
+ map.push( i );
+ }
+ }
+ }
+ }
+
+ return newUnmatched;
+}
+
+function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
+ if ( postFilter && !postFilter[ expando ] ) {
+ postFilter = setMatcher( postFilter );
+ }
+ if ( postFinder && !postFinder[ expando ] ) {
+ postFinder = setMatcher( postFinder, postSelector );
+ }
+ return markFunction(function( seed, results, context, xml ) {
+ var temp, i, elem,
+ preMap = [],
+ postMap = [],
+ preexisting = results.length,
+
+ // Get initial elements from seed or context
+ elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
+
+ // Prefilter to get matcher input, preserving a map for seed-results synchronization
+ matcherIn = preFilter && ( seed || !selector ) ?
+ condense( elems, preMap, preFilter, context, xml ) :
+ elems,
+
+ matcherOut = matcher ?
+ // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
+ postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
+
+ // ...intermediate processing is necessary
+ [] :
+
+ // ...otherwise use results directly
+ results :
+ matcherIn;
+
+ // Find primary matches
+ if ( matcher ) {
+ matcher( matcherIn, matcherOut, context, xml );
+ }
+
+ // Apply postFilter
+ if ( postFilter ) {
+ temp = condense( matcherOut, postMap );
+ postFilter( temp, [], context, xml );
+
+ // Un-match failing elements by moving them back to matcherIn
+ i = temp.length;
+ while ( i-- ) {
+ if ( (elem = temp[i]) ) {
+ matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
+ }
+ }
+ }
+
+ if ( seed ) {
+ if ( postFinder || preFilter ) {
+ if ( postFinder ) {
+ // Get the final matcherOut by condensing this intermediate into postFinder contexts
+ temp = [];
+ i = matcherOut.length;
+ while ( i-- ) {
+ if ( (elem = matcherOut[i]) ) {
+ // Restore matcherIn since elem is not yet a final match
+ temp.push( (matcherIn[i] = elem) );
+ }
+ }
+ postFinder( null, (matcherOut = []), temp, xml );
+ }
+
+ // Move matched elements from seed to results to keep them synchronized
+ i = matcherOut.length;
+ while ( i-- ) {
+ if ( (elem = matcherOut[i]) &&
+ (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {
+
+ seed[temp] = !(results[temp] = elem);
+ }
+ }
+ }
+
+ // Add elements to results, through postFinder if defined
+ } else {
+ matcherOut = condense(
+ matcherOut === results ?
+ matcherOut.splice( preexisting, matcherOut.length ) :
+ matcherOut
+ );
+ if ( postFinder ) {
+ postFinder( null, results, matcherOut, xml );
+ } else {
+ push.apply( results, matcherOut );
+ }
+ }
+ });
+}
+
+function matcherFromTokens( tokens ) {
+ var checkContext, matcher, j,
+ len = tokens.length,
+ leadingRelative = Expr.relative[ tokens[0].type ],
+ implicitRelative = leadingRelative || Expr.relative[" "],
+ i = leadingRelative ? 1 : 0,
+
+ // The foundational matcher ensures that elements are reachable from top-level context(s)
+ matchContext = addCombinator( function( elem ) {
+ return elem === checkContext;
+ }, implicitRelative, true ),
+ matchAnyContext = addCombinator( function( elem ) {
+ return indexOf.call( checkContext, elem ) > -1;
+ }, implicitRelative, true ),
+ matchers = [ function( elem, context, xml ) {
+ return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
+ (checkContext = context).nodeType ?
+ matchContext( elem, context, xml ) :
+ matchAnyContext( elem, context, xml ) );
+ } ];
+
+ for ( ; i < len; i++ ) {
+ if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
+ matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
+ } else {
+ matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
+
+ // Return special upon seeing a positional matcher
+ if ( matcher[ expando ] ) {
+ // Find the next relative operator (if any) for proper handling
+ j = ++i;
+ for ( ; j < len; j++ ) {
+ if ( Expr.relative[ tokens[j].type ] ) {
+ break;
+ }
+ }
+ return setMatcher(
+ i > 1 && elementMatcher( matchers ),
+ i > 1 && toSelector(
+ // If the preceding token was a descendant combinator, insert an implicit any-element `*`
+ tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
+ ).replace( rtrim, "$1" ),
+ matcher,
+ i < j && matcherFromTokens( tokens.slice( i, j ) ),
+ j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
+ j < len && toSelector( tokens )
+ );
+ }
+ matchers.push( matcher );
+ }
+ }
+
+ return elementMatcher( matchers );
+}
+
+function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
+ // A counter to specify which element is currently being matched
+ var matcherCachedRuns = 0,
+ bySet = setMatchers.length > 0,
+ byElement = elementMatchers.length > 0,
+ superMatcher = function( seed, context, xml, results, expandContext ) {
+ var elem, j, matcher,
+ setMatched = [],
+ matchedCount = 0,
+ i = "0",
+ unmatched = seed && [],
+ outermost = expandContext != null,
+ contextBackup = outermostContext,
+ // We must always have either seed elements or context
+ elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ),
+ // Use integer dirruns iff this is the outermost matcher
+ dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1);
+
+ if ( outermost ) {
+ outermostContext = context !== document && context;
+ cachedruns = matcherCachedRuns;
+ }
+
+ // Add elements passing elementMatchers directly to results
+ // Keep `i` a string if there are no elements so `matchedCount` will be "00" below
+ for ( ; (elem = elems[i]) != null; i++ ) {
+ if ( byElement && elem ) {
+ j = 0;
+ while ( (matcher = elementMatchers[j++]) ) {
+ if ( matcher( elem, context, xml ) ) {
+ results.push( elem );
+ break;
+ }
+ }
+ if ( outermost ) {
+ dirruns = dirrunsUnique;
+ cachedruns = ++matcherCachedRuns;
+ }
+ }
+
+ // Track unmatched elements for set filters
+ if ( bySet ) {
+ // They will have gone through all possible matchers
+ if ( (elem = !matcher && elem) ) {
+ matchedCount--;
+ }
+
+ // Lengthen the array for every element, matched or not
+ if ( seed ) {
+ unmatched.push( elem );
+ }
+ }
+ }
+
+ // Apply set filters to unmatched elements
+ matchedCount += i;
+ if ( bySet && i !== matchedCount ) {
+ j = 0;
+ while ( (matcher = setMatchers[j++]) ) {
+ matcher( unmatched, setMatched, context, xml );
+ }
+
+ if ( seed ) {
+ // Reintegrate element matches to eliminate the need for sorting
+ if ( matchedCount > 0 ) {
+ while ( i-- ) {
+ if ( !(unmatched[i] || setMatched[i]) ) {
+ setMatched[i] = pop.call( results );
+ }
+ }
+ }
+
+ // Discard index placeholder values to get only actual matches
+ setMatched = condense( setMatched );
+ }
+
+ // Add matches to results
+ push.apply( results, setMatched );
+
+ // Seedless set matches succeeding multiple successful matchers stipulate sorting
+ if ( outermost && !seed && setMatched.length > 0 &&
+ ( matchedCount + setMatchers.length ) > 1 ) {
+
+ Sizzle.uniqueSort( results );
+ }
+ }
+
+ // Override manipulation of globals by nested matchers
+ if ( outermost ) {
+ dirruns = dirrunsUnique;
+ outermostContext = contextBackup;
+ }
+
+ return unmatched;
+ };
+
+ return bySet ?
+ markFunction( superMatcher ) :
+ superMatcher;
+}
+
+compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {
+ var i,
+ setMatchers = [],
+ elementMatchers = [],
+ cached = compilerCache[ selector + " " ];
+
+ if ( !cached ) {
+ // Generate a function of recursive functions that can be used to check each element
+ if ( !group ) {
+ group = tokenize( selector );
+ }
+ i = group.length;
+ while ( i-- ) {
+ cached = matcherFromTokens( group[i] );
+ if ( cached[ expando ] ) {
+ setMatchers.push( cached );
+ } else {
+ elementMatchers.push( cached );
+ }
+ }
+
+ // Cache the compiled function
+ cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
+ }
+ return cached;
+};
+
+function multipleContexts( selector, contexts, results ) {
+ var i = 0,
+ len = contexts.length;
+ for ( ; i < len; i++ ) {
+ Sizzle( selector, contexts[i], results );
+ }
+ return results;
+}
+
+function select( selector, context, results, seed ) {
+ var i, tokens, token, type, find,
+ match = tokenize( selector );
+
+ if ( !seed ) {
+ // Try to minimize operations if there is only one group
+ if ( match.length === 1 ) {
+
+ // Take a shortcut and set the context if the root selector is an ID
+ tokens = match[0] = match[0].slice( 0 );
+ if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
+ support.getById && context.nodeType === 9 && documentIsHTML &&
+ Expr.relative[ tokens[1].type ] ) {
+
+ context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
+ if ( !context ) {
+ return results;
+ }
+ selector = selector.slice( tokens.shift().value.length );
+ }
+
+ // Fetch a seed set for right-to-left matching
+ i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
+ while ( i-- ) {
+ token = tokens[i];
+
+ // Abort if we hit a combinator
+ if ( Expr.relative[ (type = token.type) ] ) {
+ break;
+ }
+ if ( (find = Expr.find[ type ]) ) {
+ // Search, expanding context for leading sibling combinators
+ if ( (seed = find(
+ token.matches[0].replace( runescape, funescape ),
+ rsibling.test( tokens[0].type ) && context.parentNode || context
+ )) ) {
+
+ // If seed is empty or no tokens remain, we can return early
+ tokens.splice( i, 1 );
+ selector = seed.length && toSelector( tokens );
+ if ( !selector ) {
+ push.apply( results, seed );
+ return results;
+ }
+
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ // Compile and execute a filtering function
+ // Provide `match` to avoid retokenization if we modified the selector above
+ compile( selector, match )(
+ seed,
+ context,
+ !documentIsHTML,
+ results,
+ rsibling.test( selector )
+ );
+ return results;
+}
+
+// One-time assignments
+
+// Sort stability
+support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
+
+// Support: Chrome<14
+// Always assume duplicates if they aren't passed to the comparison function
+support.detectDuplicates = hasDuplicate;
+
+// Initialize against the default document
+setDocument();
+
+// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
+// Detached nodes confoundingly follow *each other*
+support.sortDetached = assert(function( div1 ) {
+ // Should return 1, but returns 4 (following)
+ return div1.compareDocumentPosition( document.createElement("div") ) & 1;
+});
+
+// Support: IE<8
+// Prevent attribute/property "interpolation"
+// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
+if ( !assert(function( div ) {
+ div.innerHTML = "<a href='#'></a>";
+ return div.firstChild.getAttribute("href") === "#" ;
+}) ) {
+ addHandle( "type|href|height|width", function( elem, name, isXML ) {
+ if ( !isXML ) {
+ return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
+ }
+ });
+}
+
+// Support: IE<9
+// Use defaultValue in place of getAttribute("value")
+if ( !support.attributes || !assert(function( div ) {
+ div.innerHTML = "<input/>";
+ div.firstChild.setAttribute( "value", "" );
+ return div.firstChild.getAttribute( "value" ) === "";
+}) ) {
+ addHandle( "value", function( elem, name, isXML ) {
+ if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
+ return elem.defaultValue;
+ }
+ });
+}
+
+// Support: IE<9
+// Use getAttributeNode to fetch booleans when getAttribute lies
+if ( !assert(function( div ) {
+ return div.getAttribute("disabled") == null;
+}) ) {
+ addHandle( booleans, function( elem, name, isXML ) {
+ var val;
+ if ( !isXML ) {
+ return (val = elem.getAttributeNode( name )) && val.specified ?
+ val.value :
+ elem[ name ] === true ? name.toLowerCase() : null;
+ }
+ });
+}
+
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[":"] = jQuery.expr.pseudos;
+jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+
+})( window );
+// String to Object options format cache
+var optionsCache = {};
+
+// Convert String-formatted options into Object-formatted ones and store in cache
+function createOptions( options ) {
+ var object = optionsCache[ options ] = {};
+ jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) {
+ object[ flag ] = true;
+ });
+ return object;
+}
+
+/*
+ * Create a callback list using the following parameters:
+ *
+ * options: an optional list of space-separated options that will change how
+ * the callback list behaves or a more traditional option object
+ *
+ * By default a callback list will act like an event callback list and can be
+ * "fired" multiple times.
+ *
+ * Possible options:
+ *
+ * once: will ensure the callback list can only be fired once (like a Deferred)
+ *
+ * memory: will keep track of previous values and will call any callback added
+ * after the list has been fired right away with the latest "memorized"
+ * values (like a Deferred)
+ *
+ * unique: will ensure a callback can only be added once (no duplicate in the list)
+ *
+ * stopOnFalse: interrupt callings when a callback returns false
+ *
+ */
+jQuery.Callbacks = function( options ) {
+
+ // Convert options from String-formatted to Object-formatted if needed
+ // (we check in cache first)
+ options = typeof options === "string" ?
+ ( optionsCache[ options ] || createOptions( options ) ) :
+ jQuery.extend( {}, options );
+
+ var // Last fire value (for non-forgettable lists)
+ memory,
+ // Flag to know if list was already fired
+ fired,
+ // Flag to know if list is currently firing
+ firing,
+ // First callback to fire (used internally by add and fireWith)
+ firingStart,
+ // End of the loop when firing
+ firingLength,
+ // Index of currently firing callback (modified by remove if needed)
+ firingIndex,
+ // Actual callback list
+ list = [],
+ // Stack of fire calls for repeatable lists
+ stack = !options.once && [],
+ // Fire callbacks
+ fire = function( data ) {
+ memory = options.memory && data;
+ fired = true;
+ firingIndex = firingStart || 0;
+ firingStart = 0;
+ firingLength = list.length;
+ firing = true;
+ for ( ; list && firingIndex < firingLength; firingIndex++ ) {
+ if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
+ memory = false; // To prevent further calls using add
+ break;
+ }
+ }
+ firing = false;
+ if ( list ) {
+ if ( stack ) {
+ if ( stack.length ) {
+ fire( stack.shift() );
+ }
+ } else if ( memory ) {
+ list = [];
+ } else {
+ self.disable();
+ }
+ }
+ },
+ // Actual Callbacks object
+ self = {
+ // Add a callback or a collection of callbacks to the list
+ add: function() {
+ if ( list ) {
+ // First, we save the current length
+ var start = list.length;
+ (function add( args ) {
+ jQuery.each( args, function( _, arg ) {
+ var type = jQuery.type( arg );
+ if ( type === "function" ) {
+ if ( !options.unique || !self.has( arg ) ) {
+ list.push( arg );
+ }
+ } else if ( arg && arg.length && type !== "string" ) {
+ // Inspect recursively
+ add( arg );
+ }
+ });
+ })( arguments );
+ // Do we need to add the callbacks to the
+ // current firing batch?
+ if ( firing ) {
+ firingLength = list.length;
+ // With memory, if we're not firing then
+ // we should call right away
+ } else if ( memory ) {
+ firingStart = start;
+ fire( memory );
+ }
+ }
+ return this;
+ },
+ // Remove a callback from the list
+ remove: function() {
+ if ( list ) {
+ jQuery.each( arguments, function( _, arg ) {
+ var index;
+ while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
+ list.splice( index, 1 );
+ // Handle firing indexes
+ if ( firing ) {
+ if ( index <= firingLength ) {
+ firingLength--;
+ }
+ if ( index <= firingIndex ) {
+ firingIndex--;
+ }
+ }
+ }
+ });
+ }
+ return this;
+ },
+ // Check if a given callback is in the list.
+ // If no argument is given, return whether or not list has callbacks attached.
+ has: function( fn ) {
+ return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );
+ },
+ // Remove all callbacks from the list
+ empty: function() {
+ list = [];
+ firingLength = 0;
+ return this;
+ },
+ // Have the list do nothing anymore
+ disable: function() {
+ list = stack = memory = undefined;
+ return this;
+ },
+ // Is it disabled?
+ disabled: function() {
+ return !list;
+ },
+ // Lock the list in its current state
+ lock: function() {
+ stack = undefined;
+ if ( !memory ) {
+ self.disable();
+ }
+ return this;
+ },
+ // Is it locked?
+ locked: function() {
+ return !stack;
+ },
+ // Call all callbacks with the given context and arguments
+ fireWith: function( context, args ) {
+ if ( list && ( !fired || stack ) ) {
+ args = args || [];
+ args = [ context, args.slice ? args.slice() : args ];
+ if ( firing ) {
+ stack.push( args );
+ } else {
+ fire( args );
+ }
+ }
+ return this;
+ },
+ // Call all the callbacks with the given arguments
+ fire: function() {
+ self.fireWith( this, arguments );
+ return this;
+ },
+ // To know if the callbacks have already been called at least once
+ fired: function() {
+ return !!fired;
+ }
+ };
+
+ return self;
+};
+jQuery.extend({
+
+ Deferred: function( func ) {
+ var tuples = [
+ // action, add listener, listener list, final state
+ [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
+ [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
+ [ "notify", "progress", jQuery.Callbacks("memory") ]
+ ],
+ state = "pending",
+ promise = {
+ state: function() {
+ return state;
+ },
+ always: function() {
+ deferred.done( arguments ).fail( arguments );
+ return this;
+ },
+ then: function( /* fnDone, fnFail, fnProgress */ ) {
+ var fns = arguments;
+ return jQuery.Deferred(function( newDefer ) {
+ jQuery.each( tuples, function( i, tuple ) {
+ var action = tuple[ 0 ],
+ fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
+ // deferred[ done | fail | progress ] for forwarding actions to newDefer
+ deferred[ tuple[1] ](function() {
+ var returned = fn && fn.apply( this, arguments );
+ if ( returned && jQuery.isFunction( returned.promise ) ) {
+ returned.promise()
+ .done( newDefer.resolve )
+ .fail( newDefer.reject )
+ .progress( newDefer.notify );
+ } else {
+ newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
+ }
+ });
+ });
+ fns = null;
+ }).promise();
+ },
+ // Get a promise for this deferred
+ // If obj is provided, the promise aspect is added to the object
+ promise: function( obj ) {
+ return obj != null ? jQuery.extend( obj, promise ) : promise;
+ }
+ },
+ deferred = {};
+
+ // Keep pipe for back-compat
+ promise.pipe = promise.then;
+
+ // Add list-specific methods
+ jQuery.each( tuples, function( i, tuple ) {
+ var list = tuple[ 2 ],
+ stateString = tuple[ 3 ];
+
+ // promise[ done | fail | progress ] = list.add
+ promise[ tuple[1] ] = list.add;
+
+ // Handle state
+ if ( stateString ) {
+ list.add(function() {
+ // state = [ resolved | rejected ]
+ state = stateString;
+
+ // [ reject_list | resolve_list ].disable; progress_list.lock
+ }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
+ }
+
+ // deferred[ resolve | reject | notify ]
+ deferred[ tuple[0] ] = function() {
+ deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
+ return this;
+ };
+ deferred[ tuple[0] + "With" ] = list.fireWith;
+ });
+
+ // Make the deferred a promise
+ promise.promise( deferred );
+
+ // Call given func if any
+ if ( func ) {
+ func.call( deferred, deferred );
+ }
+
+ // All done!
+ return deferred;
+ },
+
+ // Deferred helper
+ when: function( subordinate /* , ..., subordinateN */ ) {
+ var i = 0,
+ resolveValues = core_slice.call( arguments ),
+ length = resolveValues.length,
+
+ // the count of uncompleted subordinates
+ remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
+
+ // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
+ deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
+
+ // Update function for both resolve and progress values
+ updateFunc = function( i, contexts, values ) {
+ return function( value ) {
+ contexts[ i ] = this;
+ values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value;
+ if( values === progressValues ) {
+ deferred.notifyWith( contexts, values );
+ } else if ( !( --remaining ) ) {
+ deferred.resolveWith( contexts, values );
+ }
+ };
+ },
+
+ progressValues, progressContexts, resolveContexts;
+
+ // add listeners to Deferred subordinates; treat others as resolved
+ if ( length > 1 ) {
+ progressValues = new Array( length );
+ progressContexts = new Array( length );
+ resolveContexts = new Array( length );
+ for ( ; i < length; i++ ) {
+ if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
+ resolveValues[ i ].promise()
+ .done( updateFunc( i, resolveContexts, resolveValues ) )
+ .fail( deferred.reject )
+ .progress( updateFunc( i, progressContexts, progressValues ) );
+ } else {
+ --remaining;
+ }
+ }
+ }
+
+ // if we're not waiting on anything, resolve the master
+ if ( !remaining ) {
+ deferred.resolveWith( resolveContexts, resolveValues );
+ }
+
+ return deferred.promise();
+ }
+});
+jQuery.support = (function( support ) {
+ var input = document.createElement("input"),
+ fragment = document.createDocumentFragment(),
+ div = document.createElement("div"),
+ select = document.createElement("select"),
+ opt = select.appendChild( document.createElement("option") );
+
+ // Finish early in limited environments
+ if ( !input.type ) {
+ return support;
+ }
+
+ input.type = "checkbox";
+
+ // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3
+ // Check the default checkbox/radio value ("" on old WebKit; "on" elsewhere)
+ support.checkOn = input.value !== "";
+
+ // Must access the parent to make an option select properly
+ // Support: IE9, IE10
+ support.optSelected = opt.selected;
+
+ // Will be defined later
+ support.reliableMarginRight = true;
+ support.boxSizingReliable = true;
+ support.pixelPosition = false;
+
+ // Make sure checked status is properly cloned
+ // Support: IE9, IE10
+ input.checked = true;
+ support.noCloneChecked = input.cloneNode( true ).checked;
+
+ // Make sure that the options inside disabled selects aren't marked as disabled
+ // (WebKit marks them as disabled)
+ select.disabled = true;
+ support.optDisabled = !opt.disabled;
+
+ // Check if an input maintains its value after becoming a radio
+ // Support: IE9, IE10
+ input = document.createElement("input");
+ input.value = "t";
+ input.type = "radio";
+ support.radioValue = input.value === "t";
+
+ // #11217 - WebKit loses check when the name is after the checked attribute
+ input.setAttribute( "checked", "t" );
+ input.setAttribute( "name", "t" );
+
+ fragment.appendChild( input );
+
+ // Support: Safari 5.1, Android 4.x, Android 2.3
+ // old WebKit doesn't clone checked state correctly in fragments
+ support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
+
+ // Support: Firefox, Chrome, Safari
+ // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)
+ support.focusinBubbles = "onfocusin" in window;
+
+ div.style.backgroundClip = "content-box";
+ div.cloneNode( true ).style.backgroundClip = "";
+ support.clearCloneStyle = div.style.backgroundClip === "content-box";
+
+ // Run tests that need a body at doc ready
+ jQuery(function() {
+ var container, marginDiv,
+ // Support: Firefox, Android 2.3 (Prefixed box-sizing versions).
+ divReset = "padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",
+ body = document.getElementsByTagName("body")[ 0 ];
+
+ if ( !body ) {
+ // Return for frameset docs that don't have a body
+ return;
+ }
+
+ container = document.createElement("div");
+ container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";
+
+ // Check box-sizing and margin behavior.
+ body.appendChild( container ).appendChild( div );
+ div.innerHTML = "";
+ // Support: Firefox, Android 2.3 (Prefixed box-sizing versions).
+ div.style.cssText = "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%";
+
+ // Workaround failing boxSizing test due to offsetWidth returning wrong value
+ // with some non-1 values of body zoom, ticket #13543
+ jQuery.swap( body, body.style.zoom != null ? { zoom: 1 } : {}, function() {
+ support.boxSizing = div.offsetWidth === 4;
+ });
+
+ // Use window.getComputedStyle because jsdom on node.js will break without it.
+ if ( window.getComputedStyle ) {
+ support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
+ support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
+
+ // Support: Android 2.3
+ // Check if div with explicit width and no margin-right incorrectly
+ // gets computed margin-right based on width of container. (#3333)
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+ marginDiv = div.appendChild( document.createElement("div") );
+ marginDiv.style.cssText = div.style.cssText = divReset;
+ marginDiv.style.marginRight = marginDiv.style.width = "0";
+ div.style.width = "1px";
+
+ support.reliableMarginRight =
+ !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );
+ }
+
+ body.removeChild( container );
+ });
+
+ return support;
+})( {} );
+
+/*
+ Implementation Summary
+
+ 1. Enforce API surface and semantic compatibility with 1.9.x branch
+ 2. Improve the module's maintainability by reducing the storage
+ paths to a single mechanism.
+ 3. Use the same single mechanism to support "private" and "user" data.
+ 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
+ 5. Avoid exposing implementation details on user objects (eg. expando properties)
+ 6. Provide a clear path for implementation upgrade to WeakMap in 2014
+*/
+var data_user, data_priv,
+ rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
+ rmultiDash = /([A-Z])/g;
+
+function Data() {
+ // Support: Android < 4,
+ // Old WebKit does not have Object.preventExtensions/freeze method,
+ // return new empty object instead with no [[set]] accessor
+ Object.defineProperty( this.cache = {}, 0, {
+ get: function() {
+ return {};
+ }
+ });
+
+ this.expando = jQuery.expando + Math.random();
+}
+
+Data.uid = 1;
+
+Data.accepts = function( owner ) {
+ // Accepts only:
+ // - Node
+ // - Node.ELEMENT_NODE
+ // - Node.DOCUMENT_NODE
+ // - Object
+ // - Any
+ return owner.nodeType ?
+ owner.nodeType === 1 || owner.nodeType === 9 : true;
+};
+
+Data.prototype = {
+ key: function( owner ) {
+ // We can accept data for non-element nodes in modern browsers,
+ // but we should not, see #8335.
+ // Always return the key for a frozen object.
+ if ( !Data.accepts( owner ) ) {
+ return 0;
+ }
+
+ var descriptor = {},
+ // Check if the owner object already has a cache key
+ unlock = owner[ this.expando ];
+
+ // If not, create one
+ if ( !unlock ) {
+ unlock = Data.uid++;
+
+ // Secure it in a non-enumerable, non-writable property
+ try {
+ descriptor[ this.expando ] = { value: unlock };
+ Object.defineProperties( owner, descriptor );
+
+ // Support: Android < 4
+ // Fallback to a less secure definition
+ } catch ( e ) {
+ descriptor[ this.expando ] = unlock;
+ jQuery.extend( owner, descriptor );
+ }
+ }
+
+ // Ensure the cache object
+ if ( !this.cache[ unlock ] ) {
+ this.cache[ unlock ] = {};
+ }
+
+ return unlock;
+ },
+ set: function( owner, data, value ) {
+ var prop,
+ // There may be an unlock assigned to this node,
+ // if there is no entry for this "owner", create one inline
+ // and set the unlock as though an owner entry had always existed
+ unlock = this.key( owner ),
+ cache = this.cache[ unlock ];
+
+ // Handle: [ owner, key, value ] args
+ if ( typeof data === "string" ) {
+ cache[ data ] = value;
+
+ // Handle: [ owner, { properties } ] args
+ } else {
+ // Fresh assignments by object are shallow copied
+ if ( jQuery.isEmptyObject( cache ) ) {
+ jQuery.extend( this.cache[ unlock ], data );
+ // Otherwise, copy the properties one-by-one to the cache object
+ } else {
+ for ( prop in data ) {
+ cache[ prop ] = data[ prop ];
+ }
+ }
+ }
+ return cache;
+ },
+ get: function( owner, key ) {
+ // Either a valid cache is found, or will be created.
+ // New caches will be created and the unlock returned,
+ // allowing direct access to the newly created
+ // empty data object. A valid owner object must be provided.
+ var cache = this.cache[ this.key( owner ) ];
+
+ return key === undefined ?
+ cache : cache[ key ];
+ },
+ access: function( owner, key, value ) {
+ var stored;
+ // In cases where either:
+ //
+ // 1. No key was specified
+ // 2. A string key was specified, but no value provided
+ //
+ // Take the "read" path and allow the get method to determine
+ // which value to return, respectively either:
+ //
+ // 1. The entire cache object
+ // 2. The data stored at the key
+ //
+ if ( key === undefined ||
+ ((key && typeof key === "string") && value === undefined) ) {
+
+ stored = this.get( owner, key );
+
+ return stored !== undefined ?
+ stored : this.get( owner, jQuery.camelCase(key) );
+ }
+
+ // [*]When the key is not a string, or both a key and value
+ // are specified, set or extend (existing objects) with either:
+ //
+ // 1. An object of properties
+ // 2. A key and value
+ //
+ this.set( owner, key, value );
+
+ // Since the "set" path can have two possible entry points
+ // return the expected data based on which path was taken[*]
+ return value !== undefined ? value : key;
+ },
+ remove: function( owner, key ) {
+ var i, name, camel,
+ unlock = this.key( owner ),
+ cache = this.cache[ unlock ];
+
+ if ( key === undefined ) {
+ this.cache[ unlock ] = {};
+
+ } else {
+ // Support array or space separated string of keys
+ if ( jQuery.isArray( key ) ) {
+ // If "name" is an array of keys...
+ // When data is initially created, via ("key", "val") signature,
+ // keys will be converted to camelCase.
+ // Since there is no way to tell _how_ a key was added, remove
+ // both plain key and camelCase key. #12786
+ // This will only penalize the array argument path.
+ name = key.concat( key.map( jQuery.camelCase ) );
+ } else {
+ camel = jQuery.camelCase( key );
+ // Try the string as a key before any manipulation
+ if ( key in cache ) {
+ name = [ key, camel ];
+ } else {
+ // If a key with the spaces exists, use it.
+ // Otherwise, create an array by matching non-whitespace
+ name = camel;
+ name = name in cache ?
+ [ name ] : ( name.match( core_rnotwhite ) || [] );
+ }
+ }
+
+ i = name.length;
+ while ( i-- ) {
+ delete cache[ name[ i ] ];
+ }
+ }
+ },
+ hasData: function( owner ) {
+ return !jQuery.isEmptyObject(
+ this.cache[ owner[ this.expando ] ] || {}
+ );
+ },
+ discard: function( owner ) {
+ if ( owner[ this.expando ] ) {
+ delete this.cache[ owner[ this.expando ] ];
+ }
+ }
+};
+
+// These may be used throughout the jQuery core codebase
+data_user = new Data();
+data_priv = new Data();
+
+
+jQuery.extend({
+ acceptData: Data.accepts,
+
+ hasData: function( elem ) {
+ return data_user.hasData( elem ) || data_priv.hasData( elem );
+ },
+
+ data: function( elem, name, data ) {
+ return data_user.access( elem, name, data );
+ },
+
+ removeData: function( elem, name ) {
+ data_user.remove( elem, name );
+ },
+
+ // TODO: Now that all calls to _data and _removeData have been replaced
+ // with direct calls to data_priv methods, these can be deprecated.
+ _data: function( elem, name, data ) {
+ return data_priv.access( elem, name, data );
+ },
+
+ _removeData: function( elem, name ) {
+ data_priv.remove( elem, name );
+ }
+});
+
+jQuery.fn.extend({
+ data: function( key, value ) {
+ var attrs, name,
+ elem = this[ 0 ],
+ i = 0,
+ data = null;
+
+ // Gets all values
+ if ( key === undefined ) {
+ if ( this.length ) {
+ data = data_user.get( elem );
+
+ if ( elem.nodeType === 1 && !data_priv.get( elem, "hasDataAttrs" ) ) {
+ attrs = elem.attributes;
+ for ( ; i < attrs.length; i++ ) {
+ name = attrs[ i ].name;
+
+ if ( name.indexOf( "data-" ) === 0 ) {
+ name = jQuery.camelCase( name.slice(5) );
+ dataAttr( elem, name, data[ name ] );
+ }
+ }
+ data_priv.set( elem, "hasDataAttrs", true );
+ }
+ }
+
+ return data;
+ }
+
+ // Sets multiple values
+ if ( typeof key === "object" ) {
+ return this.each(function() {
+ data_user.set( this, key );
+ });
+ }
+
+ return jQuery.access( this, function( value ) {
+ var data,
+ camelKey = jQuery.camelCase( key );
+
+ // The calling jQuery object (element matches) is not empty
+ // (and therefore has an element appears at this[ 0 ]) and the
+ // `value` parameter was not undefined. An empty jQuery object
+ // will result in `undefined` for elem = this[ 0 ] which will
+ // throw an exception if an attempt to read a data cache is made.
+ if ( elem && value === undefined ) {
+ // Attempt to get data from the cache
+ // with the key as-is
+ data = data_user.get( elem, key );
+ if ( data !== undefined ) {
+ return data;
+ }
+
+ // Attempt to get data from the cache
+ // with the key camelized
+ data = data_user.get( elem, camelKey );
+ if ( data !== undefined ) {
+ return data;
+ }
+
+ // Attempt to "discover" the data in
+ // HTML5 custom data-* attrs
+ data = dataAttr( elem, camelKey, undefined );
+ if ( data !== undefined ) {
+ return data;
+ }
+
+ // We tried really hard, but the data doesn't exist.
+ return;
+ }
+
+ // Set the data...
+ this.each(function() {
+ // First, attempt to store a copy or reference of any
+ // data that might've been store with a camelCased key.
+ var data = data_user.get( this, camelKey );
+
+ // For HTML5 data-* attribute interop, we have to
+ // store property names with dashes in a camelCase form.
+ // This might not apply to all properties...*
+ data_user.set( this, camelKey, value );
+
+ // *... In the case of properties that might _actually_
+ // have dashes, we need to also store a copy of that
+ // unchanged property.
+ if ( key.indexOf("-") !== -1 && data !== undefined ) {
+ data_user.set( this, key, value );
+ }
+ });
+ }, null, value, arguments.length > 1, null, true );
+ },
+
+ removeData: function( key ) {
+ return this.each(function() {
+ data_user.remove( this, key );
+ });
+ }
+});
+
+function dataAttr( elem, key, data ) {
+ var name;
+
+ // If nothing was found internally, try to fetch any
+ // data from the HTML5 data-* attribute
+ if ( data === undefined && elem.nodeType === 1 ) {
+ name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
+ data = elem.getAttribute( name );
+
+ if ( typeof data === "string" ) {
+ try {
+ data = data === "true" ? true :
+ data === "false" ? false :
+ data === "null" ? null :
+ // Only convert to a number if it doesn't change the string
+ +data + "" === data ? +data :
+ rbrace.test( data ) ? JSON.parse( data ) :
+ data;
+ } catch( e ) {}
+
+ // Make sure we set the data so it isn't changed later
+ data_user.set( elem, key, data );
+ } else {
+ data = undefined;
+ }
+ }
+ return data;
+}
+jQuery.extend({
+ queue: function( elem, type, data ) {
+ var queue;
+
+ if ( elem ) {
+ type = ( type || "fx" ) + "queue";
+ queue = data_priv.get( elem, type );
+
+ // Speed up dequeue by getting out quickly if this is just a lookup
+ if ( data ) {
+ if ( !queue || jQuery.isArray( data ) ) {
+ queue = data_priv.access( elem, type, jQuery.makeArray(data) );
+ } else {
+ queue.push( data );
+ }
+ }
+ return queue || [];
+ }
+ },
+
+ dequeue: function( elem, type ) {
+ type = type || "fx";
+
+ var queue = jQuery.queue( elem, type ),
+ startLength = queue.length,
+ fn = queue.shift(),
+ hooks = jQuery._queueHooks( elem, type ),
+ next = function() {
+ jQuery.dequeue( elem, type );
+ };
+
+ // If the fx queue is dequeued, always remove the progress sentinel
+ if ( fn === "inprogress" ) {
+ fn = queue.shift();
+ startLength--;
+ }
+
+ if ( fn ) {
+
+ // Add a progress sentinel to prevent the fx queue from being
+ // automatically dequeued
+ if ( type === "fx" ) {
+ queue.unshift( "inprogress" );
+ }
+
+ // clear up the last queue stop function
+ delete hooks.stop;
+ fn.call( elem, next, hooks );
+ }
+
+ if ( !startLength && hooks ) {
+ hooks.empty.fire();
+ }
+ },
+
+ // not intended for public consumption - generates a queueHooks object, or returns the current one
+ _queueHooks: function( elem, type ) {
+ var key = type + "queueHooks";
+ return data_priv.get( elem, key ) || data_priv.access( elem, key, {
+ empty: jQuery.Callbacks("once memory").add(function() {
+ data_priv.remove( elem, [ type + "queue", key ] );
+ })
+ });
+ }
+});
+
+jQuery.fn.extend({
+ queue: function( type, data ) {
+ var setter = 2;
+
+ if ( typeof type !== "string" ) {
+ data = type;
+ type = "fx";
+ setter--;
+ }
+
+ if ( arguments.length < setter ) {
+ return jQuery.queue( this[0], type );
+ }
+
+ return data === undefined ?
+ this :
+ this.each(function() {
+ var queue = jQuery.queue( this, type, data );
+
+ // ensure a hooks for this queue
+ jQuery._queueHooks( this, type );
+
+ if ( type === "fx" && queue[0] !== "inprogress" ) {
+ jQuery.dequeue( this, type );
+ }
+ });
+ },
+ dequeue: function( type ) {
+ return this.each(function() {
+ jQuery.dequeue( this, type );
+ });
+ },
+ // Based off of the plugin by Clint Helfers, with permission.
+ // http://blindsignals.com/index.php/2009/07/jquery-delay/
+ delay: function( time, type ) {
+ time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
+ type = type || "fx";
+
+ return this.queue( type, function( next, hooks ) {
+ var timeout = setTimeout( next, time );
+ hooks.stop = function() {
+ clearTimeout( timeout );
+ };
+ });
+ },
+ clearQueue: function( type ) {
+ return this.queue( type || "fx", [] );
+ },
+ // Get a promise resolved when queues of a certain type
+ // are emptied (fx is the type by default)
+ promise: function( type, obj ) {
+ var tmp,
+ count = 1,
+ defer = jQuery.Deferred(),
+ elements = this,
+ i = this.length,
+ resolve = function() {
+ if ( !( --count ) ) {
+ defer.resolveWith( elements, [ elements ] );
+ }
+ };
+
+ if ( typeof type !== "string" ) {
+ obj = type;
+ type = undefined;
+ }
+ type = type || "fx";
+
+ while( i-- ) {
+ tmp = data_priv.get( elements[ i ], type + "queueHooks" );
+ if ( tmp && tmp.empty ) {
+ count++;
+ tmp.empty.add( resolve );
+ }
+ }
+ resolve();
+ return defer.promise( obj );
+ }
+});
+var nodeHook, boolHook,
+ rclass = /[\t\r\n\f]/g,
+ rreturn = /\r/g,
+ rfocusable = /^(?:input|select|textarea|button)$/i;
+
+jQuery.fn.extend({
+ attr: function( name, value ) {
+ return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
+ },
+
+ removeAttr: function( name ) {
+ return this.each(function() {
+ jQuery.removeAttr( this, name );
+ });
+ },
+
+ prop: function( name, value ) {
+ return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
+ },
+
+ removeProp: function( name ) {
+ return this.each(function() {
+ delete this[ jQuery.propFix[ name ] || name ];
+ });
+ },
+
+ addClass: function( value ) {
+ var classes, elem, cur, clazz, j,
+ i = 0,
+ len = this.length,
+ proceed = typeof value === "string" && value;
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( j ) {
+ jQuery( this ).addClass( value.call( this, j, this.className ) );
+ });
+ }
+
+ if ( proceed ) {
+ // The disjunction here is for better compressibility (see removeClass)
+ classes = ( value || "" ).match( core_rnotwhite ) || [];
+
+ for ( ; i < len; i++ ) {
+ elem = this[ i ];
+ cur = elem.nodeType === 1 && ( elem.className ?
+ ( " " + elem.className + " " ).replace( rclass, " " ) :
+ " "
+ );
+
+ if ( cur ) {
+ j = 0;
+ while ( (clazz = classes[j++]) ) {
+ if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
+ cur += clazz + " ";
+ }
+ }
+ elem.className = jQuery.trim( cur );
+
+ }
+ }
+ }
+
+ return this;
+ },
+
+ removeClass: function( value ) {
+ var classes, elem, cur, clazz, j,
+ i = 0,
+ len = this.length,
+ proceed = arguments.length === 0 || typeof value === "string" && value;
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( j ) {
+ jQuery( this ).removeClass( value.call( this, j, this.className ) );
+ });
+ }
+ if ( proceed ) {
+ classes = ( value || "" ).match( core_rnotwhite ) || [];
+
+ for ( ; i < len; i++ ) {
+ elem = this[ i ];
+ // This expression is here for better compressibility (see addClass)
+ cur = elem.nodeType === 1 && ( elem.className ?
+ ( " " + elem.className + " " ).replace( rclass, " " ) :
+ ""
+ );
+
+ if ( cur ) {
+ j = 0;
+ while ( (clazz = classes[j++]) ) {
+ // Remove *all* instances
+ while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
+ cur = cur.replace( " " + clazz + " ", " " );
+ }
+ }
+ elem.className = value ? jQuery.trim( cur ) : "";
+ }
+ }
+ }
+
+ return this;
+ },
+
+ toggleClass: function( value, stateVal ) {
+ var type = typeof value;
+
+ if ( typeof stateVal === "boolean" && type === "string" ) {
+ return stateVal ? this.addClass( value ) : this.removeClass( value );
+ }
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( i ) {
+ jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
+ });
+ }
+
+ return this.each(function() {
+ if ( type === "string" ) {
+ // toggle individual class names
+ var className,
+ i = 0,
+ self = jQuery( this ),
+ classNames = value.match( core_rnotwhite ) || [];
+
+ while ( (className = classNames[ i++ ]) ) {
+ // check each className given, space separated list
+ if ( self.hasClass( className ) ) {
+ self.removeClass( className );
+ } else {
+ self.addClass( className );
+ }
+ }
+
+ // Toggle whole class name
+ } else if ( type === core_strundefined || type === "boolean" ) {
+ if ( this.className ) {
+ // store className if set
+ data_priv.set( this, "__className__", this.className );
+ }
+
+ // If the element has a class name or if we're passed "false",
+ // then remove the whole classname (if there was one, the above saved it).
+ // Otherwise bring back whatever was previously saved (if anything),
+ // falling back to the empty string if nothing was stored.
+ this.className = this.className || value === false ? "" : data_priv.get( this, "__className__" ) || "";
+ }
+ });
+ },
+
+ hasClass: function( selector ) {
+ var className = " " + selector + " ",
+ i = 0,
+ l = this.length;
+ for ( ; i < l; i++ ) {
+ if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
+ return true;
+ }
+ }
+
+ return false;
+ },
+
+ val: function( value ) {
+ var hooks, ret, isFunction,
+ elem = this[0];
+
+ if ( !arguments.length ) {
+ if ( elem ) {
+ hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
+
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
+ return ret;
+ }
+
+ ret = elem.value;
+
+ return typeof ret === "string" ?
+ // handle most common string cases
+ ret.replace(rreturn, "") :
+ // handle cases where value is null/undef or number
+ ret == null ? "" : ret;
+ }
+
+ return;
+ }
+
+ isFunction = jQuery.isFunction( value );
+
+ return this.each(function( i ) {
+ var val;
+
+ if ( this.nodeType !== 1 ) {
+ return;
+ }
+
+ if ( isFunction ) {
+ val = value.call( this, i, jQuery( this ).val() );
+ } else {
+ val = value;
+ }
+
+ // Treat null/undefined as ""; convert numbers to string
+ if ( val == null ) {
+ val = "";
+ } else if ( typeof val === "number" ) {
+ val += "";
+ } else if ( jQuery.isArray( val ) ) {
+ val = jQuery.map(val, function ( value ) {
+ return value == null ? "" : value + "";
+ });
+ }
+
+ hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
+
+ // If set returns undefined, fall back to normal setting
+ if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
+ this.value = val;
+ }
+ });
+ }
+});
+
+jQuery.extend({
+ valHooks: {
+ option: {
+ get: function( elem ) {
+ // attributes.value is undefined in Blackberry 4.7 but
+ // uses .value. See #6932
+ var val = elem.attributes.value;
+ return !val || val.specified ? elem.value : elem.text;
+ }
+ },
+ select: {
+ get: function( elem ) {
+ var value, option,
+ options = elem.options,
+ index = elem.selectedIndex,
+ one = elem.type === "select-one" || index < 0,
+ values = one ? null : [],
+ max = one ? index + 1 : options.length,
+ i = index < 0 ?
+ max :
+ one ? index : 0;
+
+ // Loop through all the selected options
+ for ( ; i < max; i++ ) {
+ option = options[ i ];
+
+ // IE6-9 doesn't update selected after form reset (#2551)
+ if ( ( option.selected || i === index ) &&
+ // Don't return options that are disabled or in a disabled optgroup
+ ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
+ ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
+
+ // Get the specific value for the option
+ value = jQuery( option ).val();
+
+ // We don't need an array for one selects
+ if ( one ) {
+ return value;
+ }
+
+ // Multi-Selects return an array
+ values.push( value );
+ }
+ }
+
+ return values;
+ },
+
+ set: function( elem, value ) {
+ var optionSet, option,
+ options = elem.options,
+ values = jQuery.makeArray( value ),
+ i = options.length;
+
+ while ( i-- ) {
+ option = options[ i ];
+ if ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) {
+ optionSet = true;
+ }
+ }
+
+ // force browsers to behave consistently when non-matching value is set
+ if ( !optionSet ) {
+ elem.selectedIndex = -1;
+ }
+ return values;
+ }
+ }
+ },
+
+ attr: function( elem, name, value ) {
+ var hooks, ret,
+ nType = elem.nodeType;
+
+ // don't get/set attributes on text, comment and attribute nodes
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+ return;
+ }
+
+ // Fallback to prop when attributes are not supported
+ if ( typeof elem.getAttribute === core_strundefined ) {
+ return jQuery.prop( elem, name, value );
+ }
+
+ // All attributes are lowercase
+ // Grab necessary hook if one is defined
+ if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
+ name = name.toLowerCase();
+ hooks = jQuery.attrHooks[ name ] ||
+ ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );
+ }
+
+ if ( value !== undefined ) {
+
+ if ( value === null ) {
+ jQuery.removeAttr( elem, name );
+
+ } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
+ return ret;
+
+ } else {
+ elem.setAttribute( name, value + "" );
+ return value;
+ }
+
+ } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
+ return ret;
+
+ } else {
+ ret = jQuery.find.attr( elem, name );
+
+ // Non-existent attributes return null, we normalize to undefined
+ return ret == null ?
+ undefined :
+ ret;
+ }
+ },
+
+ removeAttr: function( elem, value ) {
+ var name, propName,
+ i = 0,
+ attrNames = value && value.match( core_rnotwhite );
+
+ if ( attrNames && elem.nodeType === 1 ) {
+ while ( (name = attrNames[i++]) ) {
+ propName = jQuery.propFix[ name ] || name;
+
+ // Boolean attributes get special treatment (#10870)
+ if ( jQuery.expr.match.bool.test( name ) ) {
+ // Set corresponding property to false
+ elem[ propName ] = false;
+ }
+
+ elem.removeAttribute( name );
+ }
+ }
+ },
+
+ attrHooks: {
+ type: {
+ set: function( elem, value ) {
+ if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
+ // Setting the type on a radio button after the value resets the value in IE6-9
+ // Reset value to default in case type is set after value during creation
+ var val = elem.value;
+ elem.setAttribute( "type", value );
+ if ( val ) {
+ elem.value = val;
+ }
+ return value;
+ }
+ }
+ }
+ },
+
+ propFix: {
+ "for": "htmlFor",
+ "class": "className"
+ },
+
+ prop: function( elem, name, value ) {
+ var ret, hooks, notxml,
+ nType = elem.nodeType;
+
+ // don't get/set properties on text, comment and attribute nodes
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+ return;
+ }
+
+ notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+ if ( notxml ) {
+ // Fix name and attach hooks
+ name = jQuery.propFix[ name ] || name;
+ hooks = jQuery.propHooks[ name ];
+ }
+
+ if ( value !== undefined ) {
+ return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?
+ ret :
+ ( elem[ name ] = value );
+
+ } else {
+ return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ?
+ ret :
+ elem[ name ];
+ }
+ },
+
+ propHooks: {
+ tabIndex: {
+ get: function( elem ) {
+ return elem.hasAttribute( "tabindex" ) || rfocusable.test( elem.nodeName ) || elem.href ?
+ elem.tabIndex :
+ -1;
+ }
+ }
+ }
+});
+
+// Hooks for boolean attributes
+boolHook = {
+ set: function( elem, value, name ) {
+ if ( value === false ) {
+ // Remove boolean attributes when set to false
+ jQuery.removeAttr( elem, name );
+ } else {
+ elem.setAttribute( name, name );
+ }
+ return name;
+ }
+};
+jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
+ var getter = jQuery.expr.attrHandle[ name ] || jQuery.find.attr;
+
+ jQuery.expr.attrHandle[ name ] = function( elem, name, isXML ) {
+ var fn = jQuery.expr.attrHandle[ name ],
+ ret = isXML ?
+ undefined :
+ /* jshint eqeqeq: false */
+ // Temporarily disable this handler to check existence
+ (jQuery.expr.attrHandle[ name ] = undefined) !=
+ getter( elem, name, isXML ) ?
+
+ name.toLowerCase() :
+ null;
+
+ // Restore handler
+ jQuery.expr.attrHandle[ name ] = fn;
+
+ return ret;
+ };
+});
+
+// Support: IE9+
+// Selectedness for an option in an optgroup can be inaccurate
+if ( !jQuery.support.optSelected ) {
+ jQuery.propHooks.selected = {
+ get: function( elem ) {
+ var parent = elem.parentNode;
+ if ( parent && parent.parentNode ) {
+ parent.parentNode.selectedIndex;
+ }
+ return null;
+ }
+ };
+}
+
+jQuery.each([
+ "tabIndex",
+ "readOnly",
+ "maxLength",
+ "cellSpacing",
+ "cellPadding",
+ "rowSpan",
+ "colSpan",
+ "useMap",
+ "frameBorder",
+ "contentEditable"
+], function() {
+ jQuery.propFix[ this.toLowerCase() ] = this;
+});
+
+// Radios and checkboxes getter/setter
+jQuery.each([ "radio", "checkbox" ], function() {
+ jQuery.valHooks[ this ] = {
+ set: function( elem, value ) {
+ if ( jQuery.isArray( value ) ) {
+ return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
+ }
+ }
+ };
+ if ( !jQuery.support.checkOn ) {
+ jQuery.valHooks[ this ].get = function( elem ) {
+ // Support: Webkit
+ // "" is returned instead of "on" if a value isn't specified
+ return elem.getAttribute("value") === null ? "on" : elem.value;
+ };
+ }
+});
+var rkeyEvent = /^key/,
+ rmouseEvent = /^(?:mouse|contextmenu)|click/,
+ rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
+ rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
+
+function returnTrue() {
+ return true;
+}
+
+function returnFalse() {
+ return false;
+}
+
+function safeActiveElement() {
+ try {
+ return document.activeElement;
+ } catch ( err ) { }
+}
+
+/*
+ * Helper functions for managing events -- not part of the public interface.
+ * Props to Dean Edwards' addEvent library for many of the ideas.
+ */
+jQuery.event = {
+
+ global: {},
+
+ add: function( elem, types, handler, data, selector ) {
+
+ var handleObjIn, eventHandle, tmp,
+ events, t, handleObj,
+ special, handlers, type, namespaces, origType,
+ elemData = data_priv.get( elem );
+
+ // Don't attach events to noData or text/comment nodes (but allow plain objects)
+ if ( !elemData ) {
+ return;
+ }
+
+ // Caller can pass in an object of custom data in lieu of the handler
+ if ( handler.handler ) {
+ handleObjIn = handler;
+ handler = handleObjIn.handler;
+ selector = handleObjIn.selector;
+ }
+
+ // Make sure that the handler has a unique ID, used to find/remove it later
+ if ( !handler.guid ) {
+ handler.guid = jQuery.guid++;
+ }
+
+ // Init the element's event structure and main handler, if this is the first
+ if ( !(events = elemData.events) ) {
+ events = elemData.events = {};
+ }
+ if ( !(eventHandle = elemData.handle) ) {
+ eventHandle = elemData.handle = function( e ) {
+ // Discard the second event of a jQuery.event.trigger() and
+ // when an event is called after a page has unloaded
+ return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ?
+ jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
+ undefined;
+ };
+ // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
+ eventHandle.elem = elem;
+ }
+
+ // Handle multiple events separated by a space
+ types = ( types || "" ).match( core_rnotwhite ) || [""];
+ t = types.length;
+ while ( t-- ) {
+ tmp = rtypenamespace.exec( types[t] ) || [];
+ type = origType = tmp[1];
+ namespaces = ( tmp[2] || "" ).split( "." ).sort();
+
+ // There *must* be a type, no attaching namespace-only handlers
+ if ( !type ) {
+ continue;
+ }
+
+ // If event changes its type, use the special event handlers for the changed type
+ special = jQuery.event.special[ type ] || {};
+
+ // If selector defined, determine special event api type, otherwise given type
+ type = ( selector ? special.delegateType : special.bindType ) || type;
+
+ // Update special based on newly reset type
+ special = jQuery.event.special[ type ] || {};
+
+ // handleObj is passed to all event handlers
+ handleObj = jQuery.extend({
+ type: type,
+ origType: origType,
+ data: data,
+ handler: handler,
+ guid: handler.guid,
+ selector: selector,
+ needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
+ namespace: namespaces.join(".")
+ }, handleObjIn );
+
+ // Init the event handler queue if we're the first
+ if ( !(handlers = events[ type ]) ) {
+ handlers = events[ type ] = [];
+ handlers.delegateCount = 0;
+
+ // Only use addEventListener if the special events handler returns false
+ if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+ if ( elem.addEventListener ) {
+ elem.addEventListener( type, eventHandle, false );
+ }
+ }
+ }
+
+ if ( special.add ) {
+ special.add.call( elem, handleObj );
+
+ if ( !handleObj.handler.guid ) {
+ handleObj.handler.guid = handler.guid;
+ }
+ }
+
+ // Add to the element's handler list, delegates in front
+ if ( selector ) {
+ handlers.splice( handlers.delegateCount++, 0, handleObj );
+ } else {
+ handlers.push( handleObj );
+ }
+
+ // Keep track of which events have ever been used, for event optimization
+ jQuery.event.global[ type ] = true;
+ }
+
+ // Nullify elem to prevent memory leaks in IE
+ elem = null;
+ },
+
+ // Detach an event or set of events from an element
+ remove: function( elem, types, handler, selector, mappedTypes ) {
+
+ var j, origCount, tmp,
+ events, t, handleObj,
+ special, handlers, type, namespaces, origType,
+ elemData = data_priv.hasData( elem ) && data_priv.get( elem );
+
+ if ( !elemData || !(events = elemData.events) ) {
+ return;
+ }
+
+ // Once for each type.namespace in types; type may be omitted
+ types = ( types || "" ).match( core_rnotwhite ) || [""];
+ t = types.length;
+ while ( t-- ) {
+ tmp = rtypenamespace.exec( types[t] ) || [];
+ type = origType = tmp[1];
+ namespaces = ( tmp[2] || "" ).split( "." ).sort();
+
+ // Unbind all events (on this namespace, if provided) for the element
+ if ( !type ) {
+ for ( type in events ) {
+ jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
+ }
+ continue;
+ }
+
+ special = jQuery.event.special[ type ] || {};
+ type = ( selector ? special.delegateType : special.bindType ) || type;
+ handlers = events[ type ] || [];
+ tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" );
+
+ // Remove matching events
+ origCount = j = handlers.length;
+ while ( j-- ) {
+ handleObj = handlers[ j ];
+
+ if ( ( mappedTypes || origType === handleObj.origType ) &&
+ ( !handler || handler.guid === handleObj.guid ) &&
+ ( !tmp || tmp.test( handleObj.namespace ) ) &&
+ ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
+ handlers.splice( j, 1 );
+
+ if ( handleObj.selector ) {
+ handlers.delegateCount--;
+ }
+ if ( special.remove ) {
+ special.remove.call( elem, handleObj );
+ }
+ }
+ }
+
+ // Remove generic event handler if we removed something and no more handlers exist
+ // (avoids potential for endless recursion during removal of special event handlers)
+ if ( origCount && !handlers.length ) {
+ if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
+ jQuery.removeEvent( elem, type, elemData.handle );
+ }
+
+ delete events[ type ];
+ }
+ }
+
+ // Remove the expando if it's no longer used
+ if ( jQuery.isEmptyObject( events ) ) {
+ delete elemData.handle;
+ data_priv.remove( elem, "events" );
+ }
+ },
+
+ trigger: function( event, data, elem, onlyHandlers ) {
+
+ var i, cur, tmp, bubbleType, ontype, handle, special,
+ eventPath = [ elem || document ],
+ type = core_hasOwn.call( event, "type" ) ? event.type : event,
+ namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : [];
+
+ cur = tmp = elem = elem || document;
+
+ // Don't do events on text and comment nodes
+ if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+ return;
+ }
+
+ // focus/blur morphs to focusin/out; ensure we're not firing them right now
+ if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
+ return;
+ }
+
+ if ( type.indexOf(".") >= 0 ) {
+ // Namespaced trigger; create a regexp to match event type in handle()
+ namespaces = type.split(".");
+ type = namespaces.shift();
+ namespaces.sort();
+ }
+ ontype = type.indexOf(":") < 0 && "on" + type;
+
+ // Caller can pass in a jQuery.Event object, Object, or just an event type string
+ event = event[ jQuery.expando ] ?
+ event :
+ new jQuery.Event( type, typeof event === "object" && event );
+
+ // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
+ event.isTrigger = onlyHandlers ? 2 : 3;
+ event.namespace = namespaces.join(".");
+ event.namespace_re = event.namespace ?
+ new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :
+ null;
+
+ // Clean up the event in case it is being reused
+ event.result = undefined;
+ if ( !event.target ) {
+ event.target = elem;
+ }
+
+ // Clone any incoming data and prepend the event, creating the handler arg list
+ data = data == null ?
+ [ event ] :
+ jQuery.makeArray( data, [ event ] );
+
+ // Allow special events to draw outside the lines
+ special = jQuery.event.special[ type ] || {};
+ if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
+ return;
+ }
+
+ // Determine event propagation path in advance, per W3C events spec (#9951)
+ // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
+ if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
+
+ bubbleType = special.delegateType || type;
+ if ( !rfocusMorph.test( bubbleType + type ) ) {
+ cur = cur.parentNode;
+ }
+ for ( ; cur; cur = cur.parentNode ) {
+ eventPath.push( cur );
+ tmp = cur;
+ }
+
+ // Only add window if we got to document (e.g., not plain obj or detached DOM)
+ if ( tmp === (elem.ownerDocument || document) ) {
+ eventPath.push( tmp.defaultView || tmp.parentWindow || window );
+ }
+ }
+
+ // Fire handlers on the event path
+ i = 0;
+ while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {
+
+ event.type = i > 1 ?
+ bubbleType :
+ special.bindType || type;
+
+ // jQuery handler
+ handle = ( data_priv.get( cur, "events" ) || {} )[ event.type ] && data_priv.get( cur, "handle" );
+ if ( handle ) {
+ handle.apply( cur, data );
+ }
+
+ // Native handler
+ handle = ontype && cur[ ontype ];
+ if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {
+ event.preventDefault();
+ }
+ }
+ event.type = type;
+
+ // If nobody prevented the default action, do it now
+ if ( !onlyHandlers && !event.isDefaultPrevented() ) {
+
+ if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) &&
+ jQuery.acceptData( elem ) ) {
+
+ // Call a native DOM method on the target with the same name name as the event.
+ // Don't do default actions on window, that's where global variables be (#6170)
+ if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) {
+
+ // Don't re-trigger an onFOO event when we call its FOO() method
+ tmp = elem[ ontype ];
+
+ if ( tmp ) {
+ elem[ ontype ] = null;
+ }
+
+ // Prevent re-triggering of the same event, since we already bubbled it above
+ jQuery.event.triggered = type;
+ elem[ type ]();
+ jQuery.event.triggered = undefined;
+
+ if ( tmp ) {
+ elem[ ontype ] = tmp;
+ }
+ }
+ }
+ }
+
+ return event.result;
+ },
+
+ dispatch: function( event ) {
+
+ // Make a writable jQuery.Event from the native event object
+ event = jQuery.event.fix( event );
+
+ var i, j, ret, matched, handleObj,
+ handlerQueue = [],
+ args = core_slice.call( arguments ),
+ handlers = ( data_priv.get( this, "events" ) || {} )[ event.type ] || [],
+ special = jQuery.event.special[ event.type ] || {};
+
+ // Use the fix-ed jQuery.Event rather than the (read-only) native event
+ args[0] = event;
+ event.delegateTarget = this;
+
+ // Call the preDispatch hook for the mapped type, and let it bail if desired
+ if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
+ return;
+ }
+
+ // Determine handlers
+ handlerQueue = jQuery.event.handlers.call( this, event, handlers );
+
+ // Run delegates first; they may want to stop propagation beneath us
+ i = 0;
+ while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {
+ event.currentTarget = matched.elem;
+
+ j = 0;
+ while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {
+
+ // Triggered event must either 1) have no namespace, or
+ // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
+ if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {
+
+ event.handleObj = handleObj;
+ event.data = handleObj.data;
+
+ ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
+ .apply( matched.elem, args );
+
+ if ( ret !== undefined ) {
+ if ( (event.result = ret) === false ) {
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ }
+ }
+ }
+ }
+
+ // Call the postDispatch hook for the mapped type
+ if ( special.postDispatch ) {
+ special.postDispatch.call( this, event );
+ }
+
+ return event.result;
+ },
+
+ handlers: function( event, handlers ) {
+ var i, matches, sel, handleObj,
+ handlerQueue = [],
+ delegateCount = handlers.delegateCount,
+ cur = event.target;
+
+ // Find delegate handlers
+ // Black-hole SVG <use> instance trees (#13180)
+ // Avoid non-left-click bubbling in Firefox (#3861)
+ if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {
+
+ for ( ; cur !== this; cur = cur.parentNode || this ) {
+
+ // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
+ if ( cur.disabled !== true || event.type !== "click" ) {
+ matches = [];
+ for ( i = 0; i < delegateCount; i++ ) {
+ handleObj = handlers[ i ];
+
+ // Don't conflict with Object.prototype properties (#13203)
+ sel = handleObj.selector + " ";
+
+ if ( matches[ sel ] === undefined ) {
+ matches[ sel ] = handleObj.needsContext ?
+ jQuery( sel, this ).index( cur ) >= 0 :
+ jQuery.find( sel, this, null, [ cur ] ).length;
+ }
+ if ( matches[ sel ] ) {
+ matches.push( handleObj );
+ }
+ }
+ if ( matches.length ) {
+ handlerQueue.push({ elem: cur, handlers: matches });
+ }
+ }
+ }
+ }
+
+ // Add the remaining (directly-bound) handlers
+ if ( delegateCount < handlers.length ) {
+ handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });
+ }
+
+ return handlerQueue;
+ },
+
+ // Includes some event props shared by KeyEvent and MouseEvent
+ props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
+
+ fixHooks: {},
+
+ keyHooks: {
+ props: "char charCode key keyCode".split(" "),
+ filter: function( event, original ) {
+
+ // Add which for key events
+ if ( event.which == null ) {
+ event.which = original.charCode != null ? original.charCode : original.keyCode;
+ }
+
+ return event;
+ }
+ },
+
+ mouseHooks: {
+ props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
+ filter: function( event, original ) {
+ var eventDoc, doc, body,
+ button = original.button;
+
+ // Calculate pageX/Y if missing and clientX/Y available
+ if ( event.pageX == null && original.clientX != null ) {
+ eventDoc = event.target.ownerDocument || document;
+ doc = eventDoc.documentElement;
+ body = eventDoc.body;
+
+ event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
+ event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
+ }
+
+ // Add which for click: 1 === left; 2 === middle; 3 === right
+ // Note: button is not normalized, so don't use it
+ if ( !event.which && button !== undefined ) {
+ event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
+ }
+
+ return event;
+ }
+ },
+
+ fix: function( event ) {
+ if ( event[ jQuery.expando ] ) {
+ return event;
+ }
+
+ // Create a writable copy of the event object and normalize some properties
+ var i, prop, copy,
+ type = event.type,
+ originalEvent = event,
+ fixHook = this.fixHooks[ type ];
+
+ if ( !fixHook ) {
+ this.fixHooks[ type ] = fixHook =
+ rmouseEvent.test( type ) ? this.mouseHooks :
+ rkeyEvent.test( type ) ? this.keyHooks :
+ {};
+ }
+ copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
+
+ event = new jQuery.Event( originalEvent );
+
+ i = copy.length;
+ while ( i-- ) {
+ prop = copy[ i ];
+ event[ prop ] = originalEvent[ prop ];
+ }
+
+ // Support: Cordova 2.5 (WebKit) (#13255)
+ // All events should have a target; Cordova deviceready doesn't
+ if ( !event.target ) {
+ event.target = document;
+ }
+
+ // Support: Safari 6.0+, Chrome < 28
+ // Target should not be a text node (#504, #13143)
+ if ( event.target.nodeType === 3 ) {
+ event.target = event.target.parentNode;
+ }
+
+ return fixHook.filter? fixHook.filter( event, originalEvent ) : event;
+ },
+
+ special: {
+ load: {
+ // Prevent triggered image.load events from bubbling to window.load
+ noBubble: true
+ },
+ focus: {
+ // Fire native event if possible so blur/focus sequence is correct
+ trigger: function() {
+ if ( this !== safeActiveElement() && this.focus ) {
+ this.focus();
+ return false;
+ }
+ },
+ delegateType: "focusin"
+ },
+ blur: {
+ trigger: function() {
+ if ( this === safeActiveElement() && this.blur ) {
+ this.blur();
+ return false;
+ }
+ },
+ delegateType: "focusout"
+ },
+ click: {
+ // For checkbox, fire native event so checked state will be right
+ trigger: function() {
+ if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) {
+ this.click();
+ return false;
+ }
+ },
+
+ // For cross-browser consistency, don't fire native .click() on links
+ _default: function( event ) {
+ return jQuery.nodeName( event.target, "a" );
+ }
+ },
+
+ beforeunload: {
+ postDispatch: function( event ) {
+
+ // Support: Firefox 20+
+ // Firefox doesn't alert if the returnValue field is not set.
+ if ( event.result !== undefined ) {
+ event.originalEvent.returnValue = event.result;
+ }
+ }
+ }
+ },
+
+ simulate: function( type, elem, event, bubble ) {
+ // Piggyback on a donor event to simulate a different one.
+ // Fake originalEvent to avoid donor's stopPropagation, but if the
+ // simulated event prevents default then we do the same on the donor.
+ var e = jQuery.extend(
+ new jQuery.Event(),
+ event,
+ {
+ type: type,
+ isSimulated: true,
+ originalEvent: {}
+ }
+ );
+ if ( bubble ) {
+ jQuery.event.trigger( e, null, elem );
+ } else {
+ jQuery.event.dispatch.call( elem, e );
+ }
+ if ( e.isDefaultPrevented() ) {
+ event.preventDefault();
+ }
+ }
+};
+
+jQuery.removeEvent = function( elem, type, handle ) {
+ if ( elem.removeEventListener ) {
+ elem.removeEventListener( type, handle, false );
+ }
+};
+
+jQuery.Event = function( src, props ) {
+ // Allow instantiation without the 'new' keyword
+ if ( !(this instanceof jQuery.Event) ) {
+ return new jQuery.Event( src, props );
+ }
+
+ // Event object
+ if ( src && src.type ) {
+ this.originalEvent = src;
+ this.type = src.type;
+
+ // Events bubbling up the document may have been marked as prevented
+ // by a handler lower down the tree; reflect the correct value.
+ this.isDefaultPrevented = ( src.defaultPrevented ||
+ src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
+
+ // Event type
+ } else {
+ this.type = src;
+ }
+
+ // Put explicitly provided properties onto the event object
+ if ( props ) {
+ jQuery.extend( this, props );
+ }
+
+ // Create a timestamp if incoming event doesn't have one
+ this.timeStamp = src && src.timeStamp || jQuery.now();
+
+ // Mark it as fixed
+ this[ jQuery.expando ] = true;
+};
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-bindin…
+jQuery.Event.prototype = {
+ isDefaultPrevented: returnFalse,
+ isPropagationStopped: returnFalse,
+ isImmediatePropagationStopped: returnFalse,
+
+ preventDefault: function() {
+ var e = this.originalEvent;
+
+ this.isDefaultPrevented = returnTrue;
+
+ if ( e && e.preventDefault ) {
+ e.preventDefault();
+ }
+ },
+ stopPropagation: function() {
+ var e = this.originalEvent;
+
+ this.isPropagationStopped = returnTrue;
+
+ if ( e && e.stopPropagation ) {
+ e.stopPropagation();
+ }
+ },
+ stopImmediatePropagation: function() {
+ this.isImmediatePropagationStopped = returnTrue;
+ this.stopPropagation();
+ }
+};
+
+// Create mouseenter/leave events using mouseover/out and event-time checks
+// Support: Chrome 15+
+jQuery.each({
+ mouseenter: "mouseover",
+ mouseleave: "mouseout"
+}, function( orig, fix ) {
+ jQuery.event.special[ orig ] = {
+ delegateType: fix,
+ bindType: fix,
+
+ handle: function( event ) {
+ var ret,
+ target = this,
+ related = event.relatedTarget,
+ handleObj = event.handleObj;
+
+ // For mousenter/leave call the handler if related is outside the target.
+ // NB: No relatedTarget if the mouse left/entered the browser window
+ if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
+ event.type = handleObj.origType;
+ ret = handleObj.handler.apply( this, arguments );
+ event.type = fix;
+ }
+ return ret;
+ }
+ };
+});
+
+// Create "bubbling" focus and blur events
+// Support: Firefox, Chrome, Safari
+if ( !jQuery.support.focusinBubbles ) {
+ jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
+
+ // Attach a single capturing handler while someone wants focusin/focusout
+ var attaches = 0,
+ handler = function( event ) {
+ jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
+ };
+
+ jQuery.event.special[ fix ] = {
+ setup: function() {
+ if ( attaches++ === 0 ) {
+ document.addEventListener( orig, handler, true );
+ }
+ },
+ teardown: function() {
+ if ( --attaches === 0 ) {
+ document.removeEventListener( orig, handler, true );
+ }
+ }
+ };
+ });
+}
+
+jQuery.fn.extend({
+
+ on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
+ var origFn, type;
+
+ // Types can be a map of types/handlers
+ if ( typeof types === "object" ) {
+ // ( types-Object, selector, data )
+ if ( typeof selector !== "string" ) {
+ // ( types-Object, data )
+ data = data || selector;
+ selector = undefined;
+ }
+ for ( type in types ) {
+ this.on( type, selector, data, types[ type ], one );
+ }
+ return this;
+ }
+
+ if ( data == null && fn == null ) {
+ // ( types, fn )
+ fn = selector;
+ data = selector = undefined;
+ } else if ( fn == null ) {
+ if ( typeof selector === "string" ) {
+ // ( types, selector, fn )
+ fn = data;
+ data = undefined;
+ } else {
+ // ( types, data, fn )
+ fn = data;
+ data = selector;
+ selector = undefined;
+ }
+ }
+ if ( fn === false ) {
+ fn = returnFalse;
+ } else if ( !fn ) {
+ return this;
+ }
+
+ if ( one === 1 ) {
+ origFn = fn;
+ fn = function( event ) {
+ // Can use an empty set, since event contains the info
+ jQuery().off( event );
+ return origFn.apply( this, arguments );
+ };
+ // Use same guid so caller can remove using origFn
+ fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
+ }
+ return this.each( function() {
+ jQuery.event.add( this, types, fn, data, selector );
+ });
+ },
+ one: function( types, selector, data, fn ) {
+ return this.on( types, selector, data, fn, 1 );
+ },
+ off: function( types, selector, fn ) {
+ var handleObj, type;
+ if ( types && types.preventDefault && types.handleObj ) {
+ // ( event ) dispatched jQuery.Event
+ handleObj = types.handleObj;
+ jQuery( types.delegateTarget ).off(
+ handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
+ handleObj.selector,
+ handleObj.handler
+ );
+ return this;
+ }
+ if ( typeof types === "object" ) {
+ // ( types-object [, selector] )
+ for ( type in types ) {
+ this.off( type, selector, types[ type ] );
+ }
+ return this;
+ }
+ if ( selector === false || typeof selector === "function" ) {
+ // ( types [, fn] )
+ fn = selector;
+ selector = undefined;
+ }
+ if ( fn === false ) {
+ fn = returnFalse;
+ }
+ return this.each(function() {
+ jQuery.event.remove( this, types, fn, selector );
+ });
+ },
+
+ trigger: function( type, data ) {
+ return this.each(function() {
+ jQuery.event.trigger( type, data, this );
+ });
+ },
+ triggerHandler: function( type, data ) {
+ var elem = this[0];
+ if ( elem ) {
+ return jQuery.event.trigger( type, data, elem, true );
+ }
+ }
+});
+var isSimple = /^.[^:#\[\.,]*$/,
+ rparentsprev = /^(?:parents|prev(?:Until|All))/,
+ rneedsContext = jQuery.expr.match.needsContext,
+ // methods guaranteed to produce a unique set when starting from a unique set
+ guaranteedUnique = {
+ children: true,
+ contents: true,
+ next: true,
+ prev: true
+ };
+
+jQuery.fn.extend({
+ find: function( selector ) {
+ var i,
+ ret = [],
+ self = this,
+ len = self.length;
+
+ if ( typeof selector !== "string" ) {
+ return this.pushStack( jQuery( selector ).filter(function() {
+ for ( i = 0; i < len; i++ ) {
+ if ( jQuery.contains( self[ i ], this ) ) {
+ return true;
+ }
+ }
+ }) );
+ }
+
+ for ( i = 0; i < len; i++ ) {
+ jQuery.find( selector, self[ i ], ret );
+ }
+
+ // Needed because $( selector, context ) becomes $( context ).find( selector )
+ ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
+ ret.selector = this.selector ? this.selector + " " + selector : selector;
+ return ret;
+ },
+
+ has: function( target ) {
+ var targets = jQuery( target, this ),
+ l = targets.length;
+
+ return this.filter(function() {
+ var i = 0;
+ for ( ; i < l; i++ ) {
+ if ( jQuery.contains( this, targets[i] ) ) {
+ return true;
+ }
+ }
+ });
+ },
+
+ not: function( selector ) {
+ return this.pushStack( winnow(this, selector || [], true) );
+ },
+
+ filter: function( selector ) {
+ return this.pushStack( winnow(this, selector || [], false) );
+ },
+
+ is: function( selector ) {
+ return !!winnow(
+ this,
+
+ // If this is a positional/relative selector, check membership in the returned set
+ // so $("p:first").is("p:last") won't return true for a doc with two "p".
+ typeof selector === "string" && rneedsContext.test( selector ) ?
+ jQuery( selector ) :
+ selector || [],
+ false
+ ).length;
+ },
+
+ closest: function( selectors, context ) {
+ var cur,
+ i = 0,
+ l = this.length,
+ matched = [],
+ pos = ( rneedsContext.test( selectors ) || typeof selectors !== "string" ) ?
+ jQuery( selectors, context || this.context ) :
+ 0;
+
+ for ( ; i < l; i++ ) {
+ for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {
+ // Always skip document fragments
+ if ( cur.nodeType < 11 && (pos ?
+ pos.index(cur) > -1 :
+
+ // Don't pass non-elements to Sizzle
+ cur.nodeType === 1 &&
+ jQuery.find.matchesSelector(cur, selectors)) ) {
+
+ cur = matched.push( cur );
+ break;
+ }
+ }
+ }
+
+ return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched );
+ },
+
+ // Determine the position of an element within
+ // the matched set of elements
+ index: function( elem ) {
+
+ // No argument, return index in parent
+ if ( !elem ) {
+ return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
+ }
+
+ // index in selector
+ if ( typeof elem === "string" ) {
+ return core_indexOf.call( jQuery( elem ), this[ 0 ] );
+ }
+
+ // Locate the position of the desired element
+ return core_indexOf.call( this,
+
+ // If it receives a jQuery object, the first element is used
+ elem.jquery ? elem[ 0 ] : elem
+ );
+ },
+
+ add: function( selector, context ) {
+ var set = typeof selector === "string" ?
+ jQuery( selector, context ) :
+ jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
+ all = jQuery.merge( this.get(), set );
+
+ return this.pushStack( jQuery.unique(all) );
+ },
+
+ addBack: function( selector ) {
+ return this.add( selector == null ?
+ this.prevObject : this.prevObject.filter(selector)
+ );
+ }
+});
+
+function sibling( cur, dir ) {
+ while ( (cur = cur[dir]) && cur.nodeType !== 1 ) {}
+
+ return cur;
+}
+
+jQuery.each({
+ parent: function( elem ) {
+ var parent = elem.parentNode;
+ return parent && parent.nodeType !== 11 ? parent : null;
+ },
+ parents: function( elem ) {
+ return jQuery.dir( elem, "parentNode" );
+ },
+ parentsUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "parentNode", until );
+ },
+ next: function( elem ) {
+ return sibling( elem, "nextSibling" );
+ },
+ prev: function( elem ) {
+ return sibling( elem, "previousSibling" );
+ },
+ nextAll: function( elem ) {
+ return jQuery.dir( elem, "nextSibling" );
+ },
+ prevAll: function( elem ) {
+ return jQuery.dir( elem, "previousSibling" );
+ },
+ nextUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "nextSibling", until );
+ },
+ prevUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "previousSibling", until );
+ },
+ siblings: function( elem ) {
+ return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
+ },
+ children: function( elem ) {
+ return jQuery.sibling( elem.firstChild );
+ },
+ contents: function( elem ) {
+ return elem.contentDocument || jQuery.merge( [], elem.childNodes );
+ }
+}, function( name, fn ) {
+ jQuery.fn[ name ] = function( until, selector ) {
+ var matched = jQuery.map( this, fn, until );
+
+ if ( name.slice( -5 ) !== "Until" ) {
+ selector = until;
+ }
+
+ if ( selector && typeof selector === "string" ) {
+ matched = jQuery.filter( selector, matched );
+ }
+
+ if ( this.length > 1 ) {
+ // Remove duplicates
+ if ( !guaranteedUnique[ name ] ) {
+ jQuery.unique( matched );
+ }
+
+ // Reverse order for parents* and prev-derivatives
+ if ( rparentsprev.test( name ) ) {
+ matched.reverse();
+ }
+ }
+
+ return this.pushStack( matched );
+ };
+});
+
+jQuery.extend({
+ filter: function( expr, elems, not ) {
+ var elem = elems[ 0 ];
+
+ if ( not ) {
+ expr = ":not(" + expr + ")";
+ }
+
+ return elems.length === 1 && elem.nodeType === 1 ?
+ jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
+ jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
+ return elem.nodeType === 1;
+ }));
+ },
+
+ dir: function( elem, dir, until ) {
+ var matched = [],
+ truncate = until !== undefined;
+
+ while ( (elem = elem[ dir ]) && elem.nodeType !== 9 ) {
+ if ( elem.nodeType === 1 ) {
+ if ( truncate && jQuery( elem ).is( until ) ) {
+ break;
+ }
+ matched.push( elem );
+ }
+ }
+ return matched;
+ },
+
+ sibling: function( n, elem ) {
+ var matched = [];
+
+ for ( ; n; n = n.nextSibling ) {
+ if ( n.nodeType === 1 && n !== elem ) {
+ matched.push( n );
+ }
+ }
+
+ return matched;
+ }
+});
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, not ) {
+ if ( jQuery.isFunction( qualifier ) ) {
+ return jQuery.grep( elements, function( elem, i ) {
+ /* jshint -W018 */
+ return !!qualifier.call( elem, i, elem ) !== not;
+ });
+
+ }
+
+ if ( qualifier.nodeType ) {
+ return jQuery.grep( elements, function( elem ) {
+ return ( elem === qualifier ) !== not;
+ });
+
+ }
+
+ if ( typeof qualifier === "string" ) {
+ if ( isSimple.test( qualifier ) ) {
+ return jQuery.filter( qualifier, elements, not );
+ }
+
+ qualifier = jQuery.filter( qualifier, elements );
+ }
+
+ return jQuery.grep( elements, function( elem ) {
+ return ( core_indexOf.call( qualifier, elem ) >= 0 ) !== not;
+ });
+}
+var rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
+ rtagName = /<([\w:]+)/,
+ rhtml = /<|&#?\w+;/,
+ rnoInnerhtml = /<(?:script|style|link)/i,
+ manipulation_rcheckableType = /^(?:checkbox|radio)$/i,
+ // checked="checked" or checked
+ rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+ rscriptType = /^$|\/(?:java|ecma)script/i,
+ rscriptTypeMasked = /^true\/(.*)/,
+ rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
+
+ // We have to close these tags to support XHTML (#13200)
+ wrapMap = {
+
+ // Support: IE 9
+ option: [ 1, "<select multiple='multiple'>", "</select>" ],
+
+ thead: [ 1, "<table>", "</table>" ],
+ col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
+ tr: [ 2, "<table><tbody>", "</tbody></table>" ],
+ td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
+
+ _default: [ 0, "", "" ]
+ };
+
+// Support: IE 9
+wrapMap.optgroup = wrapMap.option;
+
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+jQuery.fn.extend({
+ text: function( value ) {
+ return jQuery.access( this, function( value ) {
+ return value === undefined ?
+ jQuery.text( this ) :
+ this.empty().append( ( this[ 0 ] && this[ 0 ].ownerDocument || document ).createTextNode( value ) );
+ }, null, value, arguments.length );
+ },
+
+ append: function() {
+ return this.domManip( arguments, function( elem ) {
+ if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+ var target = manipulationTarget( this, elem );
+ target.appendChild( elem );
+ }
+ });
+ },
+
+ prepend: function() {
+ return this.domManip( arguments, function( elem ) {
+ if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+ var target = manipulationTarget( this, elem );
+ target.insertBefore( elem, target.firstChild );
+ }
+ });
+ },
+
+ before: function() {
+ return this.domManip( arguments, function( elem ) {
+ if ( this.parentNode ) {
+ this.parentNode.insertBefore( elem, this );
+ }
+ });
+ },
+
+ after: function() {
+ return this.domManip( arguments, function( elem ) {
+ if ( this.parentNode ) {
+ this.parentNode.insertBefore( elem, this.nextSibling );
+ }
+ });
+ },
+
+ // keepData is for internal use only--do not document
+ remove: function( selector, keepData ) {
+ var elem,
+ elems = selector ? jQuery.filter( selector, this ) : this,
+ i = 0;
+
+ for ( ; (elem = elems[i]) != null; i++ ) {
+ if ( !keepData && elem.nodeType === 1 ) {
+ jQuery.cleanData( getAll( elem ) );
+ }
+
+ if ( elem.parentNode ) {
+ if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {
+ setGlobalEval( getAll( elem, "script" ) );
+ }
+ elem.parentNode.removeChild( elem );
+ }
+ }
+
+ return this;
+ },
+
+ empty: function() {
+ var elem,
+ i = 0;
+
+ for ( ; (elem = this[i]) != null; i++ ) {
+ if ( elem.nodeType === 1 ) {
+
+ // Prevent memory leaks
+ jQuery.cleanData( getAll( elem, false ) );
+
+ // Remove any remaining nodes
+ elem.textContent = "";
+ }
+ }
+
+ return this;
+ },
+
+ clone: function( dataAndEvents, deepDataAndEvents ) {
+ dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
+ deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
+
+ return this.map( function () {
+ return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
+ });
+ },
+
+ html: function( value ) {
+ return jQuery.access( this, function( value ) {
+ var elem = this[ 0 ] || {},
+ i = 0,
+ l = this.length;
+
+ if ( value === undefined && elem.nodeType === 1 ) {
+ return elem.innerHTML;
+ }
+
+ // See if we can take a shortcut and just use innerHTML
+ if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
+ !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {
+
+ value = value.replace( rxhtmlTag, "<$1></$2>" );
+
+ try {
+ for ( ; i < l; i++ ) {
+ elem = this[ i ] || {};
+
+ // Remove element nodes and prevent memory leaks
+ if ( elem.nodeType === 1 ) {
+ jQuery.cleanData( getAll( elem, false ) );
+ elem.innerHTML = value;
+ }
+ }
+
+ elem = 0;
+
+ // If using innerHTML throws an exception, use the fallback method
+ } catch( e ) {}
+ }
+
+ if ( elem ) {
+ this.empty().append( value );
+ }
+ }, null, value, arguments.length );
+ },
+
+ replaceWith: function() {
+ var
+ // Snapshot the DOM in case .domManip sweeps something relevant into its fragment
+ args = jQuery.map( this, function( elem ) {
+ return [ elem.nextSibling, elem.parentNode ];
+ }),
+ i = 0;
+
+ // Make the changes, replacing each context element with the new content
+ this.domManip( arguments, function( elem ) {
+ var next = args[ i++ ],
+ parent = args[ i++ ];
+
+ if ( parent ) {
+ // Don't use the snapshot next if it has moved (#13810)
+ if ( next && next.parentNode !== parent ) {
+ next = this.nextSibling;
+ }
+ jQuery( this ).remove();
+ parent.insertBefore( elem, next );
+ }
+ // Allow new content to include elements from the context set
+ }, true );
+
+ // Force removal if there was no new content (e.g., from empty arguments)
+ return i ? this : this.remove();
+ },
+
+ detach: function( selector ) {
+ return this.remove( selector, true );
+ },
+
+ domManip: function( args, callback, allowIntersection ) {
+
+ // Flatten any nested arrays
+ args = core_concat.apply( [], args );
+
+ var fragment, first, scripts, hasScripts, node, doc,
+ i = 0,
+ l = this.length,
+ set = this,
+ iNoClone = l - 1,
+ value = args[ 0 ],
+ isFunction = jQuery.isFunction( value );
+
+ // We can't cloneNode fragments that contain checked, in WebKit
+ if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) {
+ return this.each(function( index ) {
+ var self = set.eq( index );
+ if ( isFunction ) {
+ args[ 0 ] = value.call( this, index, self.html() );
+ }
+ self.domManip( args, callback, allowIntersection );
+ });
+ }
+
+ if ( l ) {
+ fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, !allowIntersection && this );
+ first = fragment.firstChild;
+
+ if ( fragment.childNodes.length === 1 ) {
+ fragment = first;
+ }
+
+ if ( first ) {
+ scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
+ hasScripts = scripts.length;
+
+ // Use the original fragment for the last item instead of the first because it can end up
+ // being emptied incorrectly in certain situations (#8070).
+ for ( ; i < l; i++ ) {
+ node = fragment;
+
+ if ( i !== iNoClone ) {
+ node = jQuery.clone( node, true, true );
+
+ // Keep references to cloned scripts for later restoration
+ if ( hasScripts ) {
+ // Support: QtWebKit
+ // jQuery.merge because core_push.apply(_, arraylike) throws
+ jQuery.merge( scripts, getAll( node, "script" ) );
+ }
+ }
+
+ callback.call( this[ i ], node, i );
+ }
+
+ if ( hasScripts ) {
+ doc = scripts[ scripts.length - 1 ].ownerDocument;
+
+ // Reenable scripts
+ jQuery.map( scripts, restoreScript );
+
+ // Evaluate executable scripts on first document insertion
+ for ( i = 0; i < hasScripts; i++ ) {
+ node = scripts[ i ];
+ if ( rscriptType.test( node.type || "" ) &&
+ !data_priv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
+
+ if ( node.src ) {
+ // Hope ajax is available...
+ jQuery._evalUrl( node.src );
+ } else {
+ jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) );
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return this;
+ }
+});
+
+jQuery.each({
+ appendTo: "append",
+ prependTo: "prepend",
+ insertBefore: "before",
+ insertAfter: "after",
+ replaceAll: "replaceWith"
+}, function( name, original ) {
+ jQuery.fn[ name ] = function( selector ) {
+ var elems,
+ ret = [],
+ insert = jQuery( selector ),
+ last = insert.length - 1,
+ i = 0;
+
+ for ( ; i <= last; i++ ) {
+ elems = i === last ? this : this.clone( true );
+ jQuery( insert[ i ] )[ original ]( elems );
+
+ // Support: QtWebKit
+ // .get() because core_push.apply(_, arraylike) throws
+ core_push.apply( ret, elems.get() );
+ }
+
+ return this.pushStack( ret );
+ };
+});
+
+jQuery.extend({
+ clone: function( elem, dataAndEvents, deepDataAndEvents ) {
+ var i, l, srcElements, destElements,
+ clone = elem.cloneNode( true ),
+ inPage = jQuery.contains( elem.ownerDocument, elem );
+
+ // Support: IE >= 9
+ // Fix Cloning issues
+ if ( !jQuery.support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && !jQuery.isXMLDoc( elem ) ) {
+
+ // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
+ destElements = getAll( clone );
+ srcElements = getAll( elem );
+
+ for ( i = 0, l = srcElements.length; i < l; i++ ) {
+ fixInput( srcElements[ i ], destElements[ i ] );
+ }
+ }
+
+ // Copy the events from the original to the clone
+ if ( dataAndEvents ) {
+ if ( deepDataAndEvents ) {
+ srcElements = srcElements || getAll( elem );
+ destElements = destElements || getAll( clone );
+
+ for ( i = 0, l = srcElements.length; i < l; i++ ) {
+ cloneCopyEvent( srcElements[ i ], destElements[ i ] );
+ }
+ } else {
+ cloneCopyEvent( elem, clone );
+ }
+ }
+
+ // Preserve script evaluation history
+ destElements = getAll( clone, "script" );
+ if ( destElements.length > 0 ) {
+ setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
+ }
+
+ // Return the cloned set
+ return clone;
+ },
+
+ buildFragment: function( elems, context, scripts, selection ) {
+ var elem, tmp, tag, wrap, contains, j,
+ i = 0,
+ l = elems.length,
+ fragment = context.createDocumentFragment(),
+ nodes = [];
+
+ for ( ; i < l; i++ ) {
+ elem = elems[ i ];
+
+ if ( elem || elem === 0 ) {
+
+ // Add nodes directly
+ if ( jQuery.type( elem ) === "object" ) {
+ // Support: QtWebKit
+ // jQuery.merge because core_push.apply(_, arraylike) throws
+ jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
+
+ // Convert non-html into a text node
+ } else if ( !rhtml.test( elem ) ) {
+ nodes.push( context.createTextNode( elem ) );
+
+ // Convert html into DOM nodes
+ } else {
+ tmp = tmp || fragment.appendChild( context.createElement("div") );
+
+ // Deserialize a standard representation
+ tag = ( rtagName.exec( elem ) || ["", ""] )[ 1 ].toLowerCase();
+ wrap = wrapMap[ tag ] || wrapMap._default;
+ tmp.innerHTML = wrap[ 1 ] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[ 2 ];
+
+ // Descend through wrappers to the right content
+ j = wrap[ 0 ];
+ while ( j-- ) {
+ tmp = tmp.lastChild;
+ }
+
+ // Support: QtWebKit
+ // jQuery.merge because core_push.apply(_, arraylike) throws
+ jQuery.merge( nodes, tmp.childNodes );
+
+ // Remember the top-level container
+ tmp = fragment.firstChild;
+
+ // Fixes #12346
+ // Support: Webkit, IE
+ tmp.textContent = "";
+ }
+ }
+ }
+
+ // Remove wrapper from fragment
+ fragment.textContent = "";
+
+ i = 0;
+ while ( (elem = nodes[ i++ ]) ) {
+
+ // #4087 - If origin and destination elements are the same, and this is
+ // that element, do not do anything
+ if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {
+ continue;
+ }
+
+ contains = jQuery.contains( elem.ownerDocument, elem );
+
+ // Append to fragment
+ tmp = getAll( fragment.appendChild( elem ), "script" );
+
+ // Preserve script evaluation history
+ if ( contains ) {
+ setGlobalEval( tmp );
+ }
+
+ // Capture executables
+ if ( scripts ) {
+ j = 0;
+ while ( (elem = tmp[ j++ ]) ) {
+ if ( rscriptType.test( elem.type || "" ) ) {
+ scripts.push( elem );
+ }
+ }
+ }
+ }
+
+ return fragment;
+ },
+
+ cleanData: function( elems ) {
+ var data, elem, events, type, key, j,
+ special = jQuery.event.special,
+ i = 0;
+
+ for ( ; (elem = elems[ i ]) !== undefined; i++ ) {
+ if ( Data.accepts( elem ) ) {
+ key = elem[ data_priv.expando ];
+
+ if ( key && (data = data_priv.cache[ key ]) ) {
+ events = Object.keys( data.events || {} );
+ if ( events.length ) {
+ for ( j = 0; (type = events[j]) !== undefined; j++ ) {
+ if ( special[ type ] ) {
+ jQuery.event.remove( elem, type );
+
+ // This is a shortcut to avoid jQuery.event.remove's overhead
+ } else {
+ jQuery.removeEvent( elem, type, data.handle );
+ }
+ }
+ }
+ if ( data_priv.cache[ key ] ) {
+ // Discard any remaining `private` data
+ delete data_priv.cache[ key ];
+ }
+ }
+ }
+ // Discard any remaining `user` data
+ delete data_user.cache[ elem[ data_user.expando ] ];
+ }
+ },
+
+ _evalUrl: function( url ) {
+ return jQuery.ajax({
+ url: url,
+ type: "GET",
+ dataType: "script",
+ async: false,
+ global: false,
+ "throws": true
+ });
+ }
+});
+
+// Support: 1.x compatibility
+// Manipulating tables requires a tbody
+function manipulationTarget( elem, content ) {
+ return jQuery.nodeName( elem, "table" ) &&
+ jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, "tr" ) ?
+
+ elem.getElementsByTagName("tbody")[0] ||
+ elem.appendChild( elem.ownerDocument.createElement("tbody") ) :
+ elem;
+}
+
+// Replace/restore the type attribute of script elements for safe DOM manipulation
+function disableScript( elem ) {
+ elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type;
+ return elem;
+}
+function restoreScript( elem ) {
+ var match = rscriptTypeMasked.exec( elem.type );
+
+ if ( match ) {
+ elem.type = match[ 1 ];
+ } else {
+ elem.removeAttribute("type");
+ }
+
+ return elem;
+}
+
+// Mark scripts as having already been evaluated
+function setGlobalEval( elems, refElements ) {
+ var l = elems.length,
+ i = 0;
+
+ for ( ; i < l; i++ ) {
+ data_priv.set(
+ elems[ i ], "globalEval", !refElements || data_priv.get( refElements[ i ], "globalEval" )
+ );
+ }
+}
+
+function cloneCopyEvent( src, dest ) {
+ var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;
+
+ if ( dest.nodeType !== 1 ) {
+ return;
+ }
+
+ // 1. Copy private data: events, handlers, etc.
+ if ( data_priv.hasData( src ) ) {
+ pdataOld = data_priv.access( src );
+ pdataCur = data_priv.set( dest, pdataOld );
+ events = pdataOld.events;
+
+ if ( events ) {
+ delete pdataCur.handle;
+ pdataCur.events = {};
+
+ for ( type in events ) {
+ for ( i = 0, l = events[ type ].length; i < l; i++ ) {
+ jQuery.event.add( dest, type, events[ type ][ i ] );
+ }
+ }
+ }
+ }
+
+ // 2. Copy user data
+ if ( data_user.hasData( src ) ) {
+ udataOld = data_user.access( src );
+ udataCur = jQuery.extend( {}, udataOld );
+
+ data_user.set( dest, udataCur );
+ }
+}
+
+
+function getAll( context, tag ) {
+ var ret = context.getElementsByTagName ? context.getElementsByTagName( tag || "*" ) :
+ context.querySelectorAll ? context.querySelectorAll( tag || "*" ) :
+ [];
+
+ return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
+ jQuery.merge( [ context ], ret ) :
+ ret;
+}
+
+// Support: IE >= 9
+function fixInput( src, dest ) {
+ var nodeName = dest.nodeName.toLowerCase();
+
+ // Fails to persist the checked state of a cloned checkbox or radio button.
+ if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) {
+ dest.checked = src.checked;
+
+ // Fails to return the selected option to the default selected state when cloning options
+ } else if ( nodeName === "input" || nodeName === "textarea" ) {
+ dest.defaultValue = src.defaultValue;
+ }
+}
+jQuery.fn.extend({
+ wrapAll: function( html ) {
+ var wrap;
+
+ if ( jQuery.isFunction( html ) ) {
+ return this.each(function( i ) {
+ jQuery( this ).wrapAll( html.call(this, i) );
+ });
+ }
+
+ if ( this[ 0 ] ) {
+
+ // The elements to wrap the target around
+ wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );
+
+ if ( this[ 0 ].parentNode ) {
+ wrap.insertBefore( this[ 0 ] );
+ }
+
+ wrap.map(function() {
+ var elem = this;
+
+ while ( elem.firstElementChild ) {
+ elem = elem.firstElementChild;
+ }
+
+ return elem;
+ }).append( this );
+ }
+
+ return this;
+ },
+
+ wrapInner: function( html ) {
+ if ( jQuery.isFunction( html ) ) {
+ return this.each(function( i ) {
+ jQuery( this ).wrapInner( html.call(this, i) );
+ });
+ }
+
+ return this.each(function() {
+ var self = jQuery( this ),
+ contents = self.contents();
+
+ if ( contents.length ) {
+ contents.wrapAll( html );
+
+ } else {
+ self.append( html );
+ }
+ });
+ },
+
+ wrap: function( html ) {
+ var isFunction = jQuery.isFunction( html );
+
+ return this.each(function( i ) {
+ jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
+ });
+ },
+
+ unwrap: function() {
+ return this.parent().each(function() {
+ if ( !jQuery.nodeName( this, "body" ) ) {
+ jQuery( this ).replaceWith( this.childNodes );
+ }
+ }).end();
+ }
+});
+var curCSS, iframe,
+ // swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
+ // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
+ rdisplayswap = /^(none|table(?!-c[ea]).+)/,
+ rmargin = /^margin/,
+ rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ),
+ rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ),
+ rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ),
+ elemdisplay = { BODY: "block" },
+
+ cssShow = { position: "absolute", visibility: "hidden", display: "block" },
+ cssNormalTransform = {
+ letterSpacing: 0,
+ fontWeight: 400
+ },
+
+ cssExpand = [ "Top", "Right", "Bottom", "Left" ],
+ cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];
+
+// return a css property mapped to a potentially vendor prefixed property
+function vendorPropName( style, name ) {
+
+ // shortcut for names that are not vendor prefixed
+ if ( name in style ) {
+ return name;
+ }
+
+ // check for vendor prefixed names
+ var capName = name.charAt(0).toUpperCase() + name.slice(1),
+ origName = name,
+ i = cssPrefixes.length;
+
+ while ( i-- ) {
+ name = cssPrefixes[ i ] + capName;
+ if ( name in style ) {
+ return name;
+ }
+ }
+
+ return origName;
+}
+
+function isHidden( elem, el ) {
+ // isHidden might be called from jQuery#filter function;
+ // in that case, element will be second argument
+ elem = el || elem;
+ return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
+}
+
+// NOTE: we've included the "window" in window.getComputedStyle
+// because jsdom on node.js will break without it.
+function getStyles( elem ) {
+ return window.getComputedStyle( elem, null );
+}
+
+function showHide( elements, show ) {
+ var display, elem, hidden,
+ values = [],
+ index = 0,
+ length = elements.length;
+
+ for ( ; index < length; index++ ) {
+ elem = elements[ index ];
+ if ( !elem.style ) {
+ continue;
+ }
+
+ values[ index ] = data_priv.get( elem, "olddisplay" );
+ display = elem.style.display;
+ if ( show ) {
+ // Reset the inline display of this element to learn if it is
+ // being hidden by cascaded rules or not
+ if ( !values[ index ] && display === "none" ) {
+ elem.style.display = "";
+ }
+
+ // Set elements which have been overridden with display: none
+ // in a stylesheet to whatever the default browser style is
+ // for such an element
+ if ( elem.style.display === "" && isHidden( elem ) ) {
+ values[ index ] = data_priv.access( elem, "olddisplay", css_defaultDisplay(elem.nodeName) );
+ }
+ } else {
+
+ if ( !values[ index ] ) {
+ hidden = isHidden( elem );
+
+ if ( display && display !== "none" || !hidden ) {
+ data_priv.set( elem, "olddisplay", hidden ? display : jQuery.css(elem, "display") );
+ }
+ }
+ }
+ }
+
+ // Set the display of most of the elements in a second loop
+ // to avoid the constant reflow
+ for ( index = 0; index < length; index++ ) {
+ elem = elements[ index ];
+ if ( !elem.style ) {
+ continue;
+ }
+ if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
+ elem.style.display = show ? values[ index ] || "" : "none";
+ }
+ }
+
+ return elements;
+}
+
+jQuery.fn.extend({
+ css: function( name, value ) {
+ return jQuery.access( this, function( elem, name, value ) {
+ var styles, len,
+ map = {},
+ i = 0;
+
+ if ( jQuery.isArray( name ) ) {
+ styles = getStyles( elem );
+ len = name.length;
+
+ for ( ; i < len; i++ ) {
+ map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
+ }
+
+ return map;
+ }
+
+ return value !== undefined ?
+ jQuery.style( elem, name, value ) :
+ jQuery.css( elem, name );
+ }, name, value, arguments.length > 1 );
+ },
+ show: function() {
+ return showHide( this, true );
+ },
+ hide: function() {
+ return showHide( this );
+ },
+ toggle: function( state ) {
+ if ( typeof state === "boolean" ) {
+ return state ? this.show() : this.hide();
+ }
+
+ return this.each(function() {
+ if ( isHidden( this ) ) {
+ jQuery( this ).show();
+ } else {
+ jQuery( this ).hide();
+ }
+ });
+ }
+});
+
+jQuery.extend({
+ // Add in style property hooks for overriding the default
+ // behavior of getting and setting a style property
+ cssHooks: {
+ opacity: {
+ get: function( elem, computed ) {
+ if ( computed ) {
+ // We should always get a number back from opacity
+ var ret = curCSS( elem, "opacity" );
+ return ret === "" ? "1" : ret;
+ }
+ }
+ }
+ },
+
+ // Don't automatically add "px" to these possibly-unitless properties
+ cssNumber: {
+ "columnCount": true,
+ "fillOpacity": true,
+ "fontWeight": true,
+ "lineHeight": true,
+ "opacity": true,
+ "order": 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": "cssFloat"
+ },
+
+ // Get and set the style property on a DOM Node
+ style: function( elem, name, value, extra ) {
+ // Don't set styles on text and comment nodes
+ if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
+ return;
+ }
+
+ // Make sure that we're working with the right name
+ var ret, type, hooks,
+ origName = jQuery.camelCase( name ),
+ style = elem.style;
+
+ name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
+
+ // gets hook for the prefixed version
+ // followed by the unprefixed version
+ hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+ // Check if we're setting a value
+ if ( value !== undefined ) {
+ type = typeof value;
+
+ // convert relative number strings (+= or -=) to relative numbers. #7345
+ if ( type === "string" && (ret = rrelNum.exec( value )) ) {
+ value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
+ // Fixes bug #9237
+ type = "number";
+ }
+
+ // Make sure that NaN and null values aren't set. See: #7116
+ if ( value == null || type === "number" && isNaN( value ) ) {
+ return;
+ }
+
+ // If a number was passed in, add 'px' to the (except for certain CSS properties)
+ if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
+ value += "px";
+ }
+
+ // Fixes #8908, it can be done more correctly by specifying setters in cssHooks,
+ // but it would mean to define eight (for every problematic property) identical functions
+ if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) {
+ style[ name ] = "inherit";
+ }
+
+ // If a hook was provided, use that value, otherwise just set the specified value
+ if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
+ style[ name ] = value;
+ }
+
+ } else {
+ // If a hook was provided get the non-computed value from there
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
+ return ret;
+ }
+
+ // Otherwise just get the value from the style object
+ return style[ name ];
+ }
+ },
+
+ css: function( elem, name, extra, styles ) {
+ var val, num, hooks,
+ origName = jQuery.camelCase( name );
+
+ // Make sure that we're working with the right name
+ name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
+
+ // gets hook for the prefixed version
+ // followed by the unprefixed version
+ hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+ // If a hook was provided get the computed value from there
+ if ( hooks && "get" in hooks ) {
+ val = hooks.get( elem, true, extra );
+ }
+
+ // Otherwise, if a way to get the computed value exists, use that
+ if ( val === undefined ) {
+ val = curCSS( elem, name, styles );
+ }
+
+ //convert "normal" to computed value
+ if ( val === "normal" && name in cssNormalTransform ) {
+ val = cssNormalTransform[ name ];
+ }
+
+ // Return, converting to number if forced or a qualifier was provided and val looks numeric
+ if ( extra === "" || extra ) {
+ num = parseFloat( val );
+ return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;
+ }
+ return val;
+ }
+});
+
+curCSS = function( elem, name, _computed ) {
+ var width, minWidth, maxWidth,
+ computed = _computed || getStyles( elem ),
+
+ // Support: IE9
+ // getPropertyValue is only needed for .css('filter') in IE9, see #12537
+ ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined,
+ style = elem.style;
+
+ if ( computed ) {
+
+ if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
+ ret = jQuery.style( elem, name );
+ }
+
+ // Support: Safari 5.1
+ // A tribute to the "awesome hack by Dean Edwards"
+ // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
+ // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
+ if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
+
+ // Remember the original values
+ width = style.width;
+ minWidth = style.minWidth;
+ maxWidth = style.maxWidth;
+
+ // Put in the new values to get a computed value out
+ style.minWidth = style.maxWidth = style.width = ret;
+ ret = computed.width;
+
+ // Revert the changed values
+ style.width = width;
+ style.minWidth = minWidth;
+ style.maxWidth = maxWidth;
+ }
+ }
+
+ return ret;
+};
+
+
+function setPositiveNumber( elem, value, subtract ) {
+ var matches = rnumsplit.exec( value );
+ return matches ?
+ // Guard against undefined "subtract", e.g., when used as in cssHooks
+ Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
+ value;
+}
+
+function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
+ var i = extra === ( isBorderBox ? "border" : "content" ) ?
+ // If we already have the right measurement, avoid augmentation
+ 4 :
+ // Otherwise initialize for horizontal or vertical properties
+ name === "width" ? 1 : 0,
+
+ val = 0;
+
+ for ( ; i < 4; i += 2 ) {
+ // both box models exclude margin, so add it if we want it
+ if ( extra === "margin" ) {
+ val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
+ }
+
+ if ( isBorderBox ) {
+ // border-box includes padding, so remove it if we want content
+ if ( extra === "content" ) {
+ val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
+ }
+
+ // at this point, extra isn't border nor margin, so remove border
+ if ( extra !== "margin" ) {
+ val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
+ }
+ } else {
+ // at this point, extra isn't content, so add padding
+ val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
+
+ // at this point, extra isn't content nor padding, so add border
+ if ( extra !== "padding" ) {
+ val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
+ }
+ }
+ }
+
+ return val;
+}
+
+function getWidthOrHeight( elem, name, extra ) {
+
+ // Start with offset property, which is equivalent to the border-box value
+ var valueIsBorderBox = true,
+ val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
+ styles = getStyles( elem ),
+ isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
+
+ // some non-html elements return undefined for offsetWidth, so check for null/undefined
+ // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
+ // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
+ if ( val <= 0 || val == null ) {
+ // Fall back to computed then uncomputed css if necessary
+ val = curCSS( elem, name, styles );
+ if ( val < 0 || val == null ) {
+ val = elem.style[ name ];
+ }
+
+ // Computed unit is not pixels. Stop here and return.
+ if ( rnumnonpx.test(val) ) {
+ return val;
+ }
+
+ // we need the check for style in case a browser which returns unreliable values
+ // for getComputedStyle silently falls back to the reliable elem.style
+ valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] );
+
+ // Normalize "", auto, and prepare for extra
+ val = parseFloat( val ) || 0;
+ }
+
+ // use the active box-sizing model to add/subtract irrelevant styles
+ return ( val +
+ augmentWidthOrHeight(
+ elem,
+ name,
+ extra || ( isBorderBox ? "border" : "content" ),
+ valueIsBorderBox,
+ styles
+ )
+ ) + "px";
+}
+
+// Try to determine the default display value of an element
+function css_defaultDisplay( nodeName ) {
+ var doc = document,
+ display = elemdisplay[ nodeName ];
+
+ if ( !display ) {
+ display = actualDisplay( nodeName, doc );
+
+ // If the simple way fails, read from inside an iframe
+ if ( display === "none" || !display ) {
+ // Use the already-created iframe if possible
+ iframe = ( iframe ||
+ jQuery("<iframe frameborder='0' width='0' height='0'/>")
+ .css( "cssText", "display:block !important" )
+ ).appendTo( doc.documentElement );
+
+ // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
+ doc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document;
+ doc.write("<!doctype html><html><body>");
+ doc.close();
+
+ display = actualDisplay( nodeName, doc );
+ iframe.detach();
+ }
+
+ // Store the correct default display
+ elemdisplay[ nodeName ] = display;
+ }
+
+ return display;
+}
+
+// Called ONLY from within css_defaultDisplay
+function actualDisplay( name, doc ) {
+ var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
+ display = jQuery.css( elem[0], "display" );
+ elem.remove();
+ return display;
+}
+
+jQuery.each([ "height", "width" ], function( i, name ) {
+ jQuery.cssHooks[ name ] = {
+ get: function( elem, computed, extra ) {
+ if ( computed ) {
+ // certain elements can have dimension info if we invisibly show them
+ // however, it must have a current display style that would benefit from this
+ return elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, "display" ) ) ?
+ jQuery.swap( elem, cssShow, function() {
+ return getWidthOrHeight( elem, name, extra );
+ }) :
+ getWidthOrHeight( elem, name, extra );
+ }
+ },
+
+ set: function( elem, value, extra ) {
+ var styles = extra && getStyles( elem );
+ return setPositiveNumber( elem, value, extra ?
+ augmentWidthOrHeight(
+ elem,
+ name,
+ extra,
+ jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
+ styles
+ ) : 0
+ );
+ }
+ };
+});
+
+// These hooks cannot be added until DOM ready because the support test
+// for it is not run until after DOM ready
+jQuery(function() {
+ // Support: Android 2.3
+ if ( !jQuery.support.reliableMarginRight ) {
+ jQuery.cssHooks.marginRight = {
+ get: function( elem, computed ) {
+ if ( computed ) {
+ // Support: Android 2.3
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+ // Work around by temporarily setting element display to inline-block
+ return jQuery.swap( elem, { "display": "inline-block" },
+ curCSS, [ elem, "marginRight" ] );
+ }
+ }
+ };
+ }
+
+ // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
+ // getComputedStyle returns percent when specified for top/left/bottom/right
+ // rather than make the css module depend on the offset module, we just check for it here
+ if ( !jQuery.support.pixelPosition && jQuery.fn.position ) {
+ jQuery.each( [ "top", "left" ], function( i, prop ) {
+ jQuery.cssHooks[ prop ] = {
+ get: function( elem, computed ) {
+ if ( computed ) {
+ computed = curCSS( elem, prop );
+ // if curCSS returns percentage, fallback to offset
+ return rnumnonpx.test( computed ) ?
+ jQuery( elem ).position()[ prop ] + "px" :
+ computed;
+ }
+ }
+ };
+ });
+ }
+
+});
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+ jQuery.expr.filters.hidden = function( elem ) {
+ // Support: Opera <= 12.12
+ // Opera reports offsetWidths and offsetHeights less than zero on some elements
+ return elem.offsetWidth <= 0 && elem.offsetHeight <= 0;
+ };
+
+ jQuery.expr.filters.visible = function( elem ) {
+ return !jQuery.expr.filters.hidden( elem );
+ };
+}
+
+// These hooks are used by animate to expand properties
+jQuery.each({
+ margin: "",
+ padding: "",
+ border: "Width"
+}, function( prefix, suffix ) {
+ jQuery.cssHooks[ prefix + suffix ] = {
+ expand: function( value ) {
+ var i = 0,
+ expanded = {},
+
+ // assumes a single number if not a string
+ parts = typeof value === "string" ? value.split(" ") : [ value ];
+
+ for ( ; i < 4; i++ ) {
+ expanded[ prefix + cssExpand[ i ] + suffix ] =
+ parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
+ }
+
+ return expanded;
+ }
+ };
+
+ if ( !rmargin.test( prefix ) ) {
+ jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
+ }
+});
+var r20 = /%20/g,
+ rbracket = /\[\]$/,
+ rCRLF = /\r?\n/g,
+ rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
+ rsubmittable = /^(?:input|select|textarea|keygen)/i;
+
+jQuery.fn.extend({
+ serialize: function() {
+ return jQuery.param( this.serializeArray() );
+ },
+ serializeArray: function() {
+ return this.map(function(){
+ // Can add propHook for "elements" to filter or add form elements
+ var elements = jQuery.prop( this, "elements" );
+ return elements ? jQuery.makeArray( elements ) : this;
+ })
+ .filter(function(){
+ var type = this.type;
+ // Use .is(":disabled") so that fieldset[disabled] works
+ return this.name && !jQuery( this ).is( ":disabled" ) &&
+ rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
+ ( this.checked || !manipulation_rcheckableType.test( type ) );
+ })
+ .map(function( i, elem ){
+ var val = jQuery( this ).val();
+
+ return val == null ?
+ null :
+ jQuery.isArray( val ) ?
+ jQuery.map( val, function( val ){
+ return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+ }) :
+ { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+ }).get();
+ }
+});
+
+//Serialize an array of form elements or a set of
+//key/values into a query string
+jQuery.param = function( a, traditional ) {
+ var prefix,
+ s = [],
+ add = function( key, value ) {
+ // If value is a function, invoke it and return its value
+ value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
+ s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
+ };
+
+ // Set traditional to true for jQuery <= 1.3.2 behavior.
+ if ( traditional === undefined ) {
+ traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
+ }
+
+ // If an array was passed in, assume that it is an array of form elements.
+ if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
+ // Serialize the form elements
+ jQuery.each( a, function() {
+ add( this.name, this.value );
+ });
+
+ } else {
+ // If traditional, encode the "old" way (the way 1.3.2 or older
+ // did it), otherwise encode params recursively.
+ for ( prefix in a ) {
+ buildParams( prefix, a[ prefix ], traditional, add );
+ }
+ }
+
+ // Return the resulting serialization
+ return s.join( "&" ).replace( r20, "+" );
+};
+
+function buildParams( prefix, obj, traditional, add ) {
+ var name;
+
+ if ( jQuery.isArray( obj ) ) {
+ // Serialize array item.
+ jQuery.each( obj, function( i, v ) {
+ if ( traditional || rbracket.test( prefix ) ) {
+ // Treat each array item as a scalar.
+ add( prefix, v );
+
+ } else {
+ // Item is non-scalar (array or object), encode its numeric index.
+ buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
+ }
+ });
+
+ } else if ( !traditional && jQuery.type( obj ) === "object" ) {
+ // Serialize object item.
+ for ( name in obj ) {
+ buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
+ }
+
+ } else {
+ // Serialize scalar item.
+ add( prefix, obj );
+ }
+}
+jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
+ "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
+ "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
+
+ // Handle event binding
+ jQuery.fn[ name ] = function( data, fn ) {
+ return arguments.length > 0 ?
+ this.on( name, null, data, fn ) :
+ this.trigger( name );
+ };
+});
+
+jQuery.fn.extend({
+ hover: function( fnOver, fnOut ) {
+ return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+ },
+
+ bind: function( types, data, fn ) {
+ return this.on( types, null, data, fn );
+ },
+ unbind: function( types, fn ) {
+ return this.off( types, null, fn );
+ },
+
+ delegate: function( selector, types, data, fn ) {
+ return this.on( types, selector, data, fn );
+ },
+ undelegate: function( selector, types, fn ) {
+ // ( namespace ) or ( selector, types [, fn] )
+ return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
+ }
+});
+var
+ // Document location
+ ajaxLocParts,
+ ajaxLocation,
+
+ ajax_nonce = jQuery.now(),
+
+ ajax_rquery = /\?/,
+ rhash = /#.*$/,
+ rts = /([?&])_=[^&]*/,
+ rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
+ // #7653, #8125, #8152: local protocol detection
+ rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
+ rnoContent = /^(?:GET|HEAD)$/,
+ rprotocol = /^\/\//,
+ rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
+
+ // Keep a copy of the old load method
+ _load = jQuery.fn.load,
+
+ /* Prefilters
+ * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
+ * 2) These are called:
+ * - BEFORE asking for a transport
+ * - AFTER param serialization (s.data is a string if s.processData is true)
+ * 3) key is the dataType
+ * 4) the catchall symbol "*" can be used
+ * 5) execution will start with transport dataType and THEN continue down to "*" if needed
+ */
+ prefilters = {},
+
+ /* Transports bindings
+ * 1) key is the dataType
+ * 2) the catchall symbol "*" can be used
+ * 3) selection will start with transport dataType and THEN go to "*" if needed
+ */
+ transports = {},
+
+ // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
+ allTypes = "*/".concat("*");
+
+// #8138, IE may throw an exception when accessing
+// a field from window.location if document.domain has been set
+try {
+ ajaxLocation = location.href;
+} catch( e ) {
+ // Use the href attribute of an A element
+ // since IE will modify it given document.location
+ ajaxLocation = document.createElement( "a" );
+ ajaxLocation.href = "";
+ ajaxLocation = ajaxLocation.href;
+}
+
+// Segment location into parts
+ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
+
+// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
+function addToPrefiltersOrTransports( structure ) {
+
+ // dataTypeExpression is optional and defaults to "*"
+ return function( dataTypeExpression, func ) {
+
+ if ( typeof dataTypeExpression !== "string" ) {
+ func = dataTypeExpression;
+ dataTypeExpression = "*";
+ }
+
+ var dataType,
+ i = 0,
+ dataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || [];
+
+ if ( jQuery.isFunction( func ) ) {
+ // For each dataType in the dataTypeExpression
+ while ( (dataType = dataTypes[i++]) ) {
+ // Prepend if requested
+ if ( dataType[0] === "+" ) {
+ dataType = dataType.slice( 1 ) || "*";
+ (structure[ dataType ] = structure[ dataType ] || []).unshift( func );
+
+ // Otherwise append
+ } else {
+ (structure[ dataType ] = structure[ dataType ] || []).push( func );
+ }
+ }
+ }
+ };
+}
+
+// Base inspection function for prefilters and transports
+function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
+
+ var inspected = {},
+ seekingTransport = ( structure === transports );
+
+ function inspect( dataType ) {
+ var selected;
+ inspected[ dataType ] = true;
+ jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
+ var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
+ if( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
+ options.dataTypes.unshift( dataTypeOrTransport );
+ inspect( dataTypeOrTransport );
+ return false;
+ } else if ( seekingTransport ) {
+ return !( selected = dataTypeOrTransport );
+ }
+ });
+ return selected;
+ }
+
+ return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
+}
+
+// A special extend for ajax options
+// that takes "flat" options (not to be deep extended)
+// Fixes #9887
+function ajaxExtend( target, src ) {
+ var key, deep,
+ flatOptions = jQuery.ajaxSettings.flatOptions || {};
+
+ for ( key in src ) {
+ if ( src[ key ] !== undefined ) {
+ ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];
+ }
+ }
+ if ( deep ) {
+ jQuery.extend( true, target, deep );
+ }
+
+ return target;
+}
+
+jQuery.fn.load = function( url, params, callback ) {
+ if ( typeof url !== "string" && _load ) {
+ return _load.apply( this, arguments );
+ }
+
+ var selector, type, response,
+ self = this,
+ off = url.indexOf(" ");
+
+ if ( off >= 0 ) {
+ selector = url.slice( off );
+ url = url.slice( 0, off );
+ }
+
+ // If it's a function
+ if ( jQuery.isFunction( params ) ) {
+
+ // We assume that it's the callback
+ callback = params;
+ params = undefined;
+
+ // Otherwise, build a param string
+ } else if ( params && typeof params === "object" ) {
+ type = "POST";
+ }
+
+ // If we have elements to modify, make the request
+ if ( self.length > 0 ) {
+ jQuery.ajax({
+ url: url,
+
+ // if "type" variable is undefined, then "GET" method will be used
+ type: type,
+ dataType: "html",
+ data: params
+ }).done(function( responseText ) {
+
+ // Save response for use in complete callback
+ response = arguments;
+
+ self.html( selector ?
+
+ // If a selector was specified, locate the right elements in a dummy div
+ // Exclude scripts to avoid IE 'Permission Denied' errors
+ jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) :
+
+ // Otherwise use the full result
+ responseText );
+
+ }).complete( callback && function( jqXHR, status ) {
+ self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
+ });
+ }
+
+ return this;
+};
+
+// Attach a bunch of functions for handling common AJAX events
+jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ){
+ jQuery.fn[ type ] = function( fn ){
+ return this.on( type, fn );
+ };
+});
+
+jQuery.extend({
+
+ // Counter for holding the number of active queries
+ active: 0,
+
+ // Last-Modified header cache for next request
+ lastModified: {},
+ etag: {},
+
+ ajaxSettings: {
+ url: ajaxLocation,
+ type: "GET",
+ isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
+ global: true,
+ processData: true,
+ async: true,
+ contentType: "application/x-www-form-urlencoded; charset=UTF-8",
+ /*
+ timeout: 0,
+ data: null,
+ dataType: null,
+ username: null,
+ password: null,
+ cache: null,
+ throws: false,
+ traditional: false,
+ headers: {},
+ */
+
+ accepts: {
+ "*": allTypes,
+ text: "text/plain",
+ html: "text/html",
+ xml: "application/xml, text/xml",
+ json: "application/json, text/javascript"
+ },
+
+ contents: {
+ xml: /xml/,
+ html: /html/,
+ json: /json/
+ },
+
+ responseFields: {
+ xml: "responseXML",
+ text: "responseText",
+ json: "responseJSON"
+ },
+
+ // Data converters
+ // Keys separate source (or catchall "*") and destination types with a single space
+ converters: {
+
+ // Convert anything to text
+ "* text": String,
+
+ // Text to html (true = no transformation)
+ "text html": true,
+
+ // Evaluate text as a json expression
+ "text json": jQuery.parseJSON,
+
+ // Parse text as xml
+ "text xml": jQuery.parseXML
+ },
+
+ // For options that shouldn't be deep extended:
+ // you can add your own custom options here if
+ // and when you create one that shouldn't be
+ // deep extended (see ajaxExtend)
+ flatOptions: {
+ url: true,
+ context: true
+ }
+ },
+
+ // Creates a full fledged settings object into target
+ // with both ajaxSettings and settings fields.
+ // If target is omitted, writes into ajaxSettings.
+ ajaxSetup: function( target, settings ) {
+ return settings ?
+
+ // Building a settings object
+ ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
+
+ // Extending ajaxSettings
+ ajaxExtend( jQuery.ajaxSettings, target );
+ },
+
+ ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
+ ajaxTransport: addToPrefiltersOrTransports( transports ),
+
+ // Main method
+ ajax: function( url, options ) {
+
+ // If url is an object, simulate pre-1.5 signature
+ if ( typeof url === "object" ) {
+ options = url;
+ url = undefined;
+ }
+
+ // Force options to be an object
+ options = options || {};
+
+ var transport,
+ // URL without anti-cache param
+ cacheURL,
+ // Response headers
+ responseHeadersString,
+ responseHeaders,
+ // timeout handle
+ timeoutTimer,
+ // Cross-domain detection vars
+ parts,
+ // To know if global events are to be dispatched
+ fireGlobals,
+ // Loop variable
+ i,
+ // Create the final options object
+ s = jQuery.ajaxSetup( {}, options ),
+ // Callbacks context
+ callbackContext = s.context || s,
+ // Context for global events is callbackContext if it is a DOM node or jQuery collection
+ globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?
+ jQuery( callbackContext ) :
+ jQuery.event,
+ // Deferreds
+ deferred = jQuery.Deferred(),
+ completeDeferred = jQuery.Callbacks("once memory"),
+ // Status-dependent callbacks
+ statusCode = s.statusCode || {},
+ // Headers (they are sent all at once)
+ requestHeaders = {},
+ requestHeadersNames = {},
+ // The jqXHR state
+ state = 0,
+ // Default abort message
+ strAbort = "canceled",
+ // Fake xhr
+ jqXHR = {
+ readyState: 0,
+
+ // Builds headers hashtable if needed
+ getResponseHeader: function( key ) {
+ var match;
+ if ( state === 2 ) {
+ if ( !responseHeaders ) {
+ responseHeaders = {};
+ while ( (match = rheaders.exec( responseHeadersString )) ) {
+ responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
+ }
+ }
+ match = responseHeaders[ key.toLowerCase() ];
+ }
+ return match == null ? null : match;
+ },
+
+ // Raw string
+ getAllResponseHeaders: function() {
+ return state === 2 ? responseHeadersString : null;
+ },
+
+ // Caches the header
+ setRequestHeader: function( name, value ) {
+ var lname = name.toLowerCase();
+ if ( !state ) {
+ name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
+ requestHeaders[ name ] = value;
+ }
+ return this;
+ },
+
+ // Overrides response content-type header
+ overrideMimeType: function( type ) {
+ if ( !state ) {
+ s.mimeType = type;
+ }
+ return this;
+ },
+
+ // Status-dependent callbacks
+ statusCode: function( map ) {
+ var code;
+ if ( map ) {
+ if ( state < 2 ) {
+ for ( code in map ) {
+ // Lazy-add the new callback in a way that preserves old ones
+ statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
+ }
+ } else {
+ // Execute the appropriate callbacks
+ jqXHR.always( map[ jqXHR.status ] );
+ }
+ }
+ return this;
+ },
+
+ // Cancel the request
+ abort: function( statusText ) {
+ var finalText = statusText || strAbort;
+ if ( transport ) {
+ transport.abort( finalText );
+ }
+ done( 0, finalText );
+ return this;
+ }
+ };
+
+ // Attach deferreds
+ deferred.promise( jqXHR ).complete = completeDeferred.add;
+ jqXHR.success = jqXHR.done;
+ jqXHR.error = jqXHR.fail;
+
+ // Remove hash character (#7531: and string promotion)
+ // Add protocol if not provided (prefilters might expect it)
+ // Handle falsy url in the settings object (#10093: consistency with old signature)
+ // We also use the url parameter if available
+ s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" )
+ .replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
+
+ // Alias method option to type as per ticket #12004
+ s.type = options.method || options.type || s.method || s.type;
+
+ // Extract dataTypes list
+ s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( core_rnotwhite ) || [""];
+
+ // A cross-domain request is in order when we have a protocol:host:port mismatch
+ if ( s.crossDomain == null ) {
+ parts = rurl.exec( s.url.toLowerCase() );
+ s.crossDomain = !!( parts &&
+ ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
+ ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==
+ ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) )
+ );
+ }
+
+ // Convert data if not already a string
+ if ( s.data && s.processData && typeof s.data !== "string" ) {
+ s.data = jQuery.param( s.data, s.traditional );
+ }
+
+ // Apply prefilters
+ inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
+
+ // If request was aborted inside a prefilter, stop there
+ if ( state === 2 ) {
+ return jqXHR;
+ }
+
+ // We can fire global events as of now if asked to
+ fireGlobals = s.global;
+
+ // Watch for a new set of requests
+ if ( fireGlobals && jQuery.active++ === 0 ) {
+ jQuery.event.trigger("ajaxStart");
+ }
+
+ // Uppercase the type
+ s.type = s.type.toUpperCase();
+
+ // Determine if request has content
+ s.hasContent = !rnoContent.test( s.type );
+
+ // Save the URL in case we're toying with the If-Modified-Since
+ // and/or If-None-Match header later on
+ cacheURL = s.url;
+
+ // More options handling for requests with no content
+ if ( !s.hasContent ) {
+
+ // If data is available, append data to url
+ if ( s.data ) {
+ cacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
+ // #9682: remove data so that it's not used in an eventual retry
+ delete s.data;
+ }
+
+ // Add anti-cache in url if needed
+ if ( s.cache === false ) {
+ s.url = rts.test( cacheURL ) ?
+
+ // If there is already a '_' parameter, set its value
+ cacheURL.replace( rts, "$1_=" + ajax_nonce++ ) :
+
+ // Otherwise add one to the end
+ cacheURL + ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ajax_nonce++;
+ }
+ }
+
+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+ if ( s.ifModified ) {
+ if ( jQuery.lastModified[ cacheURL ] ) {
+ jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
+ }
+ if ( jQuery.etag[ cacheURL ] ) {
+ jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
+ }
+ }
+
+ // Set the correct header, if data is being sent
+ if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
+ jqXHR.setRequestHeader( "Content-Type", s.contentType );
+ }
+
+ // Set the Accepts header for the server, depending on the dataType
+ jqXHR.setRequestHeader(
+ "Accept",
+ s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
+ s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
+ s.accepts[ "*" ]
+ );
+
+ // Check for headers option
+ for ( i in s.headers ) {
+ jqXHR.setRequestHeader( i, s.headers[ i ] );
+ }
+
+ // Allow custom headers/mimetypes and early abort
+ if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
+ // Abort if not done already and return
+ return jqXHR.abort();
+ }
+
+ // aborting is no longer a cancellation
+ strAbort = "abort";
+
+ // Install callbacks on deferreds
+ for ( i in { success: 1, error: 1, complete: 1 } ) {
+ jqXHR[ i ]( s[ i ] );
+ }
+
+ // Get transport
+ transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
+
+ // If no transport, we auto-abort
+ if ( !transport ) {
+ done( -1, "No Transport" );
+ } else {
+ jqXHR.readyState = 1;
+
+ // Send global event
+ if ( fireGlobals ) {
+ globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
+ }
+ // Timeout
+ if ( s.async && s.timeout > 0 ) {
+ timeoutTimer = setTimeout(function() {
+ jqXHR.abort("timeout");
+ }, s.timeout );
+ }
+
+ try {
+ state = 1;
+ transport.send( requestHeaders, done );
+ } catch ( e ) {
+ // Propagate exception as error if not done
+ if ( state < 2 ) {
+ done( -1, e );
+ // Simply rethrow otherwise
+ } else {
+ throw e;
+ }
+ }
+ }
+
+ // Callback for when everything is done
+ function done( status, nativeStatusText, responses, headers ) {
+ var isSuccess, success, error, response, modified,
+ statusText = nativeStatusText;
+
+ // Called once
+ if ( state === 2 ) {
+ return;
+ }
+
+ // State is "done" now
+ state = 2;
+
+ // Clear timeout if it exists
+ if ( timeoutTimer ) {
+ clearTimeout( timeoutTimer );
+ }
+
+ // Dereference transport for early garbage collection
+ // (no matter how long the jqXHR object will be used)
+ transport = undefined;
+
+ // Cache response headers
+ responseHeadersString = headers || "";
+
+ // Set readyState
+ jqXHR.readyState = status > 0 ? 4 : 0;
+
+ // Determine if successful
+ isSuccess = status >= 200 && status < 300 || status === 304;
+
+ // Get response data
+ if ( responses ) {
+ response = ajaxHandleResponses( s, jqXHR, responses );
+ }
+
+ // Convert no matter what (that way responseXXX fields are always set)
+ response = ajaxConvert( s, response, jqXHR, isSuccess );
+
+ // If successful, handle type chaining
+ if ( isSuccess ) {
+
+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+ if ( s.ifModified ) {
+ modified = jqXHR.getResponseHeader("Last-Modified");
+ if ( modified ) {
+ jQuery.lastModified[ cacheURL ] = modified;
+ }
+ modified = jqXHR.getResponseHeader("etag");
+ if ( modified ) {
+ jQuery.etag[ cacheURL ] = modified;
+ }
+ }
+
+ // if no content
+ if ( status === 204 || s.type === "HEAD" ) {
+ statusText = "nocontent";
+
+ // if not modified
+ } else if ( status === 304 ) {
+ statusText = "notmodified";
+
+ // If we have data, let's convert it
+ } else {
+ statusText = response.state;
+ success = response.data;
+ error = response.error;
+ isSuccess = !error;
+ }
+ } else {
+ // We extract error from statusText
+ // then normalize statusText and status for non-aborts
+ error = statusText;
+ if ( status || !statusText ) {
+ statusText = "error";
+ if ( status < 0 ) {
+ status = 0;
+ }
+ }
+ }
+
+ // Set data for the fake xhr object
+ jqXHR.status = status;
+ jqXHR.statusText = ( nativeStatusText || statusText ) + "";
+
+ // Success/Error
+ if ( isSuccess ) {
+ deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
+ } else {
+ deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
+ }
+
+ // Status-dependent callbacks
+ jqXHR.statusCode( statusCode );
+ statusCode = undefined;
+
+ if ( fireGlobals ) {
+ globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
+ [ jqXHR, s, isSuccess ? success : error ] );
+ }
+
+ // Complete
+ completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
+
+ if ( fireGlobals ) {
+ globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
+ // Handle the global AJAX counter
+ if ( !( --jQuery.active ) ) {
+ jQuery.event.trigger("ajaxStop");
+ }
+ }
+ }
+
+ return jqXHR;
+ },
+
+ getJSON: function( url, data, callback ) {
+ return jQuery.get( url, data, callback, "json" );
+ },
+
+ getScript: function( url, callback ) {
+ return jQuery.get( url, undefined, callback, "script" );
+ }
+});
+
+jQuery.each( [ "get", "post" ], function( i, method ) {
+ jQuery[ method ] = function( url, data, callback, type ) {
+ // shift arguments if data argument was omitted
+ if ( jQuery.isFunction( data ) ) {
+ type = type || callback;
+ callback = data;
+ data = undefined;
+ }
+
+ return jQuery.ajax({
+ url: url,
+ type: method,
+ dataType: type,
+ data: data,
+ success: callback
+ });
+ };
+});
+
+/* Handles responses to an ajax request:
+ * - finds the right dataType (mediates between content-type and expected dataType)
+ * - returns the corresponding response
+ */
+function ajaxHandleResponses( s, jqXHR, responses ) {
+
+ var ct, type, finalDataType, firstDataType,
+ contents = s.contents,
+ dataTypes = s.dataTypes;
+
+ // Remove auto dataType and get content-type in the process
+ while( dataTypes[ 0 ] === "*" ) {
+ dataTypes.shift();
+ if ( ct === undefined ) {
+ ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
+ }
+ }
+
+ // Check if we're dealing with a known content-type
+ if ( ct ) {
+ for ( type in contents ) {
+ if ( contents[ type ] && contents[ type ].test( ct ) ) {
+ dataTypes.unshift( type );
+ break;
+ }
+ }
+ }
+
+ // Check to see if we have a response for the expected dataType
+ if ( dataTypes[ 0 ] in responses ) {
+ finalDataType = dataTypes[ 0 ];
+ } else {
+ // Try convertible dataTypes
+ for ( type in responses ) {
+ if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
+ finalDataType = type;
+ break;
+ }
+ if ( !firstDataType ) {
+ firstDataType = type;
+ }
+ }
+ // Or just use first one
+ finalDataType = finalDataType || firstDataType;
+ }
+
+ // If we found a dataType
+ // We add the dataType to the list if needed
+ // and return the corresponding response
+ if ( finalDataType ) {
+ if ( finalDataType !== dataTypes[ 0 ] ) {
+ dataTypes.unshift( finalDataType );
+ }
+ return responses[ finalDataType ];
+ }
+}
+
+/* Chain conversions given the request and the original response
+ * Also sets the responseXXX fields on the jqXHR instance
+ */
+function ajaxConvert( s, response, jqXHR, isSuccess ) {
+ var conv2, current, conv, tmp, prev,
+ converters = {},
+ // Work with a copy of dataTypes in case we need to modify it for conversion
+ dataTypes = s.dataTypes.slice();
+
+ // Create converters map with lowercased keys
+ if ( dataTypes[ 1 ] ) {
+ for ( conv in s.converters ) {
+ converters[ conv.toLowerCase() ] = s.converters[ conv ];
+ }
+ }
+
+ current = dataTypes.shift();
+
+ // Convert to each sequential dataType
+ while ( current ) {
+
+ if ( s.responseFields[ current ] ) {
+ jqXHR[ s.responseFields[ current ] ] = response;
+ }
+
+ // Apply the dataFilter if provided
+ if ( !prev && isSuccess && s.dataFilter ) {
+ response = s.dataFilter( response, s.dataType );
+ }
+
+ prev = current;
+ current = dataTypes.shift();
+
+ if ( current ) {
+
+ // There's only work to do if current dataType is non-auto
+ if ( current === "*" ) {
+
+ current = prev;
+
+ // Convert response if prev dataType is non-auto and differs from current
+ } else if ( prev !== "*" && prev !== current ) {
+
+ // Seek a direct converter
+ conv = converters[ prev + " " + current ] || converters[ "* " + current ];
+
+ // If none found, seek a pair
+ if ( !conv ) {
+ for ( conv2 in converters ) {
+
+ // If conv2 outputs current
+ tmp = conv2.split( " " );
+ if ( tmp[ 1 ] === current ) {
+
+ // If prev can be converted to accepted input
+ conv = converters[ prev + " " + tmp[ 0 ] ] ||
+ converters[ "* " + tmp[ 0 ] ];
+ if ( conv ) {
+ // Condense equivalence converters
+ if ( conv === true ) {
+ conv = converters[ conv2 ];
+
+ // Otherwise, insert the intermediate dataType
+ } else if ( converters[ conv2 ] !== true ) {
+ current = tmp[ 0 ];
+ dataTypes.unshift( tmp[ 1 ] );
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ // Apply converter (if not an equivalence)
+ if ( conv !== true ) {
+
+ // Unless errors are allowed to bubble, catch and return them
+ if ( conv && s[ "throws" ] ) {
+ response = conv( response );
+ } else {
+ try {
+ response = conv( response );
+ } catch ( e ) {
+ return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return { state: "success", data: response };
+}
+// Install script dataType
+jQuery.ajaxSetup({
+ accepts: {
+ script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
+ },
+ contents: {
+ script: /(?:java|ecma)script/
+ },
+ converters: {
+ "text script": function( text ) {
+ jQuery.globalEval( text );
+ return text;
+ }
+ }
+});
+
+// Handle cache's special case and crossDomain
+jQuery.ajaxPrefilter( "script", function( s ) {
+ if ( s.cache === undefined ) {
+ s.cache = false;
+ }
+ if ( s.crossDomain ) {
+ s.type = "GET";
+ }
+});
+
+// Bind script tag hack transport
+jQuery.ajaxTransport( "script", function( s ) {
+ // This transport only deals with cross domain requests
+ if ( s.crossDomain ) {
+ var script, callback;
+ return {
+ send: function( _, complete ) {
+ script = jQuery("<script>").prop({
+ async: true,
+ charset: s.scriptCharset,
+ src: s.url
+ }).on(
+ "load error",
+ callback = function( evt ) {
+ script.remove();
+ callback = null;
+ if ( evt ) {
+ complete( evt.type === "error" ? 404 : 200, evt.type );
+ }
+ }
+ );
+ document.head.appendChild( script[ 0 ] );
+ },
+ abort: function() {
+ if ( callback ) {
+ callback();
+ }
+ }
+ };
+ }
+});
+var oldCallbacks = [],
+ rjsonp = /(=)\?(?=&|$)|\?\?/;
+
+// Default jsonp settings
+jQuery.ajaxSetup({
+ jsonp: "callback",
+ jsonpCallback: function() {
+ var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( ajax_nonce++ ) );
+ this[ callback ] = true;
+ return callback;
+ }
+});
+
+// Detect, normalize options and install callbacks for jsonp requests
+jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
+
+ var callbackName, overwritten, responseContainer,
+ jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
+ "url" :
+ typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data"
+ );
+
+ // Handle iff the expected data type is "jsonp" or we have a parameter to set
+ if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
+
+ // Get callback name, remembering preexisting value associated with it
+ callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
+ s.jsonpCallback() :
+ s.jsonpCallback;
+
+ // Insert callback into url or form data
+ if ( jsonProp ) {
+ s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
+ } else if ( s.jsonp !== false ) {
+ s.url += ( ajax_rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
+ }
+
+ // Use data converter to retrieve json after script execution
+ s.converters["script json"] = function() {
+ if ( !responseContainer ) {
+ jQuery.error( callbackName + " was not called" );
+ }
+ return responseContainer[ 0 ];
+ };
+
+ // force json dataType
+ s.dataTypes[ 0 ] = "json";
+
+ // Install callback
+ overwritten = window[ callbackName ];
+ window[ callbackName ] = function() {
+ responseContainer = arguments;
+ };
+
+ // Clean-up function (fires after converters)
+ jqXHR.always(function() {
+ // Restore preexisting value
+ window[ callbackName ] = overwritten;
+
+ // Save back as free
+ if ( s[ callbackName ] ) {
+ // make sure that re-using the options doesn't screw things around
+ s.jsonpCallback = originalSettings.jsonpCallback;
+
+ // save the callback name for future use
+ oldCallbacks.push( callbackName );
+ }
+
+ // Call if it was a function and we have a response
+ if ( responseContainer && jQuery.isFunction( overwritten ) ) {
+ overwritten( responseContainer[ 0 ] );
+ }
+
+ responseContainer = overwritten = undefined;
+ });
+
+ // Delegate to script
+ return "script";
+ }
+});
+jQuery.ajaxSettings.xhr = function() {
+ try {
+ return new XMLHttpRequest();
+ } catch( e ) {}
+};
+
+var xhrSupported = jQuery.ajaxSettings.xhr(),
+ xhrSuccessStatus = {
+ // file protocol always yields status code 0, assume 200
+ 0: 200,
+ // Support: IE9
+ // #1450: sometimes IE returns 1223 when it should be 204
+ 1223: 204
+ },
+ // Support: IE9
+ // We need to keep track of outbound xhr and abort them manually
+ // because IE is not smart enough to do it all by itself
+ xhrId = 0,
+ xhrCallbacks = {};
+
+if ( window.ActiveXObject ) {
+ jQuery( window ).on( "unload", function() {
+ for( var key in xhrCallbacks ) {
+ xhrCallbacks[ key ]();
+ }
+ xhrCallbacks = undefined;
+ });
+}
+
+jQuery.support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
+jQuery.support.ajax = xhrSupported = !!xhrSupported;
+
+jQuery.ajaxTransport(function( options ) {
+ var callback;
+ // Cross domain only allowed if supported through XMLHttpRequest
+ if ( jQuery.support.cors || xhrSupported && !options.crossDomain ) {
+ return {
+ send: function( headers, complete ) {
+ var i, id,
+ xhr = options.xhr();
+ xhr.open( options.type, options.url, options.async, options.username, options.password );
+ // Apply custom fields if provided
+ if ( options.xhrFields ) {
+ for ( i in options.xhrFields ) {
+ xhr[ i ] = options.xhrFields[ i ];
+ }
+ }
+ // Override mime type if needed
+ if ( options.mimeType && xhr.overrideMimeType ) {
+ xhr.overrideMimeType( options.mimeType );
+ }
+ // X-Requested-With header
+ // For cross-domain requests, seeing as conditions for a preflight are
+ // akin to a jigsaw puzzle, we simply never set it to be sure.
+ // (it can always be set on a per-request basis or even using ajaxSetup)
+ // For same-domain requests, won't change header if already provided.
+ if ( !options.crossDomain && !headers["X-Requested-With"] ) {
+ headers["X-Requested-With"] = "XMLHttpRequest";
+ }
+ // Set headers
+ for ( i in headers ) {
+ xhr.setRequestHeader( i, headers[ i ] );
+ }
+ // Callback
+ callback = function( type ) {
+ return function() {
+ if ( callback ) {
+ delete xhrCallbacks[ id ];
+ callback = xhr.onload = xhr.onerror = null;
+ if ( type === "abort" ) {
+ xhr.abort();
+ } else if ( type === "error" ) {
+ complete(
+ // file protocol always yields status 0, assume 404
+ xhr.status || 404,
+ xhr.statusText
+ );
+ } else {
+ complete(
+ xhrSuccessStatus[ xhr.status ] || xhr.status,
+ xhr.statusText,
+ // Support: IE9
+ // #11426: When requesting binary data, IE9 will throw an exception
+ // on any attempt to access responseText
+ typeof xhr.responseText === "string" ? {
+ text: xhr.responseText
+ } : undefined,
+ xhr.getAllResponseHeaders()
+ );
+ }
+ }
+ };
+ };
+ // Listen to events
+ xhr.onload = callback();
+ xhr.onerror = callback("error");
+ // Create the abort callback
+ callback = xhrCallbacks[( id = xhrId++ )] = callback("abort");
+ // Do send the request
+ // This may raise an exception which is actually
+ // handled in jQuery.ajax (so no try/catch here)
+ xhr.send( options.hasContent && options.data || null );
+ },
+ abort: function() {
+ if ( callback ) {
+ callback();
+ }
+ }
+ };
+ }
+});
+var fxNow, timerId,
+ rfxtypes = /^(?:toggle|show|hide)$/,
+ rfxnum = new RegExp( "^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i" ),
+ rrun = /queueHooks$/,
+ animationPrefilters = [ defaultPrefilter ],
+ tweeners = {
+ "*": [function( prop, value ) {
+ var tween = this.createTween( prop, value ),
+ target = tween.cur(),
+ parts = rfxnum.exec( value ),
+ unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
+
+ // Starting value computation is required for potential unit mismatches
+ start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) &&
+ rfxnum.exec( jQuery.css( tween.elem, prop ) ),
+ scale = 1,
+ maxIterations = 20;
+
+ if ( start && start[ 3 ] !== unit ) {
+ // Trust units reported by jQuery.css
+ unit = unit || start[ 3 ];
+
+ // Make sure we update the tween properties later on
+ parts = parts || [];
+
+ // Iteratively approximate from a nonzero starting point
+ start = +target || 1;
+
+ do {
+ // If previous iteration zeroed out, double until we get *something*
+ // Use a string for doubling factor so we don't accidentally see scale as unchanged below
+ scale = scale || ".5";
+
+ // Adjust and apply
+ start = start / scale;
+ jQuery.style( tween.elem, prop, start + unit );
+
+ // Update scale, tolerating zero or NaN from tween.cur()
+ // And breaking the loop if scale is unchanged or perfect, or if we've just had enough
+ } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
+ }
+
+ // Update tween properties
+ if ( parts ) {
+ start = tween.start = +start || +target || 0;
+ tween.unit = unit;
+ // If a +=/-= token was provided, we're doing a relative animation
+ tween.end = parts[ 1 ] ?
+ start + ( parts[ 1 ] + 1 ) * parts[ 2 ] :
+ +parts[ 2 ];
+ }
+
+ return tween;
+ }]
+ };
+
+// Animations created synchronously will run synchronously
+function createFxNow() {
+ setTimeout(function() {
+ fxNow = undefined;
+ });
+ return ( fxNow = jQuery.now() );
+}
+
+function createTween( value, prop, animation ) {
+ var tween,
+ collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),
+ index = 0,
+ length = collection.length;
+ for ( ; index < length; index++ ) {
+ if ( (tween = collection[ index ].call( animation, prop, value )) ) {
+
+ // we're done with this property
+ return tween;
+ }
+ }
+}
+
+function Animation( elem, properties, options ) {
+ var result,
+ stopped,
+ index = 0,
+ length = animationPrefilters.length,
+ deferred = jQuery.Deferred().always( function() {
+ // don't match elem in the :animated selector
+ delete tick.elem;
+ }),
+ tick = function() {
+ if ( stopped ) {
+ return false;
+ }
+ var currentTime = fxNow || createFxNow(),
+ remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
+ // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)
+ temp = remaining / animation.duration || 0,
+ percent = 1 - temp,
+ index = 0,
+ length = animation.tweens.length;
+
+ for ( ; index < length ; index++ ) {
+ animation.tweens[ index ].run( percent );
+ }
+
+ deferred.notifyWith( elem, [ animation, percent, remaining ]);
+
+ if ( percent < 1 && length ) {
+ return remaining;
+ } else {
+ deferred.resolveWith( elem, [ animation ] );
+ return false;
+ }
+ },
+ animation = deferred.promise({
+ elem: elem,
+ props: jQuery.extend( {}, properties ),
+ opts: jQuery.extend( true, { specialEasing: {} }, options ),
+ originalProperties: properties,
+ originalOptions: options,
+ startTime: fxNow || createFxNow(),
+ duration: options.duration,
+ tweens: [],
+ createTween: function( prop, end ) {
+ var tween = jQuery.Tween( elem, animation.opts, prop, end,
+ animation.opts.specialEasing[ prop ] || animation.opts.easing );
+ animation.tweens.push( tween );
+ return tween;
+ },
+ stop: function( gotoEnd ) {
+ var index = 0,
+ // if we are going to the end, we want to run all the tweens
+ // otherwise we skip this part
+ length = gotoEnd ? animation.tweens.length : 0;
+ if ( stopped ) {
+ return this;
+ }
+ stopped = true;
+ for ( ; index < length ; index++ ) {
+ animation.tweens[ index ].run( 1 );
+ }
+
+ // resolve when we played the last frame
+ // otherwise, reject
+ if ( gotoEnd ) {
+ deferred.resolveWith( elem, [ animation, gotoEnd ] );
+ } else {
+ deferred.rejectWith( elem, [ animation, gotoEnd ] );
+ }
+ return this;
+ }
+ }),
+ props = animation.props;
+
+ propFilter( props, animation.opts.specialEasing );
+
+ for ( ; index < length ; index++ ) {
+ result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );
+ if ( result ) {
+ return result;
+ }
+ }
+
+ jQuery.map( props, createTween, animation );
+
+ if ( jQuery.isFunction( animation.opts.start ) ) {
+ animation.opts.start.call( elem, animation );
+ }
+
+ jQuery.fx.timer(
+ jQuery.extend( tick, {
+ elem: elem,
+ anim: animation,
+ queue: animation.opts.queue
+ })
+ );
+
+ // attach callbacks from options
+ return animation.progress( animation.opts.progress )
+ .done( animation.opts.done, animation.opts.complete )
+ .fail( animation.opts.fail )
+ .always( animation.opts.always );
+}
+
+function propFilter( props, specialEasing ) {
+ var index, name, easing, value, hooks;
+
+ // camelCase, specialEasing and expand cssHook pass
+ for ( index in props ) {
+ name = jQuery.camelCase( index );
+ easing = specialEasing[ name ];
+ value = props[ index ];
+ if ( jQuery.isArray( value ) ) {
+ easing = value[ 1 ];
+ value = props[ index ] = value[ 0 ];
+ }
+
+ if ( index !== name ) {
+ props[ name ] = value;
+ delete props[ index ];
+ }
+
+ hooks = jQuery.cssHooks[ name ];
+ if ( hooks && "expand" in hooks ) {
+ value = hooks.expand( value );
+ delete props[ name ];
+
+ // not quite $.extend, this wont overwrite keys already present.
+ // also - reusing 'index' from above because we have the correct "name"
+ for ( index in value ) {
+ if ( !( index in props ) ) {
+ props[ index ] = value[ index ];
+ specialEasing[ index ] = easing;
+ }
+ }
+ } else {
+ specialEasing[ name ] = easing;
+ }
+ }
+}
+
+jQuery.Animation = jQuery.extend( Animation, {
+
+ tweener: function( props, callback ) {
+ if ( jQuery.isFunction( props ) ) {
+ callback = props;
+ props = [ "*" ];
+ } else {
+ props = props.split(" ");
+ }
+
+ var prop,
+ index = 0,
+ length = props.length;
+
+ for ( ; index < length ; index++ ) {
+ prop = props[ index ];
+ tweeners[ prop ] = tweeners[ prop ] || [];
+ tweeners[ prop ].unshift( callback );
+ }
+ },
+
+ prefilter: function( callback, prepend ) {
+ if ( prepend ) {
+ animationPrefilters.unshift( callback );
+ } else {
+ animationPrefilters.push( callback );
+ }
+ }
+});
+
+function defaultPrefilter( elem, props, opts ) {
+ /* jshint validthis: true */
+ var prop, value, toggle, tween, hooks, oldfire,
+ anim = this,
+ orig = {},
+ style = elem.style,
+ hidden = elem.nodeType && isHidden( elem ),
+ dataShow = data_priv.get( elem, "fxshow" );
+
+ // handle queue: false promises
+ if ( !opts.queue ) {
+ hooks = jQuery._queueHooks( elem, "fx" );
+ if ( hooks.unqueued == null ) {
+ hooks.unqueued = 0;
+ oldfire = hooks.empty.fire;
+ hooks.empty.fire = function() {
+ if ( !hooks.unqueued ) {
+ oldfire();
+ }
+ };
+ }
+ hooks.unqueued++;
+
+ anim.always(function() {
+ // doing this makes sure that the complete handler will be called
+ // before this completes
+ anim.always(function() {
+ hooks.unqueued--;
+ if ( !jQuery.queue( elem, "fx" ).length ) {
+ hooks.empty.fire();
+ }
+ });
+ });
+ }
+
+ // height/width overflow pass
+ if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
+ // Make sure that nothing sneaks out
+ // Record all 3 overflow attributes because IE9-10 do not
+ // change the overflow attribute when overflowX and
+ // overflowY are set to the same value
+ opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
+
+ // Set display property to inline-block for height/width
+ // animations on inline elements that are having width/height animated
+ if ( jQuery.css( elem, "display" ) === "inline" &&
+ jQuery.css( elem, "float" ) === "none" ) {
+
+ style.display = "inline-block";
+ }
+ }
+
+ if ( opts.overflow ) {
+ style.overflow = "hidden";
+ anim.always(function() {
+ style.overflow = opts.overflow[ 0 ];
+ style.overflowX = opts.overflow[ 1 ];
+ style.overflowY = opts.overflow[ 2 ];
+ });
+ }
+
+
+ // show/hide pass
+ for ( prop in props ) {
+ value = props[ prop ];
+ if ( rfxtypes.exec( value ) ) {
+ delete props[ prop ];
+ toggle = toggle || value === "toggle";
+ if ( value === ( hidden ? "hide" : "show" ) ) {
+
+ // If there is dataShow left over from a stopped hide or show and we are going to proceed with show, we should pretend to be hidden
+ if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
+ hidden = true;
+ } else {
+ continue;
+ }
+ }
+ orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
+ }
+ }
+
+ if ( !jQuery.isEmptyObject( orig ) ) {
+ if ( dataShow ) {
+ if ( "hidden" in dataShow ) {
+ hidden = dataShow.hidden;
+ }
+ } else {
+ dataShow = data_priv.access( elem, "fxshow", {} );
+ }
+
+ // store state if its toggle - enables .stop().toggle() to "reverse"
+ if ( toggle ) {
+ dataShow.hidden = !hidden;
+ }
+ if ( hidden ) {
+ jQuery( elem ).show();
+ } else {
+ anim.done(function() {
+ jQuery( elem ).hide();
+ });
+ }
+ anim.done(function() {
+ var prop;
+
+ data_priv.remove( elem, "fxshow" );
+ for ( prop in orig ) {
+ jQuery.style( elem, prop, orig[ prop ] );
+ }
+ });
+ for ( prop in orig ) {
+ tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
+
+ if ( !( prop in dataShow ) ) {
+ dataShow[ prop ] = tween.start;
+ if ( hidden ) {
+ tween.end = tween.start;
+ tween.start = prop === "width" || prop === "height" ? 1 : 0;
+ }
+ }
+ }
+ }
+}
+
+function Tween( elem, options, prop, end, easing ) {
+ return new Tween.prototype.init( elem, options, prop, end, easing );
+}
+jQuery.Tween = Tween;
+
+Tween.prototype = {
+ constructor: Tween,
+ init: function( elem, options, prop, end, easing, unit ) {
+ this.elem = elem;
+ this.prop = prop;
+ this.easing = easing || "swing";
+ this.options = options;
+ this.start = this.now = this.cur();
+ this.end = end;
+ this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
+ },
+ cur: function() {
+ var hooks = Tween.propHooks[ this.prop ];
+
+ return hooks && hooks.get ?
+ hooks.get( this ) :
+ Tween.propHooks._default.get( this );
+ },
+ run: function( percent ) {
+ var eased,
+ hooks = Tween.propHooks[ this.prop ];
+
+ if ( this.options.duration ) {
+ this.pos = eased = jQuery.easing[ this.easing ](
+ percent, this.options.duration * percent, 0, 1, this.options.duration
+ );
+ } else {
+ this.pos = eased = percent;
+ }
+ this.now = ( this.end - this.start ) * eased + this.start;
+
+ if ( this.options.step ) {
+ this.options.step.call( this.elem, this.now, this );
+ }
+
+ if ( hooks && hooks.set ) {
+ hooks.set( this );
+ } else {
+ Tween.propHooks._default.set( this );
+ }
+ return this;
+ }
+};
+
+Tween.prototype.init.prototype = Tween.prototype;
+
+Tween.propHooks = {
+ _default: {
+ get: function( tween ) {
+ var result;
+
+ if ( tween.elem[ tween.prop ] != null &&
+ (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
+ return tween.elem[ tween.prop ];
+ }
+
+ // passing an empty string as a 3rd parameter to .css will automatically
+ // attempt a parseFloat and fallback to a string if the parse fails
+ // so, simple values such as "10px" are parsed to Float.
+ // complex values such as "rotate(1rad)" are returned as is.
+ result = jQuery.css( tween.elem, tween.prop, "" );
+ // Empty strings, null, undefined and "auto" are converted to 0.
+ return !result || result === "auto" ? 0 : result;
+ },
+ set: function( tween ) {
+ // use step hook for back compat - use cssHook if its there - use .style if its
+ // available and use plain properties where available
+ if ( jQuery.fx.step[ tween.prop ] ) {
+ jQuery.fx.step[ tween.prop ]( tween );
+ } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
+ jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
+ } else {
+ tween.elem[ tween.prop ] = tween.now;
+ }
+ }
+ }
+};
+
+// Support: IE9
+// Panic based approach to setting things on disconnected nodes
+
+Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
+ set: function( tween ) {
+ if ( tween.elem.nodeType && tween.elem.parentNode ) {
+ tween.elem[ tween.prop ] = tween.now;
+ }
+ }
+};
+
+jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {
+ var cssFn = jQuery.fn[ name ];
+ jQuery.fn[ name ] = function( speed, easing, callback ) {
+ return speed == null || typeof speed === "boolean" ?
+ cssFn.apply( this, arguments ) :
+ this.animate( genFx( name, true ), speed, easing, callback );
+ };
+});
+
+jQuery.fn.extend({
+ fadeTo: function( speed, to, easing, callback ) {
+
+ // show any hidden elements after setting opacity to 0
+ return this.filter( isHidden ).css( "opacity", 0 ).show()
+
+ // animate to the value specified
+ .end().animate({ opacity: to }, speed, easing, callback );
+ },
+ animate: function( prop, speed, easing, callback ) {
+ var empty = jQuery.isEmptyObject( prop ),
+ optall = jQuery.speed( speed, easing, callback ),
+ doAnimation = function() {
+ // Operate on a copy of prop so per-property easing won't be lost
+ var anim = Animation( this, jQuery.extend( {}, prop ), optall );
+
+ // Empty animations, or finishing resolves immediately
+ if ( empty || data_priv.get( this, "finish" ) ) {
+ anim.stop( true );
+ }
+ };
+ doAnimation.finish = doAnimation;
+
+ return empty || optall.queue === false ?
+ this.each( doAnimation ) :
+ this.queue( optall.queue, doAnimation );
+ },
+ stop: function( type, clearQueue, gotoEnd ) {
+ var stopQueue = function( hooks ) {
+ var stop = hooks.stop;
+ delete hooks.stop;
+ stop( gotoEnd );
+ };
+
+ if ( typeof type !== "string" ) {
+ gotoEnd = clearQueue;
+ clearQueue = type;
+ type = undefined;
+ }
+ if ( clearQueue && type !== false ) {
+ this.queue( type || "fx", [] );
+ }
+
+ return this.each(function() {
+ var dequeue = true,
+ index = type != null && type + "queueHooks",
+ timers = jQuery.timers,
+ data = data_priv.get( this );
+
+ if ( index ) {
+ if ( data[ index ] && data[ index ].stop ) {
+ stopQueue( data[ index ] );
+ }
+ } else {
+ for ( index in data ) {
+ if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
+ stopQueue( data[ index ] );
+ }
+ }
+ }
+
+ for ( index = timers.length; index--; ) {
+ if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
+ timers[ index ].anim.stop( gotoEnd );
+ dequeue = false;
+ timers.splice( index, 1 );
+ }
+ }
+
+ // start the next in the queue if the last step wasn't forced
+ // timers currently will call their complete callbacks, which will dequeue
+ // but only if they were gotoEnd
+ if ( dequeue || !gotoEnd ) {
+ jQuery.dequeue( this, type );
+ }
+ });
+ },
+ finish: function( type ) {
+ if ( type !== false ) {
+ type = type || "fx";
+ }
+ return this.each(function() {
+ var index,
+ data = data_priv.get( this ),
+ queue = data[ type + "queue" ],
+ hooks = data[ type + "queueHooks" ],
+ timers = jQuery.timers,
+ length = queue ? queue.length : 0;
+
+ // enable finishing flag on private data
+ data.finish = true;
+
+ // empty the queue first
+ jQuery.queue( this, type, [] );
+
+ if ( hooks && hooks.stop ) {
+ hooks.stop.call( this, true );
+ }
+
+ // look for any active animations, and finish them
+ for ( index = timers.length; index--; ) {
+ if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
+ timers[ index ].anim.stop( true );
+ timers.splice( index, 1 );
+ }
+ }
+
+ // look for any animations in the old queue and finish them
+ for ( index = 0; index < length; index++ ) {
+ if ( queue[ index ] && queue[ index ].finish ) {
+ queue[ index ].finish.call( this );
+ }
+ }
+
+ // turn off finishing flag
+ delete data.finish;
+ });
+ }
+});
+
+// Generate parameters to create a standard animation
+function genFx( type, includeWidth ) {
+ var which,
+ attrs = { height: type },
+ i = 0;
+
+ // if we include width, step value is 1 to do all cssExpand values,
+ // if we don't include width, step value is 2 to skip over Left and Right
+ includeWidth = includeWidth? 1 : 0;
+ for( ; i < 4 ; i += 2 - includeWidth ) {
+ which = cssExpand[ i ];
+ attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
+ }
+
+ if ( includeWidth ) {
+ attrs.opacity = attrs.width = type;
+ }
+
+ return attrs;
+}
+
+// Generate shortcuts for custom animations
+jQuery.each({
+ slideDown: genFx("show"),
+ slideUp: genFx("hide"),
+ slideToggle: genFx("toggle"),
+ fadeIn: { opacity: "show" },
+ fadeOut: { opacity: "hide" },
+ fadeToggle: { opacity: "toggle" }
+}, function( name, props ) {
+ jQuery.fn[ name ] = function( speed, easing, callback ) {
+ return this.animate( props, speed, easing, callback );
+ };
+});
+
+jQuery.speed = function( speed, easing, fn ) {
+ var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
+ complete: fn || !fn && easing ||
+ jQuery.isFunction( speed ) && speed,
+ duration: speed,
+ easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
+ };
+
+ opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
+ opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
+
+ // normalize opt.queue - true/undefined/null -> "fx"
+ if ( opt.queue == null || opt.queue === true ) {
+ opt.queue = "fx";
+ }
+
+ // Queueing
+ opt.old = opt.complete;
+
+ opt.complete = function() {
+ if ( jQuery.isFunction( opt.old ) ) {
+ opt.old.call( this );
+ }
+
+ if ( opt.queue ) {
+ jQuery.dequeue( this, opt.queue );
+ }
+ };
+
+ return opt;
+};
+
+jQuery.easing = {
+ linear: function( p ) {
+ return p;
+ },
+ swing: function( p ) {
+ return 0.5 - Math.cos( p*Math.PI ) / 2;
+ }
+};
+
+jQuery.timers = [];
+jQuery.fx = Tween.prototype.init;
+jQuery.fx.tick = function() {
+ var timer,
+ timers = jQuery.timers,
+ i = 0;
+
+ fxNow = jQuery.now();
+
+ for ( ; i < timers.length; i++ ) {
+ timer = timers[ i ];
+ // Checks the timer has not already been removed
+ if ( !timer() && timers[ i ] === timer ) {
+ timers.splice( i--, 1 );
+ }
+ }
+
+ if ( !timers.length ) {
+ jQuery.fx.stop();
+ }
+ fxNow = undefined;
+};
+
+jQuery.fx.timer = function( timer ) {
+ if ( timer() && jQuery.timers.push( timer ) ) {
+ jQuery.fx.start();
+ }
+};
+
+jQuery.fx.interval = 13;
+
+jQuery.fx.start = function() {
+ if ( !timerId ) {
+ timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );
+ }
+};
+
+jQuery.fx.stop = function() {
+ clearInterval( timerId );
+ timerId = null;
+};
+
+jQuery.fx.speeds = {
+ slow: 600,
+ fast: 200,
+ // Default speed
+ _default: 400
+};
+
+// Back Compat <1.8 extension point
+jQuery.fx.step = {};
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+ jQuery.expr.filters.animated = function( elem ) {
+ return jQuery.grep(jQuery.timers, function( fn ) {
+ return elem === fn.elem;
+ }).length;
+ };
+}
+jQuery.fn.offset = function( options ) {
+ if ( arguments.length ) {
+ return options === undefined ?
+ this :
+ this.each(function( i ) {
+ jQuery.offset.setOffset( this, options, i );
+ });
+ }
+
+ var docElem, win,
+ elem = this[ 0 ],
+ box = { top: 0, left: 0 },
+ doc = elem && elem.ownerDocument;
+
+ if ( !doc ) {
+ return;
+ }
+
+ docElem = doc.documentElement;
+
+ // Make sure it's not a disconnected DOM node
+ if ( !jQuery.contains( docElem, elem ) ) {
+ return box;
+ }
+
+ // If we don't have gBCR, just use 0,0 rather than error
+ // BlackBerry 5, iOS 3 (original iPhone)
+ if ( typeof elem.getBoundingClientRect !== core_strundefined ) {
+ box = elem.getBoundingClientRect();
+ }
+ win = getWindow( doc );
+ return {
+ top: box.top + win.pageYOffset - docElem.clientTop,
+ left: box.left + win.pageXOffset - docElem.clientLeft
+ };
+};
+
+jQuery.offset = {
+
+ setOffset: function( elem, options, i ) {
+ var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
+ position = jQuery.css( elem, "position" ),
+ curElem = jQuery( elem ),
+ props = {};
+
+ // Set position first, in-case top/left are set even on static elem
+ if ( position === "static" ) {
+ elem.style.position = "relative";
+ }
+
+ curOffset = curElem.offset();
+ curCSSTop = jQuery.css( elem, "top" );
+ curCSSLeft = jQuery.css( elem, "left" );
+ calculatePosition = ( position === "absolute" || position === "fixed" ) && ( curCSSTop + curCSSLeft ).indexOf("auto") > -1;
+
+ // Need to be able to calculate position if either top or left is auto and position is either absolute or fixed
+ if ( calculatePosition ) {
+ curPosition = curElem.position();
+ curTop = curPosition.top;
+ curLeft = curPosition.left;
+
+ } else {
+ curTop = parseFloat( curCSSTop ) || 0;
+ curLeft = parseFloat( curCSSLeft ) || 0;
+ }
+
+ if ( jQuery.isFunction( options ) ) {
+ options = options.call( elem, i, curOffset );
+ }
+
+ if ( options.top != null ) {
+ props.top = ( options.top - curOffset.top ) + curTop;
+ }
+ if ( options.left != null ) {
+ props.left = ( options.left - curOffset.left ) + curLeft;
+ }
+
+ if ( "using" in options ) {
+ options.using.call( elem, props );
+
+ } else {
+ curElem.css( props );
+ }
+ }
+};
+
+
+jQuery.fn.extend({
+
+ position: function() {
+ if ( !this[ 0 ] ) {
+ return;
+ }
+
+ var offsetParent, offset,
+ elem = this[ 0 ],
+ parentOffset = { top: 0, left: 0 };
+
+ // Fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent
+ if ( jQuery.css( elem, "position" ) === "fixed" ) {
+ // We assume that getBoundingClientRect is available when computed position is fixed
+ offset = elem.getBoundingClientRect();
+
+ } else {
+ // Get *real* offsetParent
+ offsetParent = this.offsetParent();
+
+ // Get correct offsets
+ offset = this.offset();
+ if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
+ parentOffset = offsetParent.offset();
+ }
+
+ // Add offsetParent borders
+ parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
+ parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
+ }
+
+ // Subtract parent offsets and element margins
+ return {
+ top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
+ left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )
+ };
+ },
+
+ offsetParent: function() {
+ return this.map(function() {
+ var offsetParent = this.offsetParent || docElem;
+
+ while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position") === "static" ) ) {
+ offsetParent = offsetParent.offsetParent;
+ }
+
+ return offsetParent || docElem;
+ });
+ }
+});
+
+
+// Create scrollLeft and scrollTop methods
+jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) {
+ var top = "pageYOffset" === prop;
+
+ jQuery.fn[ method ] = function( val ) {
+ return jQuery.access( this, function( elem, method, val ) {
+ var win = getWindow( elem );
+
+ if ( val === undefined ) {
+ return win ? win[ prop ] : elem[ method ];
+ }
+
+ if ( win ) {
+ win.scrollTo(
+ !top ? val : window.pageXOffset,
+ top ? val : window.pageYOffset
+ );
+
+ } else {
+ elem[ method ] = val;
+ }
+ }, method, val, arguments.length, null );
+ };
+});
+
+function getWindow( elem ) {
+ return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;
+}
+// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
+jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
+ jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
+ // margin is only for outerHeight, outerWidth
+ jQuery.fn[ funcName ] = function( margin, value ) {
+ var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
+ extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
+
+ return jQuery.access( this, function( elem, type, value ) {
+ var doc;
+
+ if ( jQuery.isWindow( elem ) ) {
+ // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
+ // isn't a whole lot we can do. See pull request at this URL for discussion:
+ // https://github.com/jquery/jquery/pull/764
+ return elem.document.documentElement[ "client" + name ];
+ }
+
+ // Get document width or height
+ if ( elem.nodeType === 9 ) {
+ doc = elem.documentElement;
+
+ // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
+ // whichever is greatest
+ return Math.max(
+ elem.body[ "scroll" + name ], doc[ "scroll" + name ],
+ elem.body[ "offset" + name ], doc[ "offset" + name ],
+ doc[ "client" + name ]
+ );
+ }
+
+ return value === undefined ?
+ // Get width or height on the element, requesting but not forcing parseFloat
+ jQuery.css( elem, type, extra ) :
+
+ // Set width or height on the element
+ jQuery.style( elem, type, value, extra );
+ }, type, chainable ? margin : undefined, chainable, null );
+ };
+ });
+});
+// Limit scope pollution from any deprecated API
+// (function() {
+
+// The number of elements contained in the matched element set
+jQuery.fn.size = function() {
+ return this.length;
+};
+
+jQuery.fn.andSelf = jQuery.fn.addBack;
+
+// })();
+if ( typeof module === "object" && module && typeof module.exports === "object" ) {
+ // Expose jQuery as module.exports in loaders that implement the Node
+ // module pattern (including browserify). Do not create the global, since
+ // the user will be storing it themselves locally, and globals are frowned
+ // upon in the Node module world.
+ module.exports = jQuery;
+} else {
+ // Register as a named AMD module, since jQuery can be concatenated with other
+ // files that may use define, but not via a proper concatenation script that
+ // understands anonymous AMD modules. A named AMD is safest and most robust
+ // way to register. Lowercase jquery is used because AMD module names are
+ // derived from file names, and jQuery is normally delivered in a lowercase
+ // file name. Do this after creating the global so that if an AMD module wants
+ // to call noConflict to hide this version of jQuery, it will work.
+ if ( typeof define === "function" && define.amd ) {
+ define( "jquery", [], function () { return jQuery; } );
+ }
+}
+
+// If there is a window object, that at least has a document property,
+// define jQuery and $ identifiers
+if ( typeof window === "object" && typeof window.document === "object" ) {
+ window.jQuery = window.$ = jQuery;
+}
+
+})( window );
1
0
Author: echatellier
Date: 2013-07-22 15:15:21 +0200 (Mon, 22 Jul 2013)
New Revision: 178
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/178
Log:
Dedicated sandbox for jquery2
Added:
sandbox/nuiton-js-jquery2/
1
0
Author: echatellier
Date: 2013-07-22 15:11:56 +0200 (Mon, 22 Jul 2013)
New Revision: 177
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/177
Log:
Tag 1.10.2-1 release
Added:
tags/nuiton-js-jquery-1.10.2-1/
1
0
Author: echatellier
Date: 2013-07-22 15:11:09 +0200 (Mon, 22 Jul 2013)
New Revision: 176
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/176
Log:
Prepare release
Modified:
sandbox/nuiton-js-jquery/pom.xml
Modified: sandbox/nuiton-js-jquery/pom.xml
===================================================================
--- sandbox/nuiton-js-jquery/pom.xml 2013-07-22 13:07:22 UTC (rev 175)
+++ sandbox/nuiton-js-jquery/pom.xml 2013-07-22 13:11:09 UTC (rev 176)
@@ -10,11 +10,11 @@
<parent>
<groupId>org.nuiton.js</groupId>
<artifactId>nuiton-js-lib</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.1</version>
</parent>
<artifactId>nuiton-js-jquery</artifactId>
- <version>1.10.2-1-SNAPSHOT</version>
+ <version>1.10.2-1</version>
<name>Nuiton JS :: JQuery</name>
<description>JQuery jar packaging</description>
1
0
July 22, 2013
Author: maven-release
Date: 2013-07-22 15:07:22 +0200 (Mon, 22 Jul 2013)
New Revision: 175
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/175
Log:
[maven-release-plugin] prepare for next development iteration
Modified:
trunk/nuiton-js-lib/pom.xml
trunk/nuiton-js-wro/pom.xml
trunk/pom.xml
Modified: trunk/nuiton-js-lib/pom.xml
===================================================================
(Binary files differ)
Modified: trunk/nuiton-js-wro/pom.xml
===================================================================
--- trunk/nuiton-js-wro/pom.xml 2013-07-22 13:07:19 UTC (rev 174)
+++ trunk/nuiton-js-wro/pom.xml 2013-07-22 13:07:22 UTC (rev 175)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.nuiton.js</groupId>
<artifactId>nuiton-js</artifactId>
- <version>1.0.1</version>
+ <version>1.0.2-SNAPSHOT</version>
</parent>
<artifactId>nuiton-js-wro</artifactId>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2013-07-22 13:07:19 UTC (rev 174)
+++ trunk/pom.xml 2013-07-22 13:07:22 UTC (rev 175)
@@ -15,7 +15,7 @@
<groupId>org.nuiton.js</groupId>
<artifactId>nuiton-js</artifactId>
- <version>1.0.1</version>
+ <version>1.0.2-SNAPSHOT</version>
<modules>
<module>nuiton-js-wro</module>
@@ -162,11 +162,11 @@
<!-- ************************************************************* -->
<scm>
- <connection>scm:svn:http://svn.nuiton.org/svn/nuiton-js/tags/nuiton-js-1.0.1</connection>
+ <connection>scm:svn:http://svn.nuiton.org/svn/nuiton-js/trunk</connection>
<developerConnection>
- scm:svn:http://svn.nuiton.org/svn/nuiton-js/tags/nuiton-js-1.0.1
+ scm:svn:http://svn.nuiton.org/svn/nuiton-js/trunk
</developerConnection>
- <url>http://www.nuiton.org/repositories/browse/nuiton-js/tags/nuiton-js-1.0.1</url>
+ <url>http://www.nuiton.org/repositories/browse/nuiton-js/trunk</url>
</scm>
<distributionManagement>
1
0
Author: maven-release
Date: 2013-07-22 15:07:19 +0200 (Mon, 22 Jul 2013)
New Revision: 174
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/174
Log:
[maven-release-plugin] copy for tag nuiton-js-1.0.1
Added:
tags/nuiton-js-1.0.1/
1
0
July 22, 2013
Author: maven-release
Date: 2013-07-22 15:07:16 +0200 (Mon, 22 Jul 2013)
New Revision: 173
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/173
Log:
[maven-release-plugin] prepare release nuiton-js-1.0.1
Modified:
trunk/nuiton-js-lib/pom.xml
trunk/nuiton-js-wro/pom.xml
trunk/pom.xml
Modified: trunk/nuiton-js-lib/pom.xml
===================================================================
(Binary files differ)
Modified: trunk/nuiton-js-wro/pom.xml
===================================================================
--- trunk/nuiton-js-wro/pom.xml 2013-07-22 13:05:33 UTC (rev 172)
+++ trunk/nuiton-js-wro/pom.xml 2013-07-22 13:07:16 UTC (rev 173)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.nuiton.js</groupId>
<artifactId>nuiton-js</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.1</version>
</parent>
<artifactId>nuiton-js-wro</artifactId>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2013-07-22 13:05:33 UTC (rev 172)
+++ trunk/pom.xml 2013-07-22 13:07:16 UTC (rev 173)
@@ -15,7 +15,7 @@
<groupId>org.nuiton.js</groupId>
<artifactId>nuiton-js</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.1</version>
<modules>
<module>nuiton-js-wro</module>
@@ -162,11 +162,11 @@
<!-- ************************************************************* -->
<scm>
- <connection>scm:svn:http://svn.nuiton.org/svn/nuiton-js/trunk</connection>
+ <connection>scm:svn:http://svn.nuiton.org/svn/nuiton-js/tags/nuiton-js-1.0.1</connection>
<developerConnection>
- scm:svn:http://svn.nuiton.org/svn/nuiton-js/trunk
+ scm:svn:http://svn.nuiton.org/svn/nuiton-js/tags/nuiton-js-1.0.1
</developerConnection>
- <url>http://www.nuiton.org/repositories/browse/nuiton-js/trunk</url>
+ <url>http://www.nuiton.org/repositories/browse/nuiton-js/tags/nuiton-js-1.0.1</url>
</scm>
<distributionManagement>
1
0
Author: echatellier
Date: 2013-07-22 15:05:33 +0200 (Mon, 22 Jul 2013)
New Revision: 172
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/172
Log:
Add new 'request package' link
Added:
trunk/src/site/rst/request.rst
Modified:
trunk/src/site/site_en.xml
Added: trunk/src/site/rst/request.rst
===================================================================
--- trunk/src/site/rst/request.rst (rev 0)
+++ trunk/src/site/rst/request.rst 2013-07-22 13:05:33 UTC (rev 172)
@@ -0,0 +1,35 @@
+.. -
+.. * #%L
+.. * Nuiton JS
+.. * $Id$
+.. * $HeadURL$
+.. * %%
+.. * Copyright (C) 2012 - 2013 CodeLutin, Chatellier Eric
+.. * %%
+.. * This program is free software: you can redistribute it and/or modify
+.. * it under the terms of the GNU Lesser General Public License as
+.. * published by the Free Software Foundation, either version 3 of the
+.. * License, or (at your option) any later version.
+.. *
+.. * This program is distributed in the hope that it will be useful,
+.. * but WITHOUT ANY WARRANTY; without even the implied warranty of
+.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+.. * GNU General Lesser Public License for more details.
+.. *
+.. * You should have received a copy of the GNU General Lesser Public
+.. * License along with this program. If not, see
+.. * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+.. * #L%
+.. -
+
+=====================
+Request a new package
+=====================
+
+Using mailing list
+==================
+
+To request a new package, just ask for it using nuiton-js's mailing lists:
+ * `nuiton-js-users(a)list.nuiton.org <http://list.nuiton.org/cgi-bin/mailman/listinfo/nuiton-js-users>`_
+
+Please provide a description for these new package including license and download link.
Property changes on: trunk/src/site/rst/request.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/src/site/site_en.xml
===================================================================
--- trunk/src/site/site_en.xml 2013-07-19 22:00:43 UTC (rev 171)
+++ trunk/src/site/site_en.xml 2013-07-22 13:05:33 UTC (rev 172)
@@ -80,6 +80,7 @@
<menu name="User">
<item name="Usage" href="index.html"/>
+ <item name="Request a new package" href="request.html"/>
</menu>
1
0
July 19, 2013
Author: echatellier
Date: 2013-07-20 00:00:43 +0200 (Sat, 20 Jul 2013)
New Revision: 171
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/171
Log:
Fix site
Modified:
sandbox/nuiton-js-jqplot/src/site/rst/index.rst.vm
Modified: sandbox/nuiton-js-jqplot/src/site/rst/index.rst.vm
===================================================================
--- sandbox/nuiton-js-jqplot/src/site/rst/index.rst.vm 2013-07-19 21:56:07 UTC (rev 170)
+++ sandbox/nuiton-js-jqplot/src/site/rst/index.rst.vm 2013-07-19 22:00:43 UTC (rev 171)
@@ -23,7 +23,7 @@
.. -
jqPlot
-=====
+======
jqPlot_ is a plotting and charting plugin for the jQuery Javascript framework.
1
0
Author: echatellier
Date: 2013-07-19 23:56:07 +0200 (Fri, 19 Jul 2013)
New Revision: 170
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/170
Log:
Fix site
Modified:
trunk/src/site/site_en.xml
Modified: trunk/src/site/site_en.xml
===================================================================
--- trunk/src/site/site_en.xml 2013-07-19 21:54:22 UTC (rev 169)
+++ trunk/src/site/site_en.xml 2013-07-19 21:56:07 UTC (rev 170)
@@ -101,7 +101,7 @@
<item name="underscope" href="nuiton-js-lib/nuiton-js-underscore/index.html"/>
</menu>
- <menu name="Developer"
+ <menu name="Developer">
<item name="Release package" href="deploy.html"/>
<item name="Create package" href="packaging.html"/>
</menu>
1
0
Author: echatellier
Date: 2013-07-19 23:54:22 +0200 (Fri, 19 Jul 2013)
New Revision: 169
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/169
Log:
Remove fr site
Removed:
trunk/src/site/fr/
1
0
r168 - in trunk: . nuiton-js-wro nuiton-js-wro/src/license nuiton-js-wro/src/main/java/org/nuiton/js/wro nuiton-js-wro/src/main/resources/META-INF src/site src/site/rst
by echatellier@users.nuiton.org July 19, 2013
by echatellier@users.nuiton.org July 19, 2013
July 19, 2013
Author: echatellier
Date: 2013-07-19 23:53:33 +0200 (Fri, 19 Jul 2013)
New Revision: 168
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/168
Log:
Update nuiton js (keywords)
Removed:
trunk/src/site/site_fr.xml
Modified:
trunk/LICENSE.txt
trunk/README.txt
trunk/nuiton-js-wro/LICENSE.txt
trunk/nuiton-js-wro/README.txt
trunk/nuiton-js-wro/pom.xml
trunk/nuiton-js-wro/src/license/THIRD-PARTY.properties
trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/ForceCssDataUriPreProcessor.java
trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/ImportWildcardXmlModelFactory.java
trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/NuitonJsFilter.java
trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/NuitonJsMavenWroManagerFactory.java
trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/NuitonJsWroConfigurationFactory.java
trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/NuitonJsWroManagerFactory.java
trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/NuitonJsXmlModelFactory.java
trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/ProtectedXmlModelFactory.java
trunk/nuiton-js-wro/src/main/resources/META-INF/web-fragment.xml
trunk/pom.xml
trunk/src/site/rst/deploy.rst
trunk/src/site/rst/index.rst.vm
trunk/src/site/rst/packaging.rst.vm
trunk/src/site/site_en.xml
Property changes on: trunk/LICENSE.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/README.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/nuiton-js-wro/LICENSE.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/nuiton-js-wro/README.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/nuiton-js-wro/pom.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/nuiton-js-wro/src/license/THIRD-PARTY.properties
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Author Date Id Revision HeadURL
Modified: trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/ForceCssDataUriPreProcessor.java
===================================================================
--- trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/ForceCssDataUriPreProcessor.java 2013-07-19 21:51:14 UTC (rev 167)
+++ trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/ForceCssDataUriPreProcessor.java 2013-07-19 21:53:33 UTC (rev 168)
@@ -3,8 +3,8 @@
/*
* #%L
* Nuiton JS :: WRO
- * $Id:$
- * $HeadURL:$
+ * $Id$
+ * $HeadURL$
* %%
* Copyright (C) 2012 - 2013 CodeLutin
* %%
Property changes on: trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/ForceCssDataUriPreProcessor.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/ImportWildcardXmlModelFactory.java
===================================================================
--- trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/ImportWildcardXmlModelFactory.java 2013-07-19 21:51:14 UTC (rev 167)
+++ trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/ImportWildcardXmlModelFactory.java 2013-07-19 21:53:33 UTC (rev 168)
@@ -3,8 +3,8 @@
/*
* #%L
* Nuiton JS :: WRO
- * $Id:$
- * $HeadURL:$
+ * $Id$
+ * $HeadURL$
* %%
* Copyright (C) 2012 - 2013 CodeLutin
* %%
Property changes on: trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/ImportWildcardXmlModelFactory.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/NuitonJsFilter.java
===================================================================
--- trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/NuitonJsFilter.java 2013-07-19 21:51:14 UTC (rev 167)
+++ trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/NuitonJsFilter.java 2013-07-19 21:53:33 UTC (rev 168)
@@ -3,8 +3,8 @@
/*
* #%L
* Nuiton JS :: WRO
- * $Id:$
- * $HeadURL:$
+ * $Id$
+ * $HeadURL$
* %%
* Copyright (C) 2012 - 2013 CodeLutin
* %%
Property changes on: trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/NuitonJsFilter.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/NuitonJsMavenWroManagerFactory.java
===================================================================
--- trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/NuitonJsMavenWroManagerFactory.java 2013-07-19 21:51:14 UTC (rev 167)
+++ trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/NuitonJsMavenWroManagerFactory.java 2013-07-19 21:53:33 UTC (rev 168)
@@ -3,8 +3,8 @@
/*
* #%L
* Nuiton JS :: WRO
- * $Id:$
- * $HeadURL:$
+ * $Id$
+ * $HeadURL$
* %%
* Copyright (C) 2012 - 2013 CodeLutin
* %%
Property changes on: trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/NuitonJsMavenWroManagerFactory.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/NuitonJsWroConfigurationFactory.java
===================================================================
--- trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/NuitonJsWroConfigurationFactory.java 2013-07-19 21:51:14 UTC (rev 167)
+++ trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/NuitonJsWroConfigurationFactory.java 2013-07-19 21:53:33 UTC (rev 168)
@@ -3,8 +3,8 @@
/*
* #%L
* Nuiton JS :: WRO
- * $Id:$
- * $HeadURL:$
+ * $Id$
+ * $HeadURL$
* %%
* Copyright (C) 2012 - 2013 CodeLutin
* %%
Property changes on: trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/NuitonJsWroConfigurationFactory.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/NuitonJsWroManagerFactory.java
===================================================================
--- trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/NuitonJsWroManagerFactory.java 2013-07-19 21:51:14 UTC (rev 167)
+++ trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/NuitonJsWroManagerFactory.java 2013-07-19 21:53:33 UTC (rev 168)
@@ -3,8 +3,8 @@
/*
* #%L
* Nuiton JS :: WRO
- * $Id:$
- * $HeadURL:$
+ * $Id$
+ * $HeadURL$
* %%
* Copyright (C) 2012 - 2013 CodeLutin
* %%
Property changes on: trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/NuitonJsWroManagerFactory.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/NuitonJsXmlModelFactory.java
===================================================================
--- trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/NuitonJsXmlModelFactory.java 2013-07-19 21:51:14 UTC (rev 167)
+++ trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/NuitonJsXmlModelFactory.java 2013-07-19 21:53:33 UTC (rev 168)
@@ -3,8 +3,8 @@
/*
* #%L
* Nuiton JS :: WRO
- * $Id:$
- * $HeadURL:$
+ * $Id$
+ * $HeadURL$
* %%
* Copyright (C) 2012 - 2013 CodeLutin
* %%
Property changes on: trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/NuitonJsXmlModelFactory.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/ProtectedXmlModelFactory.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/nuiton-js-wro/src/main/resources/META-INF/web-fragment.xml
===================================================================
--- trunk/nuiton-js-wro/src/main/resources/META-INF/web-fragment.xml 2013-07-19 21:51:14 UTC (rev 167)
+++ trunk/nuiton-js-wro/src/main/resources/META-INF/web-fragment.xml 2013-07-19 21:53:33 UTC (rev 168)
@@ -1,8 +1,8 @@
<!--
#%L
Nuiton JS :: WRO
- $Id:$
- $HeadURL:$
+ $Id$
+ $HeadURL$
%%
Copyright (C) 2012 - 2013 CodeLutin
%%
Property changes on: trunk/nuiton-js-wro/src/main/resources/META-INF/web-fragment.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/pom.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/src/site/rst/deploy.rst
===================================================================
--- trunk/src/site/rst/deploy.rst 2013-07-19 21:51:14 UTC (rev 167)
+++ trunk/src/site/rst/deploy.rst 2013-07-19 21:53:33 UTC (rev 168)
@@ -1,8 +1,8 @@
.. -
.. * #%L
.. * Nuiton JS
-.. * $Id:$
-.. * $HeadURL:$
+.. * $Id$
+.. * $HeadURL$
.. * %%
.. * Copyright (C) 2012 - 2013 CodeLutin, Chatellier Eric
.. * %%
Property changes on: trunk/src/site/rst/deploy.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/src/site/rst/index.rst.vm
===================================================================
--- trunk/src/site/rst/index.rst.vm 2013-07-19 21:51:14 UTC (rev 167)
+++ trunk/src/site/rst/index.rst.vm 2013-07-19 21:53:33 UTC (rev 168)
@@ -1,8 +1,8 @@
.. -
.. * #%L
.. * Nuiton JS
-.. * $Id:$
-.. * $HeadURL:$
+.. * $Id$
+.. * $HeadURL$
.. * %%
.. * Copyright (C) 2012 - 2013 CodeLutin, Chatellier Eric
.. * %%
Property changes on: trunk/src/site/rst/index.rst.vm
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/src/site/rst/packaging.rst.vm
===================================================================
--- trunk/src/site/rst/packaging.rst.vm 2013-07-19 21:51:14 UTC (rev 167)
+++ trunk/src/site/rst/packaging.rst.vm 2013-07-19 21:53:33 UTC (rev 168)
@@ -1,8 +1,8 @@
.. -
.. * #%L
.. * Nuiton JS
-.. * $Id:$
-.. * $HeadURL:$
+.. * $Id$
+.. * $HeadURL$
.. * %%
.. * Copyright (C) 2012 - 2013 CodeLutin, Chatellier Eric
.. * %%
Property changes on: trunk/src/site/rst/packaging.rst.vm
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/src/site/site_en.xml
===================================================================
--- trunk/src/site/site_en.xml 2013-07-19 21:51:14 UTC (rev 167)
+++ trunk/src/site/site_en.xml 2013-07-19 21:53:33 UTC (rev 168)
@@ -1,8 +1,8 @@
<!--
#%L
Nuiton JS
- $Id:$
- $HeadURL:$
+ $Id$
+ $HeadURL$
%%
Copyright (C) 2012 - 2013 CodeLutin
%%
@@ -78,12 +78,11 @@
<item name="Libre-Entreprise" href="http://www.libre-entreprise.org/"/>
</links>
- <menu name="Overview">
+ <menu name="User">
<item name="Usage" href="index.html"/>
- <item name="Create package" href="packaging.html"/>
- <item name="Release package" href="deploy.html"/>
+
</menu>
-
+
<menu name="Available packages">
<item name="angular" href="nuiton-js-lib/nuiton-js-angular/index.html"/>
<item name="backbone" href="nuiton-js-lib/nuiton-js-backbone/index.html"/>
@@ -98,8 +97,15 @@
<item name="jstree" href="nuiton-js-lib/nuiton-js-jstree/index.html"/>
<item name="moment" href="nuiton-js-lib/nuiton-js-moment/index.html"/>
<item name="mustache" href="nuiton-js-lib/nuiton-js-mustache/index.html"/>
+ <item name="select2" href="nuiton-js-lib/nuiton-js-select2/index.html"/>
+ <item name="underscope" href="nuiton-js-lib/nuiton-js-underscore/index.html"/>
</menu>
+ <menu name="Developer"
+ <item name="Release package" href="deploy.html"/>
+ <item name="Create package" href="packaging.html"/>
+ </menu>
+
<footer>
<div id='projectMetas'
Property changes on: trunk/src/site/site_en.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Deleted: trunk/src/site/site_fr.xml
===================================================================
--- trunk/src/site/site_fr.xml 2013-07-19 21:51:14 UTC (rev 167)
+++ trunk/src/site/site_fr.xml 2013-07-19 21:53:33 UTC (rev 168)
@@ -1,123 +0,0 @@
-<!--
- #%L
- Nuiton JS
- $Id:$
- $HeadURL:$
- %%
- Copyright (C) 2012 - 2013 CodeLutin
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Lesser Public License for more details.
-
- You should have received a copy of the GNU General Lesser Public
- License along with this program. If not, see
- <http://www.gnu.org/licenses/lgpl-3.0.html>.
- #L%
- -->
-<project name="${project.name}">
-
- <skin>
- <groupId>org.apache.maven.skins</groupId>
- <artifactId>maven-fluido-skin</artifactId>
- <version>1.3.0</version>
- </skin>
-
- <custom>
- <fluidoSkin>
- <topBarEnabled>true</topBarEnabled>
- <sideBarEnabled>true</sideBarEnabled>
- <searchEnabled>false</searchEnabled>
- <sourceLineNumbersEnabled>true</sourceLineNumbersEnabled>
- </fluidoSkin>
- </custom>
-
- <bannerLeft>
- <name>${project.name}</name>
- <href>index.html</href>
- </bannerLeft>
-
- <bannerRight>
- <src>http://www.codelutin.com/images/lutinorange-codelutin.png</src>
- <href>http://www.codelutin.com</href>
- </bannerRight>
-
- <publishDate position="right" format="dd/MM/yyyy"/>
- <version position="right"/>
-
- <poweredBy>
- <logo href="http://maven.apache.org" name="Maven"
- img="images/logos/maven-feather.png"/>
- </poweredBy>
-
- <body>
-
- <head>
- <script type="text/javascript"
- src="http://maven-site.nuiton.org/public/js/mavenpom-site.js">
- </script>
-
- <link rel="stylesheet" type="text/css"
- href="http://maven-site.nuiton.org/public/css/mavenpom-site.css"/>
- </head>
-
- <breadcrumbs>
- <item name="${project.name}" href="${project.url}"/>
- </breadcrumbs>
-
- <links>
- <item name="nuiton.org" href="http://www.nuiton.org"/>
- <item name="chorem.org" href="http://www.chorem.org"/>
- <item name="CodeLutin" href="http://codelutin.com"/>
- <item name="Libre-Entreprise" href="http://www.libre-entreprise.org/"/>
- </links>
-
- <menu name="Utilisateurs">
- <item name="Accueil" href="index.html"/>
- </menu>
-
- <menu name="Survol">
- <item name="Usage" href="index.html"/>
- <item name="Créer un package" href="packaging.html"/>
- </menu>
-
- <menu name="Packages disponible">
- <item name="angular" href="nuiton-js-lib/nuiton-js-angular/index.html"/>
- <item name="backbone" href="nuiton-js-lib/nuiton-js-backbone/index.html"/>
- <item name="bootstrap" href="nuiton-js-lib/nuiton-js-bootstrap/index.html"/>
- <item name="canjs" href="nuiton-js-lib/nuiton-js-canjs/index.html"/>
- <item name="font-awesome" href="nuiton-js-lib/nuiton-js-font-awesome/index.html"/>
- <item name="jqgrid" href="nuiton-js-lib/nuiton-js-jqgrid/index.html"/>
- <item name="jqplot" href="nuiton-js-lib/nuiton-js-jqplot/index.html"/>
- <item name="jquery" href="nuiton-js-lib/nuiton-js-jquery/index.html"/>
- <item name="jquery-i18n-properties" href="nuiton-js-lib/nuiton-js-jquery-i18n-properties/index.html"/>
- <item name="jquery-ui" href="nuiton-js-lib/nuiton-js-jquery-ui/index.html"/>
- <item name="jstree" href="nuiton-js-lib/nuiton-js-jstree/index.html"/>
- <item name="moment" href="nuiton-js-lib/nuiton-js-moment/index.html"/>
- <item name="mustache" href="nuiton-js-lib/nuiton-js-mustache/index.html"/>
- </menu>
-
- <footer>
-
- <div id='projectMetas'
- projectversion='${project.version}'
- platform='${project.platform}'
- projectid='${project.projectId}'
- scm='${project.scm.connection}'
- scmwebeditorenabled='${project.scmwebeditorEnabled}'
- scmwebeditorurl='${project.scmwebeditorUrl}'
- siteSourcesType='${project.siteSourcesType}'
- piwikEnabled='${project.piwikEnabled}'
- piwikId='${project.piwikId}'>
- </div>
- </footer>
-
- </body>
-
-</project>
1
0
r167 - in sandbox/nuiton-js-jqplot: . src/main/resources/META-INF/nuiton-js src/main/resources/nuiton-js-jqplot src/main/resources/nuiton-js-jqplot/plugins src/site src/site/rst
by echatellier@users.nuiton.org July 19, 2013
by echatellier@users.nuiton.org July 19, 2013
July 19, 2013
Author: echatellier
Date: 2013-07-19 23:51:14 +0200 (Fri, 19 Jul 2013)
New Revision: 167
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/167
Log:
Update jqplot
Removed:
sandbox/nuiton-js-jqplot/changelog.txt
Modified:
sandbox/nuiton-js-jqplot/LICENSE.txt
sandbox/nuiton-js-jqplot/README.txt
sandbox/nuiton-js-jqplot/generate-plugin-group.sh
sandbox/nuiton-js-jqplot/pom.xml
sandbox/nuiton-js-jqplot/src/main/resources/META-INF/nuiton-js/wro-jqplot.xml
sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/excanvas.js
sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/jquery.jqplot.css
sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/jquery.jqplot.js
sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.BezierCurveRenderer.js
sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.barRenderer.js
sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.blockRenderer.js
sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.bubbleRenderer.js
sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.canvasAxisLabelRenderer.js
sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.canvasAxisTickRenderer.js
sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.canvasOverlay.js
sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.canvasTextRenderer.js
sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.categoryAxisRenderer.js
sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.ciParser.js
sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.cursor.js
sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.dateAxisRenderer.js
sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.donutRenderer.js
sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.dragable.js
sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.enhancedLegendRenderer.js
sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.funnelRenderer.js
sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.highlighter.js
sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.json2.js
sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.logAxisRenderer.js
sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.mekkoAxisRenderer.js
sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.mekkoRenderer.js
sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.meterGaugeRenderer.js
sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.mobile.js
sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.ohlcRenderer.js
sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.pieRenderer.js
sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.pointLabels.js
sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.pyramidAxisRenderer.js
sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.pyramidGridRenderer.js
sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.pyramidRenderer.js
sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.trendline.js
sandbox/nuiton-js-jqplot/src/site/rst/index.rst.vm
sandbox/nuiton-js-jqplot/src/site/site_en.xml
Property changes on: sandbox/nuiton-js-jqplot/LICENSE.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/README.txt
===================================================================
(Binary files differ)
Property changes on: sandbox/nuiton-js-jqplot/README.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Deleted: sandbox/nuiton-js-jqplot/changelog.txt
===================================================================
--- sandbox/nuiton-js-jqplot/changelog.txt 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/changelog.txt 2013-07-19 21:51:14 UTC (rev 167)
@@ -1,2 +0,0 @@
-Please refer to the release note :
- http://maven-site.nuiton.org/nuiton-js/changes-report.html
Property changes on: sandbox/nuiton-js-jqplot/generate-plugin-group.sh
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/pom.xml
===================================================================
(Binary files differ)
Property changes on: sandbox/nuiton-js-jqplot/pom.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/main/resources/META-INF/nuiton-js/wro-jqplot.xml
===================================================================
--- sandbox/nuiton-js-jqplot/src/main/resources/META-INF/nuiton-js/wro-jqplot.xml 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/main/resources/META-INF/nuiton-js/wro-jqplot.xml 2013-07-19 21:51:14 UTC (rev 167)
@@ -1,8 +1,8 @@
<!--
#%L
Nuiton JS :: jqPlot
- $Id:$
- $HeadURL:$
+ $Id$
+ $HeadURL$
%%
Copyright (C) 2012 - 2013 CodeLutin
%%
Property changes on: sandbox/nuiton-js-jqplot/src/main/resources/META-INF/nuiton-js/wro-jqplot.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/excanvas.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/jquery.jqplot.css
===================================================================
--- sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/jquery.jqplot.css 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/jquery.jqplot.css 2013-07-19 21:51:14 UTC (rev 167)
@@ -1,5 +1,5 @@
-/*%%Ignore-License
- rules for the plot target div. These will be cascaded down to all plot elements according to css rules*/
+/*%%Ignore-License
+rules for the plot target div. These will be cascaded down to all plot elements according to css rules*/
.jqplot-target {
position: relative;
color: #666666;
@@ -63,12 +63,12 @@
}
.jqplot-yaxis-tick.jqplot-breakTick {
- right: -20px;
- margin-right: 0px;
- padding:1px 5px 1px 5px;
-/* background-color: white;*/
- z-index: 2;
- font-size: 1.5em;
+ right: -20px;
+ margin-right: 0px;
+ padding:1px 5px 1px 5px;
+ /*background-color: white;*/
+ z-index: 2;
+ font-size: 1.5em;
}
.jqplot-y2axis-tick, .jqplot-y3axis-tick, .jqplot-y4axis-tick, .jqplot-y5axis-tick, .jqplot-y6axis-tick, .jqplot-y7axis-tick, .jqplot-y8axis-tick, .jqplot-y9axis-tick {
@@ -255,6 +255,6 @@
}
div.jqplot-noData-container {
- text-align: center;
- background-color: rgba(96%, 96%, 96%, 0.3);
+ text-align: center;
+ background-color: rgba(96%, 96%, 96%, 0.3);
}
Property changes on: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/jquery.jqplot.css
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/jquery.jqplot.js
===================================================================
--- sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/jquery.jqplot.js 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/jquery.jqplot.js 2013-07-19 21:51:14 UTC (rev 167)
@@ -5,12 +5,12 @@
*
* About: Version
*
- * version: 1.0.4
- * revision: 1121
+ * version: 1.0.8
+ * revision: 1250
*
* About: Copyright & License
*
- * Copyright (c) 2009-2012 Chris Leonello
+ * Copyright (c) 2009-2013 Chris Leonello
* jqPlot is currently available for use in all personal or commercial projects
* under both the MIT and GPL version 2.0 licenses. This means that you can
* choose the license that best suits your project and use it accordingly.
@@ -244,8 +244,8 @@
}
};
- $.jqplot.version = "1.0.4";
- $.jqplot.revision = "1121";
+ $.jqplot.version = "1.0.8";
+ $.jqplot.revision = "1250";
$.jqplot.targetCounter = 1;
@@ -395,7 +395,7 @@
return $.jqplot.support_canvas_text.result;
};
- $.jqplot.use_excanvas = ($.browser.msie && !$.jqplot.support_canvas()) ? true : false;
+ $.jqplot.use_excanvas = ((!$.support.boxModel || !$.support.objectAll || !$support.leadingWhitespace) && !$.jqplot.support_canvas()) ? true : false;
/**
*
@@ -511,7 +511,7 @@
/**
* Class: Axis
* An individual axis object. Cannot be instantiated directly, but created
- * by the Plot oject. Axis properties can be set or overriden by the
+ * by the Plot object. Axis properties can be set or overridden by the
* options passed in from the user.
*
*/
@@ -848,7 +848,7 @@
/**
* Class: Legend
* Legend object. Cannot be instantiated directly, but created
- * by the Plot oject. Legend properties can be set or overriden by the
+ * by the Plot object. Legend properties can be set or overridden by the
* options passed in from the user.
*/
function Legend(options) {
@@ -1077,7 +1077,7 @@
/**
* Class: Title
* Plot Title object. Cannot be instantiated directly, but created
- * by the Plot oject. Title properties can be set or overriden by the
+ * by the Plot object. Title properties can be set or overridden by the
* options passed in from the user.
*
* Parameters:
@@ -1091,7 +1091,7 @@
// text of the title;
this.text = text;
// prop: show
- // wether or not to show the title
+ // whether or not to show the title
this.show = true;
// prop: fontFamily
// css font-family spec for the text.
@@ -1140,7 +1140,7 @@
/**
* Class: Series
* An individual data series object. Cannot be instantiated directly, but created
- * by the Plot oject. Series properties can be set or overriden by the
+ * by the Plot object. Series properties can be set or overridden by the
* options passed in from the user.
*/
function Series(options) {
@@ -1159,7 +1159,7 @@
// > }
// prop: show
- // wether or not to draw the series.
+ // whether or not to draw the series.
this.show = true;
// prop: xaxis
// which x axis to use with this series, either 'xaxis' or 'x2axis'.
@@ -1233,16 +1233,16 @@
// see <$.jqplot.MarkerRenderer>.
this.markerOptions = {};
// prop: showLine
- // wether to actually draw the line or not. Series will still be renderered, even if no line is drawn.
+ // whether to actually draw the line or not. Series will still be renderered, even if no line is drawn.
this.showLine = true;
// prop: showMarker
- // wether or not to show the markers at the data points.
+ // whether or not to show the markers at the data points.
this.showMarker = true;
// prop: index
// 0 based index of this series in the plot series array.
this.index;
// prop: fill
- // true or false, wether to fill under lines or in bars.
+ // true or false, whether to fill under lines or in bars.
// May not be implemented in all renderers.
this.fill = false;
// prop: fillColor
@@ -1369,7 +1369,7 @@
this.markerOptions.show = this.showMarker;
}
this.showMarker = this.markerOptions.show;
- // the markerRenderer is called within it's own scaope, don't want to overwrite series options!!
+ // the markerRenderer is called within its own scope, don't want to overwrite series options!!
this.markerRenderer.init(this.markerOptions);
};
@@ -1524,15 +1524,15 @@
* Object representing the grid on which the plot is drawn. The grid in this
* context is the area bounded by the axes, the area which will contain the series.
* Note, the series are drawn on their own canvas.
- * The Grid object cannot be instantiated directly, but is created by the Plot oject.
- * Grid properties can be set or overriden by the options passed in from the user.
+ * The Grid object cannot be instantiated directly, but is created by the Plot object.
+ * Grid properties can be set or overridden by the options passed in from the user.
*/
function Grid() {
$.jqplot.ElemContainer.call(this);
// Group: Properties
// prop: drawGridlines
- // wether to draw the gridlines on the plot.
+ // whether to draw the gridlines on the plot.
this.drawGridlines = true;
// prop: gridLineColor
// color of the grid lines.
@@ -1553,7 +1553,7 @@
// True to draw border around grid.
this.drawBorder = true;
// prop: shadow
- // wether to show a shadow behind the grid.
+ // whether to show a shadow behind the grid.
this.shadow = true;
// prop: shadowAngle
// shadow angle in degrees
@@ -1741,7 +1741,7 @@
// animation in these situations can cause problems.
this.animateReplot = false;
// prop: axes
- // up to 4 axes are supported, each with it's own options,
+ // up to 4 axes are supported, each with its own options,
// See <Axis> for axis specific options.
this.axes = {xaxis: new Axis('xaxis'), yaxis: new Axis('yaxis'), x2axis: new Axis('x2axis'), y2axis: new Axis('y2axis'), y3axis: new Axis('y3axis'), y4axis: new Axis('y4axis'), y5axis: new Axis('y5axis'), y6axis: new Axis('y6axis'), y7axis: new Axis('y7axis'), y8axis: new Axis('y8axis'), y9axis: new Axis('y9axis'), yMidAxis: new Axis('yMidAxis')};
this.baseCanvas = new $.jqplot.GenericCanvas();
@@ -1757,7 +1757,8 @@
this.data = [];
// prop: dataRenderer
// A callable which can be used to preprocess data passed into the plot.
- // Will be called with 2 arguments, the plot data and a reference to the plot.
+ // Will be called with 3 arguments: the plot data, a reference to the plot,
+ // and the value of dataRendererOptions.
this.dataRenderer;
// prop: dataRendererOptions
// Options that will be passed to the dataRenderer.
@@ -1820,7 +1821,6 @@
this.legend = new Legend();
// prop: noDataIndicator
// Options to set up a mock plot with a data loading indicator if no data is specified.
- this.negativeSeriesColors = $.jqplot.config.defaultNegativeColors;
this.noDataIndicator = {
show: false,
indicator: 'Loading Data...',
@@ -1839,16 +1839,19 @@
}
}
};
+ // prop: negativeSeriesColors
+ // colors to use for portions of the line below zero.
+ this.negativeSeriesColors = $.jqplot.config.defaultNegativeColors;
// container to hold all of the merged options. Convienence for plugins.
this.options = {};
this.previousSeriesStack = [];
- // Namespece to hold plugins. Generally non-renderer plugins add themselves to here.
+ // Namespace to hold plugins. Generally non-renderer plugins add themselves to here.
this.plugins = {};
// prop: series
// Array of series object options.
// see <Series> for series specific options.
this.series = [];
- // array of series indicies. Keep track of order
+ // array of series indices. Keep track of order
// which series canvases are displayed, lowest
// to highest, back to front.
this.seriesStack = [];
@@ -1860,7 +1863,7 @@
this.seriesColors = $.jqplot.config.defaultColors;
// prop: sortData
// false to not sort the data passed in by the user.
- // Many bar, stakced and other graphs as well as many plugins depend on
+ // Many bar, stacked and other graphs as well as many plugins depend on
// having sorted data.
this.sortData = true;
// prop: stackSeries
@@ -1887,7 +1890,7 @@
// Mostly used to test if plot has never been dran (=0), has been successfully drawn
// into a visible container once (=1) or draw more than once into a visible container.
// Can use this in tests to see if plot has been visibly drawn at least one time.
- // After plot has been visibly drawn once, it generally doesn't need redrawn if its
+ // After plot has been visibly drawn once, it generally doesn't need redrawing if its
// container is hidden and shown.
this._drawCount = 0;
// sum of y values for all series in plot.
@@ -1963,7 +1966,7 @@
// remove any error class that may be stuck on target.
this.target.removeClass('jqplot-error');
if (!this.target.get(0)) {
- throw "No plot target specified";
+ throw new Error("No plot target specified");
}
// make sure the target is positioned by some means and set css
@@ -2022,7 +2025,7 @@
this.eventCanvas._plotDimensions = this._plotDimensions;
this.legend._plotDimensions = this._plotDimensions;
if (this._height <=0 || this._width <=0 || !this._height || !this._width) {
- throw "Canvas dimension not set";
+ throw new Error("Canvas dimension not set");
}
if (options.dataRenderer && $.isFunction(options.dataRenderer)) {
@@ -2040,7 +2043,7 @@
if (data == null || $.isArray(data) == false || data.length == 0 || $.isArray(data[0]) == false || data[0].length == 0) {
if (this.noDataIndicator.show == false) {
- throw "No Data";
+ throw new Error("No data specified");
}
else {
@@ -2205,7 +2208,7 @@
this._width = this.target.width();
if (this._height <=0 || this._width <=0 || !this._height || !this._width) {
- throw "Target dimension not set";
+ throw new Error("Target dimension not set");
}
this._plotDimensions.height = this._height;
@@ -2361,7 +2364,7 @@
this._width = this.target.width();
if (this._height <=0 || this._width <=0 || !this._height || !this._width) {
- throw "Target dimension not set";
+ throw new Error("Target dimension not set");
}
this._plotDimensions.height = this._height;
@@ -2924,7 +2927,7 @@
for (i=0, l=$.jqplot.preDrawHooks.length; i<l; i++) {
$.jqplot.preDrawHooks[i].call(this);
}
- for (i=0, l=this.preDrawHooks.length; i<l; i++) {
+ for (i=0, l=this.preDrawHooks.hooks.length; i<l; i++) {
this.preDrawHooks.hooks[i].apply(this, this.preDrawSeriesHooks.args[i]);
}
// create an underlying canvas to be used for special features.
@@ -3296,7 +3299,7 @@
minang = (j>0) ? s.gridData[j-1][1]+sm : sm;
maxang = s.gridData[j][1];
if (theta > minang && theta < maxang) {
- return {seriesIndex:s.index, pointIndex:j, gridData:s.gridData[j], data:s.data[j]};
+ return {seriesIndex:s.index, pointIndex:j, gridData:[gridpos.x,gridpos.y], data:s.data[j]};
}
}
}
@@ -3341,7 +3344,7 @@
minang = (j>0) ? s.gridData[j-1][1]+sm : sm;
maxang = s.gridData[j][1];
if (theta > minang && theta < maxang) {
- return {seriesIndex:s.index, pointIndex:j, gridData:s.gridData[j], data:s.data[j]};
+ return {seriesIndex:s.index, pointIndex:j, gridData:[gridpos.x,gridpos.y], data:s.data[j]};
}
}
}
@@ -3906,7 +3909,7 @@
return $.jqplot.hex2rgb(s, a);
}
else {
- throw 'invalid color spec';
+ throw new Error('Invalid color spec');
}
};
@@ -4082,6 +4085,7 @@
+
// class: $.jqplot.AxisLabelRenderer
// Renderer to place labels on the axes.
$.jqplot.AxisLabelRenderer = function(options) {
@@ -4090,7 +4094,7 @@
// name of the axis associated with this tick
this.axis;
// prop: show
- // wether or not to show the tick (mark and label).
+ // whether or not to show the tick (mark and label).
this.show = true;
// prop: label
// The text or html for the label.
@@ -4159,10 +4163,10 @@
// name of the axis associated with this tick
this.axis;
// prop: showMark
- // wether or not to show the mark on the axis.
+ // whether or not to show the mark on the axis.
this.showMark = true;
// prop: showGridline
- // wether or not to draw the gridline on the grid at this tick.
+ // whether or not to draw the gridline on the grid at this tick.
this.showGridline = true;
// prop: isMinorTick
// if this is a minor tick.
@@ -4176,12 +4180,12 @@
// will be stoked above and below axis, so total length will be twice this.
this.markSize = 6;
// prop: show
- // wether or not to show the tick (mark and label).
+ // whether or not to show the tick (mark and label).
// Setting this to false requires more testing. It is recommended
// to set showLabel and showMark to false instead.
this.show = true;
// prop: showLabel
- // wether or not to show the label.
+ // whether or not to show the label.
this.showLabel = true;
this.label = null;
this.value = null;
@@ -4213,7 +4217,7 @@
// true to escape HTML entities in the label.
this.escapeHTML = false;
this._elem;
- this._breakTick = false;
+ this._breakTick = false;
$.extend(true, this, options);
};
@@ -4273,9 +4277,9 @@
if (this.textColor) {
this._elem.css('color', this.textColor);
}
- if (this._breakTick) {
- this._elem.addClass('jqplot-breakTick');
- }
+ if (this._breakTick) {
+ this._elem.addClass('jqplot-breakTick');
+ }
return this._elem;
};
@@ -4349,8 +4353,8 @@
this._elem.addClass('jqplot-grid-canvas');
this._elem.css({ position: 'absolute', left: 0, top: 0 });
- elem = plot.canvasManager.initCanvas(elem);
-
+ elem = plot.canvasManager.initCanvas(elem);
+
this._top = this._offsets.top;
this._bottom = h - this._offsets.bottom;
this._left = this._offsets.left;
@@ -4754,11 +4758,11 @@
$.jqplot.LinePattern = function (ctx, pattern) {
- var defaultLinePatterns = {
- dotted: [ dotlen, $.jqplot.config.dotGapLength ],
- dashed: [ $.jqplot.config.dashLength, $.jqplot.config.gapLength ],
- solid: null
- };
+ var defaultLinePatterns = {
+ dotted: [ dotlen, $.jqplot.config.dotGapLength ],
+ dashed: [ $.jqplot.config.dashLength, $.jqplot.config.gapLength ],
+ solid: null
+ };
if (typeof pattern === 'string') {
if (pattern[0] === '.' || pattern[0] === '-') {
@@ -5732,7 +5736,7 @@
tempgd.push(gd[i]);
this._areaPoints.push(gd[i]);
// do we have an axis crossing?
- if (pd[i][1] * pd[i+1][1] < 0) {
+ if (pd[i][1] * pd[i+1][1] <= 0) {
if (pd[i][1] < 0) {
isnegative = true;
opts.fillStyle = negativeColor;
@@ -5992,7 +5996,7 @@
plot.target.trigger(evt1, ins);
if (plot.series[ins[0]].highlightMouseOver && !(ins[0] == plot.plugins.lineRenderer.highlightedSeriesIndex)) {
var evt = jQuery.Event('jqplotDataHighlight');
- evt.which = ev.which;
+ evt.which = ev.which;
evt.pageX = ev.pageX;
evt.pageY = ev.pageY;
plot.target.trigger(evt, ins);
@@ -6009,7 +6013,7 @@
var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data];
if (plot.series[ins[0]].highlightMouseDown && !(ins[0] == plot.plugins.lineRenderer.highlightedSeriesIndex)) {
var evt = jQuery.Event('jqplotDataHighlight');
- evt.which = ev.which;
+ evt.which = ev.which;
evt.pageX = ev.pageX;
evt.pageY = ev.pageY;
plot.target.trigger(evt, ins);
@@ -6032,7 +6036,7 @@
if (neighbor) {
var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data];
var evt = jQuery.Event('jqplotDataClick');
- evt.which = ev.which;
+ evt.which = ev.which;
evt.pageX = ev.pageX;
evt.pageY = ev.pageY;
plot.target.trigger(evt, ins);
@@ -6047,7 +6051,7 @@
unhighlight(plot);
}
var evt = jQuery.Event('jqplotDataRightClick');
- evt.which = ev.which;
+ evt.which = ev.which;
evt.pageX = ev.pageX;
evt.pageY = ev.pageY;
plot.target.trigger(evt, ins);
@@ -6142,7 +6146,7 @@
// call it within the scope of the axis.
this.renderer.createTicks.call(this, plot);
// fill a div with axes labels in the right direction.
- // Need to pregenerate each axis to get it's bounds and
+ // Need to pregenerate each axis to get its bounds and
// position it and the labels correctly on the plot.
var dim=0;
var temp;
@@ -7399,7 +7403,7 @@
// Group: Properties
// prop: show
- // wether or not to show the marker.
+ // whether or not to show the marker.
this.show = true;
// prop: style
// One of diamond, circle, square, x, plus, dash, filledDiamond, filledCircle, filledSquare
@@ -7414,7 +7418,7 @@
// color of marker. Will be set to color of series by default on init.
this.color = '#666666';
// prop: shadow
- // wether or not to draw a shadow on the line
+ // whether or not to draw a shadow on the line
this.shadow = true;
// prop: shadowAngle
// Shadow angle in degrees
@@ -7625,7 +7629,7 @@
this.depth = 3;
this.strokeStyle = 'rgba(0,0,0,0.1)';
// prop: isarc
- // wether the shadow is an arc or not.
+ // whether the shadow is an arc or not.
this.isarc = false;
$.extend(true, this, options);
@@ -7727,7 +7731,7 @@
// whether to fill the shape.
this.fill = false;
// prop: isarc
- // wether the shadow is an arc or not.
+ // whether the shadow is an arc or not.
this.isarc = false;
// prop: fillRect
// true to draw shape as a filled rectangle.
@@ -7950,7 +7954,7 @@
var pad = false,
reverse = false,
- s;
+ s;
for (var i = 0; i< series.length; i++) {
s = series[i];
if (s._stack || s.renderer.constructor == $.jqplot.BezierCurveRenderer){
@@ -9283,7 +9287,7 @@
return str;
};
- // Not gauranteed to work, even on canvas supporting browsers due to
+ // Not guaranteed to work, even on canvas supporting browsers due to
// limitations with location.href and browser support.
$.fn.jqplotSaveImage = function() {
var imgData = $(this).jqplotToImageStr({});
@@ -9293,7 +9297,7 @@
};
- // Not gauranteed to work, even on canvas supporting browsers due to
+ // Not guaranteed to work, even on canvas supporting browsers due to
// limitations with window.open and arbitrary data.
$.fn.jqplotViewImage = function() {
var imgStr = $(this).jqplotToImageElemStr({});
@@ -9323,12 +9327,12 @@
* @author Chris Leonello
* @date #date#
* @version #VERSION#
- * @copyright (c) 2010 Chris Leonello
+ * @copyright (c) 2010-2013 Chris Leonello
* jsDate is currently available for use in all personal or commercial projects
* under both the MIT and GPL version 2.0 licenses. This means that you can
* choose the license that best suits your project and use it accordingly.
*
- * <p>Ken's origianl Date Instance Methods and copyright notice:</p>
+ * <p>Ken's original Date Instance Methods and copyright notice:</p>
* <pre>
* Ken Snyder (ken d snyder at gmail dot com)
* 2008-09-10
@@ -9616,7 +9620,7 @@
jsDate.prototype.getIsoWeek = function() {
var d = this.proxy;
- var woy = d.getWeekOfYear();
+ var woy = this.getWeekOfYear();
var dow1_1 = (new Date('' + d.getFullYear() + '/1/1')).getDay();
// First week is 01 and not 00 as in the case of %U and %W,
// so we add 1 to the final result except if day 1 of the year
@@ -10010,8 +10014,31 @@
dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'],
dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
formatString: '%Y-%m-%d %H:%M:%S'
+ },
+
+ 'pl': {
+ monthNames: ['Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec','Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'],
+ monthNamesShort: ['Sty', 'Lut', 'Mar', 'Kwi', 'Maj', 'Cze','Lip', 'Sie', 'Wrz', 'Paź', 'Lis', 'Gru'],
+ dayNames: ['Niedziela', 'Poniedziałek', 'Wtorek', 'Środa', 'Czwartek', 'Piątek', 'Sobota'],
+ dayNamesShort: ['Ni', 'Pn', 'Wt', 'Śr', 'Cz', 'Pt', 'Sb'],
+ formatString: '%Y-%m-%d %H:%M:%S'
+ },
+
+ 'nl': {
+ monthNames: ['Januari','Februari','Maart','April','Mei','Juni','July','Augustus','September','Oktober','November','December'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun','Jul','Aug','Sep','Okt','Nov','Dec'],
+ dayNames:','['Zondag','Maandag','Dinsdag','Woensdag','Donderdag','Vrijdag','Zaterdag'],
+ dayNamesShort: ['Zo','Ma','Di','Wo','Do','Vr','Za'],
+ formatString: '%Y-%m-%d %H:%M:%S'
+ },
+
+ 'sv': {
+ monthNames: ['januari','februari','mars','april','maj','juni','juli','augusti','september','oktober','november','december'],
+ monthNamesShort: ['jan','feb','mar','apr','maj','jun','jul','aug','sep','okt','nov','dec'],
+ dayNames: ['söndag','måndag','tisdag','onsdag','torsdag','fredag','lördag'],
+ dayNamesShort: ['sön','mån','tis','ons','tor','fre','lör'],
+ formatString: '%Y-%m-%d %H:%M:%S'
}
-
};
@@ -10976,15 +11003,18 @@
var method = ['toExponential', 'toFixed', 'toPrecision']['efg'.indexOf(type.toLowerCase())];
var textTransform = ['toString', 'toUpperCase']['eEfFgG'.indexOf(type) % 2];
var number_str = Math.abs(number)[method](precision);
- number_str = thousandSeparation ? thousand_separate(number_str): number_str;
+
+ // Apply the decimal mark properly by splitting the number by the
+ // decimalMark, applying thousands separator, and then placing it
+ // back in.
+ var parts = number_str.toString().split('.');
+ parts[0] = thousandSeparation ? thousand_separate(parts[0]) : parts[0];
+ number_str = parts.join($.jqplot.sprintf.decimalMark);
+
value = prefix + number_str;
var justified = justify(value, prefix, leftJustify, minWidth, zeroPad, htmlSpace)[textTransform]();
-
- if ($.jqplot.sprintf.decimalMark !== '.' && $.jqplot.sprintf.decimalMark !== $.jqplot.sprintf.thousandsSeparator) {
- return justified.replace(/\./, $.jqplot.sprintf.decimalMark);
- } else {
- return justified;
- }
+
+ return justified;
}
case 'p':
case 'P':
@@ -10997,7 +11027,7 @@
var prefix = number < 0 ? '-' : positivePrefix;
var parts = String(Number(Math.abs(number)).toExponential()).split(/e|E/);
- var sd = (parts[0].indexOf('.') != -1) ? parts[0].length - 1 : parts[0].length;
+ var sd = (parts[0].indexOf('.') != -1) ? parts[0].length - 1 : String(number).length;
var zeros = (parts[1] < 0) ? -parts[1] - 1 : 0;
if (Math.abs(number) < 1) {
@@ -11053,7 +11083,7 @@
return $.jqplot.getSignificantFigures(number).digitsRight;
};
-})(jQuery);
+
var backCompat = $.uiBackCompat !== false;
@@ -11378,4 +11408,4 @@
};
-
+})(jQuery);
Property changes on: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/jquery.jqplot.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.BezierCurveRenderer.js
===================================================================
--- sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.BezierCurveRenderer.js 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.BezierCurveRenderer.js 2013-07-19 21:51:14 UTC (rev 167)
@@ -2,10 +2,10 @@
* jqPlot
* Pure JavaScript plotting plugin using jQuery
*
- * Version: 1.0.4
- * Revision: 1121
+ * Version: 1.0.8
+ * Revision: 1250
*
- * Copyright (c) 2009-2012 Chris Leonello
+ * Copyright (c) 2009-2013 Chris Leonello
* jqPlot is currently available for use in all personal or commercial projects
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
@@ -289,6 +289,7 @@
function preInit(target, data, options) {
options = options || {};
options.axesDefaults = $.extend(true, {pad:0}, options.axesDefaults);
+ options.seriesDefaults = options.seriesDefaults || {};
options.legend = $.extend(true, {placement:'outside'}, options.legend);
// only set these if there is a pie series
var setopts = false;
Property changes on: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.BezierCurveRenderer.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.barRenderer.js
===================================================================
--- sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.barRenderer.js 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.barRenderer.js 2013-07-19 21:51:14 UTC (rev 167)
@@ -2,10 +2,10 @@
* jqPlot
* Pure JavaScript plotting plugin using jQuery
*
- * Version: 1.0.4
- * Revision: 1121
+ * Version: 1.0.8
+ * Revision: 1250
*
- * Copyright (c) 2009-2012 Chris Leonello
+ * Copyright (c) 2009-2013 Chris Leonello
* jqPlot is currently available for use in all personal or commercial projects
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
@@ -115,7 +115,7 @@
//////
// This is probably wrong here.
- // After going back and forth on wether renderer should be the thing
+ // After going back and forth on whether renderer should be the thing
// or extend the thing, it seems that it it best if it is a property
// on the thing. This should be something that is commonized
// among series renderers in the future.
@@ -350,7 +350,7 @@
var nvals = temp[0];
var nseries = temp[1];
var pos = temp[2];
- var points = [];
+ var points = [];
if (this._stack) {
this._barNudge = 0;
@@ -366,9 +366,9 @@
negativeColor = opts.fillStyle;
}
var positiveColor = opts.fillStyle;
- var base;
- var xstart;
- var ystart;
+ var base;
+ var xstart;
+ var ystart;
if (this.barDirection == 'vertical') {
for (var i=0; i<gridData.length; i++) {
@@ -438,20 +438,20 @@
opts.fillStyle = positiveColor;
}
}
-
- if (!this.fillToZero || this._plotData[i][1] >= 0) {
- points.push([base-this.barWidth/2, ystart]);
- points.push([base-this.barWidth/2, gridData[i][1]]);
- points.push([base+this.barWidth/2, gridData[i][1]]);
- points.push([base+this.barWidth/2, ystart]);
- }
- // for negative bars make sure points are always ordered clockwise
- else {
- points.push([base-this.barWidth/2, gridData[i][1]]);
- points.push([base-this.barWidth/2, ystart]);
- points.push([base+this.barWidth/2, ystart]);
- points.push([base+this.barWidth/2, gridData[i][1]]);
- }
+
+ if (!this.fillToZero || this._plotData[i][1] >= 0) {
+ points.push([base-this.barWidth/2, ystart]);
+ points.push([base-this.barWidth/2, gridData[i][1]]);
+ points.push([base+this.barWidth/2, gridData[i][1]]);
+ points.push([base+this.barWidth/2, ystart]);
+ }
+ // for negative bars make sure points are always ordered clockwise
+ else {
+ points.push([base-this.barWidth/2, gridData[i][1]]);
+ points.push([base-this.barWidth/2, ystart]);
+ points.push([base+this.barWidth/2, ystart]);
+ points.push([base+this.barWidth/2, gridData[i][1]]);
+ }
this._barPoints.push(points);
// now draw the shadows if not stacked.
// for stacked plots, they are predrawn by drawShadow
@@ -513,7 +513,7 @@
xstart = 0;
}
}
- if ((this.fillToZero && this._plotData[i][1] < 0) || (this.waterfall && this._data[i][1] < 0)) {
+ if ((this.fillToZero && this._plotData[i][0] < 0) || (this.waterfall && this._data[i][0] < 0)) {
if (this.varyBarColor && !this._stack) {
if (this.useNegativeColors) {
opts.fillStyle = negativeColors.next();
@@ -522,6 +522,9 @@
opts.fillStyle = positiveColors.next();
}
}
+ else {
+ opts.fillStyle = negativeColor;
+ }
}
else {
if (this.varyBarColor && !this._stack) {
@@ -729,9 +732,10 @@
evt1.pageX = ev.pageX;
evt1.pageY = ev.pageY;
plot.target.trigger(evt1, ins);
- if (plot.series[ins[0]].highlightMouseOver && !(ins[0] == plot.plugins.barRenderer.highlightedSeriesIndex && ins[1] == plot.series[ins[0]]._highlightedPoint)) {
+ if (plot.series[ins[0]].show && plot.series[ins[0]].highlightMouseOver &&
+ !(ins[0] == plot.plugins.barRenderer.highlightedSeriesIndex && ins[1] == plot.series[ins[0]]._highlightedPoint)) {
var evt = jQuery.Event('jqplotDataHighlight');
- evt.which = ev.which;
+ evt.which = ev.which;
evt.pageX = ev.pageX;
evt.pageY = ev.pageY;
plot.target.trigger(evt, ins);
@@ -748,7 +752,7 @@
var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data];
if (plot.series[ins[0]].highlightMouseDown && !(ins[0] == plot.plugins.barRenderer.highlightedSeriesIndex && ins[1] == plot.series[ins[0]]._highlightedPoint)) {
var evt = jQuery.Event('jqplotDataHighlight');
- evt.which = ev.which;
+ evt.which = ev.which;
evt.pageX = ev.pageX;
evt.pageY = ev.pageY;
plot.target.trigger(evt, ins);
@@ -771,7 +775,7 @@
if (neighbor) {
var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data];
var evt = jQuery.Event('jqplotDataClick');
- evt.which = ev.which;
+ evt.which = ev.which;
evt.pageX = ev.pageX;
evt.pageY = ev.pageY;
plot.target.trigger(evt, ins);
@@ -786,7 +790,7 @@
unhighlight(plot);
}
var evt = jQuery.Event('jqplotDataRightClick');
- evt.which = ev.which;
+ evt.which = ev.which;
evt.pageX = ev.pageX;
evt.pageY = ev.pageY;
plot.target.trigger(evt, ins);
@@ -794,4 +798,4 @@
}
-})(jQuery);
\ No newline at end of file
+})(jQuery);
\ No newline at end of file
Property changes on: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.barRenderer.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.blockRenderer.js
===================================================================
--- sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.blockRenderer.js 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.blockRenderer.js 2013-07-19 21:51:14 UTC (rev 167)
@@ -2,10 +2,10 @@
* jqPlot
* Pure JavaScript plotting plugin using jQuery
*
- * Version: 1.0.4
- * Revision: 1121
+ * Version: 1.0.8
+ * Revision: 1250
*
- * Copyright (c) 2009-2012 Chris Leonello
+ * Copyright (c) 2009-2013 Chris Leonello
* jqPlot is currently available for use in all personal or commercial projects
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
Property changes on: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.blockRenderer.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.bubbleRenderer.js
===================================================================
--- sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.bubbleRenderer.js 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.bubbleRenderer.js 2013-07-19 21:51:14 UTC (rev 167)
@@ -2,10 +2,10 @@
* jqPlot
* Pure JavaScript plotting plugin using jQuery
*
- * Version: 1.0.4
- * Revision: 1121
+ * Version: 1.0.8
+ * Revision: 1250
*
- * Copyright (c) 2009-2012 Chris Leonello
+ * Copyright (c) 2009-2013 Chris Leonello
* jqPlot is currently available for use in all personal or commercial projects
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
@@ -632,7 +632,7 @@
plot.target.trigger(evt1, ins);
if (plot.series[ins[0]].highlightMouseOver && !(ins[0] == plot.plugins.bubbleRenderer.highlightedSeriesIndex && ins[1] == plot.series[ins[0]]._highlightedPoint)) {
var evt = jQuery.Event('jqplotDataHighlight');
- evt.which = ev.which;
+ evt.which = ev.which;
evt.pageX = ev.pageX;
evt.pageY = ev.pageY;
plot.target.trigger(evt, ins);
@@ -651,7 +651,7 @@
var ins = [si, pi, neighbor.data, plot.series[si].gridData[pi][2]];
if (plot.series[ins[0]].highlightMouseDown && !(ins[0] == plot.plugins.bubbleRenderer.highlightedSeriesIndex && ins[1] == plot.series[ins[0]]._highlightedPoint)) {
var evt = jQuery.Event('jqplotDataHighlight');
- evt.which = ev.which;
+ evt.which = ev.which;
evt.pageX = ev.pageX;
evt.pageY = ev.pageY;
plot.target.trigger(evt, ins);
@@ -676,7 +676,7 @@
var pi = neighbor.pointIndex;
var ins = [si, pi, neighbor.data, plot.series[si].gridData[pi][2]];
var evt = jQuery.Event('jqplotDataClick');
- evt.which = ev.which;
+ evt.which = ev.which;
evt.pageX = ev.pageX;
evt.pageY = ev.pageY;
plot.target.trigger(evt, ins);
@@ -693,7 +693,7 @@
unhighlight(plot);
}
var evt = jQuery.Event('jqplotDataRightClick');
- evt.which = ev.which;
+ evt.which = ev.which;
evt.pageX = ev.pageX;
evt.pageY = ev.pageY;
plot.target.trigger(evt, ins);
Property changes on: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.bubbleRenderer.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.canvasAxisLabelRenderer.js
===================================================================
--- sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.canvasAxisLabelRenderer.js 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.canvasAxisLabelRenderer.js 2013-07-19 21:51:14 UTC (rev 167)
@@ -2,10 +2,10 @@
* jqPlot
* Pure JavaScript plotting plugin using jQuery
*
- * Version: 1.0.4
- * Revision: 1121
+ * Version: 1.0.8
+ * Revision: 1250
*
- * Copyright (c) 2009-2012 Chris Leonello
+ * Copyright (c) 2009-2013 Chris Leonello
* jqPlot is currently available for use in all personal or commercial projects
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
@@ -52,10 +52,10 @@
// name of the axis associated with this tick
this.axis;
// prop: show
- // wether or not to show the tick (mark and label).
+ // whether or not to show the tick (mark and label).
this.show = true;
// prop: showLabel
- // wether or not to show the label.
+ // whether or not to show the label.
this.showLabel = true;
// prop: label
// label for the axis.
@@ -186,8 +186,8 @@
elem.style.width = w;
elem.style.height = h;
- elem = plot.canvasManager.initCanvas(elem);
-
+ elem = plot.canvasManager.initCanvas(elem);
+
this._elem = $(elem);
this._elem.css({ position: 'absolute'});
this._elem.addClass('jqplot-'+this.axis+'-label');
Property changes on: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.canvasAxisLabelRenderer.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.canvasAxisTickRenderer.js
===================================================================
--- sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.canvasAxisTickRenderer.js 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.canvasAxisTickRenderer.js 2013-07-19 21:51:14 UTC (rev 167)
@@ -2,10 +2,10 @@
* jqPlot
* Pure JavaScript plotting plugin using jQuery
*
- * Version: 1.0.4
- * Revision: 1121
+ * Version: 1.0.8
+ * Revision: 1250
*
- * Copyright (c) 2009-2012 Chris Leonello
+ * Copyright (c) 2009-2013 Chris Leonello
* jqPlot is currently available for use in all personal or commercial projects
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
@@ -49,10 +49,10 @@
// tick mark on the axis. One of 'inside', 'outside', 'cross', '' or null.
this.mark = 'outside';
// prop: showMark
- // wether or not to show the mark on the axis.
+ // whether or not to show the mark on the axis.
this.showMark = true;
// prop: showGridline
- // wether or not to draw the gridline on the grid at this tick.
+ // whether or not to draw the gridline on the grid at this tick.
this.showGridline = true;
// prop: isMinorTick
// if this is a minor tick.
@@ -65,10 +65,10 @@
// will be stoked above and below axis, so total length will be twice this.
this.markSize = 4;
// prop: show
- // wether or not to show the tick (mark and label).
+ // whether or not to show the tick (mark and label).
this.show = true;
// prop: showLabel
- // wether or not to show the label.
+ // whether or not to show the label.
this.showLabel = true;
// prop: labelPosition
// 'auto', 'start', 'middle' or 'end'.
@@ -180,6 +180,16 @@
return w;
}
};
+
+ // return top.
+ $.jqplot.CanvasAxisTickRenderer.prototype.getTop = function(ctx) {
+ if (this._elem) {
+ return this._elem.position().top;
+ }
+ else {
+ return null;
+ }
+ };
$.jqplot.CanvasAxisTickRenderer.prototype.getAngleRad = function() {
var a = this.angle * Math.PI/180;
@@ -225,13 +235,13 @@
elem.style.height = h;
elem.style.textAlign = 'left';
elem.style.position = 'absolute';
-
- elem = plot.canvasManager.initCanvas(elem);
-
+
+ elem = plot.canvasManager.initCanvas(elem);
+
this._elem = $(elem);
this._elem.css(this._styles);
this._elem.addClass('jqplot-'+this.axis+'-tick');
-
+
elem = null;
return this._elem;
};
Property changes on: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.canvasAxisTickRenderer.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.canvasOverlay.js
===================================================================
--- sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.canvasOverlay.js 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.canvasOverlay.js 2013-07-19 21:51:14 UTC (rev 167)
@@ -2,10 +2,10 @@
* jqPlot
* Pure JavaScript plotting plugin using jQuery
*
- * Version: 1.0.4
- * Revision: 1121
+ * Version: 1.0.8
+ * Revision: 1250
*
- * Copyright (c) 2009-2012 Chris Leonello
+ * Copyright (c) 2009-2013 Chris Leonello
* jqPlot is currently available for use in all personal or commercial projects
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
@@ -66,6 +66,9 @@
case 'dashedVerticalLine':
this.addDashedVerticalLine(obj[n]);
break;
+ case 'rectangle':
+ this.addRectangle(obj[n]);
+ break;
default:
break;
}
@@ -107,7 +110,7 @@
// color of the line
color: '#666666',
// prop: shadow
- // wether or not to draw a shadow on the line
+ // whether or not to draw a shadow on the line
shadow: true,
// prop: shadowAngle
// Shadow angle in degrees
@@ -153,7 +156,41 @@
tooltipFormatString: '%d, %d'
};
}
+
+
+ function Rectangle(options) {
+ LineBase.call(this);
+ this.type = 'rectangle';
+ var opts = {
+ // prop: xmin
+ // x value for the start of the line, null to scale to axis min.
+ xmin: null,
+ // prop: xmax
+ // x value for the end of the line, null to scale to axis max.
+ xmax: null,
+ // prop xOffset
+ // offset ends of the line inside the grid. Number
+ xOffset: '6px', // number or string. Number interpreted as units, string as pixels.
+ xminOffset: null,
+ xmaxOffset: null,
+
+ ymin: null,
+ ymax: null,
+ yOffset: '6px', // number or string. Number interpreted as units, string as pixels.
+ yminOffset: null,
+ ymaxOffset: null
+ };
+ $.extend(true, this.options, opts, options);
+ if (this.options.showTooltipPrecision < 0.01) {
+ this.options.showTooltipPrecision = 0.01;
+ }
+ }
+
+ Rectangle.prototype = new LineBase();
+ Rectangle.prototype.constructor = Rectangle;
+
+
/**
* Class: Line
* A straight line.
@@ -338,6 +375,13 @@
this.objectNames.push(line.options.name);
};
+ $.jqplot.CanvasOverlay.prototype.addRectangle = function(opts) {
+ var line = new Rectangle(opts);
+ line.uid = objCounter++;
+ this.objects.push(line);
+ this.objectNames.push(line.options.name);
+ };
+
$.jqplot.CanvasOverlay.prototype.removeObject = function(idx) {
// check if integer, remove by index
if ($.type(idx) == 'number') {
@@ -621,7 +665,81 @@
}
}
break;
+
+ case 'rectangle':
+ // style and shadow properties should be set before
+ // every draw of marker renderer.
+ mr.style = 'line';
+ opts.closePath = true;
+
+ var xaxis = plot.axes[obj.options.xaxis],
+ xstart,
+ xstop,
+ y = plot.axes[obj.options.yaxis].series_u2p(obj.options.y),
+ xminoff = obj.options.xminOffset || obj.options.xOffset,
+ xmaxoff = obj.options.xmaxOffset || obj.options.xOffset;
+ if (obj.options.xmin != null) {
+ xstart = xaxis.series_u2p(obj.options.xmin);
+ }
+ else if (xminoff != null) {
+ if ($.type(xminoff) == "number") {
+ xstart = xaxis.series_u2p(xaxis.min + xminoff);
+ }
+ else if ($.type(xminoff) == "string") {
+ xstart = xaxis.series_u2p(xaxis.min) + parseFloat(xminoff);
+ }
+ }
+ if (obj.options.xmax != null) {
+ xstop = xaxis.series_u2p(obj.options.xmax);
+ }
+ else if (xmaxoff != null) {
+ if ($.type(xmaxoff) == "number") {
+ xstop = xaxis.series_u2p(xaxis.max - xmaxoff);
+ }
+ else if ($.type(xmaxoff) == "string") {
+ xstop = xaxis.series_u2p(xaxis.max) - parseFloat(xmaxoff);
+ }
+ }
+
+ var yaxis = plot.axes[obj.options.yaxis],
+ ystart,
+ ystop,
+ x = plot.axes[obj.options.xaxis].series_u2p(obj.options.x),
+ yminoff = obj.options.yminOffset || obj.options.yOffset,
+ ymaxoff = obj.options.ymaxOffset || obj.options.yOffset;
+ if (obj.options.ymin != null) {
+ ystart = yaxis.series_u2p(obj.options.ymin);
+ }
+ else if (yminoff != null) {
+ if ($.type(yminoff) == "number") {
+ ystart = yaxis.series_u2p(yaxis.min - yminoff);
+ }
+ else if ($.type(yminoff) == "string") {
+ ystart = yaxis.series_u2p(yaxis.min) - parseFloat(yminoff);
+ }
+ }
+ if (obj.options.ymax != null) {
+ ystop = yaxis.series_u2p(obj.options.ymax);
+ }
+ else if (ymaxoff != null) {
+ if ($.type(ymaxoff) == "number") {
+ ystop = yaxis.series_u2p(yaxis.max + ymaxoff);
+ }
+ else if ($.type(ymaxoff) == "string") {
+ ystop = yaxis.series_u2p(yaxis.max) + parseFloat(ymaxoff);
+ }
+ }
+
+ if (xstop != null && xstart != null && ystop != null && ystart != null) {
+ obj.gridStart = [xstart, ystart];
+ obj.gridStop = [xstop, ystop];
+
+ this.canvas._ctx.fillStyle = obj.options.color;
+ this.canvas._ctx.fillRect(xstart, ystart, xstop - xstart, ystop - ystart);
+ }
+ break;
+
default:
break;
}
@@ -738,6 +856,24 @@
var ret = (res < eps) ? true : false;
return ret;
}
+
+ function isNearRectangle(point, lstart, lstop, width) {
+ // r is point to test, p and q are end points.
+ var rx = point[0];
+ var ry = point[1];
+ var px = Math.round(lstop[0]);
+ var py = Math.round(lstop[1]);
+ var qx = Math.round(lstart[0]);
+ var qy = Math.round(lstart[1]);
+
+ var temp;
+ if (px > qx) { temp = px; px = qx; qx = temp; }
+ if (py > qy) { temp = py; py = qy; qy = temp; }
+
+ var ret = (rx >= px && rx <= qx && ry >= py && ry <= qy);
+
+ return ret;
+ }
function handleMove(ev, gridpos, datapos, neighbor, plot) {
@@ -749,7 +885,12 @@
for (var i=0; i<l; i++) {
obj = objs[i];
if (obj.options.showTooltip) {
- var n = isNearLine([gridpos.x, gridpos.y], obj.gridStart, obj.gridStop, obj.tooltipWidthFactor);
+ var n;
+ if (obj.type === 'rectangle') {
+ n = isNearRectangle([gridpos.x, gridpos.y], obj.gridStart, obj.gridStop, obj.tooltipWidthFactor);
+ } else {
+ n = isNearLine([gridpos.x, gridpos.y], obj.gridStart, obj.gridStop, obj.tooltipWidthFactor);
+ }
datapos = [plot.axes[obj.options.xaxis].series_p2u(gridpos.x), plot.axes[obj.options.yaxis].series_p2u(gridpos.y)];
// cases:
@@ -775,6 +916,11 @@
case 'dashedVerticalLine':
showTooltip(plot, obj, [obj.gridStart[0], gridpos.y], [obj.options.x, datapos[1]]);
break;
+
+ case 'rectangle':
+ showTooltip(plot, obj, [obj.gridStart[0], gridpos.y], [obj.options.x, datapos[1]]);
+ break;
+
default:
break;
}
@@ -809,6 +955,11 @@
case 'dashedVerticalLine':
showTooltip(plot, obj, [obj.gridStart[0], gridpos.y], [obj.options.x, datapos[1]]);
break;
+
+ case 'rectangle':
+ showTooltip(plot, obj, [obj.gridStart[0], gridpos.y], [obj.options.x, datapos[1]]);
+ break;
+
default:
break;
}
@@ -834,6 +985,11 @@
case 'dashedVerticalLine':
showTooltip(plot, obj, [obj.gridStart[0], gridpos.y], [obj.options.x, datapos[1]]);
break;
+
+ case 'rectangle':
+ showTooltip(plot, obj, [obj.gridStart[0], gridpos.y], [obj.options.x, datapos[1]]);
+ break;
+
default:
break;
}
Property changes on: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.canvasOverlay.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.canvasTextRenderer.js
===================================================================
--- sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.canvasTextRenderer.js 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.canvasTextRenderer.js 2013-07-19 21:51:14 UTC (rev 167)
@@ -2,10 +2,10 @@
* jqPlot
* Pure JavaScript plotting plugin using jQuery
*
- * Version: 1.0.4
- * Revision: 1121
+ * Version: 1.0.8
+ * Revision: 1250
*
- * Copyright (c) 2009-2012 Chris Leonello
+ * Copyright (c) 2009-2013 Chris Leonello
* jqPlot is currently available for use in all personal or commercial projects
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
@@ -29,7 +29,7 @@
*
* included jsDate library by Chris Leonello:
*
- * Copyright (c) 2010-2012 Chris Leonello
+ * Copyright (c) 2010-2013 Chris Leonello
*
* jsDate is currently available for use in all personal or commercial projects
* under both the MIT and GPL version 2.0 licenses. This means that you can
@@ -38,7 +38,7 @@
* jsDate borrows many concepts and ideas from the Date Instance
* Methods by Ken Snyder along with some parts of Ken's actual code.
*
- * Ken's origianl Date Instance Methods and copyright notice:
+ * Ken's original Date Instance Methods and copyright notice:
*
* Ken Snyder (ken d snyder at gmail dot com)
* 2008-09-10
Property changes on: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.canvasTextRenderer.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.categoryAxisRenderer.js
===================================================================
--- sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.categoryAxisRenderer.js 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.categoryAxisRenderer.js 2013-07-19 21:51:14 UTC (rev 167)
@@ -2,10 +2,10 @@
* jqPlot
* Pure JavaScript plotting plugin using jQuery
*
- * Version: 1.0.4
- * Revision: 1121
+ * Version: 1.0.8
+ * Revision: 1250
*
- * Copyright (c) 2009-2012 Chris Leonello
+ * Copyright (c) 2009-2013 Chris Leonello
* jqPlot is currently available for use in all personal or commercial projects
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
@@ -211,7 +211,11 @@
}
if (isMerged && this.sortMergedLabels) {
- labels.sort(function(a,b) { return a - b; });
+ if (typeof labels[0] == "string") {
+ labels.sort();
+ } else {
+ labels.sort(function(a,b) { return a - b; });
+ }
}
// keep a reference to these tick labels to use for redrawing plot (see bug #57)
@@ -306,7 +310,7 @@
// call it within the scope of the axis.
this.renderer.createTicks.call(this);
// fill a div with axes labels in the right direction.
- // Need to pregenerate each axis to get it's bounds and
+ // Need to pregenerate each axis to get its bounds and
// position it and the labels correctly on the plot.
var dim=0;
var temp;
@@ -432,7 +436,7 @@
var offmin = offsets.min;
var lshow = (this._label == null) ? false : this._label.show;
var i;
-
+
for (var p in pos) {
this._elem.css(p, pos[p]);
}
@@ -564,11 +568,12 @@
}
// draw the group labels
- var step = parseInt(this._ticks.length/this.groups, 10);
+ var step = parseInt(this._ticks.length/this.groups, 10) + 1;
for (i=0; i<this._groupLabels.length; i++) {
var mid = 0;
var count = 0;
- for (var j=i*step; j<=(i+1)*step; j++) {
+ for (var j=i*step; j<(i+1)*step; j++) {
+ if (j >= this._ticks.length-1) continue; // the last tick does not exist as there is no other group in order to have an empty one.
if (this._ticks[j]._elem && this._ticks[j].label != " ") {
var t = this._ticks[j]._elem;
var p = t.position();
@@ -648,11 +653,12 @@
}
// draw the group labels, position top here, do left after label position.
- var step = parseInt(this._ticks.length/this.groups, 10);
+ var step = parseInt(this._ticks.length/this.groups, 10) + 1; // step is one more than before as we don't want to have overlaps in loops
for (i=0; i<this._groupLabels.length; i++) {
var mid = 0;
var count = 0;
- for (var j=i*step; j<=(i+1)*step; j++) {
+ for (var j=i*step; j<(i+1)*step; j++) { // j must never reach (i+1)*step as we don't want to have overlap between loops
+ if (j >= this._ticks.length-1) continue; // the last tick does not exist as there is no other group in order to have an empty one.
if (this._ticks[j]._elem && this._ticks[j].label != " ") {
var t = this._ticks[j]._elem;
var p = t.position();
@@ -670,4 +676,4 @@
};
-})(jQuery);
\ No newline at end of file
+})(jQuery);
Property changes on: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.categoryAxisRenderer.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.ciParser.js
===================================================================
--- sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.ciParser.js 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.ciParser.js 2013-07-19 21:51:14 UTC (rev 167)
@@ -2,10 +2,10 @@
* jqPlot
* Pure JavaScript plotting plugin using jQuery
*
- * Version: 1.0.4
- * Revision: 1121
+ * Version: 1.0.8
+ * Revision: 1250
*
- * Copyright (c) 2009-2012 Chris Leonello
+ * Copyright (c) 2009-2013 Chris Leonello
* jqPlot is currently available for use in all personal or commercial projects
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
@@ -54,7 +54,7 @@
$.jqplot.ciParser = function (data, plot) {
var ret = [],
line,
- temp,
+ temp,
i, j, k, kk;
if (typeof(data) == "string") {
Property changes on: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.ciParser.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.cursor.js
===================================================================
--- sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.cursor.js 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.cursor.js 2013-07-19 21:51:14 UTC (rev 167)
@@ -2,10 +2,10 @@
* jqPlot
* Pure JavaScript plotting plugin using jQuery
*
- * Version: 1.0.4
- * Revision: 1121
+ * Version: 1.0.8
+ * Revision: 1250
*
- * Copyright (c) 2009-2012 Chris Leonello
+ * Copyright (c) 2009-2013 Chris Leonello
* jqPlot is currently available for use in all personal or commercial projects
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
@@ -42,7 +42,7 @@
this.style = 'crosshair';
this.previousCursor = 'auto';
// prop: show
- // wether to show the cursor or not.
+ // whether to show the cursor or not.
this.show = $.jqplot.config.enablePlugins;
// prop: showTooltip
// show a cursor position tooltip. Location of the tooltip
@@ -654,7 +654,7 @@
elem.css('left', x);
elem.css('top', y);
- elem = null;
+ elem = null;
}
function positionTooltip(plot) {
@@ -1048,7 +1048,7 @@
if (this.show) {
var series = this._series, s;
// make a table. one line label per row.
- var elem = document.createElement('div');
+ var elem = document.createElement('table');
this._elem = $(elem);
elem = null;
this._elem.addClass('jqplot-legend jqplot-cursor-legend');
Property changes on: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.cursor.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.dateAxisRenderer.js
===================================================================
--- sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.dateAxisRenderer.js 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.dateAxisRenderer.js 2013-07-19 21:51:14 UTC (rev 167)
@@ -2,10 +2,10 @@
* jqPlot
* Pure JavaScript plotting plugin using jQuery
*
- * Version: 1.0.4
- * Revision: 1121
+ * Version: 1.0.8
+ * Revision: 1250
*
- * Copyright (c) 2009-2012 Chris Leonello
+ * Copyright (c) 2009-2013 Chris Leonello
* jqPlot is currently available for use in all personal or commercial projects
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
@@ -33,7 +33,7 @@
* Class: $.jqplot.DateAxisRenderer
* A plugin for a jqPlot to render an axis as a series of date values.
* This renderer has no options beyond those supplied by the <Axis> class.
- * It supplies it's own tick formatter, so the tickOptions.formatter option
+ * It supplies its own tick formatter, so the tickOptions.formatter option
* should not be overridden.
*
* Thanks to Ken Synder for his enhanced Date instance methods which are
@@ -334,14 +334,35 @@
var tt, i;
var threshold = 30;
var insetMult = 1;
+ var daTickInterval = null;
+
+ // if user specified a tick interval, convert to usable.
+ if (this.tickInterval != null)
+ {
+ // if interval is a number or can be converted to one, use it.
+ // Assume it is in SECONDS!!!
+ if (Number(this.tickInterval)) {
+ daTickInterval = [Number(this.tickInterval), 'seconds'];
+ }
+ // else, parse out something we can build from.
+ else if (typeof this.tickInterval == "string") {
+ var parts = this.tickInterval.split(' ');
+ if (parts.length == 1) {
+ daTickInterval = [1, parts[0]];
+ }
+ else if (parts.length == 2) {
+ daTickInterval = [parts[0], parts[1]];
+ }
+ }
+ }
var tickInterval = this.tickInterval;
// if we already have ticks, use them.
// ticks must be in order of increasing value.
- min = ((this.min != null) ? new $.jsDate(this.min).getTime() : db.min);
- max = ((this.max != null) ? new $.jsDate(this.max).getTime() : db.max);
+ min = new $.jsDate((this.min != null) ? this.min : db.min).getTime();
+ max = new $.jsDate((this.max != null) ? this.max : db.max).getTime();
// see if we're zooming. if we are, don't use the min and max we're given,
// but compute some nice ones. They will be reset later.
@@ -459,16 +480,16 @@
}
// If tickInterval is specified, we'll try to honor it.
- // Not gauranteed to get this interval, but we'll get as close as
+ // Not guaranteed to get this interval, but we'll get as close as
// we can.
// tickInterval will be used before numberTicks, that is if
// both are specified, numberTicks will be ignored.
else if (this.tickInterval) {
- titarget = this.tickInterval;
+ titarget = new $.jsDate(0).add(daTickInterval[0], daTickInterval[1]).getTime();
}
// if numberTicks specified, try to honor it.
- // Not gauranteed, but will try to get close.
+ // Not guaranteed, but will try to get close.
else if (this.numberTicks) {
nttarget = this.numberTicks;
titarget = (max - min) / (nttarget - 1);
@@ -480,9 +501,8 @@
var tempti = ret[0];
this._autoFormatString = ret[1];
- min = Math.floor(min/tempti) * tempti;
min = new $.jsDate(min);
- min = min.getTime() + min.getUtcOffset();
+ min = Math.floor((min.getTime() - min.getUtcOffset())/tempti) * tempti + min.getUtcOffset();
nttarget = Math.ceil((max - min) / tempti) + 1;
this.min = min;
@@ -640,24 +660,8 @@
this.tickInterval = null;
}
- // if user specified a tick interval, convert to usable.
- if (this.tickInterval != null)
- {
- // if interval is a number or can be converted to one, use it.
- // Assume it is in SECONDS!!!
- if (Number(this.tickInterval)) {
- this.daTickInterval = [Number(this.tickInterval), 'seconds'];
- }
- // else, parse out something we can build from.
- else if (typeof this.tickInterval == "string") {
- var parts = this.tickInterval.split(' ');
- if (parts.length == 1) {
- this.daTickInterval = [1, parts[0]];
- }
- else if (parts.length == 2) {
- this.daTickInterval = [parts[0], parts[1]];
- }
- }
+ if (this.tickInterval != null && daTickInterval != null) {
+ this.daTickInterval = daTickInterval;
}
// if min and max are same, space them out a bit
Property changes on: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.dateAxisRenderer.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.donutRenderer.js
===================================================================
--- sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.donutRenderer.js 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.donutRenderer.js 2013-07-19 21:51:14 UTC (rev 167)
@@ -2,10 +2,10 @@
* jqPlot
* Pure JavaScript plotting plugin using jQuery
*
- * Version: 1.0.4
- * Revision: 1121
+ * Version: 1.0.8
+ * Revision: 1250
*
- * Copyright (c) 2009-2012 Chris Leonello
+ * Copyright (c) 2009-2013 Chris Leonello
* jqPlot is currently available for use in all personal or commercial projects
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
@@ -101,7 +101,7 @@
// null will compute ringMargin based on sliceMargin.
this.ringMargin = null;
// prop: fill
- // true or false, wether to fil the slices.
+ // true or false, whether to fil the slices.
this.fill = true;
// prop: shadowOffset
// offset of the shadow from the slice and offset of
@@ -703,7 +703,7 @@
plot.target.trigger(evt1, ins);
if (plot.series[ins[0]].highlightMouseOver && !(ins[0] == plot.plugins.donutRenderer.highlightedSeriesIndex && ins[1] == plot.series[ins[0]]._highlightedPoint)) {
var evt = jQuery.Event('jqplotDataHighlight');
- evt.which = ev.which;
+ evt.which = ev.which;
evt.pageX = ev.pageX;
evt.pageY = ev.pageY;
plot.target.trigger(evt, ins);
@@ -720,7 +720,7 @@
var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data];
if (plot.series[ins[0]].highlightMouseDown && !(ins[0] == plot.plugins.donutRenderer.highlightedSeriesIndex && ins[1] == plot.series[ins[0]]._highlightedPoint)) {
var evt = jQuery.Event('jqplotDataHighlight');
- evt.which = ev.which;
+ evt.which = ev.which;
evt.pageX = ev.pageX;
evt.pageY = ev.pageY;
plot.target.trigger(evt, ins);
@@ -743,7 +743,7 @@
if (neighbor) {
var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data];
var evt = jQuery.Event('jqplotDataClick');
- evt.which = ev.which;
+ evt.which = ev.which;
evt.pageX = ev.pageX;
evt.pageY = ev.pageY;
plot.target.trigger(evt, ins);
@@ -758,7 +758,7 @@
unhighlight(plot);
}
var evt = jQuery.Event('jqplotDataRightClick');
- evt.which = ev.which;
+ evt.which = ev.which;
evt.pageX = ev.pageX;
evt.pageY = ev.pageY;
plot.target.trigger(evt, ins);
Property changes on: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.donutRenderer.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.dragable.js
===================================================================
--- sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.dragable.js 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.dragable.js 2013-07-19 21:51:14 UTC (rev 167)
@@ -2,10 +2,10 @@
* jqPlot
* Pure JavaScript plotting plugin using jQuery
*
- * Version: 1.0.4
- * Revision: 1121
+ * Version: 1.0.8
+ * Revision: 1250
*
- * Copyright (c) 2009-2012 Chris Leonello
+ * Copyright (c) 2009-2013 Chris Leonello
* jqPlot is currently available for use in all personal or commercial projects
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
Property changes on: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.dragable.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.enhancedLegendRenderer.js
===================================================================
--- sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.enhancedLegendRenderer.js 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.enhancedLegendRenderer.js 2013-07-19 21:51:14 UTC (rev 167)
@@ -2,10 +2,10 @@
* jqPlot
* Pure JavaScript plotting plugin using jQuery
*
- * Version: 1.0.4
- * Revision: 1121
+ * Version: 1.0.8
+ * Revision: 1250
*
- * Copyright (c) 2009-2012 Chris Leonello
+ * Copyright (c) 2009-2013 Chris Leonello
* jqPlot is currently available for use in all personal or commercial projects
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
@@ -73,7 +73,7 @@
var legend = this;
if (this.show) {
var series = this._series;
- var s;
+ var s;
var ss = 'position:absolute;';
ss += (this.background) ? 'background:'+this.background+';' : '';
ss += (this.border) ? 'border:'+this.border+';' : '';
Property changes on: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.enhancedLegendRenderer.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.funnelRenderer.js
===================================================================
--- sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.funnelRenderer.js 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.funnelRenderer.js 2013-07-19 21:51:14 UTC (rev 167)
@@ -2,10 +2,10 @@
* jqPlot
* Pure JavaScript plotting plugin using jQuery
*
- * Version: 1.0.4
- * Revision: 1121
+ * Version: 1.0.8
+ * Revision: 1250
*
- * Copyright (c) 2009-2012 Chris Leonello
+ * Copyright (c) 2009-2013 Chris Leonello
* jqPlot is currently available for use in all personal or commercial projects
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
@@ -102,7 +102,7 @@
// spacing between funnel sections in pixels.
this.sectionMargin = 6;
// prop: fill
- // true or false, wether to fill the areas.
+ // true or false, whether to fill the areas.
this.fill = true;
// prop: shadowOffset
// offset of the shadow from the area and offset of
@@ -841,7 +841,7 @@
plot.target.trigger(evt1, ins);
if (plot.series[ins[0]].highlightMouseOver && !(ins[0] == plot.plugins.funnelRenderer.highlightedSeriesIndex && ins[1] == plot.series[ins[0]]._highlightedPoint)) {
var evt = jQuery.Event('jqplotDataHighlight');
- evt.which = ev.which;
+ evt.which = ev.which;
evt.pageX = ev.pageX;
evt.pageY = ev.pageY;
plot.target.trigger(evt, ins);
@@ -858,7 +858,7 @@
var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data];
if (plot.series[ins[0]].highlightMouseDown && !(ins[0] == plot.plugins.funnelRenderer.highlightedSeriesIndex && ins[1] == plot.series[ins[0]]._highlightedPoint)) {
var evt = jQuery.Event('jqplotDataHighlight');
- evt.which = ev.which;
+ evt.which = ev.which;
evt.pageX = ev.pageX;
evt.pageY = ev.pageY;
plot.target.trigger(evt, ins);
@@ -881,7 +881,7 @@
if (neighbor) {
var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data];
var evt = jQuery.Event('jqplotDataClick');
- evt.which = ev.which;
+ evt.which = ev.which;
evt.pageX = ev.pageX;
evt.pageY = ev.pageY;
plot.target.trigger(evt, ins);
@@ -896,7 +896,7 @@
unhighlight(plot);
}
var evt = jQuery.Event('jqplotDataRightClick');
- evt.which = ev.which;
+ evt.which = ev.which;
evt.pageX = ev.pageX;
evt.pageY = ev.pageY;
plot.target.trigger(evt, ins);
Property changes on: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.funnelRenderer.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.highlighter.js
===================================================================
--- sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.highlighter.js 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.highlighter.js 2013-07-19 21:51:14 UTC (rev 167)
@@ -2,10 +2,10 @@
* jqPlot
* Pure JavaScript plotting plugin using jQuery
*
- * Version: 1.0.4
- * Revision: 1121
+ * Version: 1.0.8
+ * Revision: 1250
*
- * Copyright (c) 2009-2012 Chris Leonello
+ * Copyright (c) 2009-2013 Chris Leonello
* jqPlot is currently available for use in all personal or commercial projects
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
@@ -44,7 +44,7 @@
* To disable the tooltip, set "showTooltip" to false.
*
* You can control what data is displayed in the tooltip with various
- * options. The "tooltipAxes" option controls wether the x, y or both
+ * options. The "tooltipAxes" option controls whether the x, y or both
* data values are displayed.
*
* Some chart types (e.g. hi-low-close) have more than one y value per
@@ -339,12 +339,12 @@
if (series.markerRenderer.show == true) {
ms = (series.markerRenderer.size + opts.sizeAdjust)/2;
}
-
- var loc = locations;
- if (series.fillToZero && series.fill && neighbor.data[1] < 0) {
- loc = oppositeLocations;
- }
-
+
+ var loc = locations;
+ if (series.fillToZero && series.fill && neighbor.data[1] < 0) {
+ loc = oppositeLocations;
+ }
+
switch (loc[locationIndicies[opts.tooltipLocation]]) {
case 'nw':
var x = gridpos.x + plot._gridPadding.left - elem.outerWidth(true) - opts.tooltipOffset - fact * ms;
@@ -432,7 +432,7 @@
if (hl.showMarker) {
draw(plot, neighbor);
}
- if (hl.showTooltip && (!c || !c._zoom.started)) {
+ if (plot.series[neighbor.seriesIndex].show && hl.showTooltip && (!c || !c._zoom.started)) {
showTooltip(plot, plot.series[neighbor.seriesIndex], neighbor);
}
if (hl.bringSeriesToFront) {
@@ -452,7 +452,7 @@
if (hl.showMarker) {
draw(plot, neighbor);
}
- if (hl.showTooltip && (!c || !c._zoom.started)) {
+ if (plot.series[neighbor.seriesIndex].show && hl.showTooltip && (!c || !c._zoom.started)) {
showTooltip(plot, plot.series[neighbor.seriesIndex], neighbor);
}
if (hl.bringSeriesToFront) {
Property changes on: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.highlighter.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.json2.js
===================================================================
--- sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.json2.js 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.json2.js 2013-07-19 21:51:14 UTC (rev 167)
@@ -1,4 +1,4 @@
-/* %%Ignore-License
+/*
2010-11-01 Chris Leonello
Slightly modified version of the original json2.js to put JSON
Property changes on: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.json2.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.logAxisRenderer.js
===================================================================
--- sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.logAxisRenderer.js 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.logAxisRenderer.js 2013-07-19 21:51:14 UTC (rev 167)
@@ -2,10 +2,10 @@
* jqPlot
* Pure JavaScript plotting plugin using jQuery
*
- * Version: 1.0.4
- * Revision: 1121
+ * Version: 1.0.8
+ * Revision: 1250
*
- * Copyright (c) 2009-2012 Chris Leonello
+ * Copyright (c) 2009-2013 Chris Leonello
* jqPlot is currently available for use in all personal or commercial projects
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
@@ -161,10 +161,10 @@
// perform some checks
if (this.min != null && this.min <= 0) {
- throw('log axis minimum must be greater than 0');
+ throw new Error("Log axis minimum must be greater than 0");
}
if (this.max != null && this.max <= 0) {
- throw('log axis maximum must be greater than 0');
+ throw new Error("Log axis maximum must be greater than 0");
}
function findCeil (val) {
@@ -192,6 +192,11 @@
// rmax = rmax*(1+adj);
// }
+ // Handle case where a data value was zero
+ if (rmin === 0) {
+ rmin = 1;
+ }
+
var order = Math.round(Math.log(rmin)/Math.LN10);
if (this.tickOptions == null || !this.tickOptions.formatString) {
Property changes on: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.logAxisRenderer.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.mekkoAxisRenderer.js
===================================================================
--- sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.mekkoAxisRenderer.js 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.mekkoAxisRenderer.js 2013-07-19 21:51:14 UTC (rev 167)
@@ -2,10 +2,10 @@
* jqPlot
* Pure JavaScript plotting plugin using jQuery
*
- * Version: 1.0.4
- * Revision: 1121
+ * Version: 1.0.8
+ * Revision: 1250
*
- * Copyright (c) 2009-2012 Chris Leonello
+ * Copyright (c) 2009-2013 Chris Leonello
* jqPlot is currently available for use in all personal or commercial projects
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
@@ -91,7 +91,7 @@
// call it within the scope of the axis.
this.renderer.createTicks.call(this);
// fill a div with axes labels in the right direction.
- // Need to pregenerate each axis to get it's bounds and
+ // Need to pregenerate each axis to get its bounds and
// position it and the labels correctly on the plot.
var dim=0;
var temp;
Property changes on: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.mekkoAxisRenderer.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.mekkoRenderer.js
===================================================================
--- sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.mekkoRenderer.js 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.mekkoRenderer.js 2013-07-19 21:51:14 UTC (rev 167)
@@ -2,10 +2,10 @@
* jqPlot
* Pure JavaScript plotting plugin using jQuery
*
- * Version: 1.0.4
- * Revision: 1121
+ * Version: 1.0.8
+ * Revision: 1250
*
- * Copyright (c) 2009-2012 Chris Leonello
+ * Copyright (c) 2009-2013 Chris Leonello
* jqPlot is currently available for use in all personal or commercial projects
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
@@ -33,7 +33,7 @@
* Class: $.jqplot.MekkoRenderer
* Draws a Mekko style chart which shows 3 dimensional data on a 2 dimensional graph.
* the <$.jqplot.MekkoAxisRenderer> should be used with mekko charts. The mekko renderer
- * overrides the default legend renderer with it's own $.jqplot.MekkoLegendRenderer
+ * overrides the default legend renderer with its own $.jqplot.MekkoLegendRenderer
* which allows more flexibility to specify number of rows and columns in the legend.
*
* Data is specified per bar in the chart. You can specify data as an array of y values, or as
@@ -434,4 +434,4 @@
$.jqplot.preInitHooks.push(preInit);
-})(jQuery);
\ No newline at end of file
+})(jQuery);
Property changes on: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.mekkoRenderer.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.meterGaugeRenderer.js
===================================================================
--- sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.meterGaugeRenderer.js 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.meterGaugeRenderer.js 2013-07-19 21:51:14 UTC (rev 167)
@@ -2,10 +2,10 @@
* jqPlot
* Pure JavaScript plotting plugin using jQuery
*
- * Version: 1.0.4
- * Revision: 1121
+ * Version: 1.0.8
+ * Revision: 1250
*
- * Copyright (c) 2009-2012 Chris Leonello
+ * Copyright (c) 2009-2013 Chris Leonello
* jqPlot is currently available for use in all personal or commercial projects
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
@@ -94,7 +94,7 @@
this.needleColor = "#C3D3E5";
// prop: tickColor
// color of the tick marks around the gauge.
- this.tickColor = "989898";
+ this.tickColor = "#989898";
// prop: ringWidth
// width of the ring around the gauge. Auto computed by default.
this.ringWidth = null;
@@ -358,7 +358,7 @@
- // pre-draw so can get it's dimensions.
+ // pre-draw so can get its dimensions.
if (this.label) {
this._labelElem = $('<div class="jqplot-meterGauge-label" style="position:absolute;">'+this.label+'</div>');
this.canvas._elem.after(this._labelElem);
@@ -413,13 +413,12 @@
// will be center of hub.
this._center = [(cw-trans*offx)/2 + trans * offx, (ch-trans*offy)/2 + trans * offy];
}
+ if (this._labelElem && this.labelPosition == 'bottom') {
+ this._center[1] -= this._labelElem.outerHeight(true);
+ }
+
}
-
- if (this._labelElem && this.labelPosition == 'bottom') {
- this._center[1] -= this._labelElem.outerHeight(true);
- }
-
this._radius = this.diameter/2;
this.tickSpacing = 6000/this.diameter;
@@ -719,7 +718,7 @@
l = this._tickPoints[i][0] - ew * (this._tickPoints[i][2]-Math.PI)/Math.PI - tp * Math.cos(this._tickPoints[i][2]);
t = this._tickPoints[i][1] - eh/2 + eh/2 * Math.pow(Math.abs((Math.sin(this._tickPoints[i][2]))), 0.5) + tp/3 * Math.pow(Math.abs((Math.sin(this._tickPoints[i][2]))), 0.5) ;
// t = this._tickPoints[i][1] - eh/2 - eh/2 * Math.sin(this._tickPoints[i][2]) - tp/2 * Math.sin(this._tickPoints[i][2]);
- elem.css({left:l, top:t});
+ elem.css({left:l, top:t, color: this.tickColor});
dim = ew*Math.cos(this._tickPoints[i][2]) + eh*Math.sin(Math.PI/2+this._tickPoints[i][2]/2);
maxdim = (dim > maxdim) ? dim : maxdim;
}
@@ -739,7 +738,7 @@
else if (this.label && this.labelPosition == 'bottom') {
var l = this._center[0] + this.canvas._offsets.left - this._labelElem.outerWidth(true)/2;
- var t = this._center[1] + this.canvas._offsets.top + this.innerPad + + this.ringWidth + this.padding + this.labelHeightAdjust;
+ var t = this._center[1] + this.canvas._offsets.top + this.innerPad + this.ringWidth + this.padding + this.labelHeightAdjust;
this._labelElem.css({left:l, top:t});
}
@@ -1027,4 +1026,4 @@
})(jQuery);
-
\ No newline at end of file
+
Property changes on: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.meterGaugeRenderer.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.mobile.js
===================================================================
--- sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.mobile.js 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.mobile.js 2013-07-19 21:51:14 UTC (rev 167)
@@ -2,8 +2,8 @@
* jqplot.jquerymobile plugin
* jQuery Mobile virtual event support.
*
- * Version: 1.0.4
- * Revision: 1121
+ * Version: 1.0.8
+ * Revision: 1250
*
* Copyright (c) 2011 Takashi Okamoto
* jqPlot is currently available for use in all personal or commercial projects
Property changes on: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.mobile.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.ohlcRenderer.js
===================================================================
--- sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.ohlcRenderer.js 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.ohlcRenderer.js 2013-07-19 21:51:14 UTC (rev 167)
@@ -2,10 +2,10 @@
* jqPlot
* Pure JavaScript plotting plugin using jQuery
*
- * Version: 1.0.4
- * Revision: 1121
+ * Version: 1.0.8
+ * Revision: 1250
*
- * Copyright (c) 2009-2012 Chris Leonello
+ * Copyright (c) 2009-2013 Chris Leonello
* jqPlot is currently available for use in all personal or commercial projects
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
@@ -65,7 +65,7 @@
*
*/
$.jqplot.OHLCRenderer = function(){
- // subclass line renderer to make use of some of it's methods.
+ // subclass line renderer to make use of some of its methods.
$.jqplot.LineRenderer.call(this);
// prop: candleStick
// true to render chart as candleStick.
@@ -370,4 +370,4 @@
//$.jqplot.preInitHooks.push($.jqplot.OHLCRenderer.checkOptions);
-})(jQuery);
\ No newline at end of file
+})(jQuery);
Property changes on: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.ohlcRenderer.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.pieRenderer.js
===================================================================
--- sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.pieRenderer.js 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.pieRenderer.js 2013-07-19 21:51:14 UTC (rev 167)
@@ -2,10 +2,10 @@
* jqPlot
* Pure JavaScript plotting plugin using jQuery
*
- * Version: 1.0.4
- * Revision: 1121
+ * Version: 1.0.8
+ * Revision: 1250
*
- * Copyright (c) 2009-2012 Chris Leonello
+ * Copyright (c) 2009-2013 Chris Leonello
* jqPlot is currently available for use in all personal or commercial projects
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
@@ -88,7 +88,7 @@
// angular spacing between pie slices in degrees.
this.sliceMargin = 0;
// prop: fill
- // true or false, wether to fil the slices.
+ // true or false, whether to fil the slices.
this.fill = true;
// prop: shadowOffset
// offset of the shadow from the slice and offset of
@@ -801,7 +801,7 @@
plot.target.trigger(evt1, ins);
if (plot.series[ins[0]].highlightMouseOver && !(ins[0] == plot.plugins.pieRenderer.highlightedSeriesIndex && ins[1] == plot.series[ins[0]]._highlightedPoint)) {
var evt = jQuery.Event('jqplotDataHighlight');
- evt.which = ev.which;
+ evt.which = ev.which;
evt.pageX = ev.pageX;
evt.pageY = ev.pageY;
plot.target.trigger(evt, ins);
@@ -818,7 +818,7 @@
var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data];
if (plot.series[ins[0]].highlightMouseDown && !(ins[0] == plot.plugins.pieRenderer.highlightedSeriesIndex && ins[1] == plot.series[ins[0]]._highlightedPoint)) {
var evt = jQuery.Event('jqplotDataHighlight');
- evt.which = ev.which;
+ evt.which = ev.which;
evt.pageX = ev.pageX;
evt.pageY = ev.pageY;
plot.target.trigger(evt, ins);
@@ -841,7 +841,7 @@
if (neighbor) {
var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data];
var evt = jQuery.Event('jqplotDataClick');
- evt.which = ev.which;
+ evt.which = ev.which;
evt.pageX = ev.pageX;
evt.pageY = ev.pageY;
plot.target.trigger(evt, ins);
@@ -856,7 +856,7 @@
unhighlight(plot);
}
var evt = jQuery.Event('jqplotDataRightClick');
- evt.which = ev.which;
+ evt.which = ev.which;
evt.pageX = ev.pageX;
evt.pageY = ev.pageY;
plot.target.trigger(evt, ins);
Property changes on: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.pieRenderer.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.pointLabels.js
===================================================================
--- sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.pointLabels.js 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.pointLabels.js 2013-07-19 21:51:14 UTC (rev 167)
@@ -2,10 +2,10 @@
* jqPlot
* Pure JavaScript plotting plugin using jQuery
*
- * Version: 1.0.4
- * Revision: 1121
+ * Version: 1.0.8
+ * Revision: 1250
*
- * Copyright (c) 2009-2012 Chris Leonello
+ * Copyright (c) 2009-2013 Chris Leonello
* jqPlot is currently available for use in all personal or commercial projects
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
@@ -155,7 +155,7 @@
labelIdx = p.seriesLabelIndex;
}
else if (this.renderer.constructor === $.jqplot.BarRenderer && this.barDirection === 'horizontal') {
- labelIdx = 0;
+ labelIdx = (this._plotData[0].length < 3) ? 0 : this._plotData[0].length -1;
}
else {
labelIdx = (this._plotData.length === 0) ? 0 : this._plotData[0].length -1;
@@ -294,13 +294,11 @@
for (var i=0, l=p._labels.length; i < l; i++) {
var label = p._labels[i];
- if (p.hideZeros && parseInt(p._labels[i], 10) == 0) {
- label = '';
+ if (label == null || (p.hideZeros && parseInt(label, 10) == 0)) {
+ continue;
}
- if (label != null) {
- label = p.formatter(p.formatString, label);
- }
+ label = p.formatter(p.formatString, label);
helem = document.createElement('div');
p._elems[i] = $(helem);
Property changes on: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.pointLabels.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.pyramidAxisRenderer.js
===================================================================
--- sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.pyramidAxisRenderer.js 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.pyramidAxisRenderer.js 2013-07-19 21:51:14 UTC (rev 167)
@@ -2,10 +2,10 @@
* jqPlot
* Pure JavaScript plotting plugin using jQuery
*
- * Version: 1.0.4
- * Revision: 1121
+ * Version: 1.0.8
+ * Revision: 1250
*
- * Copyright (c) 2009-2012 Chris Leonello
+ * Copyright (c) 2009-2013 Chris Leonello
* jqPlot is currently available for use in all personal or commercial projects
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
@@ -111,7 +111,7 @@
// call it within the scope of the axis.
this.renderer.createTicks.call(this, plot);
// fill a div with axes labels in the right direction.
- // Need to pregenerate each axis to get it's bounds and
+ // Need to pregenerate each axis to get its bounds and
// position it and the labels correctly on the plot.
var dim=0;
var temp;
@@ -725,4 +725,4 @@
ticks = null;
};
-})(jQuery);
\ No newline at end of file
+})(jQuery);
Property changes on: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.pyramidAxisRenderer.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.pyramidGridRenderer.js
===================================================================
--- sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.pyramidGridRenderer.js 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.pyramidGridRenderer.js 2013-07-19 21:51:14 UTC (rev 167)
@@ -2,10 +2,10 @@
* jqPlot
* Pure JavaScript plotting plugin using jQuery
*
- * Version: 1.0.4
- * Revision: 1121
+ * Version: 1.0.8
+ * Revision: 1250
*
- * Copyright (c) 2009-2012 Chris Leonello
+ * Copyright (c) 2009-2013 Chris Leonello
* jqPlot is currently available for use in all personal or commercial projects
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
Property changes on: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.pyramidGridRenderer.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.pyramidRenderer.js
===================================================================
--- sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.pyramidRenderer.js 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.pyramidRenderer.js 2013-07-19 21:51:14 UTC (rev 167)
@@ -2,10 +2,10 @@
* jqPlot
* Pure JavaScript plotting plugin using jQuery
*
- * Version: 1.0.4
- * Revision: 1121
+ * Version: 1.0.8
+ * Revision: 1250
*
- * Copyright (c) 2009-2012 Chris Leonello
+ * Copyright (c) 2009-2013 Chris Leonello
* jqPlot is currently available for use in all personal or commercial projects
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
@@ -495,7 +495,7 @@
plot.target.trigger(evt1, ins);
if (plot.series[ins[0]].highlightMouseOver && !(ins[0] == plot.plugins.pyramidRenderer.highlightedSeriesIndex && ins[1] == plot.series[ins[0]]._highlightedPoint)) {
var evt = jQuery.Event('jqplotDataHighlight');
- evt.which = ev.which;
+ evt.which = ev.which;
evt.pageX = ev.pageX;
evt.pageY = ev.pageY;
plot.target.trigger(evt, ins);
Property changes on: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.pyramidRenderer.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.trendline.js
===================================================================
--- sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.trendline.js 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.trendline.js 2013-07-19 21:51:14 UTC (rev 167)
@@ -2,10 +2,10 @@
* jqPlot
* Pure JavaScript plotting plugin using jQuery
*
- * Version: 1.0.4
- * Revision: 1121
+ * Version: 1.0.8
+ * Revision: 1250
*
- * Copyright (c) 2009-2012 Chris Leonello
+ * Copyright (c) 2009-2013 Chris Leonello
* jqPlot is currently available for use in all personal or commercial projects
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
@@ -60,7 +60,7 @@
// Either 'exponential', 'exp', or 'linear'.
this.type = 'linear';
// prop: shadow
- // true or false, wether or not to show the shadow.
+ // true or false, whether or not to show the shadow.
this.shadow = true;
// prop: markerRenderer
// Renderer to use to draw markers on the line.
Property changes on: sandbox/nuiton-js-jqplot/src/main/resources/nuiton-js-jqplot/plugins/jqplot.trendline.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/site/rst/index.rst.vm
===================================================================
--- sandbox/nuiton-js-jqplot/src/site/rst/index.rst.vm 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/site/rst/index.rst.vm 2013-07-19 21:51:14 UTC (rev 167)
@@ -1,8 +1,8 @@
.. -
.. * #%L
.. * Nuiton JS :: jqPlot
-.. * $Id:$
-.. * $HeadURL:$
+.. * $Id$
+.. * $HeadURL$
.. * %%
.. * Copyright (C) 2012 - 2013 CodeLutin
.. * %%
@@ -33,7 +33,7 @@
.. _documentation: http://www.jqplot.com/docs/files/usage-txt.html
Use
-===
+---
Maven part::
Property changes on: sandbox/nuiton-js-jqplot/src/site/rst/index.rst.vm
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqplot/src/site/site_en.xml
===================================================================
--- sandbox/nuiton-js-jqplot/src/site/site_en.xml 2013-07-19 21:45:03 UTC (rev 166)
+++ sandbox/nuiton-js-jqplot/src/site/site_en.xml 2013-07-19 21:51:14 UTC (rev 167)
@@ -1,8 +1,8 @@
<!--
#%L
Nuiton JS :: jqPlot
- $Id:$
- $HeadURL:$
+ $Id$
+ $HeadURL$
%%
Copyright (C) 2012 - 2013 CodeLutin
%%
@@ -45,8 +45,8 @@
<menu ref="parent"/>
- <menu name="Utilisateurs">
- <item name="Accueil" href="index.html"/>
+ <menu name="Users">
+ <item name="Home" href="index.html"/>
</menu>
<menu ref="reports"/>
Property changes on: sandbox/nuiton-js-jqplot/src/site/site_en.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
1
0
r166 - in sandbox/nuiton-js-jqgrid: . src/main/resources/META-INF/nuiton-js src/main/resources/nuiton-js-jqgrid/css src/main/resources/nuiton-js-jqgrid/js src/main/resources/nuiton-js-jqgrid/js/i18n src/main/resources/nuiton-js-jqgrid/plugins src/site src/site/rst
by echatellier@users.nuiton.org July 19, 2013
by echatellier@users.nuiton.org July 19, 2013
July 19, 2013
Author: echatellier
Date: 2013-07-19 23:45:03 +0200 (Fri, 19 Jul 2013)
New Revision: 166
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/166
Log:
Update jqgrid
Added:
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-id.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-vi.js
Removed:
sandbox/nuiton-js-jqgrid/changelog.txt
Modified:
sandbox/nuiton-js-jqgrid/.classpath
sandbox/nuiton-js-jqgrid/LICENSE.txt
sandbox/nuiton-js-jqgrid/README.txt
sandbox/nuiton-js-jqgrid/generate-i18n-group.sh
sandbox/nuiton-js-jqgrid/pom.xml
sandbox/nuiton-js-jqgrid/src/main/resources/META-INF/nuiton-js/wro-jqgrid.xml
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/css/ellipsis-xbl.xml
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/css/ui.jqgrid.css
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ar.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-bg.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-bg1251.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-cat.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-cn.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-cs.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-da.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-de.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-dk.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-el.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-en.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-es.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-fa.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-fi.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-fr.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-gl.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-he.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-hr.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-hr1250.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-hu.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-is.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-it.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ja.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-kr.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-lt.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-mne.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-nl.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-no.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-pl.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-pt-br.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-pt.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ro.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ru.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sk.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sr-latin.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sr.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sv.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-th.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-tr.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-tw.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ua.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/jquery.jqGrid.src.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/grid.addons.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/grid.postext.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/grid.setcolumns.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/jquery.contextmenu.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/jquery.searchFilter.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/jquery.tablednd.js
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/searchFilter.css
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/ui.multiselect.css
sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/ui.multiselect.js
sandbox/nuiton-js-jqgrid/src/site/rst/index.rst.vm
sandbox/nuiton-js-jqgrid/src/site/site_en.xml
Property changes on: sandbox/nuiton-js-jqgrid/.classpath
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: sandbox/nuiton-js-jqgrid/LICENSE.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/README.txt
===================================================================
--- sandbox/nuiton-js-jqgrid/README.txt 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/README.txt 2013-07-19 21:45:03 UTC (rev 166)
@@ -1 +1,2 @@
+for f in src/main/resources/nuiton-js-jqgrid/js/i18n/*.js; do sed -i '1i// %%Ignore-License' $f; done
Property changes on: sandbox/nuiton-js-jqgrid/README.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Deleted: sandbox/nuiton-js-jqgrid/changelog.txt
===================================================================
--- sandbox/nuiton-js-jqgrid/changelog.txt 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/changelog.txt 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,2 +0,0 @@
-Please refer to the release note :
- http://maven-site.nuiton.org/nuiton-js/changes-report.html
Property changes on: sandbox/nuiton-js-jqgrid/generate-i18n-group.sh
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/pom.xml
===================================================================
--- sandbox/nuiton-js-jqgrid/pom.xml 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/pom.xml 2013-07-19 21:45:03 UTC (rev 166)
@@ -14,7 +14,7 @@
</parent>
<artifactId>nuiton-js-jqgrid</artifactId>
- <version>4.4.1-1</version>
+ <version>4.5.2-1-SNAPSHOT</version>
<name>Nuiton JS :: jqGrid</name>
<description>jqGrid jar packaging</description>
@@ -29,9 +29,9 @@
</licenses>
<scm>
- <connection>scm:svn:http://svn.nuiton.org/svn/nuiton-js/tags/nuiton-js-jqgrid-4.4.1-1</connection>
- <developerConnection>scm:svn:http://svn.nuiton.org/svn/nuiton-js/tags/nuiton-js-jqgrid-4.4.1-1</developerConnection>
- <url>http://www.nuiton.org/repositories/browse/nuiton-js/tags/nuiton-js-jqgrid-4…</url>
+ <connection>scm:svn:http://svn.nuiton.org/svn/nuiton-js/tags/nuiton-js-jqgrid-4.5.2-1</connection>
+ <developerConnection>scm:svn:http://svn.nuiton.org/svn/nuiton-js/tags/nuiton-js-jqgrid-4.5.2-1</developerConnection>
+ <url>http://www.nuiton.org/repositories/browse/nuiton-js/tags/nuiton-js-jqgrid-4…</url>
</scm>
<dependencies>
Property changes on: sandbox/nuiton-js-jqgrid/pom.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/META-INF/nuiton-js/wro-jqgrid.xml
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/META-INF/nuiton-js/wro-jqgrid.xml 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/META-INF/nuiton-js/wro-jqgrid.xml 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,8 +1,8 @@
<!--
#%L
Nuiton JS :: jqGrid
- $Id:$
- $HeadURL:$
+ $Id$
+ $HeadURL$
%%
Copyright (C) 2012 - 2013 CodeLutin
%%
@@ -154,6 +154,10 @@
<group name='jqgrid-hu'>
<css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-hu.js</css>
</group>
+
+ <group name='jqgrid-id'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-id.js</css>
+ </group>
<group name='jqgrid-is'>
<css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-is.js</css>
@@ -239,4 +243,8 @@
<css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-ua.js</css>
</group>
+ <group name='jqgrid-vi'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-vi.js</css>
+ </group>
+
</groups>
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/META-INF/nuiton-js/wro-jqgrid.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/css/ellipsis-xbl.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/css/ui.jqgrid.css
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/css/ui.jqgrid.css 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/css/ui.jqgrid.css 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,20 +1,20 @@
-/*%%Ignore-License Grid*/
+/*Grid %%Ignore-License */
.ui-jqgrid {position: relative;}
-.ui-jqgrid .ui-jqgrid-view {position: relative;left:0px; top: 0px; padding: .0em; font-size:11px;}
+.ui-jqgrid .ui-jqgrid-view {position: relative;left:0; top: 0; padding: 0; font-size:11px;}
/* caption*/
-.ui-jqgrid .ui-jqgrid-titlebar {padding: .3em .2em .2em .3em; position: relative; border-left: 0px none;border-right: 0px none; border-top: 0px none;}
+.ui-jqgrid .ui-jqgrid-titlebar {padding: .3em .2em .2em .3em; position: relative; border-left: 0 none;border-right: 0 none; border-top: 0 none;}
.ui-jqgrid .ui-jqgrid-title { float: left; margin: .1em 0 .2em; }
.ui-jqgrid .ui-jqgrid-titlebar-close { position: absolute;top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height:18px;}.ui-jqgrid .ui-jqgrid-titlebar-close span { display: block; margin: 1px; }
.ui-jqgrid .ui-jqgrid-titlebar-close:hover { padding: 0; }
/* header*/
-.ui-jqgrid .ui-jqgrid-hdiv {position: relative; margin: 0em;padding: 0em; overflow-x: hidden; border-left: 0px none !important; border-top : 0px none !important; border-right : 0px none !important;}
+.ui-jqgrid .ui-jqgrid-hdiv {position: relative; margin: 0;padding: 0; overflow-x: hidden; border-left: 0 none !important; border-top : 0 none !important; border-right : 0 none !important;}
.ui-jqgrid .ui-jqgrid-hbox {float: left; padding-right: 20px;}
-.ui-jqgrid .ui-jqgrid-htable {table-layout:fixed;margin:0em;}
+.ui-jqgrid .ui-jqgrid-htable {table-layout:fixed;margin:0;}
.ui-jqgrid .ui-jqgrid-htable th {height:22px;padding: 0 2px 0 2px;}
.ui-jqgrid .ui-jqgrid-htable th div {overflow: hidden; position:relative; height:17px;}
-.ui-th-column, .ui-jqgrid .ui-jqgrid-htable th.ui-th-column {overflow: hidden;white-space: nowrap;text-align:center;border-top : 0px none;border-bottom : 0px none;}
-.ui-th-ltr, .ui-jqgrid .ui-jqgrid-htable th.ui-th-ltr {border-left : 0px none;}
-.ui-th-rtl, .ui-jqgrid .ui-jqgrid-htable th.ui-th-rtl {border-right : 0px none;}
+.ui-th-column, .ui-jqgrid .ui-jqgrid-htable th.ui-th-column {overflow: hidden;white-space: nowrap;text-align:center;border-top : 0 none;border-bottom : 0 none;}
+.ui-th-ltr, .ui-jqgrid .ui-jqgrid-htable th.ui-th-ltr {border-left : 0 none;}
+.ui-th-rtl, .ui-jqgrid .ui-jqgrid-htable th.ui-th-rtl {border-right : 0 none;}
.ui-first-th-ltr {border-right: 1px solid; }
.ui-first-th-rtl {border-left: 1px solid; }
.ui-jqgrid .ui-th-div-ie {white-space: nowrap; zoom :1; height:17px;}
@@ -22,15 +22,15 @@
.ui-jqgrid .ui-grid-ico-sort {overflow:hidden;position:absolute;display:inline; cursor: pointer !important;}
.ui-jqgrid .ui-icon-asc {margin-top:-3px; height:12px;}
.ui-jqgrid .ui-icon-desc {margin-top:3px;height:12px;}
-.ui-jqgrid .ui-i-asc {margin-top:0px;height:16px;}
-.ui-jqgrid .ui-i-desc {margin-top:0px;margin-left:13px;height:16px;}
+.ui-jqgrid .ui-i-asc {margin-top:0;height:16px;}
+.ui-jqgrid .ui-i-desc {margin-top:0;margin-left:13px;height:16px;}
.ui-jqgrid .ui-jqgrid-sortable {cursor:pointer;}
.ui-jqgrid tr.ui-search-toolbar th { border-top-width: 1px !important; border-top-color: inherit !important; border-top-style: ridge !important }
-tr.ui-search-toolbar input {margin: 1px 0px 0px 0px}
-tr.ui-search-toolbar select {margin: 1px 0px 0px 0px}
+tr.ui-search-toolbar input {margin: 1px 0 0 0}
+tr.ui-search-toolbar select {margin: 1px 0 0 0}
/* body */
-.ui-jqgrid .ui-jqgrid-bdiv {position: relative; margin: 0em; padding:0; overflow: auto; text-align:left;}
-.ui-jqgrid .ui-jqgrid-btable {table-layout:fixed; margin:0em; outline-style: none; }
+.ui-jqgrid .ui-jqgrid-bdiv {position: relative; margin: 0; padding:0; overflow: auto; text-align:left;}
+.ui-jqgrid .ui-jqgrid-btable {table-layout:fixed; margin:0; outline-style: none; }
.ui-jqgrid tr.jqgrow { outline-style: none; }
.ui-jqgrid tr.jqgroup { outline-style: none; }
.ui-jqgrid tr.jqgrow td {font-weight: normal; overflow: hidden; white-space: pre; height: 22px;padding: 0 2px 0 2px;border-bottom-width: 1px; border-bottom-color: inherit; border-bottom-style: solid;}
@@ -39,43 +39,43 @@
.ui-jqgrid tr.jqfoot td {font-weight: bold; overflow: hidden; white-space: pre; height: 22px;padding: 0 2px 0 2px;border-bottom-width: 1px; border-bottom-color: inherit; border-bottom-style: solid;}
.ui-jqgrid tr.ui-row-ltr td {text-align:left;border-right-width: 1px; border-right-color: inherit; border-right-style: solid;}
.ui-jqgrid tr.ui-row-rtl td {text-align:right;border-left-width: 1px; border-left-color: inherit; border-left-style: solid;}
-.ui-jqgrid td.jqgrid-rownum { padding: 0 2px 0 2px; margin: 0px; border: 0px none;}
+.ui-jqgrid td.jqgrid-rownum { padding: 0 2px 0 2px; margin: 0; border: 0 none;}
.ui-jqgrid .ui-jqgrid-resize-mark { width:2px; left:0; background-color:#777; cursor: e-resize; cursor: col-resize; position:absolute; top:0; height:100px; overflow:hidden; display:none; border:0 none; z-index: 99999;}
/* footer */
-.ui-jqgrid .ui-jqgrid-sdiv {position: relative; margin: 0em;padding: 0em; overflow: hidden; border-left: 0px none !important; border-top : 0px none !important; border-right : 0px none !important;}
-.ui-jqgrid .ui-jqgrid-ftable {table-layout:fixed; margin-bottom:0em;}
+.ui-jqgrid .ui-jqgrid-sdiv {position: relative; margin: 0;padding: 0; overflow: hidden; border-left: 0 none !important; border-top : 0 none !important; border-right : 0 none !important;}
+.ui-jqgrid .ui-jqgrid-ftable {table-layout:fixed; margin-bottom:0;}
.ui-jqgrid tr.footrow td {font-weight: bold; overflow: hidden; white-space:nowrap; height: 21px;padding: 0 2px 0 2px;border-top-width: 1px; border-top-color: inherit; border-top-style: solid;}
.ui-jqgrid tr.footrow-ltr td {text-align:left;border-right-width: 1px; border-right-color: inherit; border-right-style: solid;}
.ui-jqgrid tr.footrow-rtl td {text-align:right;border-left-width: 1px; border-left-color: inherit; border-left-style: solid;}
/* Pager*/
-.ui-jqgrid .ui-jqgrid-pager { border-left: 0px none !important;border-right: 0px none !important; border-bottom: 0px none !important; margin: 0px !important; padding: 0px !important; position: relative; height: 25px;white-space: nowrap;overflow: hidden;font-size:11px;}
+.ui-jqgrid .ui-jqgrid-pager { border-left: 0 none !important;border-right: 0 none !important; border-bottom: 0 none !important; margin: 0 !important; padding: 0 !important; position: relative; height: 25px;white-space: nowrap;overflow: hidden;font-size:11px;}
.ui-jqgrid .ui-pager-control {position: relative;}
-.ui-jqgrid .ui-pg-table {position: relative; padding-bottom:2px; width:auto; margin: 0em;}
+.ui-jqgrid .ui-pg-table {position: relative; padding-bottom:2px; width:auto; margin: 0;}
.ui-jqgrid .ui-pg-table td {font-weight:normal; vertical-align:middle; padding:1px;}
.ui-jqgrid .ui-pg-button { height:19px !important;}
.ui-jqgrid .ui-pg-button span { display: block; margin: 1px; float:left;}
-.ui-jqgrid .ui-pg-button:hover { padding: 0px; }
+.ui-jqgrid .ui-pg-button:hover { padding: 0; }
.ui-jqgrid .ui-state-disabled:hover {padding:1px;}
-.ui-jqgrid .ui-pg-input { height:13px;font-size:.8em; margin: 0em;}
-.ui-jqgrid .ui-pg-selbox {font-size:.8em; line-height:18px; display:block; height:18px; margin: 0em;}
+.ui-jqgrid .ui-pg-input { height:13px;font-size:.8em; margin: 0;}
+.ui-jqgrid .ui-pg-selbox {font-size:.8em; line-height:18px; display:block; height:18px; margin: 0;}
.ui-jqgrid .ui-separator {height: 18px; border-left: 1px solid #ccc ; border-right: 1px solid #ccc ; margin: 1px; float: right;}
.ui-jqgrid .ui-paging-info {font-weight: normal;height:19px; margin-top:3px;margin-right:4px;}
.ui-jqgrid .ui-jqgrid-pager .ui-pg-div {padding:1px 0;float:left;position:relative;}
.ui-jqgrid .ui-jqgrid-pager .ui-pg-button { cursor:pointer; }
.ui-jqgrid .ui-jqgrid-pager .ui-pg-div span.ui-icon {float:left;margin:0 2px;}
-.ui-jqgrid td input, .ui-jqgrid td select .ui-jqgrid td textarea { margin: 0em;}
+.ui-jqgrid td input, .ui-jqgrid td select .ui-jqgrid td textarea { margin: 0;}
.ui-jqgrid td textarea {width:auto;height:auto;}
-.ui-jqgrid .ui-jqgrid-toppager {border-left: 0px none !important;border-right: 0px none !important; border-top: 0px none !important; margin: 0px !important; padding: 0px !important; position: relative; height: 25px !important;white-space: nowrap;overflow: hidden;}
+.ui-jqgrid .ui-jqgrid-toppager {border-left: 0 none !important;border-right: 0 none !important; border-top: 0 none !important; margin: 0 !important; padding: 0 !important; position: relative; height: 25px !important;white-space: nowrap;overflow: hidden;}
.ui-jqgrid .ui-jqgrid-toppager .ui-pg-div {padding:1px 0;float:left;position:relative;}
.ui-jqgrid .ui-jqgrid-toppager .ui-pg-button { cursor:pointer; }
.ui-jqgrid .ui-jqgrid-toppager .ui-pg-div span.ui-icon {float:left;margin:0 2px;}
/*subgrid*/
.ui-jqgrid .ui-jqgrid-btable .ui-sgcollapsed span {display: block;}
-.ui-jqgrid .ui-subgrid {margin:0em;padding:0em; width:100%;}
+.ui-jqgrid .ui-subgrid {margin:0;padding:0; width:100%;}
.ui-jqgrid .ui-subgrid table {table-layout: fixed;}
.ui-jqgrid .ui-subgrid tr.ui-subtblcell td {height:18px;border-right-width: 1px; border-right-color: inherit; border-right-style: solid;border-bottom-width: 1px; border-bottom-color: inherit; border-bottom-style: solid;}
-.ui-jqgrid .ui-subgrid td.subgrid-data {border-top: 0px none !important;}
-.ui-jqgrid .ui-subgrid td.subgrid-cell {border-width: 0px 0px 1px 0px;}
+.ui-jqgrid .ui-subgrid td.subgrid-data {border-top: 0 none !important;}
+.ui-jqgrid .ui-subgrid td.subgrid-cell {border-width: 0 0 1px 0;}
.ui-jqgrid .ui-th-subgrid {height:20px;}
/* loading */
.ui-jqgrid .loading {position: absolute; top: 45%;left: 45%;width: auto;z-index:101;padding: 6px; margin: 5px;text-align: center;font-weight: bold;display: none;border-width: 2px !important; font-size:11px;}
@@ -84,7 +84,7 @@
* .jqgrid-overlay iframe {position:absolute;top:0;left:0;z-index:-1;width: expression(this.parentNode.offsetWidth+'px');height: expression(this.parentNode.offsetHeight+'px');}
/* end loading div */
/* toolbar */
-.ui-jqgrid .ui-userdata {border-left: 0px none; border-right: 0px none; height : 21px;overflow: hidden; }
+.ui-jqgrid .ui-userdata {border-left: 0 none; border-right: 0 none; height : 21px;overflow: hidden; }
/*Modal Window */
.ui-jqdialog { display: none; width: 300px; position: absolute; padding: .2em; font-size:11px; overflow:visible;}
.ui-jqdialog .ui-jqdialog-titlebar { padding: .3em .2em; position: relative; }
@@ -95,20 +95,22 @@
.ui-jqdialog .ui-jqdialog-titlebar-close:hover, .ui-jqdialog .ui-jqdialog-titlebar-close:focus { padding: 0; }
.ui-jqdialog-content, .ui-jqdialog .ui-jqdialog-content { border: 0; padding: .3em .2em; background: none; height:auto;}
.ui-jqdialog .ui-jqconfirm {padding: .4em 1em; border-width:3px;position:absolute;bottom:10px;right:10px;overflow:visible;display:none;height:80px;width:220px;text-align:center;}
+.ui-jqdialog>.ui-resizable-se { bottom: -3px; right: -3px}
/* end Modal window*/
/* Form edit */
-.ui-jqdialog-content .FormGrid {margin: 0px;}
-.ui-jqdialog-content .EditTable { width: 100%; margin-bottom:0em;}
-.ui-jqdialog-content .DelTable { width: 100%; margin-bottom:0em;}
-.EditTable td input, .EditTable td select, .EditTable td textarea {margin: 0em;}
+.ui-jqdialog-content .FormGrid {margin: 0;}
+.ui-jqdialog-content .EditTable { width: 100%; margin-bottom:0;}
+.ui-jqdialog-content .DelTable { width: 100%; margin-bottom:0;}
+.EditTable td input, .EditTable td select, .EditTable td textarea {margin: 0;}
.EditTable td textarea { width:auto; height:auto;}
-.ui-jqdialog-content td.EditButton {text-align: right;border-top: 0px none;border-left: 0px none;border-right: 0px none; padding-bottom:5px; padding-top:5px;}
-.ui-jqdialog-content td.navButton {text-align: center; border-left: 0px none;border-top: 0px none;border-right: 0px none; padding-bottom:5px; padding-top:5px;}
+.ui-jqdialog-content td.EditButton {text-align: right;border-top: 0 none;border-left: 0 none;border-right: 0 none; padding-bottom:5px; padding-top:5px;}
+.ui-jqdialog-content td.navButton {text-align: center; border-left: 0 none;border-top: 0 none;border-right: 0 none; padding-bottom:5px; padding-top:5px;}
.ui-jqdialog-content input.FormElement {padding:.3em}
-.ui-jqdialog-content .data-line {padding-top:.1em;border: 0px none;}
+.ui-jqdialog-content select.FormElement {padding:.3em}
+.ui-jqdialog-content .data-line {padding-top:.1em;border: 0 none;}
-.ui-jqdialog-content .CaptionTD {vertical-align: middle;border: 0px none; padding: 2px;white-space: nowrap;}
-.ui-jqdialog-content .DataTD {padding: 2px; border: 0px none; vertical-align: top;}
+.ui-jqdialog-content .CaptionTD {vertical-align: middle;border: 0 none; padding: 2px;white-space: nowrap;}
+.ui-jqdialog-content .DataTD {padding: 2px; border: 0 none; vertical-align: top;}
.ui-jqdialog-content .form-view-data {white-space:pre}
.fm-button { display: inline-block; margin:0 4px 0 0; padding: .4em .5em; text-decoration:none !important; cursor:pointer; position: relative; text-align: center; zoom: 1; }
.fm-button-icon-left { padding-left: 1.9em; }
@@ -118,7 +120,7 @@
#nData, #pData { float: left; margin:3px;padding: 0; width: 15px; }
/* End Eorm edit */
/*.ui-jqgrid .edit-cell {}*/
-.ui-jqgrid .selected-row, div.ui-jqgrid .selected-row td {font-style : normal;border-left: 0px none;}
+.ui-jqgrid .selected-row, div.ui-jqgrid .selected-row td {font-style : normal;border-left: 0 none;}
/* inline edit actions button*/
.ui-inline-del.ui-state-hover span, .ui-inline-edit.ui-state-hover span,
.ui-inline-save.ui-state-hover span, .ui-inline-cancel.ui-state-hover span {
@@ -136,9 +138,14 @@
/* RTL Support */
.ui-jqgrid .ui-jqgrid-title-rtl {float:right;margin: .1em 0 .2em; }
.ui-jqgrid .ui-jqgrid-hbox-rtl {float: right; padding-left: 20px;}
-.ui-jqgrid .ui-jqgrid-resize-ltr {float: right;margin: -2px -2px -2px 0px;}
-.ui-jqgrid .ui-jqgrid-resize-rtl {float: left;margin: -2px 0px -1px -3px;}
-.ui-jqgrid .ui-sort-rtl {left:0px;}
+.ui-jqgrid .ui-jqgrid-resize-ltr {float: right;margin: -2px -2px -2px 0;}
+.ui-jqgrid .ui-jqgrid-resize-rtl {float: left;margin: -2px 0 -1px -3px;}
+.ui-jqgrid .ui-sort-rtl {left:0;}
.ui-jqgrid .tree-wrap-ltr {float: left;}
.ui-jqgrid .tree-wrap-rtl {float: right;}
.ui-jqgrid .ui-ellipsis {text-overflow:ellipsis;}
+
+/* Toolbar Search Menu */
+.ui-search-menu { position: absolute; padding: 2px 5px;}
+.ui-jqgrid .ui-search-table { padding: 0px 0px; border: 0px none; height:20px; width:100%;}
+.ui-jqgrid .ui-search-table .ui-search-oper { width:20px; }
\ No newline at end of file
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/css/ui.jqgrid.css
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ar.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ar.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ar.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,6 @@
+// %%Ignore-License
;(function($){
/**
- * %%Ignore-License
* jqGrid Arabic Translation
*
* http://trirand.com/blog/
@@ -20,10 +20,8 @@
caption: "بحث...",
Find: "بحث",
Reset: "إلغاء",
- odata : ['يساوي', 'يختلف', 'أقل', 'أقل أو يساوي','أكبر','أكبر أو يساوي', 'يبدأ بـ','لا يبدأ بـ','est dans',"n'est pas dans",'ينته بـ','لا ينته بـ','يحتوي','لا يحتوي'],
- groupOps: [ { op: "مع", text: "الكل" }, { op: "أو", text: "لا أحد" } ],
- matchText: " توافق",
- rulesText: " قواعد"
+ odata: [{ oper:'eq', text:"يساوي"},{ oper:'ne', text:"يختلف"},{ oper:'lt', text:"أقل"},{ oper:'le', text:"أقل أو يساوي"},{ oper:'gt', text:"أكبر"},{ oper:'ge', text:"أكبر أو يساوي"},{ oper:'bw', text:"يبدأ بـ"},{ oper:'bn', text:"لا يبدأ بـ"},{ oper:'in', text:"est dans"},{ oper:'ni', text:"n'est pas dans"},{ oper:'ew', text:"ينته بـ"},{ oper:'en', text:"لا ينته بـ"},{ oper:'cn', text:"يحتوي"},{ oper:'nc', text:"لا يحتوي"}],
+ groupOps: [ { op: "مع", text: "الكل" }, { op: "أو", text: "لا أحد" } ]
},
edit : {
addCaption: "اضافة",
@@ -103,6 +101,7 @@
S: function (j) {return j == 1 ? 'er' : 'e';},
srcformat: 'Y-m-d',
newformat: 'd/m/Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks : {
ISO8601Long:"Y-m-d H:i:s",
ISO8601Short:"Y-m-d",
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ar.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-bg.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-bg.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-bg.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,6 @@
+// %%Ignore-License
;(function($){
/**
- * %%Ignore-License
* jqGrid Bulgarian Translation
* Tony Tomov tony(a)trirand.com
* http://trirand.com/blog/
@@ -20,10 +20,8 @@
caption: "Търсене...",
Find: "Намери",
Reset: "Изчисти",
- odata : ['равно', 'различно', 'по-малко', 'по-малко или=','по-голямо','по-голямо или =', 'започва с','не започва с','се намира в','не се намира в','завършва с','не завършава с','съдържа', 'не съдържа' ],
- groupOps: [ { op: "AND", text: " И " }, { op: "OR", text: "ИЛИ" } ],
- matchText: " включи",
- rulesText: " клауза"
+ odata: [{ oper:'eq', text:"равно"},{ oper:'ne', text:"различно"},{ oper:'lt', text:"по-малко"},{ oper:'le', text:"по-малко или="},{ oper:'gt', text:"по-голямо"},{ oper:'ge', text:"по-голямо или ="},{ oper:'bw', text:"започва с"},{ oper:'bn', text:"не започва с"},{ oper:'in', text:"се намира в"},{ oper:'ni', text:"не се намира в"},{ oper:'ew', text:"завършва с"},{ oper:'en', text:"не завършава с"},{ oper:'cn', text:"съдържа"},{ oper:'nc', text:"не съдържа"}],
+ groupOps: [ { op: "AND", text: " И " }, { op: "OR", text: "ИЛИ" } ]
},
edit : {
addCaption: "Нов Запис",
@@ -109,6 +107,7 @@
},
srcformat: 'Y-m-d',
newformat: 'd/m/Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks : {
ISO8601Long:"Y-m-d H:i:s",
ISO8601Short:"Y-m-d",
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-bg.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-bg1251.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-bg1251.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-bg1251.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,6 @@
+// %%Ignore-License
;(function($){
/**
- * %%Ignore-License
* jqGrid Bulgarian Translation
* Tony Tomov tony(a)trirand.com
* http://trirand.com/blog/
@@ -20,10 +20,8 @@
caption: "�������...",
Find: "������",
Reset: "�������",
- odata : ['�����', '��������', '��-�����', '��-����� ���=','��-������','��-������ ��� =', '������� �','�� ������� �','�� ������ �','�� �� ������ �','�������� �','�� ��������� �','�������', '�� �������' ],
- groupOps: [ { op: "AND", text: " � " }, { op: "OR", text: "���" } ],
- matchText: " ������",
- rulesText: " ������"
+ odata : [{ oper:'eq', text:'�����'}, { oper:'ne', text:'��������'}, { oper:'lt', text:'��-�����'}, { oper:'le', text:'��-����� ���='},{ oper:'gt', text:'��-������'},{ oper:'ge', text:'��-������ ��� ='}, { oper:'bw', text:'������� �'},{ oper:'bn', text:'�� ������� �'},{ oper:'in', text:'�� ������ �'},{ oper:'ni', text:'�� �� ������ �'},{ oper:'ew', text:'�������� �'},{ oper:'en', text:'�� ��������� �'},,{ oper:'cn', text:'�������'}, ,{ oper:'nc', text:'�� �������'} ],
+ groupOps: [ { op: "AND", text: " � " }, { op: "OR", text: "���" } ]
},
edit : {
addCaption: "��� �����",
@@ -109,6 +107,7 @@
},
srcformat: 'Y-m-d',
newformat: 'd/m/Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks : {
ISO8601Long:"Y-m-d H:i:s",
ISO8601Short:"Y-m-d",
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-bg1251.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-cat.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-cat.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-cat.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,6 @@
+// %%Ignore-License
;(function($){
/**
- * %%Ignore-License
* jqGrid Catalan Translation
* Traducció jqGrid en Catatà per Faserline, S.L.
* http://www.faserline.com
@@ -20,10 +20,8 @@
caption: "Cerca...",
Find: "Cercar",
Reset: "Buidar",
- odata : ['equal', 'not equal', 'less', 'less or equal','greater','greater or equal', 'begins with','does not begin with','is in','is not in','ends with','does not end with','contains','does not contain'],
- groupOps: [ { op: "AND", text: "tot" }, { op: "OR", text: "qualsevol" } ],
- matchText: " match",
- rulesText: " rules"
+ odata: [{ oper:'eq', text:"equal"},{ oper:'ne', text:"not equal"},{ oper:'lt', text:"less"},{ oper:'le', text:"less or equal"},{ oper:'gt', text:"greater"},{ oper:'ge', text:"greater or equal"},{ oper:'bw', text:"begins with"},{ oper:'bn', text:"does not begin with"},{ oper:'in', text:"is in"},{ oper:'ni', text:"is not in"},{ oper:'ew', text:"ends with"},{ oper:'en', text:"does not end with"},{ oper:'cn', text:"contains"},{ oper:'nc', text:"does not contain"}],
+ groupOps: [ { op: "AND", text: "tot" }, { op: "OR", text: "qualsevol" } ]
},
edit : {
addCaption: "Afegir registre",
@@ -105,6 +103,7 @@
S: function (j) {return j < 11 || j > 13 ? ['st', 'nd', 'rd', 'th'][Math.min((j - 1) % 10, 3)] : 'th'},
srcformat: 'Y-m-d',
newformat: 'd-m-Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks : {
ISO8601Long:"Y-m-d H:i:s",
ISO8601Short:"Y-m-d",
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-cat.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-cn.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-cn.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-cn.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,6 @@
+// %%Ignore-License
;(function($){
/**
- * %%Ignore-License
* jqGrid Chinese Translation for v4.2
* henryyan 2011.11.30
* http://www.wsria.com
@@ -23,11 +23,9 @@
caption: "搜索...",
Find: "查找",
Reset: "重置",
- odata : ['等于\u3000\u3000', '不等\u3000\u3000', '小于\u3000\u3000', '小于等于','大于\u3000\u3000','大于等于',
- '开始于','不开始于','属于\u3000\u3000','不属于','结束于','不结束于','包含\u3000\u3000','不包含','空值于\u3000\u3000','非空值'],
- groupOps: [ { op: "AND", text: "所有" }, { op: "OR", text: "任一" } ],
- matchText: " 匹配",
- rulesText: " 规则"
+ odata : [{oper:'eq', text:'等于\u3000\u3000'},{oper:'ne', text: '不等\u3000\u3000'}, { oper:'lt', text:'小于\u3000\u3000'},{ oper:'le', text: '小于等于'},{ oper:'gt', text:'大于\u3000\u3000'},{ oper:'ge', text:'大于等于'},
+ {oper:'bw', text:'开始于'},{ oper:'bn', text:'不开始于'},{ oper:'in', text:'属于\u3000\u3000'},{ oper:'ni', text:'不属于'},{ oper:'ew', text:'结束于'},{ oper:'en', text:'不结束于'},{ oper:'cn', text:'包含\u3000\u3000'},{ oper:'nc', text:'不包含'},{ oper:'nu', text:'空值于\u3000\u3000'},{ oper:'nn', text:'非空值'}],
+ groupOps: [ { op: "AND", text: "所有" }, { op: "OR", text: "任一" } ]
},
edit : {
addCaption: "添加记录",
@@ -109,6 +107,7 @@
S: function (j) {return j < 11 || j > 13 ? ['st', 'nd', 'rd', 'th'][Math.min((j - 1) % 10, 3)] : 'th'},
srcformat: 'Y-m-d',
newformat: 'm-d-Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks : {
ISO8601Long:"Y-m-d H:i:s",
ISO8601Short:"Y-m-d",
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-cn.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-cs.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-cs.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-cs.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,6 @@
+// %%Ignore-License
;(function($){
/**
- * %%Ignore-License
* jqGrid Czech Translation
* Pavel Jirak pavel.jirak(a)jipas.cz
* doplnil Thomas Wagner xwagne01(a)stud.fit.vutbr.cz
@@ -21,10 +21,8 @@
caption: "Vyhledávám...",
Find: "Hledat",
Reset: "Reset",
- odata : ['rovno', 'nerovono', 'menší', 'menší nebo rovno','větší', 'větší nebo rovno', 'začíná s', 'nezačíná s', 'je v', 'není v', 'končí s', 'nekončí s', 'obahuje', 'neobsahuje'],
- groupOps: [ { op: "AND", text: "všech" }, { op: "OR", text: "některého z" } ],
- matchText: " hledat podle",
- rulesText: " pravidel"
+ odata: [{ oper:'eq', text:"rovno"},{ oper:'ne', text:"nerovono"},{ oper:'lt', text:"menší"},{ oper:'le', text:"menší nebo rovno"},{ oper:'gt', text:"větší"},{ oper:'ge', text:"větší nebo rovno"},{ oper:'bw', text:"začíná s"},{ oper:'bn', text:"nezačíná s"},{ oper:'in', text:"je v"},{ oper:'ni', text:"není v"},{ oper:'ew', text:"končí s"},{ oper:'en', text:"nekončí s"},{ oper:'cn', text:"obahuje"},{ oper:'nc', text:"neobsahuje"}],
+ groupOps: [ { op: "AND", text: "všech" }, { op: "OR", text: "některého z" } ]
},
edit : {
addCaption: "Přidat záznam",
@@ -105,6 +103,7 @@
S: function (j) {return j < 11 || j > 13 ? ['st', 'nd', 'rd', 'th'][Math.min((j - 1) % 10, 3)] : 'th'},
srcformat: 'Y-m-d',
newformat: 'd/m/Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks : {
ISO8601Long:"Y-m-d H:i:s",
ISO8601Short:"Y-m-d",
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-cs.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-da.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-da.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-da.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,6 @@
+// %%Ignore-License
;(function($){
/**
- * %%Ignore-License
* jqGrid Danish Translation
* Aesiras A/S
* http://www.aesiras.dk
@@ -20,10 +20,8 @@
caption: "Søg...",
Find: "Find",
Reset: "Nulstil",
- odata : ['lig', 'forskellige fra', 'mindre', 'mindre eller lig','større','større eller lig', 'begynder med','begynder ikke med','findes i','findes ikke i','ender med','ender ikke med','indeholder','indeholder ikke'],
- groupOps: [ { op: "AND", text: "all" }, { op: "OR", text: "any" } ],
- matchText: " lig",
- rulesText: " regler"
+ odata: [{ oper:'eq', text:"lig"},{ oper:'ne', text:"forskellige fra"},{ oper:'lt', text:"mindre"},{ oper:'le', text:"mindre eller lig"},{ oper:'gt', text:"større"},{ oper:'ge', text:"større eller lig"},{ oper:'bw', text:"begynder med"},{ oper:'bn', text:"begynder ikke med"},{ oper:'in', text:"findes i"},{ oper:'ni', text:"findes ikke i"},{ oper:'ew', text:"ender med"},{ oper:'en', text:"ender ikke med"},{ oper:'cn', text:"indeholder"},{ oper:'nc', text:"indeholder ikke"}],
+ groupOps: [ { op: "AND", text: "all" }, { op: "OR", text: "any" } ]
},
edit : {
addCaption: "Tilføj",
@@ -104,6 +102,7 @@
S: function (j) {return '.'},
srcformat: 'Y-m-d',
newformat: 'd/m/Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks : {
ISO8601Long:"Y-m-d H:i:s",
ISO8601Short:"Y-m-d",
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-da.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-de.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-de.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-de.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,6 @@
+// %%Ignore-License
;(function($){
/**
- * %%Ignore-License
* jqGrid German Translation
* Version 1.0.0 (developed for jQuery Grid 3.3.1)
* Olaf Klöppel opensource(a)blue-hit.de
@@ -31,10 +31,8 @@
caption: "Suche...",
Find: "Suchen",
Reset: "Zurücksetzen",
- odata : ['gleich', 'ungleich', 'kleiner', 'kleiner gleich','größer','größer gleich', 'beginnt mit','beginnt nicht mit','ist in','ist nicht in','endet mit','endet nicht mit','enthält','enthält nicht'],
- groupOps: [ { op: "AND", text: "alle" }, { op: "OR", text: "mindestens eine" } ],
- matchText: " erfülle",
- rulesText: " Bedingung(en)"
+ odata: [{ oper:'eq', text:"gleich"},{ oper:'ne', text:"ungleich"},{ oper:'lt', text:"kleiner"},{ oper:'le', text:"kleiner gleich"},{ oper:'gt', text:"größer"},{ oper:'ge', text:"größer gleich"},{ oper:'bw', text:"beginnt mit"},{ oper:'bn', text:"beginnt nicht mit"},{ oper:'in', text:"ist in"},{ oper:'ni', text:"ist nicht in"},{ oper:'ew', text:"endet mit"},{ oper:'en', text:"endet nicht mit"},{ oper:'cn', text:"enthält"},{ oper:'nc', text:"enthält nicht"}],
+ groupOps: [ { op: "AND", text: "alle" }, { op: "OR", text: "mindestens eine" } ]
},
edit : {
addCaption: "Datensatz hinzufügen",
@@ -115,6 +113,7 @@
S: function (j) {return '.';}, // one can also use 'er' instead of '.' but one have to use additional word like 'der' or 'den' before
srcformat: 'Y-m-d',
newformat: 'd.m.Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks : {
// see http://php.net/manual/en/function.date.php for PHP format used in jqGrid
// and see http://docs.jquery.com/UI/Datepicker/formatDate
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-de.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-dk.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-dk.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-dk.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,129 +1,128 @@
-;(function($){
-/**
- * %%Ignore-License
- * jqGrid Danish Translation
- * Kaare Rasmussen kjs(a)jasonic.dk
- * http://jasonic.dk/blog
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
-**/
-$.jgrid = {
- defaults : {
- recordtext: "View {0} - {1} of {2}",
- emptyrecords: "No records to view",
- loadtext: "Loading...",
- pgtext : "Page {0} of {1}"
- },
- search : {
- caption: "Søg...",
- Find: "Find",
- Reset: "Nulstil",
- odata : ['equal', 'not equal', 'less', 'less or equal','greater','greater or equal', 'begins with','does not begin with','is in','is not in','ends with','does not end with','contains','does not contain'],
- groupOps: [ { op: "AND", text: "all" }, { op: "OR", text: "any" } ],
- matchText: " match",
- rulesText: " rules"
- },
- edit : {
- addCaption: "Tilføj",
- editCaption: "Ret",
- bSubmit: "Send",
- bCancel: "Annuller",
- bClose: "Luk",
- saveData: "Data has been changed! Save changes?",
- bYes : "Yes",
- bNo : "No",
- bExit : "Cancel",
- msg: {
- required:"Felt er nødvendigt",
- number:"Indtast venligst et validt tal",
- minValue:"værdi skal være større end eller lig med",
- maxValue:"værdi skal være mindre end eller lig med",
- email: "er ikke en valid email",
- integer: "Indtast venligst et validt heltalt",
- date: "Indtast venligst en valid datoværdi",
- url: "is not a valid URL. Prefix required ('http://' or 'https://')",
- nodefined : " is not defined!",
- novalue : " return value is required!",
- customarray : "Custom function should return array!",
- customfcheck : "Custom function should be present in case of custom checking!"
- }
- },
- view : {
- caption: "View Record",
- bClose: "Close"
- },
- del : {
- caption: "Slet",
- msg: "Slet valgte række(r)?",
- bSubmit: "Slet",
- bCancel: "Annuller"
- },
- nav : {
- edittext: " ",
- edittitle: "Rediger valgte række",
- addtext:" ",
- addtitle: "Tilføj ny række",
- deltext: " ",
- deltitle: "Slet valgte række",
- searchtext: " ",
- searchtitle: "Find poster",
- refreshtext: "",
- refreshtitle: "Indlæs igen",
- alertcap: "Advarsel",
- alerttext: "Vælg venligst række",
- viewtext: "",
- viewtitle: "View selected row"
- },
- col : {
- caption: "Vis/skjul kolonner",
- bSubmit: "Send",
- bCancel: "Annuller"
- },
- errors : {
- errcap : "Fejl",
- nourl : "Ingel url valgt",
- norecords: "Ingen poster at behandle",
- model : "colNames og colModel har ikke samme længde!"
- },
- formatter : {
- integer : {thousandsSeparator: " ", defaultValue: '0'},
- number : {decimalSeparator:",", thousandsSeparator: " ", decimalPlaces: 2, defaultValue: '0,00'},
- currency : {decimalSeparator:",", thousandsSeparator: " ", decimalPlaces: 2, prefix: "", suffix:"", defaultValue: '0,00'},
- date : {
- dayNames: [
- "Søn", "Man", "Tirs", "Ons", "Tors", "Fre", "Lør",
- "Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag"
- ],
- monthNames: [
- "Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec",
- "Januar", "Februar", "Marts", "April", "Maj", "Juni", "Juli", "August", "September", "Oktober", "November", "December"
- ],
- AmPm : ["","","",""],
- S: function (j) {return '.'},
- srcformat: 'Y-m-d',
- newformat: 'd/m/Y',
- masks : {
- ISO8601Long:"Y-m-d H:i:s",
- ISO8601Short:"Y-m-d",
- ShortDate: "j/n/Y",
- LongDate: "l d. F Y",
- FullDateTime: "l d F Y G:i:s",
- MonthDay: "d. F",
- ShortTime: "G:i",
- LongTime: "G:i:s",
- SortableDateTime: "Y-m-d\\TH:i:s",
- UniversalSortableDateTime: "Y-m-d H:i:sO",
- YearMonth: "F Y"
- },
- reformatAfterEdit : false
- },
- baseLinkUrl: '',
- showAction: '',
- target: '',
- checkbox : {disabled:true},
- idName : 'id'
- }
-};
-// DK
-})(jQuery);
+// %%Ignore-License
+;(function($){
+/**
+ * jqGrid Danish Translation
+ * Kaare Rasmussen kjs(a)jasonic.dk
+ * http://jasonic.dk/blog
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+**/
+$.jgrid = {
+ defaults : {
+ recordtext: "View {0} - {1} of {2}",
+ emptyrecords: "No records to view",
+ loadtext: "Loading...",
+ pgtext : "Page {0} of {1}"
+ },
+ search : {
+ caption: "Søg...",
+ Find: "Find",
+ Reset: "Nulstil",
+ odata: [{ oper:'eq', text:'equal'},{ oper:'ne', text:'not equal'},{ oper:'lt', text:'less'},{ oper:'le', text:'less or equal'},{ oper:'gt', text:'greater'},{ oper:'ge', text:'greater or equal'},{ oper:'bw', text:'begins with'},{ oper:'bn', text:'does not begin with'},{ oper:'in', text:'is in'},{ oper:'ni', text:'is not in'},{ oper:'ew', text:'ends with'},{ oper:'en', text:'does not end with'},{ oper:'cn', text:'contains'},{ oper:'nc', text:'does not contain'}],
+ groupOps: [ { op: "AND", text: "all" }, { op: "OR", text: "any" } ]
+ },
+ edit : {
+ addCaption: "Tilføj",
+ editCaption: "Ret",
+ bSubmit: "Send",
+ bCancel: "Annuller",
+ bClose: "Luk",
+ saveData: "Data has been changed! Save changes?",
+ bYes : "Yes",
+ bNo : "No",
+ bExit : "Cancel",
+ msg: {
+ required:"Felt er nødvendigt",
+ number:"Indtast venligst et validt tal",
+ minValue:"værdi skal være større end eller lig med",
+ maxValue:"værdi skal være mindre end eller lig med",
+ email: "er ikke en valid email",
+ integer: "Indtast venligst et validt heltalt",
+ date: "Indtast venligst en valid datoværdi",
+ url: "is not a valid URL. Prefix required ('http://' or 'https://')",
+ nodefined : " is not defined!",
+ novalue : " return value is required!",
+ customarray : "Custom function should return array!",
+ customfcheck : "Custom function should be present in case of custom checking!"
+ }
+ },
+ view : {
+ caption: "View Record",
+ bClose: "Close"
+ },
+ del : {
+ caption: "Slet",
+ msg: "Slet valgte række(r)?",
+ bSubmit: "Slet",
+ bCancel: "Annuller"
+ },
+ nav : {
+ edittext: " ",
+ edittitle: "Rediger valgte række",
+ addtext:" ",
+ addtitle: "Tilføj ny række",
+ deltext: " ",
+ deltitle: "Slet valgte række",
+ searchtext: " ",
+ searchtitle: "Find poster",
+ refreshtext: "",
+ refreshtitle: "Indlæs igen",
+ alertcap: "Advarsel",
+ alerttext: "Vælg venligst række",
+ viewtext: "",
+ viewtitle: "View selected row"
+ },
+ col : {
+ caption: "Vis/skjul kolonner",
+ bSubmit: "Send",
+ bCancel: "Annuller"
+ },
+ errors : {
+ errcap : "Fejl",
+ nourl : "Ingel url valgt",
+ norecords: "Ingen poster at behandle",
+ model : "colNames og colModel har ikke samme længde!"
+ },
+ formatter : {
+ integer : {thousandsSeparator: " ", defaultValue: '0'},
+ number : {decimalSeparator:",", thousandsSeparator: " ", decimalPlaces: 2, defaultValue: '0,00'},
+ currency : {decimalSeparator:",", thousandsSeparator: " ", decimalPlaces: 2, prefix: "", suffix:"", defaultValue: '0,00'},
+ date : {
+ dayNames: [
+ "Søn", "Man", "Tirs", "Ons", "Tors", "Fre", "Lør",
+ "Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag"
+ ],
+ monthNames: [
+ "Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec",
+ "Januar", "Februar", "Marts", "April", "Maj", "Juni", "Juli", "August", "September", "Oktober", "November", "December"
+ ],
+ AmPm : ["","","",""],
+ S: function (j) {return '.'},
+ srcformat: 'Y-m-d',
+ newformat: 'd/m/Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
+ masks : {
+ ISO8601Long:"Y-m-d H:i:s",
+ ISO8601Short:"Y-m-d",
+ ShortDate: "j/n/Y",
+ LongDate: "l d. F Y",
+ FullDateTime: "l d F Y G:i:s",
+ MonthDay: "d. F",
+ ShortTime: "G:i",
+ LongTime: "G:i:s",
+ SortableDateTime: "Y-m-d\\TH:i:s",
+ UniversalSortableDateTime: "Y-m-d H:i:sO",
+ YearMonth: "F Y"
+ },
+ reformatAfterEdit : false
+ },
+ baseLinkUrl: '',
+ showAction: '',
+ target: '',
+ checkbox : {disabled:true},
+ idName : 'id'
+ }
+};
+// DK
+})(jQuery);
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-dk.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-el.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-el.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-el.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,6 @@
+// %%Ignore-License
;(function($){
/**
- * %%Ignore-License
* jqGrid Greek (el) Translation
* Alex Cicovic
* http://www.alexcicovic.com
@@ -20,10 +20,8 @@
caption: "Αναζήτηση...",
Find: "Εύρεση",
Reset: "Επαναφορά",
- odata : ['equal', 'not equal', 'less', 'less or equal','greater','greater or equal', 'begins with','does not begin with','is in','is not in','ends with','does not end with','contains','does not contain'],
- groupOps: [ { op: "AND", text: "all" }, { op: "OR", text: "any" } ],
- matchText: " match",
- rulesText: " rules"
+ odata: [{ oper:'eq', text:'equal'},{ oper:'ne', text:'not equal'},{ oper:'lt', text:'less'},{ oper:'le', text:'less or equal'},{ oper:'gt', text:'greater'},{ oper:'ge', text:'greater or equal'},{ oper:'bw', text:'begins with'},{ oper:'bn', text:'does not begin with'},{ oper:'in', text:'is in'},{ oper:'ni', text:'is not in'},{ oper:'ew', text:'ends with'},{ oper:'en', text:'does not end with'},{ oper:'cn', text:'contains'},{ oper:'nc', text:'does not contain'}],
+ groupOps: [ { op: "AND", text: "all" }, { op: "OR", text: "any" } ]
},
edit : {
addCaption: "Εισαγωγή Εγγραφής",
@@ -103,6 +101,7 @@
S: function (j) {return j == 1 || j > 1 ? ['η'][Math.min((j - 1) % 10, 3)] : ''},
srcformat: 'Y-m-d',
newformat: 'd/m/Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks : {
ISO8601Long:"Y-m-d H:i:s",
ISO8601Short:"Y-m-d",
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-el.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-en.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-en.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-en.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,6 @@
+// %%Ignore-License
;(function($){
/**
- * %%Ignore-License
* jqGrid English Translation
* Tony Tomov tony(a)trirand.com
* http://trirand.com/blog/
@@ -20,10 +20,8 @@
caption: "Search...",
Find: "Find",
Reset: "Reset",
- odata : ['equal', 'not equal', 'less', 'less or equal','greater','greater or equal', 'begins with','does not begin with','is in','is not in','ends with','does not end with','contains','does not contain'],
- groupOps: [ { op: "AND", text: "all" }, { op: "OR", text: "any" } ],
- matchText: " match",
- rulesText: " rules"
+ odata: [{ oper:'eq', text:'equal'},{ oper:'ne', text:'not equal'},{ oper:'lt', text:'less'},{ oper:'le', text:'less or equal'},{ oper:'gt', text:'greater'},{ oper:'ge', text:'greater or equal'},{ oper:'bw', text:'begins with'},{ oper:'bn', text:'does not begin with'},{ oper:'in', text:'is in'},{ oper:'ni', text:'is not in'},{ oper:'ew', text:'ends with'},{ oper:'en', text:'does not end with'},{ oper:'cn', text:'contains'},{ oper:'nc', text:'does not contain'}],
+ groupOps: [ { op: "AND", text: "all" }, { op: "OR", text: "any" } ]
},
edit : {
addCaption: "Add Record",
@@ -105,6 +103,7 @@
S: function (j) {return j < 11 || j > 13 ? ['st', 'nd', 'rd', 'th'][Math.min((j - 1) % 10, 3)] : 'th';},
srcformat: 'Y-m-d',
newformat: 'n/j/Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks : {
// see http://php.net/manual/en/function.date.php for PHP format used in jqGrid
// and see http://docs.jquery.com/UI/Datepicker/formatDate
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-en.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-es.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-es.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-es.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,6 @@
+// %%Ignore-License
;(function($){
/**
- * %%Ignore-License
* jqGrid Spanish Translation
* Traduccion jqGrid en Español por Yamil Bracho
* Traduccion corregida y ampliada por Faserline, S.L.
@@ -21,10 +21,8 @@
caption: "Búsqueda...",
Find: "Buscar",
Reset: "Limpiar",
- odata : ['igual ', 'no igual a', 'menor que', 'menor o igual que','mayor que','mayor o igual a', 'empiece por','no empiece por','está en','no está en','termina por','no termina por','contiene','no contiene'],
- groupOps: [ { op: "AND", text: "todo" }, { op: "OR", text: "cualquier" } ],
- matchText: " match",
- rulesText: " reglas"
+ odata: [{ oper:'eq', text:"igual "},{ oper:'ne', text:"no igual a"},{ oper:'lt', text:"menor que"},{ oper:'le', text:"menor o igual que"},{ oper:'gt', text:"mayor que"},{ oper:'ge', text:"mayor o igual a"},{ oper:'bw', text:"empiece por"},{ oper:'bn', text:"no empiece por"},{ oper:'in', text:"está en"},{ oper:'ni', text:"no está en"},{ oper:'ew', text:"termina por"},{ oper:'en', text:"no termina por"},{ oper:'cn', text:"contiene"},{ oper:'nc', text:"no contiene"}],
+ groupOps: [ { op: "AND", text: "todo" }, { op: "OR", text: "cualquier" } ]
},
edit : {
addCaption: "Agregar registro",
@@ -105,6 +103,7 @@
S: function (j) {return j < 11 || j > 13 ? ['st', 'nd', 'rd', 'th'][Math.min((j - 1) % 10, 3)] : 'th'},
srcformat: 'Y-m-d',
newformat: 'd-m-Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks : {
ISO8601Long:"Y-m-d H:i:s",
ISO8601Short:"Y-m-d",
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-es.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-fa.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-fa.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-fa.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,6 @@
+// %%Ignore-License
;(function ($) {
/**
- * %%Ignore-License
* jqGrid Persian Translation
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
@@ -18,7 +18,7 @@
caption: "جستجو...",
Find: "يافته ها",
Reset: "از نو",
- odata: ['برابر', 'نا برابر', 'به', 'کوچکتر', 'از', 'بزرگتر', 'شروع با', 'شروع نشود با', 'نباشد', 'عضو این نباشد', 'اتمام با', 'تمام نشود با', 'حاوی', 'نباشد حاوی'],
+ odata: [{ oper:'eq', text:"برابر"},{ oper:'ne', text:"نا برابر"},{ oper:'lt', text:"به"},{ oper:'le', text:"کوچکتر"},{ oper:'gt', text:"از"},{ oper:'ge', text:"بزرگتر"},{ oper:'bw', text:"شروع با"},{ oper:'bn', text:"شروع نشود با"},{ oper:'in', text:"نباشد"},{ oper:'ni', text:"عضو این نباشد"},{ oper:'ew', text:"اتمام با"},{ oper:'en', text:"تمام نشود با"},{ oper:'cn', text:"حاوی"},{ oper:'nc', text:"نباشد حاوی"}],
groupOps: [{
op: "AND",
text: "کل"
@@ -26,9 +26,7 @@
{
op: "OR",
text: "مجموع"
- }],
- matchText: " حاوی",
- rulesText: " اطلاعات"
+ }]
},
edit: {
addCaption: "اضافه کردن رکورد",
@@ -71,7 +69,7 @@
addtext: " ",
addtitle: "افزودن رديف جديد",
deltext: " ",
- deltitle: "حذف ردبف هاي انتخاب شده",
+ deltitle: "حذف ردبف هاي انتیاب شده",
searchtext: " ",
searchtitle: "جستجوي رديف",
refreshtext: "",
@@ -120,6 +118,7 @@
},
srcformat: "Y-m-d",
newformat: "d/m/Y",
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks: {
ISO8601Long: "Y-m-d H:i:s",
ISO8601Short: "Y-m-d",
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-fa.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-fi.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-fi.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-fi.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,6 @@
+// %%Ignore-License
;(function($){
/**
- * %%Ignore-License
* jqGrid (fi) Finnish Translation
* Jukka Inkeri awot.fi 2010-05-19
* Alex Grönholm alex.gronholm(a)nextday.fi 2011-05-18
@@ -21,10 +21,8 @@
caption: "Etsi...",
Find: "Etsi",
Reset: "Tyhjennä",
- odata: ['on', 'ei ole', 'pienempi', 'pienempi tai yhtäsuuri','suurempi','suurempi tai yhtäsuuri', 'alkaa','ei ala','joukossa','ei joukossa','loppuu','ei lopu','sisältää','ei sisällä','on tyhjä','ei ole tyhjä'],
- groupOps: [ { op: "AND", text: "kaikki" }, { op: "OR", text: "mikä tahansa" } ],
- matchText: " täytä ehdot:",
- rulesText: ""
+ odata: [{ oper:'eq', text:"on"},{ oper:'ne', text:"ei ole"},{ oper:'lt', text:"pienempi"},{ oper:'le', text:"pienempi tai yhtäsuuri"},{ oper:'gt', text:"suurempi"},{ oper:'ge', text:"suurempi tai yhtäsuuri"},{ oper:'bw', text:"alkaa"},{ oper:'bn', text:"ei ala"},{ oper:'in', text:"joukossa"},{ oper:'ni', text:"ei joukossa"},{ oper:'ew', text:"loppuu"},{ oper:'en', text:"ei lopu"},{ oper:'cn', text:"sisältää"},{ oper:'nc', text:"ei sisällä"},{ oper:'nu', text:"on tyhjä"},{ oper:'nn', text:"ei ole tyhjä"}],
+ groupOps: [ { op: "AND", text: "kaikki" }, { op: "OR", text: "mikä tahansa" } ]
},
edit: {
addCaption: "Uusi rivi",
@@ -105,6 +103,7 @@
S: function (j) {return j < 11 || j > 13 ? ['st', 'nd', 'rd', 'th'][Math.min((j - 1) % 10, 3)] : 'th'},
srcformat: 'Y-m-d',
newformat: 'd.m.Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks: {
ISO8601Long:"Y-m-d H:i:s",
ISO8601Short:"Y-m-d",
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-fi.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-fr.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-fr.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-fr.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,6 @@
+// %%Ignore-License
;(function($){
/**
- * %%Ignore-License
* jqGrid French Translation
* Tony Tomov tony(a)trirand.com
* http://trirand.com/blog/
@@ -20,10 +20,8 @@
caption: "Recherche...",
Find: "Chercher",
Reset: "Réinitialiser",
- odata : ['égal', 'différent', 'inférieur', 'inférieur ou égal','supérieur','supérieur ou égal', 'commence par','ne commence pas par','est dans',"n'est pas dans",'finit par','ne finit pas par','contient','ne contient pas'],
- groupOps: [ { op: "AND", text: "tous" }, { op: "OR", text: "au moins un" } ],
- matchText: " correspondance",
- rulesText: " règles"
+ odata: [{ oper:'eq', text:"égal"},{ oper:'ne', text:"différent"},{ oper:'lt', text:"inférieur"},{ oper:'le', text:"inférieur ou égal"},{ oper:'gt', text:"supérieur"},{ oper:'ge', text:"supérieur ou égal"},{ oper:'bw', text:"commence par"},{ oper:'bn', text:"ne commence pas par"},{ oper:'in', text:"est dans"},{ oper:'ni', text:"n'est pas dans"},{ oper:'ew', text:"finit par"},{ oper:'en', text:"ne finit pas par"},{ oper:'cn', text:"contient"},{ oper:'nc', text:"ne contient pas"}],
+ groupOps: [ { op: "AND", text: "tous" }, { op: "OR", text: "au moins un" } ]
},
edit : {
addCaption: "Ajouter",
@@ -103,6 +101,7 @@
S: function (j) {return j == 1 ? 'er' : 'e';},
srcformat: 'Y-m-d',
newformat: 'd/m/Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks : {
ISO8601Long:"Y-m-d H:i:s",
ISO8601Short:"Y-m-d",
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-fr.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-gl.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-gl.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-gl.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,6 @@
+// %%Ignore-License
;(function($){
/**
- * %%Ignore-License
* jqGrid Galician Translation
* Translated by Jorge Barreiro <yortx.barry(a)gmail.com>
* Dual licensed under the MIT and GPL licenses:
@@ -19,10 +19,8 @@
caption: "Búsqueda...",
Find: "Buscar",
Reset: "Limpar",
- odata : ['igual ', 'diferente a', 'menor que', 'menor ou igual que','maior que','maior ou igual a', 'empece por','non empece por','está en','non está en','termina por','non termina por','contén','non contén'],
- groupOps: [ { op: "AND", text: "todo" }, { op: "OR", text: "calquera" } ],
- matchText: " match",
- rulesText: " regras"
+ odata: [{ oper:'eq', text:"igual "},{ oper:'ne', text:"diferente a"},{ oper:'lt', text:"menor que"},{ oper:'le', text:"menor ou igual que"},{ oper:'gt', text:"maior que"},{ oper:'ge', text:"maior ou igual a"},{ oper:'bw', text:"empece por"},{ oper:'bn', text:"non empece por"},{ oper:'in', text:"está en"},{ oper:'ni', text:"non está en"},{ oper:'ew', text:"termina por"},{ oper:'en', text:"non termina por"},{ oper:'cn', text:"contén"},{ oper:'nc', text:"non contén"}],
+ groupOps: [ { op: "AND", text: "todo" }, { op: "OR", text: "calquera" } ]
},
edit : {
addCaption: "Engadir rexistro",
@@ -103,6 +101,7 @@
S: function (j) {return j < 11 || j > 13 ? ['st', 'nd', 'rd', 'th'][Math.min((j - 1) % 10, 3)] : 'th'},
srcformat: 'Y-m-d',
newformat: 'd-m-Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks : {
ISO8601Long:"Y-m-d H:i:s",
ISO8601Short:"Y-m-d",
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-gl.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-he.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-he.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-he.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,6 @@
+// %%Ignore-License
;(function($){
/**
- * %%Ignore-License
* jqGrid Hebrew Translation
* Shuki Shukrun shukrun.shuki(a)gmail.com
* http://trirand.com/blog/
@@ -20,10 +20,8 @@
caption: "מחפש...",
Find: "חפש",
Reset: "התחל",
- odata : ['שווה', 'לא שווה', 'קטן', 'קטן או שווה','גדול','גדול או שווה', 'מתחיל ב','לא מתחיל ב','נמצא ב','לא נמצא ב','מסתיים ב','לא מסתיים ב','מכיל','לא מכיל'],
- groupOps: [ { op: "AND", text: "הכל" }, { op: "OR", text: "אחד מ" } ],
- matchText: " תואם",
- rulesText: " חוקים"
+ odata: [{ oper:'eq', text:"שווה"},{ oper:'ne', text:"לא שווה"},{ oper:'lt', text:"קטן"},{ oper:'le', text:"קטן או שווה"},{ oper:'gt', text:"גדול"},{ oper:'ge', text:"גדול או שווה"},{ oper:'bw', text:"מתחיל ב"},{ oper:'bn', text:"לא מתחיל ב"},{ oper:'in', text:"נמצא ב"},{ oper:'ni', text:"לא נמצא ב"},{ oper:'ew', text:"מסתיים ב"},{ oper:'en', text:"לא מסתיים ב"},{ oper:'cn', text:"מכיל"},{ oper:'nc', text:"לא מכיל"}],
+ groupOps: [ { op: "AND", text: "הכל" }, { op: "OR", text: "אחד מ" } ]
},
edit : {
addCaption: "הוסף רשומה",
@@ -104,6 +102,7 @@
S: function (j) {return j < 11 || j > 13 ? ['', '', '', ''][Math.min((j - 1) % 10, 3)] : ''},
srcformat: 'Y-m-d',
newformat: 'd/m/Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks : {
ISO8601Long:"Y-m-d H:i:s",
ISO8601Short:"Y-m-d",
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-he.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-hr.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-hr.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-hr.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,9 +1,10 @@
-;(function($){
+// %%Ignore-License
+;(function($){
/**
- * %%Ignore-License
- * jqGrid Translation
- * Tony Tomov tony(a)trirand.com
- * http://trirand.com/blog/
+ * jqGrid Croatian Translation
+ * Version 1.0.1 (developed for jQuery Grid 4.4)
+ * msajko(a)gmail.com
+ *
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
@@ -17,13 +18,11 @@
pgtext : "Stranica {0} od {1}"
},
search : {
- caption: "pretraživanje...",
- Find: "Traži",
+ caption: "Traži...",
+ Find: "Pretraživanje",
Reset: "Poništi",
- odata : ['jednak', 'nije identičan', 'manje', 'manje ili identično','veće','veše ili identično', 'počinje sa','ne počinje sa ','je u','nije u','završava sa','ne završava sa','sadrži','ne sadrži'],
- groupOps: [ { op: "U", text: "sve" }, { op: "ILI", text: "bilo koji" } ],
- matchText: " podudata se",
- rulesText: " pravila"
+ odata: [{ oper:'eq', text:"jednak"},{ oper:'ne', text:"nije identičan"},{ oper:'lt', text:"manje"},{ oper:'le', text:"manje ili identično"},{ oper:'gt', text:"veće"},{ oper:'ge', text:"veše ili identično"},{ oper:'bw', text:"počinje sa"},{ oper:'bn', text:"ne počinje sa "},{ oper:'in', text:"je u"},{ oper:'ni', text:"nije u"},{ oper:'ew', text:"završava sa"},{ oper:'en', text:"ne završava sa"},{ oper:'cn', text:"sadrži"},{ oper:'nc', text:"ne sadrži"}],
+ groupOps: [ { op: "I", text: "sve" }, { op: "ILI", text: "bilo koji" } ]
},
edit : {
addCaption: "Dodaj zapis",
@@ -38,8 +37,8 @@
msg: {
required:"Polje je obavezno",
number:"Molim, unesite ispravan broj",
- minValue:"vrijednost mora biti veća ili identična ",
- maxValue:"vrijednost mora biti manja ili identična",
+ minValue:"Vrijednost mora biti veća ili identična ",
+ maxValue:"Vrijednost mora biti manja ili identična",
email: "neispravan e-mail",
integer: "Molim, unjeti ispravan cijeli broj (integer)",
date: "Molim, unjeti ispravan datum ",
@@ -62,13 +61,13 @@
bCancel: "Odustani"
},
nav : {
- edittext: "",
+ edittext: " ",
edittitle: "Promijeni obilježeni red",
- addtext:"",
+ addtext:" ",
addtitle: "Dodaj novi red",
- deltext: "",
+ deltext: " ",
deltitle: "Obriši obilježeni red",
- searchtext: "",
+ searchtext: " ",
searchtitle: "Potraži zapise",
refreshtext: "",
refreshtitle: "Ponovo preuzmi podatke",
@@ -86,12 +85,12 @@
errcap : "Greška",
nourl : "Nedostaje URL",
norecords: "Bez zapisa za obradu",
- model : "Duljina colNames <> colModel!"
+ model : "colNames i colModel imaju različitu duljinu!"
},
formatter : {
- integer : {thousandsSeparator: " ", defaultValue: '0'},
- number : {decimalSeparator:".", thousandsSeparator: " ", decimalPlaces: 2, defaultValue: '0.00'},
- currency : {decimalSeparator:".", thousandsSeparator: " ", decimalPlaces: 2, prefix: "", suffix:"", defaultValue: '0.00'},
+ integer : {thousandsSeparator: ".", defaultValue: '0'},
+ number : {decimalSeparator:",", thousandsSeparator: ".", decimalPlaces: 2, defaultValue: '0,00'},
+ currency : {decimalSeparator:",", thousandsSeparator: ".", decimalPlaces: 2, prefix: "", suffix:" Kn", defaultValue: '0,00'},
date : {
dayNames: [
"Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub",
@@ -105,18 +104,52 @@
S: function (j) {return ''},
srcformat: 'Y-m-d',
newformat: 'd.m.Y.',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks : {
- ISO8601Long:"Y-m-d H:i:s",
- ISO8601Short:"Y-m-d",
- ShortDate: "j.n.Y.",
- LongDate: "l, j. F Y",
- FullDateTime: "l, d. F Y G:i:s",
- MonthDay: "d. F",
- ShortTime: "G:i",
- LongTime: "G:i:s",
+ // see http://php.net/manual/en/function.date.php for PHP format used in jqGrid
+ // and see http://docs.jquery.com/UI/Datepicker/formatDate
+ // and https://github.com/jquery/globalize#dates for alternative formats used frequently
+ ISO8601Long: "Y-m-d H:i:s",
+ ISO8601Short: "Y-m-d",
+ // short date:
+ // d - Day of the month, 2 digits with leading zeros
+ // m - Numeric representation of a month, with leading zeros
+ // Y - A full numeric representation of a year, 4 digits
+ ShortDate: "d.m.Y.", // in jQuery UI Datepicker: "dd.mm.yy."
+ // long date:
+ // l - A full textual representation of the day of the week
+ // j - Day of the month without leading zeros
+ // F - A full textual representation of a month
+ // Y - A full numeric representation of a year, 4 digits
+ LongDate: "l, j. F Y", // in jQuery UI Datepicker: "dddd, d. MMMM yyyy"
+ // long date with long time:
+ // l - A full textual representation of the day of the week
+ // j - Day of the month without leading zeros
+ // F - A full textual representation of a month
+ // Y - A full numeric representation of a year, 4 digits
+ // H - 24-hour format of an hour with leading zeros
+ // i - Minutes with leading zeros
+ // s - Seconds, with leading zeros
+ FullDateTime: "l, j. F Y H:i:s", // in jQuery UI Datepicker: "dddd, d. MMMM yyyy HH:mm:ss"
+ // month day:
+ // d - Day of the month, 2 digits with leading zeros
+ // F - A full textual representation of a month
+ MonthDay: "d F", // in jQuery UI Datepicker: "dd MMMM"
+ // short time (without seconds)
+ // H - 24-hour format of an hour with leading zeros
+ // i - Minutes with leading zeros
+ ShortTime: "H:i", // in jQuery UI Datepicker: "HH:mm"
+ // long time (with seconds)
+ // H - 24-hour format of an hour with leading zeros
+ // i - Minutes with leading zeros
+ // s - Seconds, with leading zeros
+ LongTime: "H:i:s", // in jQuery UI Datepicker: "HH:mm:ss"
SortableDateTime: "Y-m-d\\TH:i:s",
UniversalSortableDateTime: "Y-m-d H:i:sO",
- YearMonth: "F, Y"
+ // month with year
+ // F - A full textual representation of a month
+ // Y - A full numeric representation of a year, 4 digits
+ YearMonth: "F Y" // in jQuery UI Datepicker: "MMMM yyyy"
},
reformatAfterEdit : false
},
@@ -127,4 +160,4 @@
idName : 'id'
}
});
-})(jQuery);
+})(jQuery);
\ No newline at end of file
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-hr.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-hr1250.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-hr1250.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-hr1250.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,9 +1,10 @@
+// %%Ignore-License
;(function($){
/**
- * %%Ignore-License
- * jqGrid Translation
- * Tony Tomov tony(a)trirand.com
- * http://trirand.com/blog/
+ * jqGrid Croatian Translation (charset windows-1250)
+ * Version 1.0.1 (developed for jQuery Grid 4.4)
+ * msajko(a)gmail.com
+ *
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
@@ -17,13 +18,11 @@
pgtext : "Stranica {0} od {1}"
},
search : {
- caption: "pretra�ivanje...",
- Find: "Tra�i",
+ caption: "Tra�i...",
+ Find: "Pretra�ivanje",
Reset: "Poni�ti",
- odata : ['jednak', 'nije identi�an', 'manje', 'manje ili identi�no','ve�e','ve�e ili identi�no', 'po�inje sa','ne po�inje sa ','je u','nije u','zavr�ava sa','ne zavr�ava sa','sadr�i','ne sadr�i'],
- groupOps: [ { op: "U", text: "sve" }, { op: "ILI", text: "bilo koji" } ],
- matchText: " podudata se",
- rulesText: " pravila"
+ odata : [{ oper:'eq', text:'jednak'}, { oper:'ne', text:'nije identi�an'}, { oper:'lt', text:'manje'}, { oper:'le', text:'manje ili identi�no'},{ oper:'gt', text:'ve�e'},{ oper:'ge', text:'ve�e ili identi�no'}, { oper:'bw', text:'po�inje sa'},{ oper:'bn', text:'ne po�inje sa '},{ oper:'in', text:'je u'},{ oper:'ni', text:'nije u'},{ oper:'ew', text:'zavr�ava sa'},{ oper:'en', text:'ne zavr�ava sa'},{ oper:'cn', text:'sadr�i'},{ oper:'nc', text:'ne sadr�i'}],
+ groupOps: [ { op: "I", text: "sve" }, { op: "ILI", text: "bilo koji" } ]
},
edit : {
addCaption: "Dodaj zapis",
@@ -38,8 +37,8 @@
msg: {
required:"Polje je obavezno",
number:"Molim, unesite ispravan broj",
- minValue:"vrijednost mora biti ve�a ili identi�na ",
- maxValue:"vrijednost mora biti manja ili identi�na",
+ minValue:"Vrijednost mora biti ve�a ili identi�na ",
+ maxValue:"Vrijednost mora biti manja ili identi�na",
email: "neispravan e-mail",
integer: "Molim, unjeti ispravan cijeli broj (integer)",
date: "Molim, unjeti ispravan datum ",
@@ -62,13 +61,13 @@
bCancel: "Odustani"
},
nav : {
- edittext: "",
+ edittext: " ",
edittitle: "Promijeni obilje�eni red",
- addtext:"",
+ addtext:" ",
addtitle: "Dodaj novi red",
- deltext: "",
+ deltext: " ",
deltitle: "Obri�i obilje�eni red",
- searchtext: "",
+ searchtext: " ",
searchtitle: "Potra�i zapise",
refreshtext: "",
refreshtitle: "Ponovo preuzmi podatke",
@@ -86,12 +85,12 @@
errcap : "Gre�ka",
nourl : "Nedostaje URL",
norecords: "Bez zapisa za obradu",
- model : "Duljina colNames <> colModel!"
+ model : "colNames i colModel imaju razli�itu duljinu!"
},
formatter : {
- integer : {thousandsSeparator: " ", defaultValue: '0'},
- number : {decimalSeparator:".", thousandsSeparator: " ", decimalPlaces: 2, defaultValue: '0.00'},
- currency : {decimalSeparator:".", thousandsSeparator: " ", decimalPlaces: 2, prefix: "", suffix:"", defaultValue: '0.00'},
+ integer : {thousandsSeparator: ".", defaultValue: '0'},
+ number : {decimalSeparator:",", thousandsSeparator: ".", decimalPlaces: 2, defaultValue: '0,00'},
+ currency : {decimalSeparator:",", thousandsSeparator: ".", decimalPlaces: 2, prefix: "", suffix:" Kn", defaultValue: '0,00'},
date : {
dayNames: [
"Ned", "Pon", "Uto", "Sri", "�et", "Pet", "Sub",
@@ -105,18 +104,52 @@
S: function (j) {return ''},
srcformat: 'Y-m-d',
newformat: 'd.m.Y.',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks : {
- ISO8601Long:"Y-m-d H:i:s",
- ISO8601Short:"Y-m-d",
- ShortDate: "j.n.Y.",
- LongDate: "l, j. F Y",
- FullDateTime: "l, d. F Y G:i:s",
- MonthDay: "d. F",
- ShortTime: "G:i",
- LongTime: "G:i:s",
+ // see http://php.net/manual/en/function.date.php for PHP format used in jqGrid
+ // and see http://docs.jquery.com/UI/Datepicker/formatDate
+ // and https://github.com/jquery/globalize#dates for alternative formats used frequently
+ ISO8601Long: "Y-m-d H:i:s",
+ ISO8601Short: "Y-m-d",
+ // short date:
+ // d - Day of the month, 2 digits with leading zeros
+ // m - Numeric representation of a month, with leading zeros
+ // Y - A full numeric representation of a year, 4 digits
+ ShortDate: "d.m.Y.", // in jQuery UI Datepicker: "dd.mm.yy."
+ // long date:
+ // l - A full textual representation of the day of the week
+ // j - Day of the month without leading zeros
+ // F - A full textual representation of a month
+ // Y - A full numeric representation of a year, 4 digits
+ LongDate: "l, j. F Y", // in jQuery UI Datepicker: "dddd, d. MMMM yyyy"
+ // long date with long time:
+ // l - A full textual representation of the day of the week
+ // j - Day of the month without leading zeros
+ // F - A full textual representation of a month
+ // Y - A full numeric representation of a year, 4 digits
+ // H - 24-hour format of an hour with leading zeros
+ // i - Minutes with leading zeros
+ // s - Seconds, with leading zeros
+ FullDateTime: "l, j. F Y H:i:s", // in jQuery UI Datepicker: "dddd, d. MMMM yyyy HH:mm:ss"
+ // month day:
+ // d - Day of the month, 2 digits with leading zeros
+ // F - A full textual representation of a month
+ MonthDay: "d F", // in jQuery UI Datepicker: "dd MMMM"
+ // short time (without seconds)
+ // H - 24-hour format of an hour with leading zeros
+ // i - Minutes with leading zeros
+ ShortTime: "H:i", // in jQuery UI Datepicker: "HH:mm"
+ // long time (with seconds)
+ // H - 24-hour format of an hour with leading zeros
+ // i - Minutes with leading zeros
+ // s - Seconds, with leading zeros
+ LongTime: "H:i:s", // in jQuery UI Datepicker: "HH:mm:ss"
SortableDateTime: "Y-m-d\\TH:i:s",
UniversalSortableDateTime: "Y-m-d H:i:sO",
- YearMonth: "F, Y"
+ // month with year
+ // F - A full textual representation of a month
+ // Y - A full numeric representation of a year, 4 digits
+ YearMonth: "F Y" // in jQuery UI Datepicker: "MMMM yyyy"
},
reformatAfterEdit : false
},
@@ -127,4 +160,4 @@
idName : 'id'
}
});
-})(jQuery);
+})(jQuery);
\ No newline at end of file
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-hr1250.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-hu.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-hu.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-hu.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,6 @@
+// %%Ignore-License
;(function($){
/**
- * %%Ignore-License
* jqGrid Hungarian Translation
* Őrszigety Ádám udx6bs(a)freemail.hu
* http://trirand.com/blog/
@@ -21,10 +21,8 @@
caption: "Keresés...",
Find: "Keres",
Reset: "Alapértelmezett",
- odata : ['egyenlő', 'nem egyenlő', 'kevesebb', 'kevesebb vagy egyenlő','nagyobb','nagyobb vagy egyenlő', 'ezzel kezdődik','nem ezzel kezdődik','tartalmaz','nem tartalmaz','végződik','nem végződik','tartalmaz','nem tartalmaz'],
- groupOps: [ { op: "AND", text: "all" }, { op: "OR", text: "any" } ],
- matchText: " match",
- rulesText: " rules"
+ odata: [{ oper:'eq', text:"egyenlő"},{ oper:'ne', text:"nem egyenlő"},{ oper:'lt', text:"kevesebb"},{ oper:'le', text:"kevesebb vagy egyenlő"},{ oper:'gt', text:"nagyobb"},{ oper:'ge', text:"nagyobb vagy egyenlő"},{ oper:'bw', text:"ezzel kezdődik"},{ oper:'bn', text:"nem ezzel kezdődik"},{ oper:'in', text:"tartalmaz"},{ oper:'ni', text:"nem tartalmaz"},{ oper:'ew', text:"végződik"},{ oper:'en', text:"nem végződik"},{ oper:'cn', text:"tartalmaz"},{ oper:'nc', text:"nem tartalmaz"}],
+ groupOps: [ { op: "AND", text: "all" }, { op: "OR", text: "any" } ]
},
edit : {
addCaption: "Új tétel",
@@ -106,6 +104,7 @@
S: function (j) {return '.-ik';},
srcformat: 'Y-m-d',
newformat: 'Y/m/d',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks : {
ISO8601Long:"Y-m-d H:i:s",
ISO8601Short:"Y-m-d",
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-hu.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-id.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-id.js (rev 0)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-id.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -0,0 +1,169 @@
+// %%Ignore-License
+;(function($){
+/**
+ * jqGrid English Translation
+ * Tony Tomov tony(a)trirand.com
+ * http://trirand.com/blog/
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+**/
+$.jgrid = $.jgrid || {};
+$.extend($.jgrid,{
+ defaults : {
+ recordtext: "Data {0} - {1} dari {2}",
+ emptyrecords: "Tidak ada data",
+ loadtext: "Memuat...",
+ pgtext : "Halaman {0} dari {1}"
+ },
+ search : {
+ caption: "Pencarian",
+ Find: "Cari !",
+ Reset: "Segarkan",
+ odata: [{ oper:'eq', text:"sama dengan"},{ oper:'ne', text:"tidak sama dengan"},{ oper:'lt', text:"kurang dari"},{ oper:'le', text:"kurang dari atau sama dengan"},{ oper:'gt', text:"lebih besar"},{ oper:'ge', text:"lebih besar atau sama dengan"},{ oper:'bw', text:"dimulai dengan"},{ oper:'bn', text:"tidak dimulai dengan"},{ oper:'in', text:"di dalam"},{ oper:'ni', text:"tidak di dalam"},{ oper:'ew', text:"diakhiri dengan"},{ oper:'en', text:"tidak diakhiri dengan"},{ oper:'cn', text:"mengandung"},{ oper:'nc', text:"tidak mengandung"}],
+ groupOps: [ { op: "AND", text: "all" }, { op: "OR", text: "any" } ]
+ },
+ edit : {
+ addCaption: "Tambah Data",
+ editCaption: "Sunting Data",
+ bSubmit: "Submit",
+ bCancel: "Tutup",
+ bClose: "Tutup",
+ saveData: "Data telah berubah! Simpan perubahan?",
+ bYes : "Ya",
+ bNo : "Tidak",
+ bExit : "Tutup",
+ msg: {
+ required:"kolom wajib diisi",
+ number:"hanya nomer yang diperbolehkan",
+ minValue:"kolom harus lebih besar dari atau sama dengan",
+ maxValue:"kolom harus lebih kecil atau sama dengan",
+ email: "alamat e-mail tidak valid",
+ integer: "hanya nilai integer yang diperbolehkan",
+ date: "nilai tanggal tidak valid",
+ url: "Bukan URL yang valid. Harap gunakan ('http://' or 'https://')",
+ nodefined : " belum didefinisikan!",
+ novalue : " return value is required!",
+ customarray : "Custom function should return array!",
+ customfcheck : "Custom function should be present in case of custom checking!"
+
+ }
+ },
+ view : {
+ caption: "Menampilkan data",
+ bClose: "Tutup"
+ },
+ del : {
+ caption: "Hapus",
+ msg: "Hapus data terpilih?",
+ bSubmit: "Hapus",
+ bCancel: "Batalkan"
+ },
+ nav : {
+ edittext: "",
+ edittitle: "Sunting data terpilih",
+ addtext:"",
+ addtitle: "Tambah baris baru",
+ deltext: "",
+ deltitle: "Hapus baris terpilih",
+ searchtext: "",
+ searchtitle: "Temukan data",
+ refreshtext: "",
+ refreshtitle: "Segarkan Grid",
+ alertcap: "Warning",
+ alerttext: "Harap pilih baris",
+ viewtext: "",
+ viewtitle: "Tampilkan baris terpilih"
+ },
+ col : {
+ caption: "Pilih Kolom",
+ bSubmit: "Ok",
+ bCancel: "Batal"
+ },
+ errors : {
+ errcap : "Error",
+ nourl : "Tidak ada url yang diset",
+ norecords: "Tidak ada data untuk diproses",
+ model : "Lebar dari colNames <> colModel!"
+ },
+ formatter : {
+ integer : {thousandsSeparator: ".", defaultValue: '0'},
+ number : {decimalSeparator:",", thousandsSeparator: ".", decimalPlaces: 2, defaultValue: '0'},
+ currency : {decimalSeparator:",", thousandsSeparator: ".", decimalPlaces: 2, prefix: "Rp. ", suffix:"", defaultValue: '0'},
+ date : {
+ dayNames: [
+ "Ming", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab",
+ "Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu"
+ ],
+ monthNames: [
+ "Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Agu", "Sep", "Okt", "Nov", "Des",
+ "Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember"
+ ],
+ AmPm : ["am","pm","AM","PM"],
+ S: function (j) {return j < 11 || j > 13 ? ['st', 'nd', 'rd', 'th'][Math.min((j - 1) % 10, 3)] : 'th';},
+ srcformat: 'Y-m-d',
+ newformat: 'n/j/Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
+ masks : {
+ // see http://php.net/manual/en/function.date.php for PHP format used in jqGrid
+ // and see http://docs.jquery.com/UI/Datepicker/formatDate
+ // and https://github.com/jquery/globalize#dates for alternative formats used frequently
+ // one can find on https://github.com/jquery/globalize/tree/master/lib/cultures many
+ // information about date, time, numbers and currency formats used in different countries
+ // one should just convert the information in PHP format
+ ISO8601Long:"Y-m-d H:i:s",
+ ISO8601Short:"Y-m-d",
+ // short date:
+ // n - Numeric representation of a month, without leading zeros
+ // j - Day of the month without leading zeros
+ // Y - A full numeric representation of a year, 4 digits
+ // example: 3/1/2012 which means 1 March 2012
+ ShortDate: "n/j/Y", // in jQuery UI Datepicker: "M/d/yyyy"
+ // long date:
+ // l - A full textual representation of the day of the week
+ // F - A full textual representation of a month
+ // d - Day of the month, 2 digits with leading zeros
+ // Y - A full numeric representation of a year, 4 digits
+ LongDate: "l, F d, Y", // in jQuery UI Datepicker: "dddd, MMMM dd, yyyy"
+ // long date with long time:
+ // l - A full textual representation of the day of the week
+ // F - A full textual representation of a month
+ // d - Day of the month, 2 digits with leading zeros
+ // Y - A full numeric representation of a year, 4 digits
+ // g - 12-hour format of an hour without leading zeros
+ // i - Minutes with leading zeros
+ // s - Seconds, with leading zeros
+ // A - Uppercase Ante meridiem and Post meridiem (AM or PM)
+ FullDateTime: "l, F d, Y g:i:s A", // in jQuery UI Datepicker: "dddd, MMMM dd, yyyy h:mm:ss tt"
+ // month day:
+ // F - A full textual representation of a month
+ // d - Day of the month, 2 digits with leading zeros
+ MonthDay: "F d", // in jQuery UI Datepicker: "MMMM dd"
+ // short time (without seconds)
+ // g - 12-hour format of an hour without leading zeros
+ // i - Minutes with leading zeros
+ // A - Uppercase Ante meridiem and Post meridiem (AM or PM)
+ ShortTime: "g:i A", // in jQuery UI Datepicker: "h:mm tt"
+ // long time (with seconds)
+ // g - 12-hour format of an hour without leading zeros
+ // i - Minutes with leading zeros
+ // s - Seconds, with leading zeros
+ // A - Uppercase Ante meridiem and Post meridiem (AM or PM)
+ LongTime: "g:i:s A", // in jQuery UI Datepicker: "h:mm:ss tt"
+ SortableDateTime: "Y-m-d\\TH:i:s",
+ UniversalSortableDateTime: "Y-m-d H:i:sO",
+ // month with year
+ // Y - A full numeric representation of a year, 4 digits
+ // F - A full textual representation of a month
+ YearMonth: "F, Y" // in jQuery UI Datepicker: "MMMM, yyyy"
+ },
+ reformatAfterEdit : false
+ },
+ baseLinkUrl: '',
+ showAction: '',
+ target: '',
+ checkbox : {disabled:true},
+ idName : 'id'
+ }
+});
+})(jQuery);
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-is.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-is.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-is.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,6 @@
+// %%Ignore-License
;(function($){
/**
- * %%Ignore-License
* jqGrid Icelandic Translation
* jtm(a)hi.is Univercity of Iceland
* Dual licensed under the MIT and GPL licenses:
@@ -19,10 +19,8 @@
caption: "Leita...",
Find: "Leita",
Reset: "Endursetja",
- odata : ['sama og', 'ekki sama og', 'minna en', 'minna eða jafnt og','stærra en','stærra eða jafnt og', 'byrjar á','byrjar ekki á','er í','er ekki í','endar á','endar ekki á','inniheldur','inniheldur ekki'],
- groupOps: [ { op: "AND", text: "allt" }, { op: "OR", text: "eða" } ],
- matchText: " passar",
- rulesText: " reglur"
+ odata: [{ oper:'eq', text:"sama og"},{ oper:'ne', text:"ekki sama og"},{ oper:'lt', text:"minna en"},{ oper:'le', text:"minna eða jafnt og"},{ oper:'gt', text:"stærra en"},{ oper:'ge', text:"stærra eða jafnt og"},{ oper:'bw', text:"byrjar á"},{ oper:'bn', text:"byrjar ekki á"},{ oper:'in', text:"er í"},{ oper:'ni', text:"er ekki í"},{ oper:'ew', text:"endar á"},{ oper:'en', text:"endar ekki á"},{ oper:'cn', text:"inniheldur"},{ oper:'nc', text:"inniheldur ekki"}],
+ groupOps: [ { op: "AND", text: "allt" }, { op: "OR", text: "eða" } ]
},
edit : {
addCaption: "Bæta við færslu",
@@ -103,6 +101,7 @@
S: function (j) {return j < 11 || j > 13 ? ['st', 'nd', 'rd', 'th'][Math.min((j - 1) % 10, 3)] : 'th'},
srcformat: 'Y-m-d',
newformat: 'd/m/Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks : {
ISO8601Long:"Y-m-d H:i:s",
ISO8601Short:"Y-m-d",
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-is.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-it.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-it.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-it.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,2 +1,2 @@
-/** %%Ignore-License */
-(function(a){a.jgrid = a.jgrid || {};a.extend(a.jgrid,{ defaults:{recordtext:"Visualizzati {0} - {1} di {2}",emptyrecords:"Nessun record da visualizzare",loadtext:"Caricamento...",pgtext:"Pagina {0} di {1}"},search:{caption:"Ricerca...",Find:"Cerca",Reset:"Pulisci",odata:["uguale","diverso","minore","minore o uguale","maggiore","maggiore o uguale","inizia con","non inizia con","in","non in","termina con","non termina con","contiene","non contiene"],groupOps:[{op:"AND",text:"tutto"},{op:"OR",text:"almeno uno"}],matchText:" corrisponde",rulesText:" regole"},edit:{addCaption:"Aggiungi Record",editCaption:"Modifica Record",bSubmit:"Invia",bCancel:"Chiudi",bClose:"Chiudi",saveData:"Alcuni dati modificati! Salvare i cambiamenti?",bYes:"Si",bNo:"No",bExit:"Esci",msg:{required:"Campo richiesto",number:"Per favore, inserisci un valore valido",minValue:"il valore deve essere maggiore o uguale a ",maxValue:"il valore deve essere minore o uguale a",email:"e-mail non corretta",integer:"Per favore, inserisci un numero intero valido",date:"Per favore, inserisci una data valida",url:"URL non valido. Prefisso richiesto ('http://' or 'https://')",nodefined:" non � definito!",novalue:" valore di ritorno richiesto!",customarray:"La function custon deve tornare un array!",customfcheck:"La function custom deve esistere per il custom checking!"}},view:{caption:"Visualizzazione Record",bClose:"Chiudi"},del:{caption:"Cancella",msg:"Cancellare record selezionato/i?",bSubmit:"Cancella",bCancel:"Annulla"},nav:{edittext:" ",edittitle:"Modifica record selezionato",addtext:" ",addtitle:"Aggiungi nuovo record",deltext:" ",deltitle:"Cancella record selezionato",searchtext:" ",searchtitle:"Ricerca record",refreshtext:"",refreshtitle:"Aggiorna griglia",alertcap:"Attenzione",alerttext:"Per favore, seleziona un record",viewtext:"",viewtitle:"Visualizza riga selezionata"},col:{caption:"Mostra/Nascondi Colonne",bSubmit:"Invia",bCancel:"Annulla"},errors:{errcap:"Errore",nourl:"Url non settata",norecords:"Nessun record da elaborare",model:"Lunghezza di colNames <> colModel!"},formatter:{integer:{thousandsSeparator:" ",defaultValue:"0"},number:{decimalSeparator:",",thousandsSeparator:" ",decimalPlaces:2,defaultValue:"0,00"},currency:{decimalSeparator:",",thousandsSeparator:" ",decimalPlaces:2,prefix:"",suffix:"",defaultValue:"0,00"},date:{dayNames:["Dom","Lun","Mar","Mer","Gio","Ven","Sab","Domenica","Luned�","Marted�","Mercoled�","Gioved�","Venerd�","Sabato"],monthNames:["Gen","Feb","Mar","Apr","Mag","Gui","Lug","Ago","Set","Ott","Nov","Dic","Genneio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Movembre","Dicembre"],AmPm:["am","pm","AM","PM"],S:function(b){return b<11||b>13?["st","nd","rd","th"][Math.min((b-1)%10,3)]:"th"},srcformat:"Y-m-d",newformat:"d/m/Y",masks:{ISO8601Long:"Y-m-d H:i:s",ISO8601Short:"Y-m-d",ShortDate:"n/j/Y",LongDate:"l, F d, Y",FullDateTime:"l, F d, Y g:i:s A",MonthDay:"F d",ShortTime:"g:i A",LongTime:"g:i:s A",SortableDateTime:"Y-m-d\\TH:i:s",UniversalSortableDateTime:"Y-m-d H:i:sO",YearMonth:"F, Y"},reformatAfterEdit:false},baseLinkUrl:"",showAction:"",target:"",checkbox:{disabled:true},idName:"id"}});})(jQuery);
\ No newline at end of file
+// %%Ignore-License
+(function(a){a.jgrid = a.jgrid || {};a.extend(a.jgrid,{ defaults:{recordtext:"Visualizzati {0} - {1} di {2}",emptyrecords:"Nessun record da visualizzare",loadtext:"Caricamento...",pgtext:"Pagina {0} di {1}"},search:{caption:"Ricerca...",Find:"Cerca",Reset:"Pulisci", odata: [{ oper:'eq', text:"uguale"},{ oper:'ne', text:"diverso"},{ oper:'lt', text:"minore"},{ oper:'le', text:"minore o uguale"},{ oper:'gt', text:"maggiore"},{ oper:'ge', text:"maggiore o uguale"},{ oper:'bw', text:"inizia con"},{ oper:'bn', text:"non inizia con"},{ oper:'in', text:"in"},{ oper:'ni', text:"non in"},{ oper:'ew', text:"termina con"},{ oper:'en', text:"non termina con"},{ oper:'cn', text:"contiene"},{ oper:'nc', text:"non contiene"}],groupOps:[{op:"AND",text:"tutto"},{op:"OR",text:"almeno uno"}]},edit:{addCaption:"Aggiungi Record",editCaption:"Modifica Record",bSubmit:"Invia",bCancel:"Chiudi",bClose:"Chiudi",saveData:"Alcuni dati modificati! Salvare i cambiamenti?",bYes:"Si",bNo:"No",bExit:"Esci",msg:{required:"Campo richiesto",number:"Per favore, inserisci un valore valido",minValue:"il valore deve essere maggiore o uguale a ",maxValue:"il valore deve essere minore o uguale a",email:"e-mail non corretta",integer:"Per favore, inserisci un numero intero valido",date:"Per favore, inserisci una data valida",url:"URL non valido. Prefisso richiesto ('http://' or 'https://')",nodefined:" non � definito!",novalue:" valore di ritorno richiesto!",customarray:"La function custon deve tornare un array!",customfcheck:"La function custom deve esistere per il custom checking!"}},view:{caption:"Visualizzazione Record",bClose:"Chiudi"},del:{caption:"Cancella",msg:"Cancellare record selezionato/i?",bSubmit:"Cancella",bCancel:"Annulla"},nav:{edittext:" ",edittitle:"Modifica record selezionato",addtext:" ",addtitle:"Aggiungi nuovo record",deltext:" ",deltitle:"Cancella record selezionato",searchtext:" ",searchtitle:"Ricerca record",refreshtext:"",refreshtitle:"Aggiorna griglia",alertcap:"Attenzione",alerttext:"Per favore, seleziona un record",viewtext:"",viewtitle:"Visualizza riga selezionata"},col:{caption:"Mostra/Nascondi Colonne",bSubmit:"Invia",bCancel:"Annulla"},errors:{errcap:"Errore",nourl:"Url non settata",norecords:"Nessun record da elaborare",model:"Lunghezza di colNames <> colModel!"},formatter:{integer:{thousandsSeparator:" ",defaultValue:"0"},number:{decimalSeparator:",",thousandsSeparator:" ",decimalPlaces:2,defaultValue:"0,00"},currency:{decimalSeparator:",",thousandsSeparator:" ",decimalPlaces:2,prefix:"",suffix:"",defaultValue:"0,00"},date:{dayNames:["Dom","Lun","Mar","Mer","Gio","Ven","Sab","Domenica","Luned�","Marted�","Mercoled�","Gioved�","Venerd�","Sabato"],monthNames:["Gen","Feb","Mar","Apr","Mag","Gui","Lug","Ago","Set","Ott","Nov","Dic","Genneio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Movembre","Dicembre"],AmPm:["am","pm","AM","PM"],S:function(b){return b<11||b>13?["st","nd","rd","th"][Math.min((b-1)%10,3)]:"th"},srcformat:"Y-m-d",newformat:"d/m/Y",parseRe : /[Tt\\\/:_;.,\t\s-]/,masks:{ISO8601Long:"Y-m-d H:i:s",ISO8601Short:"Y-m-d",ShortDate:"n/j/Y",LongDate:"l, F d, Y",FullDateTime:"l, F d, Y g:i:s A",MonthDay:"F d",ShortTime:"g:i A",LongTime:"g:i:s A",SortableDateTime:"Y-m-d\\TH:i:s",UniversalSortableDateTime:"Y-m-d H:i:sO",YearMonth:"F, Y"},reformatAfterEdit:false},baseLinkUrl:"",showAction:"",target:"",checkbox:{disabled:true},idName:"id"}});})(jQuery);
\ No newline at end of file
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-it.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ja.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ja.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ja.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,6 @@
+// %%Ignore-License
;(function($){
/**
- * %%Ignore-License
* jqGrid Japanese Translation
* OKADA Yoshitada okada.dev(a)sth.jp
* http://trirand.com/blog/
@@ -20,13 +20,13 @@
caption: "\u691c\u7d22...",
Find: "\u691c\u7d22",
Reset: "\u30ea\u30bb\u30c3\u30c8",
- odata: ["\u6B21\u306B\u7B49\u3057\u3044", "\u6B21\u306B\u7B49\u3057\u304F\u306A\u3044",
- "\u6B21\u3088\u308A\u5C0F\u3055\u3044", "\u6B21\u306B\u7B49\u3057\u3044\u304B\u5C0F\u3055\u3044",
- "\u6B21\u3088\u308A\u5927\u304D\u3044", "\u6B21\u306B\u7B49\u3057\u3044\u304B\u5927\u304D\u3044",
- "\u6B21\u3067\u59CB\u307E\u308B", "\u6B21\u3067\u59CB\u307E\u3089\u306A\u3044",
- "\u6B21\u306B\u542B\u307E\u308C\u308B", "\u6B21\u306B\u542B\u307E\u308C\u306A\u3044",
- "\u6B21\u3067\u7D42\u308F\u308B", "\u6B21\u3067\u7D42\u308F\u3089\u306A\u3044",
- "\u6B21\u3092\u542B\u3080", "\u6B21\u3092\u542B\u307E\u306A\u3044"],
+ odata: [{ oper:'eq', text:"\u6B21\u306B\u7B49\u3057\u3044"}, { oper:'ne', text:"\u6B21\u306B\u7B49\u3057\u304F\u306A\u3044"},
+ { oper:'lt', text:"\u6B21\u3088\u308A\u5C0F\u3055\u3044"}, { oper:'le', text:"\u6B21\u306B\u7B49\u3057\u3044\u304B\u5C0F\u3055\u3044"},
+ { oper:'gt', text:"\u6B21\u3088\u308A\u5927\u304D\u3044"}, { oper:'ge', text:"\u6B21\u306B\u7B49\u3057\u3044\u304B\u5927\u304D\u3044"},
+ { oper:'bw', text:"\u6B21\u3067\u59CB\u307E\u308B"}, { oper:'bn', text:"\u6B21\u3067\u59CB\u307E\u3089\u306A\u3044"},
+ { oper:'in', text:"\u6B21\u306B\u542B\u307E\u308C\u308B"}, { oper:'ni', text:"\u6B21\u306B\u542B\u307E\u308C\u306A\u3044"},
+ { oper:'ew', text:"\u6B21\u3067\u7D42\u308F\u308B"}, { oper:'en', text:"\u6B21\u3067\u7D42\u308F\u3089\u306A\u3044"},
+ { oper:'cn', text:"\u6B21\u3092\u542B\u3080"}, { oper:'nc', text:"\u6B21\u3092\u542B\u307E\u306A\u3044"}],
groupOps: [{
op: "AND",
text: "\u3059\u3079\u3066\u306E"
@@ -34,9 +34,7 @@
{
op: "OR",
text: "\u3044\u305A\u308C\u304B\u306E"
- }],
- matchText: " \u6B21\u306E",
- rulesText: " \u6761\u4EF6\u3092\u6E80\u305F\u3059"
+ }]
},
edit : {
addCaption: "\u30ec\u30b3\u30fc\u30c9\u8ffd\u52a0",
@@ -132,6 +130,7 @@
S: function (j) { return "\u756a\u76ee"; },
srcformat: 'Y-m-d',
newformat: 'd/m/Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks : {
ISO8601Long:"Y-m-d H:i:s",
ISO8601Short:"Y-m-d",
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ja.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-kr.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-kr.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-kr.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,6 @@
+// %%Ignore-License
;(function($){
/**
- * %%Ignore-License
* jqGrid English Translation
* Tony Tomov tony(a)trirand.com
* http://trirand.com/blog/
@@ -20,10 +20,8 @@
caption: "검색...",
Find: "찾기",
Reset: "초기화",
- odata : ['같다', '같지 않다', '작다', '작거나 같다','크다','크거나 같다', '로 시작한다','로 시작하지 않는다','내에 있다','내에 있지 않다','로 끝난다','로 끝나지 않는다','내에 존재한다','내에 존재하지 않는다'],
- groupOps: [ { op: "AND", text: "전부" }, { op: "OR", text: "임의" } ],
- matchText: " 일치하다",
- rulesText: " 적용하다"
+ odata: [{ oper:'eq', text:"같다"},{ oper:'ne', text:"같지 않다"},{ oper:'lt', text:"작다"},{ oper:'le', text:"작거나 같다"},{ oper:'gt', text:"크다"},{ oper:'ge', text:"크거나 같다"},{ oper:'bw', text:"로 시작한다"},{ oper:'bn', text:"로 시작하지 않는다"},{ oper:'in', text:"내에 있다"},{ oper:'ni', text:"내에 있지 않다"},{ oper:'ew', text:"로 끝난다"},{ oper:'en', text:"로 끝나지 않는다"},{ oper:'cn', text:"내에 존재한다"},{ oper:'nc', text:"내에 존재하지 않는다"}],
+ groupOps: [ { op: "AND", text: "전부" }, { op: "OR", text: "임의" } ]
},
edit : {
addCaption: "행 추가",
@@ -105,6 +103,7 @@
S: function (j) {return j < 11 || j > 13 ? ['st', 'nd', 'rd', 'th'][Math.min((j - 1) % 10, 3)] : 'th'},
srcformat: 'Y-m-d',
newformat: 'm-d-Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks : {
ISO8601Long:"Y-m-d H:i:s",
ISO8601Short:"Y-m-d",
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-kr.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-lt.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-lt.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-lt.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,6 @@
+// %%Ignore-License
;(function($){
/**
- * %%Ignore-License
* jqGrid Lithuanian Translation
* aur1mas aur1mas(a)devnet.lt
* http://aur1mas.devnet.lt
@@ -20,10 +20,8 @@
caption: "Paieška...",
Find: "Ieškoti",
Reset: "Atstatyti",
- odata : ['lygu', 'nelygu', 'mažiau', 'mažiau arba lygu','daugiau','daugiau arba lygu', 'prasideda','neprasideda','reikšmė yra','reikšmės nėra','baigiasi','nesibaigia','yra sudarytas','nėra sudarytas'],
- groupOps: [ { op: "AND", text: "visi" }, { op: "OR", text: "bet kuris" } ],
- matchText: " match",
- rulesText: " rules"
+ odata: [{ oper:'eq', text:"lygu"},{ oper:'ne', text:"nelygu"},{ oper:'lt', text:"mažiau"},{ oper:'le', text:"mažiau arba lygu"},{ oper:'gt', text:"daugiau"},{ oper:'ge', text:"daugiau arba lygu"},{ oper:'bw', text:"prasideda"},{ oper:'bn', text:"neprasideda"},{ oper:'in', text:"reikšmė yra"},{ oper:'ni', text:"reikšmės nėra"},{ oper:'ew', text:"baigiasi"},{ oper:'en', text:"nesibaigia"},{ oper:'cn', text:"yra sudarytas"},{ oper:'nc', text:"nėra sudarytas"}],
+ groupOps: [ { op: "AND", text: "visi" }, { op: "OR", text: "bet kuris" } ]
},
edit : {
addCaption: "Sukurti įrašą",
@@ -105,6 +103,7 @@
S: function (j) {return j < 11 || j > 13 ? ['st', 'nd', 'rd', 'th'][Math.min((j - 1) % 10, 3)] : 'th'},
srcformat: 'Y-m-d',
newformat: 'd/m/Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks : {
ISO8601Long:"Y-m-d H:i:s",
ISO8601Short:"Y-m-d",
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-lt.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-mne.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-mne.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-mne.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,6 @@
+// %%Ignore-License
;(function($){
/**
- * %%Ignore-License
* jqGrid Montenegrian Translation
* Bild Studio info(a)bild-studio.net
* http://www.bild-studio.com
@@ -20,10 +20,8 @@
caption: "Traženje...",
Find: "Traži",
Reset: "Resetuj",
- odata : ['jednako', 'nije jednako', 'manje', 'manje ili jednako','veće','veće ili jednako', 'počinje sa','ne počinje sa','je u','nije u','završava sa','ne završava sa','sadrži','ne sadrži'],
- groupOps: [ { op: "AND", text: "sva" }, { op: "OR", text: "bilo koje" } ],
- matchText: " primjeni",
- rulesText: " pravila"
+ odata: [{ oper:'eq', text:"jednako"},{ oper:'ne', text:"nije jednako"},{ oper:'lt', text:"manje"},{ oper:'le', text:"manje ili jednako"},{ oper:'gt', text:"veće"},{ oper:'ge', text:"veće ili jednako"},{ oper:'bw', text:"počinje sa"},{ oper:'bn', text:"ne počinje sa"},{ oper:'in', text:"je u"},{ oper:'ni', text:"nije u"},{ oper:'ew', text:"završava sa"},{ oper:'en', text:"ne završava sa"},{ oper:'cn', text:"sadrži"},{ oper:'nc', text:"ne sadrži"}],
+ groupOps: [ { op: "AND", text: "sva" }, { op: "OR", text: "bilo koje" } ]
},
edit : {
addCaption: "Dodaj zapis",
@@ -105,6 +103,7 @@
S: function (j) {return j < 11 || j > 13 ? ['st', 'nd', 'rd', 'th'][Math.min((j - 1) % 10, 3)] : 'th'},
srcformat: 'Y-m-d',
newformat: 'd/m/Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks : {
ISO8601Long:"Y-m-d H:i:s",
ISO8601Short:"Y-m-d",
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-mne.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-nl.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-nl.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-nl.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,4 +1,4 @@
-/**%%Ignore-License */
+// %%Ignore-License
(function(a) {
a.jgrid = a.jgrid || {};
a.extend(a.jgrid,{
@@ -14,10 +14,8 @@
caption: "Zoeken...",
Find: "Zoek",
Reset: "Herstellen",
- odata: ["gelijk aan", "niet gelijk aan", "kleiner dan", "kleiner dan of gelijk aan", "groter dan", "groter dan of gelijk aan", "begint met", "begint niet met", "is in", "is niet in", "eindigd met", "eindigd niet met", "bevat", "bevat niet"],
- groupOps: [{ op: "AND", text: "alle" }, { op: "OR", text: "een van de"}],
- matchText: " match",
- rulesText: " regels"
+ odata: [{ oper:'eq', text:"gelijk aan"},{ oper:'ne', text:"niet gelijk aan"},{ oper:'lt', text:"kleiner dan"},{ oper:'le', text:"kleiner dan of gelijk aan"},{ oper:'gt', text:"groter dan"},{ oper:'ge', text:"groter dan of gelijk aan"},{ oper:'bw', text:"begint met"},{ oper:'bn', text:"begint niet met"},{ oper:'in', text:"is in"},{ oper:'ni', text:"is niet in"},{ oper:'ew', text:"eindigd met"},{ oper:'en', text:"eindigd niet met"},{ oper:'cn', text:"bevat"},{ oper:'nc', text:"bevat niet"}],
+ groupOps: [{ op: "AND", text: "alle" }, { op: "OR", text: "een van de"}]
},
edit:
{
@@ -121,6 +119,7 @@
},
srcformat: "Y-m-d",
newformat: "d/m/Y",
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks:
{
ISO8601Long: "Y-m-d H:i:s",
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-nl.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-no.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-no.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-no.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,2 +1,2 @@
-/** %%Ignore-License */
-(function(a){a.jgrid= a.jgrid || {};a.jgrid.defaults={recordtext:"Rad {0} - {1}, totalt {2}",loadtext:"Laster...",pgtext:"Side {0} av {1}"};a.jgrid.search={caption:"S�k...",Find:"Finn",Reset:"Nullstill",odata:["lik","forskjellig fra","mindre enn","mindre eller lik","st�rre enn"," st�rre eller lik","starter med","slutter med","inneholder"]};a.jgrid.edit={addCaption:"Ny rad",editCaption:"Rediger",bSubmit:"Send",bCancel:"Avbryt",bClose:"Lukk",processData:"Laster...",msg:{required:"Felt er obligatorisk",number:"Legg inn et gyldig tall",minValue:"verdi m� v�re st�rre enn eller lik",maxValue:"verdi m� v�re mindre enn eller lik",email:"er ikke en gyldig e-post adresse",integer:"Legg inn et gyldig heltall",date:"Legg inn en gyldig dato",url:"er ikke en gyldig URL. Prefiks p�krevd ('http://' eller 'https://')",nodefined:" er ikke definert!",novalue:" returverdi er p�krevd!",customarray:"Tilpasset funksjon m� returnere en tabell!",customfcheck:"Tilpasset funksjon m� eksistere!"}};a.jgrid.view={caption:"�pne post",bClose:"Lukk"};a.jgrid.del={caption:"Slett",msg:"Slett valgte rad(er)?",bSubmit:"Slett",bCancel:"Avbryt",processData:"Behandler..."};a.jgrid.nav={edittext:" ",edittitle:"Rediger valgte rad(er)",addtext:" ",addtitle:"Legg til ny rad",deltext:" ",deltitle:"Slett valgte rad(er)",searchtext:" ",searchtitle:"S�k",refreshtext:"",refreshtitle:"Oppdater tabell",alertcap:"Advarsel",alerttext:"Velg rad",viewtext:" ",viewtitle:"�pne valgt rad"};a.jgrid.col={caption:"Vis/skjul kolonner",bSubmit:"Utf�r",bCancel:"Avbryt"};a.jgrid.errors={errcap:"Feil",nourl:"Ingen url er satt",norecords:"Ingen poster � behandle",model:"colNames og colModel har forskjellig lengde!"};a.jgrid.formatter={integer:{thousandsSeparator:" ",defaulValue:0},number:{decimalSeparator:",",thousandsSeparator:" ",decimalPlaces:2,defaulValue:0},currency:{decimalSeparator:",",thousandsSeparator:" ",decimalPlaces:2,prefix:"",suffix:"",defaulValue:0},date:{dayNames:["s�.","ma.","ti.","on.","to.","fr.","l�.","S�ndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","L�rdag"],monthNames:["jan.","feb.","mars","april","mai","juni","juli","aug.","sep.","okt.","nov.","des.","januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember"],AmPm:["","","",""],S:function(b){return"."},srcformat:"Y-m-d H:i:s",newformat:"Y-m-d H:i:s",masks:{ISO8601Long:"Y-m-d H:i:s",ISO8601Short:"Y-m-d",ShortDate:"j.n.Y",LongDate:"l j. F Y",FullDateTime:"l j. F Y kl. G.i.s",MonthDay:"j. F",ShortTime:"H:i",LongTime:"H:i:s",SortableDateTime:"Y-m-d\\TH:i:s",UniversalSortableDateTime:"Y-m-d H:i:sO",YearMonth:"F Y"},reformatAfterEdit:false},baseLinkUrl:"",showAction:"show",addParam:"",checkbox:{disabled:true}}})(jQuery);
+// %%Ignore-License
+(function(a){a.jgrid= a.jgrid || {};a.jgrid.defaults={recordtext:"Rad {0} - {1}, totalt {2}",loadtext:"Laster...",pgtext:"Side {0} av {1}"};a.jgrid.search={caption:"S�k...",Find:"Finn",Reset:"Nullstill",odata:[{oper:'eq', text:"lik"},{oper:'ne', text:"forskjellig fra"},{oper:'lt', text:"mindre enn"},{oper:'le', text:"mindre eller lik"},{oper:'gt', text:"st�rre enn"},{oper:'ge', text:" st�rre eller lik"},{oper:'bw', text:"starter med"},{oper:'ew', text:"slutter med"},{oper:'cn', text:"inneholder"}]};a.jgrid.edit={addCaption:"Ny rad",editCaption:"Rediger",bSubmit:"Send",bCancel:"Avbryt",bClose:"Lukk",processData:"Laster...",msg:{required:"Felt er obligatorisk",number:"Legg inn et gyldig tall",minValue:"verdi m� v�re st�rre enn eller lik",maxValue:"verdi m� v�re mindre enn eller lik",email:"er ikke en gyldig e-post adresse",integer:"Legg inn et gyldig heltall",date:"Legg inn en gyldig dato",url:"er ikke en gyldig URL. Prefiks p�krevd ('http://' eller 'https://')",nodefined:" er ikke definert!",novalue:" returverdi er p�krevd!",customarray:"Tilpasset funksjon m� returnere en tabell!",customfcheck:"Tilpasset funksjon m� eksistere!"}};a.jgrid.view={caption:"�pne post",bClose:"Lukk"};a.jgrid.del={caption:"Slett",msg:"Slett valgte rad(er)?",bSubmit:"Slett",bCancel:"Avbryt",processData:"Behandler..."};a.jgrid.nav={edittext:" ",edittitle:"Rediger valgte rad(er)",addtext:" ",addtitle:"Legg til ny rad",deltext:" ",deltitle:"Slett valgte rad(er)",searchtext:" ",searchtitle:"S�k",refreshtext:"",refreshtitle:"Oppdater tabell",alertcap:"Advarsel",alerttext:"Velg rad",viewtext:" ",viewtitle:"�pne valgt rad"};a.jgrid.col={caption:"Vis/skjul kolonner",bSubmit:"Utf�r",bCancel:"Avbryt"};a.jgrid.errors={errcap:"Feil",nourl:"Ingen url er satt",norecords:"Ingen poster � behandle",model:"colNames og colModel har forskjellig lengde!"};a.jgrid.formatter={integer:{thousandsSeparator:" ",defaultValue:0},number:{decimalSeparator:",",thousandsSeparator:" ",decimalPlaces:2,defaulValue:0},currency:{decimalSeparator:",",thousandsSeparator:" ",decimalPlaces:2,prefix:"",suffix:"",defaulValue:0},date:{dayNames:["s�.","ma.","ti.","on.","to.","fr.","l�.","S�ndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","L�rdag"],monthNames:["jan.","feb.","mars","april","mai","juni","juli","aug.","sep.","okt.","nov.","des.","januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember"],AmPm:["","","",""],S:function(b){return"."},srcformat:"Y-m-d H:i:s",newformat:"Y-m-d H:i:s",parseRe : /[Tt\\\/:_;.,\t\s-]/,masks:{ISO8601Long:"Y-m-d H:i:s",ISO8601Short:"Y-m-d",ShortDate:"j.n.Y",LongDate:"l j. F Y",FullDateTime:"l j. F Y kl. G.i.s",MonthDay:"j. F",ShortTime:"H:i",LongTime:"H:i:s",SortableDateTime:"Y-m-d\\TH:i:s",UniversalSortableDateTime:"Y-m-d H:i:sO",YearMonth:"F Y"},reformatAfterEdit:false},baseLinkUrl:"",showAction:"show",addParam:"",checkbox:{disabled:true}}})(jQuery);
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-no.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-pl.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-pl.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-pl.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,134 +1,133 @@
-;(function($){
-/**
- * %%Ignore-License
- * jqGrid Polish Translation
- * Łukasz Schab lukasz(a)freetree.pl
- * http://FreeTree.pl
- *
- * Updated names, abbreviations, currency and date/time formats for Polish norms (also corresponding with CLDR v21.0.1 --> http://cldr.unicode.org/index)
- * Tomasz Pęczek tpeczek(a)gmail.com
- * http://tpeczek.blogspot.com; http://tpeczek.codeplex.com
- *
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
-**/
-$.jgrid = $.jgrid || {};
-$.extend($.jgrid,{
- defaults : {
- recordtext: "Pokaż {0} - {1} z {2}",
- emptyrecords: "Brak rekordów do pokazania",
- loadtext: "Ładowanie...",
- pgtext : "Strona {0} z {1}"
- },
- search : {
- caption: "Wyszukiwanie...",
- Find: "Szukaj",
- Reset: "Czyść",
- odata : ['dokładnie', 'różne od', 'mniejsze od', 'mniejsze lub równe', 'większe od', 'większe lub równe', 'zaczyna się od', 'nie zaczyna się od', 'jest w', 'nie jest w', 'kończy się na', 'nie kończy się na', 'zawiera', 'nie zawiera'],
- groupOps: [ { op: "AND", text: "oraz" }, { op: "OR", text: "lub" } ],
- matchText: " pasuje",
- rulesText: " reguły"
- },
- edit : {
- addCaption: "Dodaj rekord",
- editCaption: "Edytuj rekord",
- bSubmit: "Zapisz",
- bCancel: "Anuluj",
- bClose: "Zamknij",
- saveData: "Dane zostały zmienione! Zapisać zmiany?",
- bYes: "Tak",
- bNo: "Nie",
- bExit: "Anuluj",
- msg: {
- required: "Pole jest wymagane",
- number: "Proszę wpisać poprawną liczbę",
- minValue: "wartość musi być większa lub równa od",
- maxValue: "wartość musi być mniejsza lub równa od",
- email: "nie jest poprawnym adresem e-mail",
- integer: "Proszę wpisać poprawną liczbę",
- date: "Proszę podaj poprawną datę",
- url: "jest niewłaściwym adresem URL. Pamiętaj o prefiksie ('http://' lub 'https://')",
- nodefined: " niezdefiniowane!",
- novalue: " wymagana jest wartość zwracana!",
- customarray: "Funkcja niestandardowa powinna zwracać tablicę!",
- customfcheck: "Funkcja niestandardowa powinna być obecna w przypadku niestandardowego sprawdzania!"
- }
- },
- view : {
- caption: "Pokaż rekord",
- bClose: "Zamknij"
- },
- del : {
- caption: "Usuń",
- msg: "Czy usunąć wybrany rekord(y)?",
- bSubmit: "Usuń",
- bCancel: "Anuluj"
- },
- nav : {
- edittext: "",
- edittitle: "Edytuj wybrany wiersz",
- addtext: "",
- addtitle: "Dodaj nowy wiersz",
- deltext: "",
- deltitle: "Usuń wybrany wiersz",
- searchtext: "",
- searchtitle: "Wyszukaj rekord",
- refreshtext: "",
- refreshtitle: "Przeładuj",
- alertcap: "Uwaga",
- alerttext: "Proszę wybrać wiersz",
- viewtext: "",
- viewtitle: "Pokaż wybrany wiersz"
- },
- col : {
- caption: "Pokaż/Ukryj kolumny",
- bSubmit: "Zatwierdź",
- bCancel: "Anuluj"
- },
- errors : {
- errcap: "Błąd",
- nourl: "Brak adresu url",
- norecords: "Brak danych",
- model : "Długość colNames <> colModel!"
- },
- formatter : {
- integer : {thousandsSeparator: " ", defaultValue: '0'},
- number : {decimalSeparator:",", thousandsSeparator: " ", decimalPlaces: 2, defaultValue: '0,00'},
- currency : {decimalSeparator:",", thousandsSeparator: " ", decimalPlaces: 2, prefix: "", suffix:" zł", defaultValue: '0,00'},
- date : {
- dayNames: [
- "niedz.", "pon.", "wt.", "śr.", "czw.", "pt.", "sob.",
- "niedziela", "poniedziałek", "wtorek", "środa", "czwartek", "piątek", "sobota"
- ],
- monthNames: [
- "sty", "lut", "mar", "kwi", "maj", "cze", "lip", "sie", "wrz", "paź", "lis", "gru",
- "styczeń", "luty", "marzec", "kwiecień", "maj", "czerwiec", "lipiec", "sierpień", "wrzesień", "październik", "listopad", "grudzień"
- ],
- AmPm : ["","","",""],
- S: function (j) {return '';},
- srcformat: 'Y-m-d',
- newformat: 'd.m.Y',
- masks : {
- ISO8601Long: "Y-m-d H:i:s",
- ISO8601Short: "Y-m-d",
- ShortDate: "d.m.y",
- LongDate: "l, j F Y",
- FullDateTime: "l, j F Y H:i:s",
- MonthDay: "j F",
- ShortTime: "H:i",
- LongTime: "H:i:s",
- SortableDateTime: "Y-m-d\\TH:i:s",
- UniversalSortableDateTime: "Y-m-d H:i:sO",
- YearMonth: "F Y"
- },
- reformatAfterEdit : false
- },
- baseLinkUrl: '',
- showAction: '',
- target: '',
- checkbox : {disabled:true},
- idName : 'id'
- }
-});
+// %%Ignore-License
+;(function($){
+/**
+ * jqGrid Polish Translation
+ * Łukasz Schab lukasz(a)freetree.pl
+ * http://FreeTree.pl
+ *
+ * Updated names, abbreviations, currency and date/time formats for Polish norms (also corresponding with CLDR v21.0.1 --> http://cldr.unicode.org/index)
+ * Tomasz Pęczek tpeczek(a)gmail.com
+ * http://tpeczek.blogspot.com; http://tpeczek.codeplex.com
+ *
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+**/
+$.jgrid = $.jgrid || {};
+$.extend($.jgrid,{
+ defaults : {
+ recordtext: "Pokaż {0} - {1} z {2}",
+ emptyrecords: "Brak rekordów do pokazania",
+ loadtext: "Ładowanie...",
+ pgtext : "Strona {0} z {1}"
+ },
+ search : {
+ caption: "Wyszukiwanie...",
+ Find: "Szukaj",
+ Reset: "Czyść",
+ odata: [{ oper:'eq', text:"dokładnie"},{ oper:'ne', text:"różne od"},{ oper:'lt', text:"mniejsze od"},{ oper:'le', text:"mniejsze lub równe"},{ oper:'gt', text:"większe od"},{ oper:'ge', text:"większe lub równe"},{ oper:'bw', text:"zaczyna się od"},{ oper:'bn', text:"nie zaczyna się od"},{ oper:'in', text:"jest w"},{ oper:'ni', text:"nie jest w"},{ oper:'ew', text:"kończy się na"},{ oper:'en', text:"nie kończy się na"},{ oper:'cn', text:"zawiera"},{ oper:'nc', text:"nie zawiera"}],
+ groupOps: [ { op: "AND", text: "oraz" }, { op: "OR", text: "lub" } ]
+ },
+ edit : {
+ addCaption: "Dodaj rekord",
+ editCaption: "Edytuj rekord",
+ bSubmit: "Zapisz",
+ bCancel: "Anuluj",
+ bClose: "Zamknij",
+ saveData: "Dane zostały zmienione! Zapisać zmiany?",
+ bYes: "Tak",
+ bNo: "Nie",
+ bExit: "Anuluj",
+ msg: {
+ required: "Pole jest wymagane",
+ number: "Proszę wpisać poprawną liczbę",
+ minValue: "wartość musi być większa lub równa od",
+ maxValue: "wartość musi być mniejsza lub równa od",
+ email: "nie jest poprawnym adresem e-mail",
+ integer: "Proszę wpisać poprawną liczbę",
+ date: "Proszę podaj poprawną datę",
+ url: "jest niewłaściwym adresem URL. Pamiętaj o prefiksie ('http://' lub 'https://')",
+ nodefined: " niezdefiniowane!",
+ novalue: " wymagana jest wartość zwracana!",
+ customarray: "Funkcja niestandardowa powinna zwracać tablicę!",
+ customfcheck: "Funkcja niestandardowa powinna być obecna w przypadku niestandardowego sprawdzania!"
+ }
+ },
+ view : {
+ caption: "Pokaż rekord",
+ bClose: "Zamknij"
+ },
+ del : {
+ caption: "Usuń",
+ msg: "Czy usunąć wybrany rekord(y)?",
+ bSubmit: "Usuń",
+ bCancel: "Anuluj"
+ },
+ nav : {
+ edittext: "",
+ edittitle: "Edytuj wybrany wiersz",
+ addtext: "",
+ addtitle: "Dodaj nowy wiersz",
+ deltext: "",
+ deltitle: "Usuń wybrany wiersz",
+ searchtext: "",
+ searchtitle: "Wyszukaj rekord",
+ refreshtext: "",
+ refreshtitle: "Przeładuj",
+ alertcap: "Uwaga",
+ alerttext: "Proszę wybrać wiersz",
+ viewtext: "",
+ viewtitle: "Pokaż wybrany wiersz"
+ },
+ col : {
+ caption: "Pokaż/Ukryj kolumny",
+ bSubmit: "Zatwierdź",
+ bCancel: "Anuluj"
+ },
+ errors : {
+ errcap: "Błąd",
+ nourl: "Brak adresu url",
+ norecords: "Brak danych",
+ model : "Długość colNames <> colModel!"
+ },
+ formatter : {
+ integer : {thousandsSeparator: " ", defaultValue: '0'},
+ number : {decimalSeparator:",", thousandsSeparator: " ", decimalPlaces: 2, defaultValue: '0,00'},
+ currency : {decimalSeparator:",", thousandsSeparator: " ", decimalPlaces: 2, prefix: "", suffix:" zł", defaultValue: '0,00'},
+ date : {
+ dayNames: [
+ "niedz.", "pon.", "wt.", "śr.", "czw.", "pt.", "sob.",
+ "niedziela", "poniedziałek", "wtorek", "środa", "czwartek", "piątek", "sobota"
+ ],
+ monthNames: [
+ "sty", "lut", "mar", "kwi", "maj", "cze", "lip", "sie", "wrz", "paź", "lis", "gru",
+ "styczeń", "luty", "marzec", "kwiecień", "maj", "czerwiec", "lipiec", "sierpień", "wrzesień", "październik", "listopad", "grudzień"
+ ],
+ AmPm : ["","","",""],
+ S: function (j) {return '';},
+ srcformat: 'Y-m-d',
+ newformat: 'd.m.Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
+ masks : {
+ ISO8601Long: "Y-m-d H:i:s",
+ ISO8601Short: "Y-m-d",
+ ShortDate: "d.m.y",
+ LongDate: "l, j F Y",
+ FullDateTime: "l, j F Y H:i:s",
+ MonthDay: "j F",
+ ShortTime: "H:i",
+ LongTime: "H:i:s",
+ SortableDateTime: "Y-m-d\\TH:i:s",
+ UniversalSortableDateTime: "Y-m-d H:i:sO",
+ YearMonth: "F Y"
+ },
+ reformatAfterEdit : false
+ },
+ baseLinkUrl: '',
+ showAction: '',
+ target: '',
+ checkbox : {disabled:true},
+ idName : 'id'
+ }
+});
})(jQuery);
\ No newline at end of file
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-pl.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-pt-br.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-pt-br.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-pt-br.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,6 @@
+// %%Ignore-License
;(function($){
/**
- * %%Ignore-License
* jqGrid Brazilian-Portuguese Translation
* Sergio Righi sergio.righi(a)gmail.com
* http://curve.com.br
@@ -23,10 +23,8 @@
caption: "Procurar...",
Find: "Procurar",
Reset: "Resetar",
- odata : ['igual', 'diferente', 'menor', 'menor ou igual','maior','maior ou igual', 'inicia com','não inicia com','está em','não está em','termina com','não termina com','contém','não contém','nulo','não nulo'],
- groupOps: [ { op: "AND", text: "all" }, { op: "OR", text: "any" } ],
- matchText: " igual a",
- rulesText: " regras"
+ odata: [{ oper:'eq', text:"igual"},{ oper:'ne', text:"diferente"},{ oper:'lt', text:"menor"},{ oper:'le', text:"menor ou igual"},{ oper:'gt', text:"maior"},{ oper:'ge', text:"maior ou igual"},{ oper:'bw', text:"inicia com"},{ oper:'bn', text:"não inicia com"},{ oper:'in', text:"está em"},{ oper:'ni', text:"não está em"},{ oper:'ew', text:"termina com"},{ oper:'en', text:"não termina com"},{ oper:'cn', text:"contém"},{ oper:'nc', text:"não contém"},{ oper:'nu', text:"nulo"},{ oper:'nn', text:"não nulo"}],
+ groupOps: [ { op: "AND", text: "all" }, { op: "OR", text: "any" } ]
},
edit : {
addCaption: "Incluir",
@@ -107,6 +105,7 @@
S: function (j) {return j < 11 || j > 13 ? ['º', 'º', 'º', 'º'][Math.min((j - 1) % 10, 3)] : 'º'},
srcformat: 'Y-m-d',
newformat: 'd/m/Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks : {
ISO8601Long:"Y-m-d H:i:s",
ISO8601Short:"Y-m-d",
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-pt-br.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-pt.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-pt.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-pt.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,6 @@
+// %%Ignore-License
;(function($){
/**
- * %%Ignore-License
* jqGrid Portuguese Translation
* Tradu��o da jqGrid em Portugues por Frederico Carvalho, http://www.eyeviewdesign.pt
* Dual licensed under the MIT and GPL licenses:
@@ -19,10 +19,8 @@
caption: "Busca...",
Find: "Procurar",
Reset: "Limpar",
- odata : ['equal', 'not equal', 'less', 'less or equal','greater','greater or equal', 'begins with','does not begin with','is in','is not in','ends with','does not end with','contains','does not contain'],
- groupOps: [ { op: "AND", text: "all" }, { op: "OR", text: "any" } ],
- matchText: " match",
- rulesText: " rules"
+ odata: [{ oper:'eq', text:'equal'},{ oper:'ne', text:'not equal'},{ oper:'lt', text:'less'},{ oper:'le', text:'less or equal'},{ oper:'gt', text:'greater'},{ oper:'ge', text:'greater or equal'},{ oper:'bw', text:'begins with'},{ oper:'bn', text:'does not begin with'},{ oper:'in', text:'is in'},{ oper:'ni', text:'is not in'},{ oper:'ew', text:'ends with'},{ oper:'en', text:'does not end with'},{ oper:'cn', text:'contains'},{ oper:'nc', text:'does not contain'}],
+ groupOps: [ { op: "AND", text: "all" }, { op: "OR", text: "any" } ]
},
edit : {
addCaption: "Adicionar Registo",
@@ -102,6 +100,7 @@
S: function (j) {return j < 11 || j > 13 ? ['�', '�', '�', '�'][Math.min((j - 1) % 10, 3)] : '�'},
srcformat: 'Y-m-d',
newformat: 'd/m/Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks : {
ISO8601Long:"Y-m-d H:i:s",
ISO8601Short:"Y-m-d",
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-pt.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ro.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ro.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ro.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,6 @@
+// %%Ignore-License
;(function($){
/**
- * %%Ignore-License
* jqGrid Romanian Translation
* Alexandru Emil Lupu contact(a)alecslupu.ro
* http://www.alecslupu.ro/
@@ -20,10 +20,8 @@
caption: "Caută...",
Find: "Caută",
Reset: "Resetare",
- odata : ['egal', 'diferit', 'mai mic', 'mai mic sau egal','mai mare','mai mare sau egal', 'începe cu','nu începe cu','se găsește în','nu se găsește în','se termină cu','nu se termină cu','conține',''],
- groupOps: [ { op: "AND", text: "toate" }, { op: "OR", text: "oricare" } ],
- matchText: " găsite",
- rulesText: " reguli"
+ odata: [{ oper:'eq', text:"egal"},{ oper:'ne', text:"diferit"},{ oper:'lt', text:"mai mic"},{ oper:'le', text:"mai mic sau egal"},{ oper:'gt', text:"mai mare"},{ oper:'ge', text:"mai mare sau egal"},{ oper:'bw', text:"începe cu"},{ oper:'bn', text:"nu începe cu"},{ oper:'in', text:"se găsește în"},{ oper:'ni', text:"nu se găsește în"},{ oper:'ew', text:"se termină cu"},{ oper:'en', text:"nu se termină cu"},{ oper:'cn', text:"conține"},{ oper:'nc', text:""}],
+ groupOps: [ { op: "AND", text: "toate" }, { op: "OR", text: "oricare" } ]
},
edit : {
addCaption: "Adăugare înregistrare",
@@ -116,6 +114,7 @@
S: function (j) {return j < 11 || j > 13 ? ['st', 'nd', 'rd', 'th'][Math.min((j - 1) % 10, 3)] : 'th'},
srcformat: 'Y-m-d',
newformat: 'd/m/Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks : {
ISO8601Long:"Y-m-d H:i:s",
ISO8601Short:"Y-m-d",
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ro.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ru.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ru.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ru.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,6 @@
+// %%Ignore-License
;(function($){
/**
- * %%Ignore-License
* jqGrid Russian Translation v1.0 02.07.2009 (based on translation by Alexey Kanaev v1.1 21.01.2009, http://softcore.com.ru)
* Sergey Dyagovchenko
* http://d.sumy.ua
@@ -20,10 +20,8 @@
caption: "Поиск...",
Find: "Найти",
Reset: "Сброс",
- odata : ['равно', 'не равно', 'меньше', 'меньше или равно','больше','больше или равно', 'начинается с','не начинается с','находится в','не находится в','заканчивается на','не заканчивается на','содержит','не содержит'],
- groupOps: [ { op: "AND", text: "все" }, { op: "OR", text: "любой" } ],
- matchText: " совпадает",
- rulesText: " правила"
+ odata: [{ oper:'eq', text:"равно"},{ oper:'ne', text:"не равно"},{ oper:'lt', text:"меньше"},{ oper:'le', text:"меньше или равно"},{ oper:'gt', text:"больше"},{ oper:'ge', text:"больше или равно"},{ oper:'bw', text:"начинается с"},{ oper:'bn', text:"не начинается с"},{ oper:'in', text:"находится в"},{ oper:'ni', text:"не находится в"},{ oper:'ew', text:"заканчивается на"},{ oper:'en', text:"не заканчивается на"},{ oper:'cn', text:"содержит"},{ oper:'nc', text:"не содержит"}],
+ groupOps: [ { op: "AND", text: "все" }, { op: "OR", text: "любой" } ]
},
edit : {
addCaption: "Добавить запись",
@@ -43,11 +41,11 @@
email: "некорректное значение e-mail",
integer: "Пожалуйста, введите целое число",
date: "Пожалуйста, введите правильную дату",
- url: "неверная ссылка. Необходимо ввести префикс ('http://' or 'https://')",
- nodefined : " is not defined!",
- novalue : " return value is required!",
- customarray : "Custom function should return array!",
- customfcheck : "Custom function should be present in case of custom checking!"
+ url: "неверная ссылка. Необходимо ввести префикс ('http://' или 'https://')",
+ nodefined : " не определено!",
+ novalue : " возвращаемое значение обязательно!",
+ customarray : "Пользовательская функция должна возвращать массив!",
+ customfcheck : "Пользовательская функция должна присутствовать в случаи пользовательской проверки!"
}
},
view : {
@@ -104,6 +102,7 @@
S: function (j) {return j < 11 || j > 13 ? ['st', 'nd', 'rd', 'th'][Math.min((j - 1) % 10, 3)] : 'th'},
srcformat: 'Y-m-d',
newformat: 'd.m.Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks : {
ISO8601Long:"Y-m-d H:i:s",
ISO8601Short:"Y-m-d",
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ru.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sk.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sk.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sk.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,6 @@
+// %%Ignore-License
;(function($){
/**
- * %%Ignore-License
* jqGrid Slovak Translation
* Milan Cibulka
* http://trirand.com/blog/
@@ -20,10 +20,8 @@
caption: "Vyhľadávam...",
Find: "Hľadať",
Reset: "Reset",
- odata : ['rovná sa', 'nerovná sa', 'menšie', 'menšie alebo rovnajúce sa','väčšie', 'väčšie alebo rovnajúce sa', 'začína s', 'nezačína s', 'je v', 'nie je v', 'končí s', 'nekončí s', 'obahuje', 'neobsahuje'],
- groupOps: [ { op: "AND", text: "všetkých" }, { op: "OR", text: "niektorého z" } ],
- matchText: " hľadať podla",
- rulesText: " pravidiel"
+ odata: [{ oper:'eq', text:"rovná sa"},{ oper:'ne', text:"nerovná sa"},{ oper:'lt', text:"menšie"},{ oper:'le', text:"menšie alebo rovnajúce sa"},{ oper:'gt', text:"väčšie"},{ oper:'ge', text:"väčšie alebo rovnajúce sa"},{ oper:'bw', text:"začína s"},{ oper:'bn', text:"nezačína s"},{ oper:'in', text:"je v"},{ oper:'ni', text:"nie je v"},{ oper:'ew', text:"končí s"},{ oper:'en', text:"nekončí s"},{ oper:'cn', text:"obahuje"},{ oper:'nc', text:"neobsahuje"}],
+ groupOps: [ { op: "AND", text: "všetkých" }, { op: "OR", text: "niektorého z" } ]
},
edit : {
addCaption: "Pridať záznam",
@@ -104,6 +102,7 @@
S: function (j) {return j < 11 || j > 13 ? ['st', 'nd', 'rd', 'th'][Math.min((j - 1) % 10, 3)] : 'th'},
srcformat: 'Y-m-d',
newformat: 'd/m/Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks : {
ISO8601Long:"Y-m-d H:i:s",
ISO8601Short:"Y-m-d",
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sk.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sr-latin.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sr-latin.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sr-latin.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,6 @@
+// %%Ignore-License
;(function($){
/**
- * %%Ignore-License
* jqGrid Serbian latin Translation
* Bild Studio info(a)bild-studio.net
* http://www.bild-studio.com
@@ -13,17 +13,15 @@
defaults : {
recordtext: "Pregled {0} - {1} od {2}",
emptyrecords: "Ne postoji nijedan zapis",
- loadtext: "Učitivanje...",
+ loadtext: "Učitavanje…",
pgtext : "Strana {0} od {1}"
},
search : {
caption: "Traženje...",
Find: "Traži",
Reset: "Resetuj",
- odata : ['jednako', 'nije jednako', 'manje', 'manje ili jednako','veće','veće ili jednako', 'počinje sa','ne počinje sa','je u','nije u','završava sa','ne završava sa','sadrži','ne sadrži'],
- groupOps: [ { op: "AND", text: "sva" }, { op: "OR", text: "bilo koje" } ],
- matchText: " primeni",
- rulesText: " pravila"
+ odata: [{ oper:'eq', text:"jednako"},{ oper:'ne', text:"nije jednako"},{ oper:'lt', text:"manje"},{ oper:'le', text:"manje ili jednako"},{ oper:'gt', text:"veće"},{ oper:'ge', text:"veće ili jednako"},{ oper:'bw', text:"počinje sa"},{ oper:'bn', text:"ne počinje sa"},{ oper:'in', text:"je u"},{ oper:'ni', text:"nije u"},{ oper:'ew', text:"završava sa"},{ oper:'en', text:"ne završava sa"},{ oper:'cn', text:"sadrži"},{ oper:'nc', text:"ne sadrži"}],
+ groupOps: [ { op: "AND", text: "sva" }, { op: "OR", text: "bilo koje" } ]
},
edit : {
addCaption: "Dodaj zapis",
@@ -105,6 +103,7 @@
S: function (j) {return j < 11 || j > 13 ? ['st', 'nd', 'rd', 'th'][Math.min((j - 1) % 10, 3)] : 'th'},
srcformat: 'Y-m-d',
newformat: 'd/m/Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks : {
ISO8601Long:"Y-m-d H:i:s",
ISO8601Short:"Y-m-d",
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sr-latin.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sr.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sr.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sr.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,6 @@
+// %%Ignore-License
;(function($){
/**
- * %%Ignore-License
* jqGrid Serbian Translation
* Александар Миловац(Aleksandar Milovac) aleksandar.milovac(a)gmail.com
* http://trirand.com/blog/
@@ -20,10 +20,8 @@
caption: "Тражење...",
Find: "Тражи",
Reset: "Ресетуј",
- odata : ['једнако', 'није једнако', 'мање', 'мање или једнако','веће','веће или једнако', 'почиње са','не почиње са','је у','није у','завршава са','не завршава са','садржи','не садржи'],
- groupOps: [ { op: "И", text: "сви" }, { op: "ИЛИ", text: "сваки" } ],
- matchText: " match",
- rulesText: " правила"
+ odata: [{ oper:'eq', text:"једнако"},{ oper:'ne', text:"није једнако"},{ oper:'lt', text:"мање"},{ oper:'le', text:"мање или једнако"},{ oper:'gt', text:"веће"},{ oper:'ge', text:"веће или једнако"},{ oper:'bw', text:"почиње са"},{ oper:'bn', text:"не почиње са"},{ oper:'in', text:"је у"},{ oper:'ni', text:"није у"},{ oper:'ew', text:"завршава са"},{ oper:'en', text:"не завршава са"},{ oper:'cn', text:"садржи"},{ oper:'nc', text:"не садржи"}],
+ groupOps: [ { op: "И", text: "сви" }, { op: "ИЛИ", text: "сваки" } ]
},
edit : {
addCaption: "Додај запис",
@@ -105,6 +103,7 @@
S: function (j) {return j < 11 || j > 13 ? ['st', 'nd', 'rd', 'th'][Math.min((j - 1) % 10, 3)] : 'th'},
srcformat: 'Y-m-d',
newformat: 'd/m/Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks : {
ISO8601Long:"Y-m-d H:i:s",
ISO8601Short:"Y-m-d",
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sr.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sv.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sv.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sv.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,6 @@
+// %%Ignore-License
;(function($){
/**
- * %%Ignore-License
* jqGrid Swedish Translation
* Harald Normann harald.normann(a)wts.se, harald.normann(a)gmail.com
* http://www.worldteamsoftware.com
@@ -20,10 +20,8 @@
caption: "Sök Poster - Ange sökvillkor",
Find: "Sök",
Reset: "Nollställ Villkor",
- odata : ['lika', 'ej lika', 'mindre', 'mindre eller lika','större','större eller lika', 'börjar med','börjar inte med','tillhör','tillhör inte','slutar med','slutar inte med','innehåller','innehåller inte'],
- groupOps: [ { op: "AND", text: "alla" }, { op: "OR", text: "eller" } ],
- matchText: " träff",
- rulesText: " regler"
+ odata: [{ oper:'eq', text:"lika"},{ oper:'ne', text:"ej lika"},{ oper:'lt', text:"mindre"},{ oper:'le', text:"mindre eller lika"},{ oper:'gt', text:"större"},{ oper:'ge', text:"större eller lika"},{ oper:'bw', text:"börjar med"},{ oper:'bn', text:"börjar inte med"},{ oper:'in', text:"tillhör"},{ oper:'ni', text:"tillhör inte"},{ oper:'ew', text:"slutar med"},{ oper:'en', text:"slutar inte med"},{ oper:'cn', text:"innehåller"},{ oper:'nc', text:"innehåller inte"}],
+ groupOps: [ { op: "AND", text: "alla" }, { op: "OR", text: "eller" } ]
},
edit : {
addCaption: "Ny Post",
@@ -104,6 +102,7 @@
S: function (j) {return j < 11 || j > 13 ? ['st', 'nd', 'rd', 'th'][Math.min((j - 1) % 10, 3)] : 'th'},
srcformat: 'Y-m-d',
newformat: 'Y-m-d',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks : {
ISO8601Long:"Y-m-d H:i:s",
ISO8601Short:"Y-m-d",
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sv.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-th.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-th.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-th.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,6 @@
+// %%Ignore-License
;(function($){
/**
- * %%Ignore-License
* jqGrid Thai Translation
* Kittituch Manakul m.kittituch(a)Gmail.com
* http://trirand.com/blog/
@@ -20,10 +20,8 @@
caption: "กำลังค้นหา...",
Find: "ค้นหา",
Reset: "คืนค่ากลับ",
- odata : ['เท่ากับ', 'ไม่เท่ากับ', 'น้อยกว่า', 'ไม่มากกว่า','มากกกว่า','ไม่น้อยกว่า', 'ขึ้นต้นด้วย','ไม่ขึ้นต้นด้วย','มีคำใดคำหนึ่งใน','ไม่มีคำใดคำหนึ่งใน','ลงท้ายด้วย','ไม่ลงท้ายด้วย','มีคำว่า','ไม่มีคำว่า'],
- groupOps: [ { op: "และ", text: "ทั้งหมด" }, { op: "หรือ", text: "ใดๆ" } ],
- matchText: " ตรงกันกับ",
- rulesText: " ตามกฏ"
+ odata: [{ oper:'eq', text:"เท่ากับ"},{ oper:'ne', text:"ไม่เท่ากับ"},{ oper:'lt', text:"น้อยกว่า"},{ oper:'le', text:"ไม่มากกว่า"},{ oper:'gt', text:"มากกกว่า"},{ oper:'ge', text:"ไม่น้อยกว่า"},{ oper:'bw', text:"ขึ้นต้นด้วย"},{ oper:'bn', text:"ไม่ขึ้นต้นด้วย"},{ oper:'in', text:"มีคำใดคำหนึ่งใน"},{ oper:'ni', text:"ไม่มีคำใดคำหนึ่งใน"},{ oper:'ew', text:"ลงท้ายด้วย"},{ oper:'en', text:"ไม่ลงท้ายด้วย"},{ oper:'cn', text:"มีคำว่า"},{ oper:'nc', text:"ไม่มีคำว่า"}],
+ groupOps: [ { op: "และ", text: "ทั้งหมด" }, { op: "หรือ", text: "ใดๆ" } ]
},
edit : {
addCaption: "เพิ่มข้อมูล",
@@ -105,6 +103,7 @@
S: function (j) {return ''},
srcformat: 'Y-m-d',
newformat: 'd/m/Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks : {
ISO8601Long:"Y-m-d H:i:s",
ISO8601Short:"Y-m-d",
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-th.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-tr.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-tr.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-tr.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,6 @@
+// %%Ignore-License
;(function($){
/**
- * %%Ignore-License
* jqGrid Turkish Translation
* Erhan Gündoğan (erhan(a)trposta.net)
* http://blog.zakkum.com
@@ -20,10 +20,8 @@
caption: "Arama...",
Find: "Bul",
Reset: "Temizle",
- odata : ['eşit', 'eşit değil', 'daha az', 'daha az veya eşit', 'daha fazla', 'daha fazla veya eşit', 'ile başlayan', 'ile başlamayan', 'içinde', 'içinde değil', 'ile biten', 'ile bitmeyen', 'içeren', 'içermeyen'],
- groupOps: [ { op: "VE", text: "tüm" }, { op: "VEYA", text: "herhangi" } ],
- matchText: " uyan",
- rulesText: " kurallar"
+ odata: [{ oper:'eq', text:"eşit"},{ oper:'ne', text:"eşit değil"},{ oper:'lt', text:"daha az"},{ oper:'le', text:"daha az veya eşit"},{ oper:'gt', text:"daha fazla"},{ oper:'ge', text:"daha fazla veya eşit"},{ oper:'bw', text:"ile başlayan"},{ oper:'bn', text:"ile başlamayan"},{ oper:'in', text:"içinde"},{ oper:'ni', text:"içinde değil"},{ oper:'ew', text:"ile biten"},{ oper:'en', text:"ile bitmeyen"},{ oper:'cn', text:"içeren"},{ oper:'nc', text:"içermeyen"}],
+ groupOps: [ { op: "VE", text: "tüm" }, { op: "VEYA", text: "herhangi" } ]
},
edit : {
addCaption: "Kayıt Ekle",
@@ -103,6 +101,7 @@
S: function (j) {return j < 11 || j > 13 ? ['st', 'nd', 'rd', 'th'][Math.min((j - 1) % 10, 3)] : 'th'},
srcformat: 'Y-m-d',
newformat: 'd/m/Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks : {
ISO8601Long:"Y-m-d H:i:s",
ISO8601Short:"Y-m-d",
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-tr.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-tw.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-tw.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-tw.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,6 @@
+// %%Ignore-License
;(function($){
/**
- * %%Ignore-License
* jqGrid Chinese (Taiwan) Translation for v4.2
* linquize
* https://github.com/linquize/jqGrid
@@ -21,10 +21,8 @@
caption: "搜尋...",
Find: "搜尋",
Reset: "重設",
- odata : ['等於 ', '不等於 ', '小於 ', '小於等於 ','大於 ','大於等於 ', '開始於 ','不開始於 ','在其中 ','不在其中 ','結束於 ','不結束於 ','包含 ','不包含 '],
- groupOps: [ { op: "AND", text: "所有" }, { op: "OR", text: "任一" } ],
- matchText: " 匹配",
- rulesText: " 規則"
+ odata: [{ oper:'eq', text:"等於 "},{ oper:'ne', text:"不等於 "},{ oper:'lt', text:"小於 "},{ oper:'le', text:"小於等於 "},{ oper:'gt', text:"大於 "},{ oper:'ge', text:"大於等於 "},{ oper:'bw', text:"開始於 "},{ oper:'bn', text:"不開始於 "},{ oper:'in', text:"在其中 "},{ oper:'ni', text:"不在其中 "},{ oper:'ew', text:"結束於 "},{ oper:'en', text:"不結束於 "},{ oper:'cn', text:"包含 "},{ oper:'nc', text:"不包含 "}],
+ groupOps: [ { op: "AND", text: "所有" }, { op: "OR", text: "任一" } ]
},
edit : {
addCaption: "新增記錄",
@@ -106,6 +104,7 @@
S: function (j) {return j < 11 || j > 13 ? ['st', 'nd', 'rd', 'th'][Math.min((j - 1) % 10, 3)] : 'th'},
srcformat: 'Y-m-d',
newformat: 'm-d-Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks : {
ISO8601Long:"Y-m-d H:i:s",
ISO8601Short:"Y-m-d",
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-tw.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ua.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ua.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ua.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,6 @@
+// %%Ignore-License
;(function($){
/**
- * %%Ignore-License
* jqGrid Ukrainian Translation v1.0 02.07.2009
* Sergey Dyagovchenko
* http://d.sumy.ua
@@ -20,10 +20,8 @@
caption: "Пошук...",
Find: "Знайти",
Reset: "Скидання",
- odata : ['рівно', 'не рівно', 'менше', 'менше або рівне','більше','більше або рівне', 'починається з','не починається з','знаходиться в','не знаходиться в','закінчується на','не закінчується на','містить','не містить'],
- groupOps: [ { op: "AND", text: "все" }, { op: "OR", text: "будь-який" } ],
- matchText: " збігається",
- rulesText: " правила"
+ odata: [{ oper:'eq', text:"рівно"},{ oper:'ne', text:"не рівно"},{ oper:'lt', text:"менше"},{ oper:'le', text:"менше або рівне"},{ oper:'gt', text:"більше"},{ oper:'ge', text:"більше або рівне"},{ oper:'bw', text:"починається з"},{ oper:'bn', text:"не починається з"},{ oper:'in', text:"знаходиться в"},{ oper:'ni', text:"не знаходиться в"},{ oper:'ew', text:"закінчується на"},{ oper:'en', text:"не закінчується на"},{ oper:'cn', text:"містить"},{ oper:'nc', text:"не містить"}],
+ groupOps: [ { op: "AND", text: "все" }, { op: "OR", text: "будь-який" } ]
},
edit : {
addCaption: "Додати запис",
@@ -104,6 +102,7 @@
S: function (j) {return j < 11 || j > 13 ? ['st', 'nd', 'rd', 'th'][Math.min((j - 1) % 10, 3)] : 'th'},
srcformat: 'Y-m-d',
newformat: 'd.m.Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
masks : {
ISO8601Long:"Y-m-d H:i:s",
ISO8601Short:"Y-m-d",
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ua.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-vi.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-vi.js (rev 0)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-vi.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -0,0 +1,169 @@
+// %%Ignore-License
+;(function($){
+/**
+ * jqGrid Vietnamese Translation
+ * Lê Đình Dũng dungtdc(a)gmail.com
+ * http://trirand.com/blog/
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+**/
+$.jgrid = $.jgrid || {};
+$.extend($.jgrid,{
+ defaults : {
+ recordtext: "View {0} - {1} of {2}",
+ emptyrecords: "Không có dữ liệu",
+ loadtext: "Đang nạp dữ liệu...",
+ pgtext : "Trang {0} trong tổng số {1}"
+ },
+ search : {
+ caption: "Tìm kiếm...",
+ Find: "Tìm",
+ Reset: "Khởi tạo lại",
+ odata: [{ oper:'eq', text:"bằng"},{ oper:'ne', text:"không bằng"},{ oper:'lt', text:"bé hơn"},{ oper:'le', text:"bé hơn hoặc bằng"},{ oper:'gt', text:"lớn hơn"},{ oper:'ge', text:"lớn hơn hoặc bằng"},{ oper:'bw', text:"bắt đầu với"},{ oper:'bn', text:"không bắt đầu với"},{ oper:'in', text:"trong"},{ oper:'ni', text:"không nằm trong"},{ oper:'ew', text:"kết thúc với"},{ oper:'en', text:"không kết thúc với"},{ oper:'cn', text:"chứa"},{ oper:'nc', text:"không chứa"}],
+ groupOps: [ { op: "VÀ", text: "tất cả" }, { op: "HOẶC", text: "bất kỳ" } ]
+ },
+ edit : {
+ addCaption: "Thêm bản ghi",
+ editCaption: "Sửa bản ghi",
+ bSubmit: "Gửi",
+ bCancel: "Hủy bỏ",
+ bClose: "Đóng",
+ saveData: "Dữ liệu đã thay đổi! Có lưu thay đổi không?",
+ bYes : "Có",
+ bNo : "Không",
+ bExit : "Hủy bỏ",
+ msg: {
+ required:"Trường dữ liệu bắt buộc có",
+ number:"Hãy điền đúng số",
+ minValue:"giá trị phải lớn hơn hoặc bằng với ",
+ maxValue:"giá trị phải bé hơn hoặc bằng",
+ email: "không phải là một email đúng",
+ integer: "Hãy điền đúng số nguyên",
+ date: "Hãy điền đúng ngày tháng",
+ url: "không phải là URL. Khởi đầu bắt buộc là ('http://' hoặc 'https://')",
+ nodefined : " chưa được định nghĩa!",
+ novalue : " giá trị trả về bắt buộc phải có!",
+ customarray : "Hàm nên trả về một mảng!",
+ customfcheck : "Custom function should be present in case of custom checking!"
+
+ }
+ },
+ view : {
+ caption: "Xem bản ghi",
+ bClose: "Đóng"
+ },
+ del : {
+ caption: "Xóa",
+ msg: "Xóa bản ghi đã chọn?",
+ bSubmit: "Xóa",
+ bCancel: "Hủy bỏ"
+ },
+ nav : {
+ edittext: "",
+ edittitle: "Sửa dòng đã chọn",
+ addtext:"",
+ addtitle: "Thêm mới 1 dòng",
+ deltext: "",
+ deltitle: "Xóa dòng đã chọn",
+ searchtext: "",
+ searchtitle: "Tìm bản ghi",
+ refreshtext: "",
+ refreshtitle: "Nạp lại lưới",
+ alertcap: "Cảnh báo",
+ alerttext: "Hãy chọn một dòng",
+ viewtext: "",
+ viewtitle: "Xem dòng đã chọn"
+ },
+ col : {
+ caption: "Chọn cột",
+ bSubmit: "OK",
+ bCancel: "Hủy bỏ"
+ },
+ errors : {
+ errcap : "Lỗi",
+ nourl : "không url được đặt",
+ norecords: "Không có bản ghi để xử lý",
+ model : "Chiều dài của colNames <> colModel!"
+ },
+ formatter : {
+ integer : {thousandsSeparator: ".", defaultValue: '0'},
+ number : {decimalSeparator:",", thousandsSeparator: ".", decimalPlaces: 2, defaultValue: '0'},
+ currency : {decimalSeparator:",", thousandsSeparator: ".", decimalPlaces: 2, prefix: "", suffix:"", defaultValue: '0'},
+ date : {
+ dayNames: [
+ "CN", "T2", "T3", "T4", "T5", "T6", "T7",
+ "Chủ nhật", "Thứ hai", "Thứ ba", "Thứ tư", "Thứ năm", "Thứ sáu", "Thứ bảy"
+ ],
+ monthNames: [
+ "Th1", "Th2", "Th3", "Th4", "Th5", "Th6", "Th7", "Th8", "Th9", "Th10", "Th11", "Th12",
+ "Tháng một", "Tháng hai", "Tháng ba", "Tháng tư", "Tháng năm", "Tháng sáu", "Tháng bảy", "Tháng tám", "Tháng chín", "Tháng mười", "Tháng mười một", "Tháng mười hai"
+ ],
+ AmPm : ["sáng","chiều","SÁNG","CHIỀU"],
+ S: function (j) {return j < 11 || j > 13 ? ['st', 'nd', 'rd', 'th'][Math.min((j - 1) % 10, 3)] : 'th';},
+ srcformat: 'Y-m-d',
+ newformat: 'n/j/Y',
+ parseRe : /[Tt\\\/:_;.,\t\s-]/,
+ masks : {
+ // see http://php.net/manual/en/function.date.php for PHP format used in jqGrid
+ // and see http://docs.jquery.com/UI/Datepicker/formatDate
+ // and https://github.com/jquery/globalize#dates for alternative formats used frequently
+ // one can find on https://github.com/jquery/globalize/tree/master/lib/cultures many
+ // information about date, time, numbers and currency formats used in different countries
+ // one should just convert the information in PHP format
+ ISO8601Long:"Y-m-d H:i:s",
+ ISO8601Short:"Y-m-d",
+ // short date:
+ // n - Numeric representation of a month, without leading zeros
+ // j - Day of the month without leading zeros
+ // Y - A full numeric representation of a year, 4 digits
+ // example: 3/1/2012 which means 1 March 2012
+ ShortDate: "n/j/Y", // in jQuery UI Datepicker: "M/d/yyyy"
+ // long date:
+ // l - A full textual representation of the day of the week
+ // F - A full textual representation of a month
+ // d - Day of the month, 2 digits with leading zeros
+ // Y - A full numeric representation of a year, 4 digits
+ LongDate: "l, F d, Y", // in jQuery UI Datepicker: "dddd, MMMM dd, yyyy"
+ // long date with long time:
+ // l - A full textual representation of the day of the week
+ // F - A full textual representation of a month
+ // d - Day of the month, 2 digits with leading zeros
+ // Y - A full numeric representation of a year, 4 digits
+ // g - 12-hour format of an hour without leading zeros
+ // i - Minutes with leading zeros
+ // s - Seconds, with leading zeros
+ // A - Uppercase Ante meridiem and Post meridiem (AM or PM)
+ FullDateTime: "l, F d, Y g:i:s A", // in jQuery UI Datepicker: "dddd, MMMM dd, yyyy h:mm:ss tt"
+ // month day:
+ // F - A full textual representation of a month
+ // d - Day of the month, 2 digits with leading zeros
+ MonthDay: "F d", // in jQuery UI Datepicker: "MMMM dd"
+ // short time (without seconds)
+ // g - 12-hour format of an hour without leading zeros
+ // i - Minutes with leading zeros
+ // A - Uppercase Ante meridiem and Post meridiem (AM or PM)
+ ShortTime: "g:i A", // in jQuery UI Datepicker: "h:mm tt"
+ // long time (with seconds)
+ // g - 12-hour format of an hour without leading zeros
+ // i - Minutes with leading zeros
+ // s - Seconds, with leading zeros
+ // A - Uppercase Ante meridiem and Post meridiem (AM or PM)
+ LongTime: "g:i:s A", // in jQuery UI Datepicker: "h:mm:ss tt"
+ SortableDateTime: "Y-m-d\\TH:i:s",
+ UniversalSortableDateTime: "Y-m-d H:i:sO",
+ // month with year
+ // Y - A full numeric representation of a year, 4 digits
+ // F - A full textual representation of a month
+ YearMonth: "F, Y" // in jQuery UI Datepicker: "MMMM, yyyy"
+ },
+ reformatAfterEdit : false
+ },
+ baseLinkUrl: '',
+ showAction: '',
+ target: '',
+ checkbox : {disabled:true},
+ idName : 'id'
+ }
+});
+})(jQuery);
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/jquery.jqGrid.src.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/jquery.jqGrid.src.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/jquery.jqGrid.src.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,3 +1,4 @@
+// %%Ignore-License
// ==ClosureCompiler==
// @compilation_level SIMPLE_OPTIMIZATIONS
@@ -2,12 +3,12 @@
/**
- * %%Ignore-License
- * @license jqGrid 4.4.1 - jQuery Grid
+ * @license jqGrid 4.5.2 - jQuery Grid
* Copyright (c) 2008, Tony Tomov, tony(a)trirand.com
* Dual licensed under the MIT and GPL licenses
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl-2.0.html
- * Date: 2012-08-28
+ * Date: 2013-05-21
*/
//jsHint options
-/*global document, window, jQuery, DOMParser, ActiveXObject, $, alert */
+/*jshint evil:true, eqeqeq:false, eqnull:true, devel:true */
+/*global jQuery */
@@ -17,9 +18,9 @@
"use strict";
$.jgrid = $.jgrid || {};
$.extend($.jgrid,{
- version : "4.4.1",
+ version : "4.5.2",
htmlDecode : function(value){
- if(value && (value==' ' || value==' ' || (value.length===1 && value.charCodeAt(0)===160))) { return "";}
+ if(value && (value===' ' || value===' ' || (value.length===1 && value.charCodeAt(0)===160))) { return "";}
return !value ? value : String(value).replace(/>/g, ">").replace(/</g, "<").replace(/"/g, '"').replace(/&/g, "&");
},
htmlEncode : function (value){
@@ -27,127 +28,221 @@
},
format : function(format){ //jqgformat
var args = $.makeArray(arguments).slice(1);
- if(format===undefined) { format = ""; }
+ if(format==null) { format = ""; }
return format.replace(/\{(\d+)\}/g, function(m, i){
return args[i];
});
},
+ msie : navigator.appName === 'Microsoft Internet Explorer',
+ msiever : function () {
+ var rv = -1;
+ var ua = navigator.userAgent;
+ var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
+ if (re.exec(ua) != null) {
+ rv = parseFloat( RegExp.$1 );
+ }
+ return rv;
+ },
getCellIndex : function (cell) {
var c = $(cell);
if (c.is('tr')) { return -1; }
c = (!c.is('td') && !c.is('th') ? c.closest("td,th") : c)[0];
- if ($.browser.msie) { return $.inArray(c, c.parentNode.cells); }
+ if ($.jgrid.msie) { return $.inArray(c, c.parentNode.cells); }
return c.cellIndex;
},
stripHtml : function(v) {
- v = v+"";
+ v = String(v);
var regexp = /<("[^"]*"|'[^']*'|[^'">])*>/gi;
if (v) {
v = v.replace(regexp,"");
return (v && v !== ' ' && v !== ' ') ? v.replace(/\"/g,"'") : "";
- } else {
+ }
return v;
- }
},
stripPref : function (pref, id) {
var obj = $.type( pref );
- if( obj == "string" || obj =="number") {
+ if( obj === "string" || obj === "number") {
pref = String(pref);
id = pref !== "" ? String(id).replace(String(pref), "") : id;
}
return id;
},
- stringToDoc : function (xmlString) {
- var xmlDoc;
- if(typeof xmlString !== 'string') { return xmlString; }
- try {
- var parser = new DOMParser();
- xmlDoc = parser.parseFromString(xmlString,"text/xml");
- }
- catch(e) {
- xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
- xmlDoc.async=false;
- xmlDoc.loadXML(xmlString);
- }
- return (xmlDoc && xmlDoc.documentElement && xmlDoc.documentElement.tagName != 'parsererror') ? xmlDoc : null;
- },
parse : function(jsonString) {
var js = jsonString;
- if (js.substr(0,9) == "while(1);") { js = js.substr(9); }
- if (js.substr(0,2) == "/*") { js = js.substr(2,js.length-4); }
+ if (js.substr(0,9) === "while(1);") { js = js.substr(9); }
+ if (js.substr(0,2) === "/*") { js = js.substr(2,js.length-4); }
if(!js) { js = "{}"; }
- return ($.jgrid.useJSON===true && typeof (JSON) === 'object' && typeof (JSON.parse) === 'function') ?
+ return ($.jgrid.useJSON===true && typeof JSON === 'object' && typeof JSON.parse === 'function') ?
JSON.parse(js) :
eval('(' + js + ')');
},
- parseDate : function(format, date) {
- var tsp = {m : 1, d : 1, y : 1970, h : 0, i : 0, s : 0, u:0},k,hl,dM, regdate = /[\\\/:_;.,\t\T\s-]/;
- if(date && date !== null && date !== undefined){
- date = $.trim(date);
- date = date.split(regdate);
- if ($.jgrid.formatter.date.masks[format] !== undefined) {
- format = $.jgrid.formatter.date.masks[format];
- }
- format = format.split(regdate);
- var dfmt = $.jgrid.formatter.date.monthNames;
- var afmt = $.jgrid.formatter.date.AmPm;
- var h12to24 = function(ampm, h){
- if (ampm === 0){ if (h === 12) { h = 0;} }
- else { if (h !== 12) { h += 12; } }
- return h;
- };
- for(k=0,hl=format.length;k<hl;k++){
- if(format[k] == 'M') {
- dM = $.inArray(date[k],dfmt);
- if(dM !== -1 && dM < 12){
- date[k] = dM+1;
- tsp.m = date[k];
- }
+ parseDate : function(format, date, newformat, opts) {
+ var token = /\\.|[dDjlNSwzWFmMntLoYyaABgGhHisueIOPTZcrU]/g,
+ timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,
+ timezoneClip = /[^-+\dA-Z]/g,
+ msDateRegExp = new RegExp("^\/Date\\((([-+])?[0-9]+)(([-+])([0-9]{2})([0-9]{2}))?\\)\/$"),
+ msMatch = ((typeof date === 'string') ? date.match(msDateRegExp): null),
+ pad = function (value, length) {
+ value = String(value);
+ length = parseInt(length,10) || 2;
+ while (value.length < length) { value = '0' + value; }
+ return value;
+ },
+ ts = {m : 1, d : 1, y : 1970, h : 0, i : 0, s : 0, u:0},
+ timestamp=0, dM, k,hl,
+ h12to24 = function(ampm, h){
+ if (ampm === 0){ if (h === 12) { h = 0;} }
+ else { if (h !== 12) { h += 12; } }
+ return h;
+ };
+ if(opts === undefined) {
+ opts = $.jgrid.formatter.date;
+ }
+ // old lang files
+ if(opts.parseRe === undefined ) {
+ opts.parseRe = /[Tt\\\/:_;.,\t\s-]/;
+ }
+ if( opts.masks.hasOwnProperty(format) ) { format = opts.masks[format]; }
+ if(date && date != null) {
+ if( !isNaN( date - 0 ) && String(format).toLowerCase() === "u") {
+ //Unix timestamp
+ timestamp = new Date( parseFloat(date)*1000 );
+ } else if(date.constructor === Date) {
+ timestamp = date;
+ // Microsoft date format support
+ } else if( msMatch !== null ) {
+ timestamp = new Date(parseInt(msMatch[1], 10));
+ if (msMatch[3]) {
+ var offset = Number(msMatch[5]) * 60 + Number(msMatch[6]);
+ offset *= ((msMatch[4] === '-') ? 1 : -1);
+ offset -= timestamp.getTimezoneOffset();
+ timestamp.setTime(Number(Number(timestamp) + (offset * 60 * 1000)));
}
- if(format[k] == 'F') {
- dM = $.inArray(date[k],dfmt);
- if(dM !== -1 && dM > 11){
- date[k] = dM+1-12;
- tsp.m = date[k];
+ } else {
+ date = String(date).replace(/\\T/g,"T").replace(/\\t/,"t").split(opts.parseRe);
+ format = format.replace(/\\T/g,"T").replace(/\\t/,"t").split(opts.parseRe);
+ // parsing for month names
+ for(k=0,hl=format.length;k<hl;k++){
+ if(format[k] === 'M') {
+ dM = $.inArray(date[k],opts.monthNames);
+ if(dM !== -1 && dM < 12){date[k] = dM+1; ts.m = date[k];}
}
- }
- if(format[k] == 'a') {
- dM = $.inArray(date[k],afmt);
- if(dM !== -1 && dM < 2 && date[k] == afmt[dM]){
- date[k] = dM;
- tsp.h = h12to24(date[k], tsp.h);
+ if(format[k] === 'F') {
+ dM = $.inArray(date[k],opts.monthNames,12);
+ if(dM !== -1 && dM > 11){date[k] = dM+1-12; ts.m = date[k];}
}
- }
- if(format[k] == 'A') {
- dM = $.inArray(date[k],afmt);
- if(dM !== -1 && dM > 1 && date[k] == afmt[dM]){
- date[k] = dM-2;
- tsp.h = h12to24(date[k], tsp.h);
+ if(format[k] === 'a') {
+ dM = $.inArray(date[k],opts.AmPm);
+ if(dM !== -1 && dM < 2 && date[k] === opts.AmPm[dM]){
+ date[k] = dM;
+ ts.h = h12to24(date[k], ts.h);
+ }
}
+ if(format[k] === 'A') {
+ dM = $.inArray(date[k],opts.AmPm);
+ if(dM !== -1 && dM > 1 && date[k] === opts.AmPm[dM]){
+ date[k] = dM-2;
+ ts.h = h12to24(date[k], ts.h);
+ }
+ }
+ if (format[k] === 'g') {
+ ts.h = parseInt(date[k], 10);
+ }
+ if(date[k] !== undefined) {
+ ts[format[k].toLowerCase()] = parseInt(date[k],10);
+ }
}
- if (format[k] === 'g') {
- tsp.h = parseInt(date[k], 10);
+ if(ts.f) {ts.m = ts.f;}
+ if( ts.m === 0 && ts.y === 0 && ts.d === 0) {
+ return " " ;
}
- if(date[k] !== undefined) {
- tsp[format[k].toLowerCase()] = parseInt(date[k],10);
- }
+ ts.m = parseInt(ts.m,10)-1;
+ var ty = ts.y;
+ if (ty >= 70 && ty <= 99) {ts.y = 1900+ts.y;}
+ else if (ty >=0 && ty <=69) {ts.y= 2000+ts.y;}
+ timestamp = new Date(ts.y, ts.m, ts.d, ts.h, ts.i, ts.s, ts.u);
}
- tsp.m = parseInt(tsp.m,10)-1;
- var ty = tsp.y;
- if (ty >= 70 && ty <= 99) {tsp.y = 1900+tsp.y;}
- else if (ty >=0 && ty <=69) {tsp.y= 2000+tsp.y;}
- if(tsp.j !== undefined) { tsp.d = tsp.j; }
- if(tsp.n !== undefined) { tsp.m = parseInt(tsp.n,10)-1; }
+ } else {
+ timestamp = new Date(ts.y, ts.m, ts.d, ts.h, ts.i, ts.s, ts.u);
}
- return new Date(tsp.y, tsp.m, tsp.d, tsp.h, tsp.i, tsp.s, tsp.u);
+ if( newformat === undefined ) {
+ return timestamp;
+ }
+ if( opts.masks.hasOwnProperty(newformat) ) {
+ newformat = opts.masks[newformat];
+ } else if ( !newformat ) {
+ newformat = 'Y-m-d';
+ }
+ var
+ G = timestamp.getHours(),
+ i = timestamp.getMinutes(),
+ j = timestamp.getDate(),
+ n = timestamp.getMonth() + 1,
+ o = timestamp.getTimezoneOffset(),
+ s = timestamp.getSeconds(),
+ u = timestamp.getMilliseconds(),
+ w = timestamp.getDay(),
+ Y = timestamp.getFullYear(),
+ N = (w + 6) % 7 + 1,
+ z = (new Date(Y, n - 1, j) - new Date(Y, 0, 1)) / 86400000,
+ flags = {
+ // Day
+ d: pad(j),
+ D: opts.dayNames[w],
+ j: j,
+ l: opts.dayNames[w + 7],
+ N: N,
+ S: opts.S(j),
+ //j < 11 || j > 13 ? ['st', 'nd', 'rd', 'th'][Math.min((j - 1) % 10, 3)] : 'th',
+ w: w,
+ z: z,
+ // Week
+ W: N < 5 ? Math.floor((z + N - 1) / 7) + 1 : Math.floor((z + N - 1) / 7) || ((new Date(Y - 1, 0, 1).getDay() + 6) % 7 < 4 ? 53 : 52),
+ // Month
+ F: opts.monthNames[n - 1 + 12],
+ m: pad(n),
+ M: opts.monthNames[n - 1],
+ n: n,
+ t: '?',
+ // Year
+ L: '?',
+ o: '?',
+ Y: Y,
+ y: String(Y).substring(2),
+ // Time
+ a: G < 12 ? opts.AmPm[0] : opts.AmPm[1],
+ A: G < 12 ? opts.AmPm[2] : opts.AmPm[3],
+ B: '?',
+ g: G % 12 || 12,
+ G: G,
+ h: pad(G % 12 || 12),
+ H: pad(G),
+ i: pad(i),
+ s: pad(s),
+ u: u,
+ // Timezone
+ e: '?',
+ I: '?',
+ O: (o > 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4),
+ P: '?',
+ T: (String(timestamp).match(timezone) || [""]).pop().replace(timezoneClip, ""),
+ Z: '?',
+ // Full Date/Time
+ c: '?',
+ r: '?',
+ U: Math.floor(timestamp / 1000)
+ };
+ return newformat.replace(token, function ($0) {
+ return flags.hasOwnProperty($0) ? flags[$0] : $0.substring(1);
+ });
},
jqID : function(sid){
- return String(sid).replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g,"\\$&");
+ return String(sid).replace(/[!"#$%&'()*+,.\/:; <=>?@\[\\\]\^`{|}~]/g,"\\$&");
},
guid : 1,
uidPref: 'jqg',
randId : function( prefix ) {
- return (prefix? prefix: $.jgrid.uidPref) + ($.jgrid.guid++);
+ return (prefix || $.jgrid.uidPref) + ($.jgrid.guid++);
},
getAccessor : function(obj, expr) {
var ret,p,prm = [], i;
@@ -171,19 +266,18 @@
return ret;
},
getXmlData: function (obj, expr, returnObj) {
- var ret, m = typeof (expr) === 'string' ? expr.match(/^(.*)\[(\w+)\]$/) : null;
- if (typeof (expr) === 'function') { return expr(obj); }
+ var ret, m = typeof expr === 'string' ? expr.match(/^(.*)\[(\w+)\]$/) : null;
+ if (typeof expr === 'function') { return expr(obj); }
if (m && m[2]) {
// m[2] is the attribute selector
// m[1] is an optional element selector
// examples: "[id]", "rows[page]"
return m[1] ? $(m[1], obj).attr(m[2]) : $(obj).attr(m[2]);
- } else {
+ }
ret = $(expr, obj);
if (returnObj) { return ret; }
//$(expr, obj).filter(':last'); // we use ':last' to be more compatible with old version of jqGrid
return ret.length > 0 ? $(ret).text() : undefined;
- }
},
cellWidth : function () {
var $testDiv = $("<div class='ui-jqgrid' style='left:10000px'><table class='ui-jqgrid-btable' style='width:5px;'><tr class='jqgrow'><td style='width:5px;'></td></tr></table></div>"),
@@ -193,12 +287,13 @@
$testDiv.remove();
return testCell !== 5;
},
+ cell_width : true,
ajaxOptions: {},
from : function(source){
// Original Author Hugo Bonacci
// License MIT http://jlinq.codeplex.com/license
var QueryObject=function(d,q){
- if(typeof(d)=="string"){
+ if(typeof d==="string"){
d=$.data(d);
}
var self=this,
@@ -214,9 +309,9 @@
_queuedOperator="",
_sorting=[],
_useProperties=true;
- if(typeof(d)=="object"&&d.push) {
+ if(typeof d==="object"&&d.push) {
if(d.length>0){
- if(typeof(d[0])!="object"){
+ if(typeof d[0]!=="object"){
_useProperties=false;
}else{
_useProperties=true;
@@ -243,11 +338,10 @@
return phrase.join("");
};
this._strComp=function(val){
- if(typeof(val)=="string"){
+ if(typeof val==="string"){
return".toString()";
- }else{
- return"";
}
+ return"";
};
this._group=function(f,u){
return({field:f.toString(),unique:u,items:[]});
@@ -328,9 +422,9 @@
if (a > b) { return d; }
return 0;
}
- if(!_usecase && typeof(a) !== "number" && typeof(b) !== "number" ) {
- a=String(a).toLowerCase();
- b=String(b).toLowerCase();
+ if(!_usecase && typeof a !== "number" && typeof b !== "number" ) {
+ a=String(a);
+ b=String(b);
}
if(a<b){return -d;}
if(a>b){return d;}
@@ -345,35 +439,34 @@
dir=_sorting[q].dir,
type = _sorting[q].type,
dfmt = _sorting[q].datefmt;
- if(q==_sorting.length-1){
+ if(q===_sorting.length-1){
return self._getOrder(d, by, dir, type, dfmt);
}
q++;
- var values=self._getGroup(d,by,dir,type,dfmt);
- var results=[];
- for(var i=0;i<values.length;i++){
- var sorted=self._doSort(values[i].items,q);
- for(var j=0;j<sorted.length;j++){
+ var values=self._getGroup(d,by,dir,type,dfmt), results=[], i, j, sorted;
+ for(i=0;i<values.length;i++){
+ sorted=self._doSort(values[i].items,q);
+ for(j=0;j<sorted.length;j++){
results.push(sorted[j]);
}
}
return results;
};
this._getOrder=function(data,by,dir,type, dfmt){
- var sortData=[],_sortData=[], newDir = dir=="a" ? 1 : -1, i,ab,j,
+ var sortData=[],_sortData=[], newDir = dir==="a" ? 1 : -1, i,ab,j,
findSortKey;
if(type === undefined ) { type = "text"; }
- if (type == 'float' || type== 'number' || type== 'currency' || type== 'numeric') {
+ if (type === 'float' || type=== 'number' || type=== 'currency' || type=== 'numeric') {
findSortKey = function($cell) {
var key = parseFloat( String($cell).replace(_stripNum, ''));
return isNaN(key) ? 0.00 : key;
};
- } else if (type=='int' || type=='integer') {
+ } else if (type==='int' || type==='integer') {
findSortKey = function($cell) {
return $cell ? parseFloat(String($cell).replace(_stripNum, '')) : 0;
};
- } else if(type == 'date' || type == 'datetime') {
+ } else if(type === 'date' || type === 'datetime') {
findSortKey = function($cell) {
return $.jgrid.parseDate(dfmt,$cell).getTime();
};
@@ -381,8 +474,8 @@
findSortKey = type;
} else {
findSortKey = function($cell) {
- if(!$cell) {$cell ="";}
- return $.trim(String($cell).toUpperCase());
+ $cell = $cell ? $.trim(String($cell)) : "";
+ return _usecase ? $cell : $cell.toLowerCase();
};
}
$.each(data,function(i,v){
@@ -413,7 +506,7 @@
last=null, val;
$.each(self._getOrder(data,by,dir,type, dfmt),function(i,v){
val = $.jgrid.getAccessor(v, by);
- if(val === undefined) { val = ""; }
+ if(val == null) { val = ""; }
if(!self._equals(last,val)){
last=val;
if(group !== null){
@@ -582,7 +675,7 @@
return self._compareValues(self.lessOrEquals,f,v,"<=",t);
};
this.startsWith=function(f,v){
- var val = (v===undefined || v===null) ? f: v,
+ var val = (v==null) ? f: v,
length=_trim ? $.trim(val.toString()).length : val.toString().length;
if(_useProperties){
self._append(self._getStr('jQuery.jgrid.getAccessor(this,\''+f+'\')')+'.substr(0,'+length+') == '+self._getStr('"'+self._toStr(v)+'"'));
@@ -595,7 +688,7 @@
return self;
};
this.endsWith=function(f,v){
- var val = (v===undefined || v===null) ? f: v,
+ var val = (v==null) ? f: v,
length=_trim ? $.trim(val.toString()).length:val.toString().length;
if(_useProperties){
self._append(self._getStr('jQuery.jgrid.getAccessor(this,\''+f+'\')')+'.substr('+self._getStr('jQuery.jgrid.getAccessor(this,\''+f+'\')')+'.length-'+length+','+length+') == "'+self._toStr(v)+'"');
@@ -622,11 +715,11 @@
return self._getGroup(_data,by,dir,type, datefmt);
};
this.orderBy=function(by,dir,stype, dfmt){
- dir = dir === undefined || dir === null ? "a" :$.trim(dir.toString().toLowerCase());
- if(stype === null || stype === undefined) { stype = "text"; }
- if(dfmt === null || dfmt === undefined) { dfmt = "Y-m-d"; }
- if(dir=="desc"||dir=="descending"){dir="d";}
- if(dir=="asc"||dir=="ascending"){dir="a";}
+ dir = dir == null ? "a" :$.trim(dir.toString().toLowerCase());
+ if(stype == null) { stype = "text"; }
+ if(dfmt == null) { dfmt = "Y-m-d"; }
+ if(dir==="desc"||dir==="descending"){dir="d";}
+ if(dir==="asc"||dir==="ascending"){dir="a";}
_sorting.push({by:by,dir:dir,type:stype, datefmt: dfmt});
return self;
};
@@ -634,6 +727,9 @@
};
return new QueryObject(source,null);
},
+ getMethod: function (name) {
+ return this.getAccessor($.fn.jqGrid, name);
+ },
extend : function(methods) {
$.extend($.fn.jqGrid,methods);
if (!this.no_legacy_api) {
@@ -643,9 +739,8 @@
});
$.fn.jqGrid = function( pin ) {
- if (typeof pin == 'string') {
- //var fn = $.fn.jqGrid[pin];
- var fn = $.jgrid.getAccessor($.fn.jqGrid,pin);
+ if (typeof pin === 'string') {
+ var fn = $.jgrid.getMethod(pin);
if (!fn) {
throw ("jqGrid - No such method: " + pin);
}
@@ -691,6 +786,7 @@
onRightClickRow: null,
onPaging: null,
onSelectAll: null,
+ onInitGrid : null,
loadComplete: null,
gridComplete: null,
loadError: null,
@@ -754,10 +850,11 @@
data : [],
_index : {},
grouping : false,
- groupingView : {groupField:[],groupOrder:[], groupText:[],groupColumnShow:[],groupSummary:[], showSummaryOnHide: false, sortitems:[], sortnames:[], summary:[],summaryval:[], plusicon: 'ui-icon-circlesmall-plus', minusicon: 'ui-icon-circlesmall-minus'},
+ groupingView : {groupField:[],groupOrder:[], groupText:[],groupColumnShow:[],groupSummary:[], showSummaryOnHide: false, sortitems:[], sortnames:[], summary:[],summaryval:[], plusicon: 'ui-icon-circlesmall-plus', minusicon: 'ui-icon-circlesmall-minus', displayField: []},
ignoreCase : false,
cmTemplate : {},
- idPrefix : ""
+ idPrefix : "",
+ multiSort : false
}, $.jgrid.defaults, pin || {});
var ts= this, grid={
headers:[],
@@ -769,7 +866,7 @@
this.curGbox = $("#rs_m"+$.jgrid.jqID(p.id),"#gbox_"+$.jgrid.jqID(p.id));
this.curGbox.css({display:"block",left:y[0],top:y[1],height:y[2]});
$(ts).triggerHandler("jqGridResizeStart", [x, i]);
- if($.isFunction(p.resizeStart)) { p.resizeStart.call(this,x,i); }
+ if($.isFunction(p.resizeStart)) { p.resizeStart.call(ts,x,i); }
document.onselectstart=function(){return false;};
},
dragMove: function(x) {
@@ -824,7 +921,7 @@
}
}
$(ts).triggerHandler("jqGridResizeStop", [nw, idx]);
- if($.isFunction(p.resizeStop)) { p.resizeStop.call(this,nw,idx); }
+ if($.isFunction(p.resizeStop)) { p.resizeStop.call(ts,nw,idx); }
}
this.curGbox = null;
document.onselectstart=function(){return true;};
@@ -869,7 +966,7 @@
empty = true;
}
if (npage) {
- if (p.lastpage && page > p.lastpage || p.lastpage==1 || (page === p.page && page===p.lastpage) ) {
+ if (p.lastpage && (page > p.lastpage || p.lastpage===1 || (page === p.page && page===p.lastpage)) ) {
return;
}
if (grid.hDiv.loading) {
@@ -888,7 +985,7 @@
if(p.scroll) {
var scrollTop = grid.bDiv.scrollTop;
if(grid.scrollTop === undefined) { grid.scrollTop = 0; }
- if (scrollTop != grid.scrollTop) {
+ if (scrollTop !== grid.scrollTop) {
grid.scrollTop = scrollTop;
if (grid.timer) { clearTimeout(grid.timer); }
grid.timer = setTimeout(grid.populateVisible, p.scrollTimeout);
@@ -910,7 +1007,7 @@
p.selarrrow = [];
if(p.multiselect && sra && sra.length>0) {
for(i=0;i<sra.length;i++){
- if (sra[i] != sr) {
+ if (sra[i] !== sr) {
$(ts).jqGrid("setSelection",sra[i],false, null);
}
}
@@ -924,7 +1021,7 @@
$(ts).bind('jqGridGridComplete.selectionPreserver', restoreSelection);
}
};
- if(this.tagName.toUpperCase()!='TABLE') {
+ if(this.tagName.toUpperCase() !== 'TABLE') {
alert("Element is not a table");
return;
}
@@ -934,7 +1031,7 @@
return;
}
}
- $(this).empty().attr("tabindex","1");
+ $(this).empty().attr("tabindex","0");
this.p = p ;
this.p.useProp = !!$.fn.prop;
var i, dir;
@@ -947,28 +1044,25 @@
alert($.jgrid.errors.model);
return;
}
- var gv = $("<div class='ui-jqgrid-view'></div>"), ii,
- isMSIE = $.browser.msie ? true:false;
+ var gv = $("<div class='ui-jqgrid-view'></div>"),
+ isMSIE = $.jgrid.msie;
ts.p.direction = $.trim(ts.p.direction.toLowerCase());
- if($.inArray(ts.p.direction,["ltr","rtl"]) == -1) { ts.p.direction = "ltr"; }
+ if($.inArray(ts.p.direction,["ltr","rtl"]) === -1) { ts.p.direction = "ltr"; }
dir = ts.p.direction;
$(gv).insertBefore(this);
- $(this).appendTo(gv).removeClass("scroll");
+ $(this).removeClass("scroll").appendTo(gv);
var eg = $("<div class='ui-jqgrid ui-widget ui-widget-content ui-corner-all'></div>");
- $(eg).insertBefore(gv).attr({"id" : "gbox_"+this.id,"dir":dir});
- $(gv).appendTo(eg).attr("id","gview_"+this.id);
- if (isMSIE && $.browser.version <= 6) {
- ii = '<iframe style="display:block;position:absolute;z-index:-1;filter:Alpha(Opacity=\'0\');" src="javascript:false;"></iframe>';
- } else { ii="";}
- $("<div class='ui-widget-overlay jqgrid-overlay' id='lui_"+this.id+"'></div>").append(ii).insertBefore(gv);
+ $(eg).attr({"id" : "gbox_"+this.id,"dir":dir}).insertBefore(gv);
+ $(gv).attr("id","gview_"+this.id).appendTo(eg);
+ $("<div class='ui-widget-overlay jqgrid-overlay' id='lui_"+this.id+"'></div>").insertBefore(gv);
$("<div class='loading ui-state-default ui-state-active' id='load_"+this.id+"'>"+this.p.loadtext+"</div>").insertBefore(gv);
$(this).attr({cellspacing:"0",cellpadding:"0",border:"0","role":"grid","aria-multiselectable":!!this.p.multiselect,"aria-labelledby":"gbox_"+this.id});
var sortkeys = ["shiftKey","altKey","ctrlKey"],
intNum = function(val,defval) {
val = parseInt(val,10);
- if (isNaN(val)) { return defval ? defval : 0;}
- else {return val;}
+ if (isNaN(val)) { return defval || 0;}
+ return val;
},
formatCol = function (pos, rowInd, tv, rawObject, rowId, rdata){
var cm = ts.p.colModel[pos],
@@ -980,11 +1074,11 @@
} else if (cm.cellattr && $.isFunction(cm.cellattr))
{
celp = cm.cellattr.call(ts, rowId, tv, rawObject, cm, rdata);
- if(celp && typeof(celp) === "string") {
+ if(celp && typeof celp === "string") {
celp = celp.replace(/style/i,'style').replace(/title/i,'title');
if(celp.indexOf('title') > -1) { cm.title=false;}
if(celp.indexOf('class') > -1) { clas = undefined;}
- acp = celp.split("style");
+ acp = celp.split(/[^-]style/);
if(acp.length === 2 ) {
acp[1] = $.trim(acp[1].replace("=",""));
if(acp[1].indexOf("'") === 0 || acp[1].indexOf('"') === 0) {
@@ -1002,11 +1096,12 @@
return result + acp[0];
},
cellVal = function (val) {
- return val === undefined || val === null || val === "" ? " " : (ts.p.autoencode ? $.jgrid.htmlEncode(val) : val+"");
+ return val == null || val === "" ? " " : (ts.p.autoencode ? $.jgrid.htmlEncode(val) : String(val));
},
formatter = function (rowId, cellval , colpos, rwdat, _act){
var cm = ts.p.colModel[colpos],v;
- if(typeof cm.formatter !== 'undefined') {
+ if(cm.formatter !== undefined) {
+ rowId = String(ts.p.idPrefix) !== "" ? $.jgrid.stripPref(ts.p.idPrefix, rowId) : rowId;
var opts= {rowId: rowId, colModel:cm, gid:ts.p.id, pos:colpos };
if($.isFunction( cm.formatter ) ) {
v = cm.formatter.call(ts,cellval,opts,rwdat,_act);
@@ -1020,14 +1115,14 @@
}
return v;
},
- addCell = function(rowId,cell,pos,irow, srvr) {
+ addCell = function(rowId,cell,pos,irow, srvr, rdata) {
var v,prp;
v = formatter(rowId,cell,pos,srvr,'add');
- prp = formatCol( pos,irow, v, srvr, rowId, true);
+ prp = formatCol( pos,irow, v, srvr, rowId, rdata);
return "<td role=\"gridcell\" "+prp+">"+v+"</td>";
},
addMulti = function(rowid,pos,irow,checked){
- var v = "<input role=\"checkbox\" type=\"checkbox\""+" id=\"jqg_"+ts.p.id+"_"+rowid+"\" class=\"cbox\" name=\"jqg_"+ts.p.id+"_"+rowid+"\"" + ((checked) ? "checked=\"checked\"" : "")+"/>",
+ var v = "<input role=\"checkbox\" type=\"checkbox\""+" id=\"jqg_"+ts.p.id+"_"+rowid+"\" class=\"cbox\" name=\"jqg_"+ts.p.id+"_"+rowid+"\"" + (checked ? "checked=\"checked\"" : "")+"/>",
prp = formatCol( pos,irow,'',null, rowid, true);
return "<td role=\"gridcell\" "+prp+">"+v+"</td>";
},
@@ -1041,9 +1136,9 @@
for(i =0; i<ts.p.colModel.length; i++){
field = ts.p.colModel[i];
if (field.name !== 'cb' && field.name !=='subgrid' && field.name !=='rn') {
- f[j]= datatype == "local" ?
+ f[j]= datatype === "local" ?
field.name :
- ( (datatype=="xml" || datatype === "xmlstring") ? field.xmlmap || field.name : field.jsonmap || field.name );
+ ( (datatype==="xml" || datatype === "xmlstring") ? field.xmlmap || field.name : field.jsonmap || field.name );
j++;
}
}
@@ -1091,13 +1186,17 @@
}
for(i =0;i < datalen; i++) {
val = $.jgrid.getAccessor(ts.p.data[i],idname);
+ if (val === undefined) { val=String(i+1); }
ts.p._index[val] = i;
}
},
constructTr = function(id, hide, altClass, rd, cur, selected) {
var tabindex = '-1', restAttr = '', attrName, style = hide ? 'display:none;' : '',
- classes = 'ui-widget-content jqgrow ui-row-' + ts.p.direction + altClass + ((selected) ? ' ui-state-highlight' : ''),
- rowAttrObj = $.isFunction(ts.p.rowattr) ? ts.p.rowattr.call(ts, rd, cur) : {};
+ classes = 'ui-widget-content jqgrow ui-row-' + ts.p.direction + (altClass ? ' ' + altClass : '') + (selected ? ' ui-state-highlight' : ''),
+ rowAttrObj = $(ts).triggerHandler("jqGridRowAttr", [rd, cur, id]);
+ if( typeof rowAttrObj !== "object" ) {
+ rowAttrObj = $.isFunction(ts.p.rowattr) ? ts.p.rowattr.call(ts, rd, cur, id) :{};
+ }
if(!$.isEmptyObject( rowAttrObj )) {
if (rowAttrObj.hasOwnProperty("id")) {
id = rowAttrObj.id;
@@ -1128,9 +1227,9 @@
},
addXmlData = function (xml,t, rcnt, more, adjust) {
var startReq = new Date(),
- locdata = (ts.p.datatype != "local" && ts.p.loadonce) || ts.p.datatype == "xmlstring",
+ locdata = (ts.p.datatype !== "local" && ts.p.loadonce) || ts.p.datatype === "xmlstring",
xmlid = "_id_", xmlRd = ts.p.xmlReader,
- frd = ts.p.datatype == "local" ? "local" : "xml";
+ frd = ts.p.datatype === "local" ? "local" : "xml";
if(locdata) {
ts.p.data = [];
ts.p._index = {};
@@ -1143,7 +1242,11 @@
rcnt=1;
} else { rcnt = rcnt > 1 ? rcnt :1; }
} else { return; }
- var i,fpos,ir=0,v,gi=ts.p.multiselect===true?1:0,si=ts.p.subGrid===true?1:0,ni=ts.p.rownumbers===true?1:0,idn, getId,f=[],F,rd ={}, xmlr,rid, rowData=[], cn=(ts.p.altRows === true) ? " "+ts.p.altclass:"",cn1;
+ var self= $(ts), i,fpos,ir=0,v,gi=ts.p.multiselect===true?1:0,si=0,addSubGridCell,ni=ts.p.rownumbers===true?1:0,idn, getId,f=[],F,rd ={}, xmlr,rid, rowData=[], cn=(ts.p.altRows === true) ? ts.p.altclass:"",cn1;
+ if(ts.p.subGrid===true) {
+ si = 1;
+ addSubGridCell = $.jgrid.getMethod("addSubGridCell");
+ }
if(!xmlRd.repeatitems) {f = reader(frd);}
if( ts.p.keyIndex===false) {
idn = $.isFunction( xmlRd.id ) ? xmlRd.id.call(ts, xml) : xmlRd.id;
@@ -1156,7 +1259,7 @@
}
idn=f[idn];
}
- if( (idn+"").indexOf("[") === -1 ) {
+ if( String(idn).indexOf("[") === -1 ) {
if (f.length) {
getId = function( trow, k) {return $(idn,trow).text() || k;};
} else {
@@ -1179,18 +1282,21 @@
var gxml = $.jgrid.getXmlData( xml, xmlRd.root, true);
gxml = $.jgrid.getXmlData( gxml, xmlRd.row, true);
if (!gxml) { gxml = []; }
- var gl = gxml.length, j=0, grpdata=[], rn = parseInt(ts.p.rowNum,10);
+ var gl = gxml.length, j=0, grpdata=[], rn = parseInt(ts.p.rowNum,10), br=ts.p.scroll?$.jgrid.randId():1, altr;
if (gl > 0 && ts.p.page <= 0) { ts.p.page = 1; }
if(gxml && gl){
- var br=ts.p.scroll?$.jgrid.randId():1,altr;
if (adjust) { rn *= adjust+1; }
- var afterInsRow = $.isFunction(ts.p.afterInsertRow), hiderow=ts.p.grouping && ts.p.groupingView.groupCollapse === true;
+ var afterInsRow = $.isFunction(ts.p.afterInsertRow), hiderow=false, groupingPrepare;
+ if(ts.p.grouping) {
+ hiderow = ts.p.groupingView.groupCollapse === true;
+ groupingPrepare = $.jgrid.getMethod("groupingPrepare");
+ }
while (j<gl) {
xmlr = gxml[j];
rid = getId(xmlr,br+j);
rid = ts.p.idPrefix + rid;
altr = rcnt === 0 ? 0 : rcnt+1;
- cn1 = (altr+j)%2 == 1 ? cn : '';
+ cn1 = (altr+j)%2 === 1 ? cn : '';
var iStartTrTag = rowData.length;
rowData.push("");
if( ni ) {
@@ -1200,7 +1306,7 @@
rowData.push( addMulti(rid,ni,j, false) );
}
if( si ) {
- rowData.push( $(ts).jqGrid("addSubGridCell",gi+ni,j+rcnt) );
+ rowData.push( addSubGridCell.call(self,gi+ni,j+rcnt) );
}
if(xmlRd.repeatitems){
if (!F) { F=orderedCols(gi+si+ni); }
@@ -1210,42 +1316,42 @@
if (!cell) { return false; }
v = cell.textContent || cell.text;
rd[ts.p.colModel[k+gi+si+ni].name] = v;
- rowData.push( addCell(rid,v,k+gi+si+ni,j+rcnt,xmlr) );
+ rowData.push( addCell(rid,v,k+gi+si+ni,j+rcnt,xmlr, rd) );
});
} else {
for(i = 0; i < f.length;i++) {
v = $.jgrid.getXmlData( xmlr, f[i]);
rd[ts.p.colModel[i+gi+si+ni].name] = v;
- rowData.push( addCell(rid, v, i+gi+si+ni, j+rcnt, xmlr) );
+ rowData.push( addCell(rid, v, i+gi+si+ni, j+rcnt, xmlr, rd) );
}
}
rowData[iStartTrTag] = constructTr(rid, hiderow, cn1, rd, xmlr, false);
rowData.push("</tr>");
if(ts.p.grouping) {
- grpdata = $(ts).jqGrid('groupingPrepare',rowData, grpdata, rd, j);
+ grpdata = groupingPrepare.call(self,rowData, grpdata, rd, j);
rowData = [];
}
if(locdata || ts.p.treeGrid === true) {
- rd[xmlid] = rid;
+ rd[xmlid] = $.jgrid.stripPref(ts.p.idPrefix, rid);
ts.p.data.push(rd);
- ts.p._index[rid] = ts.p.data.length-1;
+ ts.p._index[rd[xmlid]] = ts.p.data.length-1;
}
if(ts.p.gridview === false ) {
$("tbody:first",t).append(rowData.join(''));
- $(ts).triggerHandler("jqGridAfterInsertRow", [rid, rd, xmlr]);
+ self.triggerHandler("jqGridAfterInsertRow", [rid, rd, xmlr]);
if(afterInsRow) {ts.p.afterInsertRow.call(ts,rid,rd,xmlr);}
rowData=[];
}
rd={};
ir++;
j++;
- if(ir==rn) {break;}
+ if(ir===rn) {break;}
}
}
if(ts.p.gridview === true) {
fpos = ts.p.treeANode > -1 ? ts.p.treeANode: 0;
if(ts.p.grouping) {
- $(ts).jqGrid('groupingRender',grpdata,ts.p.colModel.length);
+ self.jqGrid('groupingRender',grpdata,ts.p.colModel.length);
grpdata = null;
} else if(ts.p.treeGrid === true && fpos > 0) {
$(ts.rows[fpos]).after(rowData.join(''));
@@ -1254,18 +1360,18 @@
}
}
if(ts.p.subGrid === true ) {
- try {$(ts).jqGrid("addSubGrid",gi+ni);} catch (_){}
+ try {self.jqGrid("addSubGrid",gi+ni);} catch (_){}
}
ts.p.totaltime = new Date() - startReq;
if(ir>0) { if(ts.p.records===0) { ts.p.records=gl;} }
rowData =null;
if( ts.p.treeGrid === true) {
- try {$(ts).jqGrid("setTreeNode", fpos+1, ir+fpos+1);} catch (e) {}
+ try {self.jqGrid("setTreeNode", fpos+1, ir+fpos+1);} catch (e) {}
}
if(!ts.p.treeGrid && !ts.p.scroll) {ts.grid.bDiv.scrollTop = 0;}
ts.p.reccount=ir;
ts.p.treeANode = -1;
- if(ts.p.userDataOnFooter) { $(ts).jqGrid("footerData","set",ts.p.userData,true); }
+ if(ts.p.userDataOnFooter) { self.jqGrid("footerData","set",ts.p.userData,true); }
if(locdata) {
ts.p.records = gl;
ts.p.lastpage = Math.ceil(gl/ rn);
@@ -1291,9 +1397,9 @@
rd[ts.p.colModel[i+gi+si+ni].name] = v;
}
}
- rd[xmlid] = rid;
+ rd[xmlid] = $.jgrid.stripPref(ts.p.idPrefix, rid);
ts.p.data.push(rd);
- ts.p._index[rid] = ts.p.data.length-1;
+ ts.p._index[rd[xmlid]] = ts.p.data.length-1;
rd = {};
ir++;
}
@@ -1309,37 +1415,41 @@
} else { return; }
var dReader, locid = "_id_", frd,
- locdata = (ts.p.datatype != "local" && ts.p.loadonce) || ts.p.datatype == "jsonstring";
+ locdata = (ts.p.datatype !== "local" && ts.p.loadonce) || ts.p.datatype === "jsonstring";
if(locdata) { ts.p.data = []; ts.p._index = {}; ts.p.localReader.id = locid;}
ts.p.reccount = 0;
- if(ts.p.datatype == "local") {
+ if(ts.p.datatype === "local") {
dReader = ts.p.localReader;
frd= 'local';
} else {
dReader = ts.p.jsonReader;
frd='json';
}
- var ir=0,v,i,j,f=[],F,cur,gi=ts.p.multiselect?1:0,si=ts.p.subGrid?1:0,ni=ts.p.rownumbers===true?1:0,len,drows,idn,rd={}, fpos, idr,rowData=[],cn=(ts.p.altRows === true) ? " "+ts.p.altclass:"",cn1,lp;
+ var self = $(ts), ir=0,v,i,j,f=[],cur,gi=ts.p.multiselect?1:0,si=ts.p.subGrid===true?1:0,addSubGridCell,ni=ts.p.rownumbers===true?1:0,arrayReader=orderedCols(gi+si+ni),objectReader=reader(frd),rowReader,len,drows,idn,rd={}, fpos, idr,rowData=[],cn=(ts.p.altRows === true) ? ts.p.altclass:"",cn1,lp;
ts.p.page = $.jgrid.getAccessor(data,dReader.page) || ts.p.page || 0;
lp = $.jgrid.getAccessor(data,dReader.total);
+ if(si) {
+ addSubGridCell = $.jgrid.getMethod("addSubGridCell");
+ }
ts.p.lastpage = lp === undefined ? 1 : lp;
ts.p.records = $.jgrid.getAccessor(data,dReader.records) || 0;
ts.p.userData = $.jgrid.getAccessor(data,dReader.userdata) || {};
- if(!dReader.repeatitems) {
- F = f = reader(frd);
- }
if( ts.p.keyIndex===false ) {
idn = $.isFunction(dReader.id) ? dReader.id.call(ts, data) : dReader.id;
} else {
idn = ts.p.keyIndex;
}
- if(f.length>0 && !isNaN(idn)) {
- if (ts.p.remapColumns && ts.p.remapColumns.length) {
- idn = $.inArray(idn, ts.p.remapColumns);
+ if(!dReader.repeatitems) {
+ f = objectReader;
+ if(f.length>0 && !isNaN(idn)) {
+ if (ts.p.remapColumns && ts.p.remapColumns.length) {
+ idn = $.inArray(idn, ts.p.remapColumns);
+ }
+ idn=f[idn];
}
- idn=f[idn];
}
drows = $.jgrid.getAccessor(data,dReader.root);
+ if (drows == null && $.isArray(data)) { drows = data; }
if (!drows) { drows = []; }
len = drows.length; i=0;
if (len > 0 && ts.p.page <= 0) { ts.p.page = 1; }
@@ -1348,23 +1458,33 @@
if(ts.p.datatype === "local" && !ts.p.deselectAfterSort) {
selected = true;
}
- var afterInsRow = $.isFunction(ts.p.afterInsertRow), grpdata=[], hiderow=ts.p.grouping && ts.p.groupingView.groupCollapse === true;
+ var afterInsRow = $.isFunction(ts.p.afterInsertRow), grpdata=[],hiderow=false, groupingPrepare;
+ if(ts.p.grouping) {
+ hiderow = ts.p.groupingView.groupCollapse === true;
+ groupingPrepare = $.jgrid.getMethod("groupingPrepare");
+ }
while (i<len) {
cur = drows[i];
idr = $.jgrid.getAccessor(cur,idn);
if(idr === undefined) {
- idr = br+i;
- if(f.length===0){
- if(dReader.cell){
- var ccur = $.jgrid.getAccessor(cur,dReader.cell);
- idr = ccur !== undefined ? ccur[idn] || idr : idr;
- ccur=null;
+ if (typeof idn === "number" && ts.p.colModel[idn+gi+si+ni] != null) {
+ // reread id by name
+ idr = $.jgrid.getAccessor(cur,ts.p.colModel[idn+gi+si+ni].name);
+ }
+ if(idr === undefined) {
+ idr = br+i;
+ if(f.length===0){
+ if(dReader.cell){
+ var ccur = $.jgrid.getAccessor(cur,dReader.cell) || cur;
+ idr = ccur != null && ccur[idn] !== undefined ? ccur[idn] : idr;
+ ccur=null;
+ }
}
}
}
idr = ts.p.idPrefix + idr;
altr = rcnt === 1 ? 0 : rcnt;
- cn1 = (altr+i)%2 == 1 ? cn : '';
+ cn1 = (altr+i)%2 === 1 ? cn : '';
if( selected) {
if( ts.p.multiselect) {
selr = ($.inArray(idr, ts.p.selarrrow) !== -1);
@@ -1381,43 +1501,44 @@
rowData.push( addMulti(idr,ni,i,selr) );
}
if( si ) {
- rowData.push( $(ts).jqGrid("addSubGridCell",gi+ni,i+rcnt) );
+ rowData.push( addSubGridCell.call(self,gi+ni,i+rcnt) );
}
+ rowReader=objectReader;
if (dReader.repeatitems) {
- if(dReader.cell) {cur = $.jgrid.getAccessor(cur,dReader.cell);}
- if (!F) { F=orderedCols(gi+si+ni); }
+ if(dReader.cell) {cur = $.jgrid.getAccessor(cur,dReader.cell) || cur;}
+ if ($.isArray(cur)) { rowReader=arrayReader; }
}
- for (j=0;j<F.length;j++) {
- v = $.jgrid.getAccessor(cur,F[j]);
- rowData.push( addCell(idr,v,j+gi+si+ni,i+rcnt,cur) );
+ for (j=0;j<rowReader.length;j++) {
+ v = $.jgrid.getAccessor(cur,rowReader[j]);
rd[ts.p.colModel[j+gi+si+ni].name] = v;
+ rowData.push( addCell(idr,v,j+gi+si+ni,i+rcnt,cur, rd) );
}
rowData[iStartTrTag] = constructTr(idr, hiderow, cn1, rd, cur, selr);
rowData.push( "</tr>" );
if(ts.p.grouping) {
- grpdata = $(ts).jqGrid('groupingPrepare',rowData, grpdata, rd, i);
+ grpdata = groupingPrepare.call(self,rowData, grpdata, rd, i);
rowData = [];
}
if(locdata || ts.p.treeGrid===true) {
- rd[locid] = idr;
+ rd[locid] = $.jgrid.stripPref(ts.p.idPrefix, idr);
ts.p.data.push(rd);
- ts.p._index[idr] = ts.p.data.length-1;
+ ts.p._index[rd[locid]] = ts.p.data.length-1;
}
if(ts.p.gridview === false ) {
$("#"+$.jgrid.jqID(ts.p.id)+" tbody:first").append(rowData.join(''));
- $(ts).triggerHandler("jqGridAfterInsertRow", [idr, rd, cur]);
+ self.triggerHandler("jqGridAfterInsertRow", [idr, rd, cur]);
if(afterInsRow) {ts.p.afterInsertRow.call(ts,idr,rd,cur);}
rowData=[];//ari=0;
}
rd={};
ir++;
i++;
- if(ir==rn) { break; }
+ if(ir===rn) { break; }
}
if(ts.p.gridview === true ) {
fpos = ts.p.treeANode > -1 ? ts.p.treeANode: 0;
if(ts.p.grouping) {
- $(ts).jqGrid('groupingRender',grpdata,ts.p.colModel.length);
+ self.jqGrid('groupingRender',grpdata,ts.p.colModel.length);
grpdata = null;
} else if(ts.p.treeGrid === true && fpos > 0) {
$(ts.rows[fpos]).after(rowData.join(''));
@@ -1426,7 +1547,7 @@
}
}
if(ts.p.subGrid === true ) {
- try { $(ts).jqGrid("addSubGrid",gi+ni);} catch (_){}
+ try { self.jqGrid("addSubGrid",gi+ni);} catch (_){}
}
ts.p.totaltime = new Date() - startReq;
if(ir>0) {
@@ -1434,12 +1555,12 @@
}
rowData = null;
if( ts.p.treeGrid === true) {
- try {$(ts).jqGrid("setTreeNode", fpos+1, ir+fpos+1);} catch (e) {}
+ try {self.jqGrid("setTreeNode", fpos+1, ir+fpos+1);} catch (e) {}
}
if(!ts.p.treeGrid && !ts.p.scroll) {ts.grid.bDiv.scrollTop = 0;}
ts.p.reccount=ir;
ts.p.treeANode = -1;
- if(ts.p.userDataOnFooter) { $(ts).jqGrid("footerData","set",ts.p.userData,true); }
+ if(ts.p.userDataOnFooter) { self.jqGrid("footerData","set",ts.p.userData,true); }
if(locdata) {
ts.p.records = len;
ts.p.lastpage = Math.ceil(len/ rn);
@@ -1450,29 +1571,35 @@
cur = drows[ir];
idr = $.jgrid.getAccessor(cur,idn);
if(idr === undefined) {
- idr = br+ir;
- if(f.length===0){
- if(dReader.cell){
- var ccur2 = $.jgrid.getAccessor(cur,dReader.cell);
- idr = ccur2[idn] || idr;
- ccur2=null;
+ if (typeof idn === "number" && ts.p.colModel[idn+gi+si+ni] != null) {
+ // reread id by name
+ idr = $.jgrid.getAccessor(cur,ts.p.colModel[idn+gi+si+ni].name);
+ }
+ if(idr === undefined) {
+ idr = br+ir;
+ if(f.length===0){
+ if(dReader.cell){
+ var ccur2 = $.jgrid.getAccessor(cur,dReader.cell) || cur;
+ idr = ccur2 != null && ccur2[idn] !== undefined ? ccur2[idn] : idr;
+ ccur2=null;
+ }
}
}
}
if(cur) {
idr = ts.p.idPrefix + idr;
+ rowReader=objectReader;
if (dReader.repeatitems) {
- if(dReader.cell) {cur = $.jgrid.getAccessor(cur,dReader.cell);}
- if (!F) { F=orderedCols(gi+si+ni); }
+ if(dReader.cell) {cur = $.jgrid.getAccessor(cur,dReader.cell) || cur;}
+ if ($.isArray(cur)) { rowReader=arrayReader; }
}
- for (j=0;j<F.length;j++) {
- v = $.jgrid.getAccessor(cur,F[j]);
- rd[ts.p.colModel[j+gi+si+ni].name] = v;
+ for (j=0;j<rowReader.length;j++) {
+ rd[ts.p.colModel[j+gi+si+ni].name] = $.jgrid.getAccessor(cur,rowReader[j]);
}
- rd[locid] = idr;
+ rd[locid] = $.jgrid.stripPref(ts.p.idPrefix, idr);
ts.p.data.push(rd);
- ts.p._index[idr] = ts.p.data.length-1;
+ ts.p._index[rd[locid]] = ts.p.data.length-1;
rd = {};
}
ir++;
@@ -1480,15 +1607,15 @@
}
},
addLocalData = function() {
- var st, fndsort=false, cmtypes={}, grtypes=[], grindexes=[], srcformat, sorttype, newformat;
+ var st = ts.p.multiSort ? [] : "", sto=[], fndsort=false, cmtypes={}, grtypes=[], grindexes=[], srcformat, sorttype, newformat;
if(!$.isArray(ts.p.data)) {
return;
}
var grpview = ts.p.grouping ? ts.p.groupingView : false, lengrp, gin;
$.each(ts.p.colModel,function(){
sorttype = this.sorttype || "text";
- if(sorttype == "date" || sorttype == "datetime") {
- if(this.formatter && typeof(this.formatter) === 'string' && this.formatter == 'date') {
+ if(sorttype === "date" || sorttype === "datetime") {
+ if(this.formatter && typeof this.formatter === 'string' && this.formatter === 'date') {
if(this.formatoptions && this.formatoptions.srcformat) {
srcformat = this.formatoptions.srcformat;
} else {
@@ -1508,9 +1635,9 @@
}
if(ts.p.grouping ) {
for(gin =0, lengrp = grpview.groupField.length; gin< lengrp; gin++) {
- if( this.name == grpview.groupField[gin]) {
+ if( this.name === grpview.groupField[gin]) {
var grindex = this.name;
- if (typeof this.index != 'undefined') {
+ if (this.index) {
grindex = this.index;
}
grtypes[gin] = cmtypes[grindex];
@@ -1518,9 +1645,17 @@
}
}
}
- if(!fndsort && (this.index == ts.p.sortname || this.name == ts.p.sortname)){
- st = this.name; // ???
- fndsort = true;
+ if(ts.p.multiSort) {
+ if(this.lso) {
+ st.push(this.name);
+ var tmplso= this.lso.split("-");
+ sto.push( tmplso[tmplso.length-1] );
+ }
+ } else {
+ if(!fndsort && (this.index === ts.p.sortname || this.name === ts.p.sortname)){
+ st = this.name; // ???
+ fndsort = true;
+ }
}
});
if(ts.p.treeGrid) {
@@ -1550,7 +1685,7 @@
if (ts.p.ignoreCase) { query = query.ignoreCase(); }
function tojLinq ( group ) {
var s = 0, index, gor, ror, opr, rule;
- if (group.groups !== undefined) {
+ if (group.groups != null) {
gor = group.groups.length && group.groupOp.toString().toUpperCase() === "OR";
if (gor) {
query.orBegin();
@@ -1568,12 +1703,12 @@
query.orEnd();
}
}
- if (group.rules !== undefined) {
- if(s>0) {
- var result = query.select();
- query = $.jgrid.from( result);
- if (ts.p.ignoreCase) { query = query.ignoreCase(); }
- }
+ if (group.rules != null) {
+ //if(s>0) {
+ // var result = query.select();
+ // query = $.jgrid.from( result);
+ // if (ts.p.ignoreCase) { query = query.ignoreCase(); }
+ //}
try{
ror = group.rules.length && group.groupOp.toString().toUpperCase() === "OR";
if (ror) {
@@ -1600,7 +1735,7 @@
if (ts.p.search === true) {
var srules = ts.p.postData.filters;
if(srules) {
- if(typeof srules == "string") { srules = $.jgrid.parse(srules);}
+ if(typeof srules === "string") { srules = $.jgrid.parse(srules);}
tojLinq( srules );
} else {
try {
@@ -1613,11 +1748,17 @@
query.orderBy(grindexes[gin],grpview.groupOrder[gin],grtypes[gin].stype, grtypes[gin].srcfmt);
}
}
- if (st && ts.p.sortorder && fndsort) {
- if(ts.p.sortorder.toUpperCase() == "DESC") {
- query.orderBy(ts.p.sortname, "d", cmtypes[st].stype, cmtypes[st].srcfmt);
- } else {
- query.orderBy(ts.p.sortname, "a", cmtypes[st].stype, cmtypes[st].srcfmt);
+ if(ts.p.multiSort) {
+ $.each(st,function(i){
+ query.orderBy(this, sto[i], cmtypes[this].stype, cmtypes[this].srcfmt);
+ });
+ } else {
+ if (st && ts.p.sortorder && fndsort) {
+ if(ts.p.sortorder.toUpperCase() === "DESC") {
+ query.orderBy(ts.p.sortname, "d", cmtypes[st].stype, cmtypes[st].srcfmt);
+ } else {
+ query.orderBy(ts.p.sortname, "a", cmtypes[st].stype, cmtypes[st].srcfmt);
+ }
}
}
var queryResults = query.select(),
@@ -1654,10 +1795,13 @@
var top = base * rh;
var height = parseInt(ts.p.records,10) * rh;
$(">div:first",ts.grid.bDiv).css({height : height}).children("div:first").css({height:top,display:top?"":"none"});
+ if (ts.grid.bDiv.scrollTop == 0 && ts.p.page > 1) {
+ ts.grid.bDiv.scrollTop = ts.p.rowNum * (ts.p.page - 1) * rh;
+ }
}
ts.grid.bDiv.scrollLeft = ts.grid.hDiv.scrollLeft;
}
- pgboxes = ts.p.pager ? ts.p.pager : "";
+ pgboxes = ts.p.pager || "";
pgboxes += ts.p.toppager ? (pgboxes ? "," + ts.p.toppager : ts.p.toppager) : "";
if(pgboxes) {
fmt = $.jgrid.formatter.integer || {};
@@ -1686,14 +1830,14 @@
}
if(ts.p.pgbuttons===true) {
if(cp<=0) {cp = last = 0;}
- if(cp==1 || cp === 0) {
+ if(cp===1 || cp === 0) {
$("#first"+tspg+", #prev"+tspg).addClass('ui-state-disabled').removeClass('ui-state-hover');
if(ts.p.toppager) { $("#first_t"+tspg_t+", #prev_t"+tspg_t).addClass('ui-state-disabled').removeClass('ui-state-hover'); }
} else {
$("#first"+tspg+", #prev"+tspg).removeClass('ui-state-disabled');
if(ts.p.toppager) { $("#first_t"+tspg_t+", #prev_t"+tspg_t).removeClass('ui-state-disabled'); }
}
- if(cp==last || cp === 0) {
+ if(cp===last || cp === 0) {
$("#next"+tspg+", #last"+tspg).addClass('ui-state-disabled').removeClass('ui-state-hover');
if(ts.p.toppager) { $("#next_t"+tspg_t+", #last_t"+tspg_t).addClass('ui-state-disabled').removeClass('ui-state-hover'); }
} else {
@@ -1703,7 +1847,7 @@
}
}
if(rn===true && ts.p.rownumbers === true) {
- $("td.jqgrid-rownum",ts.rows).each(function(i){
+ $(">td.jqgrid-rownum",ts.rows).each(function(i){
$(this).html(base+1+i);
});
}
@@ -1777,7 +1921,7 @@
for(gi=0;gi<grp.groupField.length;gi++) {
var index = grp.groupField[gi];
$.each(ts.p.colModel, function(cmIndex, cmValue) {
- if (cmValue.name == index && cmValue.index){
+ if (cmValue.name === index && cmValue.index){
index = cmValue.index;
}
} );
@@ -1790,7 +1934,7 @@
var bfr = $(ts).triggerHandler("jqGridBeforeRequest");
if (bfr === false || bfr === 'stop') { return; }
if ($.isFunction(ts.p.datatype)) { ts.p.datatype.call(ts,ts.p.postData,"load_"+ts.p.id); return;}
- else if($.isFunction(ts.p.beforeRequest)) {
+ if ($.isFunction(ts.p.beforeRequest)) {
bfr = ts.p.beforeRequest.call(ts);
if(bfr === undefined) { bfr = true; }
if ( bfr === false ) { return; }
@@ -1837,15 +1981,14 @@
if(gotoreq === undefined) { gotoreq = true; }
if(gotoreq === false) {
return false;
- } else {
+ }
beginReq();
}
- }
},$.jgrid.ajaxOptions, ts.p.ajaxGridOptions));
break;
case "xmlstring":
beginReq();
- dstr = $.jgrid.stringToDoc(ts.p.datastr);
+ dstr = typeof ts.p.datastr !== 'string' ? ts.p.datastr : $.parseXML(ts.p.datastr);
addXmlData(dstr,ts.grid.bDiv);
$(ts).triggerHandler("jqGridLoadComplete", [dstr]);
if(lcf) {ts.p.loadComplete.call(ts,dstr);}
@@ -1856,7 +1999,7 @@
break;
case "jsonstring":
beginReq();
- if(typeof ts.p.datastr == 'string') { dstr = $.jgrid.parse(ts.p.datastr); }
+ if(typeof ts.p.datastr === 'string') { dstr = $.jgrid.parse(ts.p.datastr); }
else { dstr = ts.p.datastr; }
addJSONData(dstr,ts.grid.bDiv);
$(ts).triggerHandler("jqGridLoadComplete", [dstr]);
@@ -1900,7 +2043,7 @@
ts.p.selrow = null;
if(ts.p.multiselect) {ts.p.selarrrow =[]; setHeadCheckBox( false );}
ts.p.savedRow = [];
- if(ret=='stop') {return false;}
+ if(ret==='stop') {return false;}
return true;
};
pgid = pgid.substr(1);
@@ -1914,21 +2057,21 @@
str = "<td dir='"+dir+"'>";
str +="<select class='ui-pg-selbox' role='listbox'>";
for(i=0;i<ts.p.rowList.length;i++){
- str +="<option role=\"option\" value=\""+ts.p.rowList[i]+"\""+((ts.p.rowNum == ts.p.rowList[i])?" selected=\"selected\"":"")+">"+ts.p.rowList[i]+"</option>";
+ str +="<option role=\"option\" value=\""+ts.p.rowList[i]+"\""+((ts.p.rowNum === ts.p.rowList[i])?" selected=\"selected\"":"")+">"+ts.p.rowList[i]+"</option>";
}
str +="</select></td>";
}
- if(dir=="rtl") { pgl += str; }
+ if(dir==="rtl") { pgl += str; }
if(ts.p.pginput===true) { pginp= "<td dir='"+dir+"'>"+$.jgrid.format(ts.p.pgtext || "","<input class='ui-pg-input' type='text' size='2' maxlength='7' value='0' role='textbox'/>","<span id='sp_1_"+$.jgrid.jqID(pgid)+"'></span>")+"</td>";}
if(ts.p.pgbuttons===true) {
- var po=["first"+tp,"prev"+tp, "next"+tp,"last"+tp]; if(dir=="rtl") { po.reverse(); }
+ var po=["first"+tp,"prev"+tp, "next"+tp,"last"+tp]; if(dir==="rtl") { po.reverse(); }
pgl += "<td id='"+po[0]+"' class='ui-pg-button ui-corner-all'><span class='ui-icon ui-icon-seek-first'></span></td>";
pgl += "<td id='"+po[1]+"' class='ui-pg-button ui-corner-all'><span class='ui-icon ui-icon-seek-prev'></span></td>";
pgl += pginp !== "" ? sep+pginp+sep:"";
pgl += "<td id='"+po[2]+"' class='ui-pg-button ui-corner-all'><span class='ui-icon ui-icon-seek-next'></span></td>";
pgl += "<td id='"+po[3]+"' class='ui-pg-button ui-corner-all'><span class='ui-icon ui-icon-seek-end'></span></td>";
} else if (pginp !== "") { pgl += pginp; }
- if(dir=="ltr") { pgl += str; }
+ if(dir==="ltr") { pgl += str; }
pgl += "</tr></tbody></table>";
if(ts.p.viewrecords===true) {$("td#"+pgid+"_"+ts.p.recordpos,"#"+pgcnt).append("<div dir='"+dir+"' style='text-align:"+ts.p.recordpos+"' class='ui-paging-info'></div>");}
$("td#"+pgid+"_"+ts.p.pagerpos,"#"+pgcnt).append(pgl);
@@ -1945,11 +2088,11 @@
ts.p._nvtd[1] = 0;
pgl=null;
$('.ui-pg-selbox',"#"+pgcnt).bind('change',function() {
+ if(!clearVals('records')) { return false; }
ts.p.page = Math.round(ts.p.rowNum*(ts.p.page-1)/this.value-0.5)+1;
ts.p.rowNum = this.value;
if(ts.p.pager) { $('.ui-pg-selbox',ts.p.pager).val(this.value); }
if(ts.p.toppager) { $('.ui-pg-selbox',ts.p.toppager).val(this.value); }
- if(!clearVals('records')) { return false; }
populate();
return false;
});
@@ -1977,12 +2120,12 @@
//else if( cp>1 && cp <last){ }
else if( cp===last){ np=false;lp=false; }
} else if( last>1 && cp===0 ) { np=false;lp=false; cp=last-1;}
+ if(!clearVals(this.id)) { return false; }
if( this.id === 'first'+tp && fp ) { ts.p.page=1; selclick=true;}
if( this.id === 'prev'+tp && pp) { ts.p.page=(cp-1); selclick=true;}
if( this.id === 'next'+tp && np) { ts.p.page=(cp+1); selclick=true;}
if( this.id === 'last'+tp && lp) { ts.p.page=last; selclick=true;}
if(selclick) {
- if(!clearVals(this.id)) { return false; }
populate();
}
return false;
@@ -1990,10 +2133,11 @@
}
if(ts.p.pginput===true) {
$('input.ui-pg-input',"#"+pgcnt).keypress( function(e) {
- var key = e.charCode ? e.charCode : e.keyCode ? e.keyCode : 0;
- if(key == 13) {
+ var key = e.charCode || e.keyCode || 0;
+ if(key === 13) {
+ if(!clearVals('user')) { return false; }
+ $(this).val( intNum( $(this).val(), 1));
ts.p.page = ($(this).val()>0) ? $(this).val():ts.p.page;
- if(!clearVals('user')) { return false; }
populate();
return false;
}
@@ -2001,43 +2145,99 @@
});
}
},
- sortData = function (index, idxcol,reload,sor){
+ multiSort = function(iCol, obj ) {
+ var splas, sort="", cm = ts.p.colModel, fs=false, ls,
+ selTh = ts.p.frozenColumns ? obj : ts.grid.headers[iCol].el, so="";
+ $("span.ui-grid-ico-sort",selTh).addClass('ui-state-disabled');
+ $(selTh).attr("aria-selected","false");
+
+ if(cm[iCol].lso) {
+ if(cm[iCol].lso==="asc") {
+ cm[iCol].lso += "-desc";
+ so = "desc";
+ } else if(cm[iCol].lso==="desc") {
+ cm[iCol].lso += "-asc";
+ so = "asc";
+ } else if(cm[iCol].lso==="asc-desc" || cm[iCol].lso==="desc-asc") {
+ cm[iCol].lso="";
+ }
+ } else {
+ cm[iCol].lso = so = cm.firstsortorder || 'asc';
+ }
+ if( so ) {
+ $("span.s-ico",selTh).show();
+ $("span.ui-icon-"+so,selTh).removeClass('ui-state-disabled');
+ $(selTh).attr("aria-selected","true");
+ } else {
+ if(!ts.p.viewsortcols[0]) {
+ $("span.s-ico",selTh).hide();
+ }
+ }
+ ts.p.sortorder = "";
+ $.each(cm, function(i){
+ if(this.lso) {
+ if(i>0 && fs) {
+ sort += ", ";
+ }
+ splas = this.lso.split("-");
+ sort += cm[i].index || cm[i].name;
+ sort += " "+splas[splas.length-1];
+ fs = true;
+ ts.p.sortorder = splas[splas.length-1];
+ }
+ });
+ ls = sort.lastIndexOf(ts.p.sortorder);
+ sort = sort.substring(0, ls);
+ ts.p.sortname = sort;
+ },
+ sortData = function (index, idxcol,reload,sor, obj){
if(!ts.p.colModel[idxcol].sortable) { return; }
var so;
if(ts.p.savedRow.length > 0) {return;}
if(!reload) {
- if( ts.p.lastsort == idxcol ) {
- if( ts.p.sortorder == 'asc') {
+ if( ts.p.lastsort === idxcol ) {
+ if( ts.p.sortorder === 'asc') {
ts.p.sortorder = 'desc';
- } else if(ts.p.sortorder == 'desc') { ts.p.sortorder = 'asc';}
+ } else if(ts.p.sortorder === 'desc') { ts.p.sortorder = 'asc';}
} else { ts.p.sortorder = ts.p.colModel[idxcol].firstsortorder || 'asc'; }
ts.p.page = 1;
}
- if(sor) {
- if(ts.p.lastsort == idxcol && ts.p.sortorder == sor && !reload) { return; }
- else { ts.p.sortorder = sor; }
- }
- var previousSelectedTh = ts.grid.headers[ts.p.lastsort].el, newSelectedTh = ts.grid.headers[idxcol].el;
+ if(ts.p.multiSort) {
+ multiSort( idxcol, obj);
+ } else {
+ if(sor) {
+ if(ts.p.lastsort === idxcol && ts.p.sortorder === sor && !reload) { return; }
+ ts.p.sortorder = sor;
+ }
+ var previousSelectedTh = ts.grid.headers[ts.p.lastsort].el, newSelectedTh = ts.p.frozenColumns ? obj : ts.grid.headers[idxcol].el;
- $("span.ui-grid-ico-sort",previousSelectedTh).addClass('ui-state-disabled');
- $(previousSelectedTh).attr("aria-selected","false");
- $("span.ui-icon-"+ts.p.sortorder,newSelectedTh).removeClass('ui-state-disabled');
- $(newSelectedTh).attr("aria-selected","true");
- if(!ts.p.viewsortcols[0]) {
- if(ts.p.lastsort != idxcol) {
- $("span.s-ico",previousSelectedTh).hide();
- $("span.s-ico",newSelectedTh).show();
+ $("span.ui-grid-ico-sort",previousSelectedTh).addClass('ui-state-disabled');
+ $(previousSelectedTh).attr("aria-selected","false");
+ if(ts.p.frozenColumns) {
+ ts.grid.fhDiv.find("span.ui-grid-ico-sort").addClass('ui-state-disabled');
+ ts.grid.fhDiv.find("th").attr("aria-selected","false");
}
+ $("span.ui-icon-"+ts.p.sortorder,newSelectedTh).removeClass('ui-state-disabled');
+ $(newSelectedTh).attr("aria-selected","true");
+ if(!ts.p.viewsortcols[0]) {
+ if(ts.p.lastsort !== idxcol) {
+ if(ts.p.frozenColumns){
+ ts.grid.fhDiv.find("span.s-ico").hide();
+ }
+ $("span.s-ico",previousSelectedTh).hide();
+ $("span.s-ico",newSelectedTh).show();
+ }
+ }
+ index = index.substring(5 + ts.p.id.length + 1); // bad to be changed!?!
+ ts.p.sortname = ts.p.colModel[idxcol].index || index;
+ so = ts.p.sortorder;
}
- index = index.substring(5 + ts.p.id.length + 1); // bad to be changed!?!
- ts.p.sortname = ts.p.colModel[idxcol].index || index;
- so = ts.p.sortorder;
if ($(ts).triggerHandler("jqGridSortCol", [index, idxcol, so]) === 'stop') {
ts.p.lastsort = idxcol;
return;
}
- if($.isFunction(ts.p.onSortCol)) {if (ts.p.onSortCol.call(ts,index,idxcol,so)=='stop') {ts.p.lastsort = idxcol; return;}}
- if(ts.p.datatype == "local") {
+ if($.isFunction(ts.p.onSortCol)) {if (ts.p.onSortCol.call(ts,index,idxcol,so)==='stop') {ts.p.lastsort = idxcol; return;}}
+ if(ts.p.datatype === "local") {
if(ts.p.deselectAfterSort) {$(ts).jqGrid("resetSelection");}
} else {
ts.p.selrow = null;
@@ -2050,20 +2250,25 @@
emptyRows.call(ts, true, false);
ts.grid.hDiv.scrollLeft = sscroll;
}
- if(ts.p.subGrid && ts.p.datatype=='local') {
+ if(ts.p.subGrid && ts.p.datatype === 'local') {
$("td.sgexpanded","#"+$.jgrid.jqID(ts.p.id)).each(function(){
$(this).trigger("click");
});
}
populate();
ts.p.lastsort = idxcol;
- if(ts.p.sortname != index && idxcol) {ts.p.lastsort = idxcol;}
+ if(ts.p.sortname !== index && idxcol) {ts.p.lastsort = idxcol;}
},
setColWidth = function () {
- var initwidth = 0, brd=$.jgrid.cellWidth()? 0: intNum(ts.p.cellLayout,0), vc=0, lvc, scw=intNum(ts.p.scrollOffset,0),cw,hs=false,aw,gw=0,
- cl = 0, cr;
+ var initwidth = 0, brd=$.jgrid.cell_width? 0: intNum(ts.p.cellLayout,0), vc=0, lvc, scw=intNum(ts.p.scrollOffset,0),cw,hs=false,aw,gw=0,cr;
$.each(ts.p.colModel, function() {
- if(typeof this.hidden === 'undefined') {this.hidden=false;}
+ if(this.hidden === undefined) {this.hidden=false;}
+ if(ts.p.grouping && ts.p.autowidth) {
+ var ind = $.inArray(this.name, ts.p.groupingView.groupField);
+ if(ind >= 0 && ts.p.groupingView.groupColumnShow.length > ind) {
+ this.hidden = !ts.p.groupingView.groupColumnShow[ind];
+ }
+ }
this.widthOrg = cw = intNum(this.width,0);
if(this.hidden===false){
initwidth += cw+brd;
@@ -2072,7 +2277,6 @@
} else {
vc++;
}
- cl++;
}
});
if(isNaN(ts.p.width)) {
@@ -2122,19 +2326,11 @@
return j-ret;
},
getOffset = function (iCol) {
- var i, ret = {}, brd1 = $.jgrid.cellWidth() ? 0 : ts.p.cellLayout;
- ret[0] = ret[1] = ret[2] = 0;
- for(i=0;i<=iCol;i++){
- if(ts.p.colModel[i].hidden === false ) {
- ret[0] += ts.p.colModel[i].width+brd1;
- }
- }
- if(ts.p.direction=="rtl") { ret[0] = ts.p.width - ret[0]; }
- ret[0] = ret[0] - ts.grid.bDiv.scrollLeft;
- if($(ts.grid.cDiv).is(":visible")) {ret[1] += $(ts.grid.cDiv).height() +parseInt($(ts.grid.cDiv).css("padding-top"),10)+parseInt($(ts.grid.cDiv).css("padding-bottom"),10);}
- if(ts.p.toolbar[0]===true && (ts.p.toolbar[1]=='top' || ts.p.toolbar[1]=='both')) {ret[1] += $(ts.grid.uDiv).height()+parseInt($(ts.grid.uDiv).css("border-top-width"),10)+parseInt($(ts.grid.uDiv).css("border-bottom-width"),10);}
- if(ts.p.toppager) {ret[1] += $(ts.grid.topDiv).height()+parseInt($(ts.grid.topDiv).css("border-bottom-width"),10);}
- ret[2] += $(ts.grid.bDiv).height() + $(ts.grid.hDiv).height();
+ var $th = $(ts.grid.headers[iCol].el), ret = [$th.position().left + $th.outerWidth()];
+ if(ts.p.direction==="rtl") { ret[0] = ts.p.width - ret[0]; }
+ ret[0] -= ts.grid.bDiv.scrollLeft;
+ ret.push($(ts.grid.hDiv).position().top);
+ ret.push($(ts.grid.bDiv).offset().top - $(ts.grid.hDiv).offset().top + $(ts.grid.bDiv).height());
return ret;
},
getColumnHeaderIndex = function (th) {
@@ -2148,7 +2344,7 @@
return ci;
};
this.p.id = this.id;
- if ($.inArray(ts.p.multikey,sortkeys) == -1 ) {ts.p.multikey = false;}
+ if ($.inArray(ts.p.multikey,sortkeys) === -1 ) {ts.p.multikey = false;}
ts.p.keyIndex=false;
for (i=0; i<ts.p.colModel.length;i++) {
ts.p.colModel[i] = $.extend(true, {}, ts.p.cmTemplate, ts.p.colModel[i].template || {}, ts.p.colModel[i]);
@@ -2157,6 +2353,7 @@
}
}
ts.p.sortorder = ts.p.sortorder.toLowerCase();
+ $.jgrid.cell_width = $.jgrid.cellWidth();
if(ts.p.grouping===true) {
ts.p.scroll = false;
ts.p.rownumbers = false;
@@ -2166,14 +2363,14 @@
}
if(this.p.treeGrid === true) {
try { $(this).jqGrid("setTreeGrid");} catch (_) {}
- if(ts.p.datatype != "local") { ts.p.localReader = {id: "_id_"}; }
+ if(ts.p.datatype !== "local") { ts.p.localReader = {id: "_id_"}; }
}
if(this.p.subGrid) {
try { $(ts).jqGrid("setSubGrid");} catch (s){}
}
if(this.p.multiselect) {
this.p.colNames.unshift("<input role='checkbox' id='cb_"+this.p.id+"' class='cbox' type='checkbox'/>");
- this.p.colModel.unshift({name:'cb',width:$.jgrid.cellWidth() ? ts.p.multiselectWidth+ts.p.cellLayout : ts.p.multiselectWidth,sortable:false,resizable:false,hidedlg:true,search:false,align:'center',fixed:true});
+ this.p.colModel.unshift({name:'cb',width:$.jgrid.cell_width ? ts.p.multiselectWidth+ts.p.cellLayout : ts.p.multiselectWidth,sortable:false,resizable:false,hidedlg:true,search:false,align:'center',fixed:true});
}
if(this.p.rownumbers) {
this.p.colNames.unshift("");
@@ -2219,7 +2416,7 @@
if(ts.p.data.length) { refreshIndex(); }
var thead = "<thead><tr class='ui-jqgrid-labels' role='rowheader'>",
tdc, idn, w, res, sort,
- td, ptr, tbody, imgs,iac="",idc="";
+ td, ptr, tbody, imgs,iac="",idc="",sortarr=[], sortord=[], sotmp=[];
if(ts.p.shrinkToFit===true && ts.p.forceFit===true) {
for (i=ts.p.colModel.length-1;i>=0;i--){
if(!ts.p.colModel[i].hidden) {
@@ -2228,10 +2425,18 @@
}
}
}
- if(ts.p.viewsortcols[1] == 'horizontal') {iac=" ui-i-asc";idc=" ui-i-desc";}
+ if(ts.p.viewsortcols[1] === 'horizontal') {iac=" ui-i-asc";idc=" ui-i-desc";}
tdc = isMSIE ? "class='ui-th-div-ie'" :"";
imgs = "<span class='s-ico' style='display:none'><span sort='asc' class='ui-grid-ico-sort ui-icon-asc"+iac+" ui-state-disabled ui-icon ui-icon-triangle-1-n ui-sort-"+dir+"'></span>";
imgs += "<span sort='desc' class='ui-grid-ico-sort ui-icon-desc"+idc+" ui-state-disabled ui-icon ui-icon-triangle-1-s ui-sort-"+dir+"'></span></span>";
+ if(ts.p.multiSort) {
+ sortarr = ts.p.sortname.split(",");
+ for (i=0; i<sortarr.length; i++) {
+ sotmp = $.trim(sortarr[i]).split(" ");
+ sortarr[i] = $.trim(sotmp[0]);
+ sortord[i] = sotmp[1] ? $.trim(sotmp[1]) : ts.p.sortorder || "asc";
+ }
+ }
for(i=0;i<this.p.colNames.length;i++){
var tooltip = ts.p.headertitles ? (" title=\""+$.jgrid.stripHtml(ts.p.colNames[i])+"\"") :"";
thead += "<th id='"+ts.p.id+"_"+ts.p.colModel[i].name+"' role='columnheader' class='ui-state-default ui-th-column ui-th-"+dir+"'"+ tooltip+">";
@@ -2239,10 +2444,17 @@
thead += "<div id='jqgh_"+ts.p.id+"_"+ts.p.colModel[i].name+"' "+tdc+">"+ts.p.colNames[i];
if(!ts.p.colModel[i].width) { ts.p.colModel[i].width = 150; }
else { ts.p.colModel[i].width = parseInt(ts.p.colModel[i].width,10); }
- if(typeof(ts.p.colModel[i].title) !== "boolean") { ts.p.colModel[i].title = true; }
- if (idn == ts.p.sortname) {
+ if(typeof ts.p.colModel[i].title !== "boolean") { ts.p.colModel[i].title = true; }
+ ts.p.colModel[i].lso = "";
+ if (idn === ts.p.sortname) {
ts.p.lastsort = i;
}
+ if(ts.p.multiSort) {
+ sotmp = $.inArray(idn,sortarr);
+ if( sotmp !== -1 ) {
+ ts.p.colModel[i].lso = sortord[sotmp];
+ }
+ }
thead += imgs+"</div></th>";
}
thead += "</tr></thead>";
@@ -2309,11 +2521,11 @@
ts.p.disableClick=false;
$("th",thr).each(function ( j ) {
w = ts.p.colModel[j].width;
- if(typeof ts.p.colModel[j].resizable === 'undefined') {ts.p.colModel[j].resizable = true;}
+ if(ts.p.colModel[j].resizable === undefined) {ts.p.colModel[j].resizable = true;}
if(ts.p.colModel[j].resizable){
res = document.createElement("span");
- $(res).html(" ").addClass('ui-jqgrid-resize ui-jqgrid-resize-'+dir);
- if(!$.browser.opera) { $(res).css("cursor","col-resize"); }
+ $(res).html(" ").addClass('ui-jqgrid-resize ui-jqgrid-resize-'+dir)
+ .css("cursor","col-resize");
$(this).addClass(ts.p.resizeclass);
} else {
res = "";
@@ -2329,18 +2541,30 @@
sort = ts.p.colModel[j].sortable;
if( typeof sort !== 'boolean') {ts.p.colModel[j].sortable = true; sort=true;}
var nm = ts.p.colModel[j].name;
- if( !(nm == 'cb' || nm=='subgrid' || nm=='rn') ) {
+ if( !(nm === 'cb' || nm==='subgrid' || nm==='rn') ) {
if(ts.p.viewsortcols[2]){
$(">div",this).addClass('ui-jqgrid-sortable');
}
}
if(sort) {
- if(ts.p.viewsortcols[0]) {$("div span.s-ico",this).show(); if(j==ts.p.lastsort){ $("div span.ui-icon-"+ts.p.sortorder,this).removeClass("ui-state-disabled");}}
- else if( j == ts.p.lastsort) {$("div span.s-ico",this).show();$("div span.ui-icon-"+ts.p.sortorder,this).removeClass("ui-state-disabled");}
+ if(ts.p.multiSort) {
+ if(ts.p.viewsortcols[0]) {
+ $("div span.s-ico",this).show();
+ if(ts.p.colModel[j].lso){
+ $("div span.ui-icon-"+ts.p.colModel[j].lso,this).removeClass("ui-state-disabled");
+ }
+ } else if( ts.p.colModel[j].lso) {
+ $("div span.s-ico",this).show();
+ $("div span.ui-icon-"+ts.p.colModel[j].lso,this).removeClass("ui-state-disabled");
+ }
+ } else {
+ if(ts.p.viewsortcols[0]) {$("div span.s-ico",this).show(); if(j===ts.p.lastsort){ $("div span.ui-icon-"+ts.p.sortorder,this).removeClass("ui-state-disabled");}}
+ else if( j === ts.p.lastsort) {$("div span.s-ico",this).show();$("div span.ui-icon-"+ts.p.sortorder,this).removeClass("ui-state-disabled");}
+ }
}
if(ts.p.footerrow) { tfoot += "<td role='gridcell' "+formatCol(j,0,'', null, '', false)+"> </td>"; }
}).mousedown(function(e) {
- if ($(e.target).closest("th>span.ui-jqgrid-resize").length != 1) { return; }
+ if ($(e.target).closest("th>span.ui-jqgrid-resize").length !== 1) { return; }
var ci = getColumnHeaderIndex(this);
if(ts.p.forceFit===true) {ts.p.nv= nextVisible(ci);}
grid.dragStart(ci, e, getOffset(ci));
@@ -2353,10 +2577,22 @@
var s = "th>div.ui-jqgrid-sortable",r,d;
if (!ts.p.viewsortcols[2]) { s = "th>div>span>span.ui-grid-ico-sort"; }
var t = $(e.target).closest(s);
- if (t.length != 1) { return; }
- var ci = getColumnHeaderIndex(this);
+ if (t.length !== 1) { return; }
+ var ci;
+ if(ts.p.frozenColumns) {
+ var tid = $(this)[0].id.substring(5);
+ $(ts.p.colModel).each(function(i){
+ if (this.name === tid) {
+ ci = i;return false;
+ }
+ });
+ } else {
+ ci = getColumnHeaderIndex(this);
+ }
if (!ts.p.viewsortcols[2]) { r=true;d=t.attr("sort"); }
- sortData( $('div',this)[0].id, ci, r, d);
+ if(ci != null){
+ sortData( $('div',this)[0].id, ci, r, d, this);
+ }
return false;
});
if (ts.p.sortable && $.fn.sortable) {
@@ -2372,7 +2608,7 @@
firstr = null;
var hTable = $("<table class='ui-jqgrid-htable' style='width:"+ts.p.tblwidth+"px' role='grid' aria-labelledby='gbox_"+this.id+"' cellspacing='0' cellpadding='0' border='0'></table>").append(thead),
hg = (ts.p.caption && ts.p.hiddengrid===true) ? true : false,
- hb = $("<div class='ui-jqgrid-hbox" + (dir=="rtl" ? "-rtl" : "" )+"'></div>");
+ hb = $("<div class='ui-jqgrid-hbox" + (dir==="rtl" ? "-rtl" : "" )+"'></div>");
thead = null;
grid.hDiv = document.createElement("div");
$(grid.hDiv)
@@ -2384,9 +2620,9 @@
if(hg) { $(grid.hDiv).hide(); }
if(ts.p.pager){
// TBD -- escape ts.p.pager here?
- if(typeof ts.p.pager == "string") {if(ts.p.pager.substr(0,1) !="#") { ts.p.pager = "#"+ts.p.pager;} }
+ if(typeof ts.p.pager === "string") {if(ts.p.pager.substr(0,1) !== "#") { ts.p.pager = "#"+ts.p.pager;} }
else { ts.p.pager = "#"+ $(ts.p.pager).attr("id");}
- $(ts.p.pager).css({width: grid.width+"px"}).appendTo(eg).addClass('ui-state-default ui-jqgrid-pager ui-corner-bottom');
+ $(ts.p.pager).css({width: grid.width+"px"}).addClass('ui-state-default ui-jqgrid-pager ui-corner-bottom').appendTo(eg);
if(hg) {$(ts.p.pager).hide();}
setPager(ts.p.pager,'');
}
@@ -2412,7 +2648,7 @@
cSel = $(ts).triggerHandler("jqGridBeforeSelectRow", [ptr[0].id, e]);
cSel = (cSel === false || cSel === 'stop') ? false : true;
if(cSel && $.isFunction(ts.p.beforeSelectRow)) { cSel = ts.p.beforeSelectRow.call(ts,ptr[0].id, e); }
- if (td.tagName == 'A' || ((td.tagName == 'INPUT' || td.tagName == 'TEXTAREA' || td.tagName == 'OPTION' || td.tagName == 'SELECT' ) && !scb) ) { return; }
+ if (td.tagName === 'A' || ((td.tagName === 'INPUT' || td.tagName === 'TEXTAREA' || td.tagName === 'OPTION' || td.tagName === 'SELECT' ) && !scb) ) { return; }
if(cSel === true) {
ri = ptr[0].id;
ci = $.jgrid.getCellIndex(td);
@@ -2462,7 +2698,7 @@
if (opts && opts.current) {
ts.grid.selectionPreserver(ts);
}
- if(ts.p.datatype=="local"){ $(ts).jqGrid("resetSelection"); if(ts.p.data.length) { refreshIndex();} }
+ if(ts.p.datatype==="local"){ $(ts).jqGrid("resetSelection"); if(ts.p.data.length) { refreshIndex();} }
else if(!ts.p.treeGrid) {
ts.p.selrow=null;
if(ts.p.multiselect) {ts.p.selarrrow =[];setHeadCheckBox(false);}
@@ -2496,7 +2732,7 @@
ri = ptr[0].rowIndex;
ci = $.jgrid.getCellIndex(td);
$(ts).triggerHandler("jqGridDblClickRow", [$(ptr).attr("id"),ri,ci,e]);
- if ($.isFunction(this.p.ondblClickRow)) { ts.p.ondblClickRow.call(ts,$(ptr).attr("id"),ri,ci, e); }
+ if ($.isFunction(ts.p.ondblClickRow)) { ts.p.ondblClickRow.call(ts,$(ptr).attr("id"),ri,ci, e); }
})
.bind('contextmenu', function(e) {
td = e.target;
@@ -2506,39 +2742,43 @@
ri = ptr[0].rowIndex;
ci = $.jgrid.getCellIndex(td);
$(ts).triggerHandler("jqGridRightClickRow", [$(ptr).attr("id"),ri,ci,e]);
- if ($.isFunction(this.p.onRightClickRow)) { ts.p.onRightClickRow.call(ts,$(ptr).attr("id"),ri,ci, e); }
+ if ($.isFunction(ts.p.onRightClickRow)) { ts.p.onRightClickRow.call(ts,$(ptr).attr("id"),ri,ci, e); }
});
grid.bDiv = document.createElement("div");
if(isMSIE) { if(String(ts.p.height).toLowerCase() === "auto") { ts.p.height = "100%"; } }
$(grid.bDiv)
- .append($('<div style="position:relative;'+(isMSIE && $.browser.version < 8 ? "height:0.01%;" : "")+'"></div>').append('<div></div>').append(this))
+ .append($('<div style="position:relative;'+(isMSIE && $.jgrid.msiever() < 8 ? "height:0.01%;" : "")+'"></div>').append('<div></div>').append(this))
.addClass("ui-jqgrid-bdiv")
.css({ height: ts.p.height+(isNaN(ts.p.height)?"":"px"), width: (grid.width)+"px"})
.scroll(grid.scrollGrid);
$("table:first",grid.bDiv).css({width:ts.p.tblwidth+"px"});
- if( isMSIE ) {
- if( $("tbody",this).length == 2 ) { $("tbody:gt(0)",this).remove();}
- if( ts.p.multikey) {$(grid.bDiv).bind("selectstart",function(){return false;});}
- } else {
- if( ts.p.multikey) {$(grid.bDiv).bind("mousedown",function(){return false;});}
+ if( !$.support.tbody ) { //IE
+ if( $("tbody",this).length === 2 ) { $("tbody:gt(0)",this).remove();}
}
+ if(ts.p.multikey){
+ if( $.jgrid.msie) {
+ $(grid.bDiv).bind("selectstart",function(){return false;});
+ } else {
+ $(grid.bDiv).bind("mousedown",function(){return false;});
+ }
+ }
if(hg) {$(grid.bDiv).hide();}
grid.cDiv = document.createElement("div");
var arf = ts.p.hidegrid===true ? $("<a role='link' href='javascript:void(0)'/>").addClass('ui-jqgrid-titlebar-close HeaderButton').hover(
function(){ arf.addClass('ui-state-hover');},
function() {arf.removeClass('ui-state-hover');})
- .append("<span class='ui-icon ui-icon-circle-triangle-n'></span>").css((dir=="rtl"?"left":"right"),"0px") : "";
- $(grid.cDiv).append(arf).append("<span class='ui-jqgrid-title"+(dir=="rtl" ? "-rtl" :"" )+"'>"+ts.p.caption+"</span>")
+ .append("<span class='ui-icon ui-icon-circle-triangle-n'></span>").css((dir==="rtl"?"left":"right"),"0px") : "";
+ $(grid.cDiv).append(arf).append("<span class='ui-jqgrid-title"+(dir==="rtl" ? "-rtl" :"" )+"'>"+ts.p.caption+"</span>")
.addClass("ui-jqgrid-titlebar ui-widget-header ui-corner-top ui-helper-clearfix");
$(grid.cDiv).insertBefore(grid.hDiv);
if( ts.p.toolbar[0] ) {
grid.uDiv = document.createElement("div");
- if(ts.p.toolbar[1] == "top") {$(grid.uDiv).insertBefore(grid.hDiv);}
- else if (ts.p.toolbar[1]=="bottom" ) {$(grid.uDiv).insertAfter(grid.hDiv);}
- if(ts.p.toolbar[1]=="both") {
+ if(ts.p.toolbar[1] === "top") {$(grid.uDiv).insertBefore(grid.hDiv);}
+ else if (ts.p.toolbar[1]==="bottom" ) {$(grid.uDiv).insertAfter(grid.hDiv);}
+ if(ts.p.toolbar[1]==="both") {
grid.ubDiv = document.createElement("div");
- $(grid.uDiv).insertBefore(grid.hDiv).addClass("ui-userdata ui-state-default").attr("id","t_"+this.id);
- $(grid.ubDiv).insertAfter(grid.hDiv).addClass("ui-userdata ui-state-default").attr("id","tb_"+this.id);
+ $(grid.uDiv).addClass("ui-userdata ui-state-default").attr("id","t_"+this.id).insertBefore(grid.hDiv);
+ $(grid.ubDiv).addClass("ui-userdata ui-state-default").attr("id","tb_"+this.id).insertAfter(grid.hDiv);
if(hg) {$(grid.ubDiv).hide();}
} else {
$(grid.uDiv).width(grid.width).addClass("ui-userdata ui-state-default").attr("id","t_"+this.id);
@@ -2549,13 +2789,13 @@
ts.p.toppager = $.jgrid.jqID(ts.p.id)+"_toppager";
grid.topDiv = $("<div id='"+ts.p.toppager+"'></div>")[0];
ts.p.toppager = "#"+ts.p.toppager;
- $(grid.topDiv).insertBefore(grid.hDiv).addClass('ui-state-default ui-jqgrid-toppager').width(grid.width);
+ $(grid.topDiv).addClass('ui-state-default ui-jqgrid-toppager').width(grid.width).insertBefore(grid.hDiv);
setPager(ts.p.toppager,'_t');
}
if(ts.p.footerrow) {
grid.sDiv = $("<div class='ui-jqgrid-sdiv'></div>")[0];
- hb = $("<div class='ui-jqgrid-hbox"+(dir=="rtl"?"-rtl":"")+"'></div>");
- $(grid.sDiv).append(hb).insertAfter(grid.hDiv).width(grid.width);
+ hb = $("<div class='ui-jqgrid-hbox"+(dir==="rtl"?"-rtl":"")+"'></div>");
+ $(grid.sDiv).append(hb).width(grid.width).insertAfter(grid.hDiv);
$(hb).append(tfoot);
grid.footers = $(".ui-jqgrid-ftable",grid.sDiv)[0].rows[0].cells;
if(ts.p.rownumbers) { grid.footers[0].className = 'ui-state-default jqgrid-rownum'; }
@@ -2570,14 +2810,14 @@
elems = ".ui-jqgrid-bdiv, .ui-jqgrid-hdiv, .ui-jqgrid-pager, .ui-jqgrid-sdiv",
counter, self = this;
if(ts.p.toolbar[0]===true) {
- if( ts.p.toolbar[1]=='both') {
+ if( ts.p.toolbar[1]==='both') {
elems += ', #' + $(grid.ubDiv).attr('id');
}
elems += ', #' + $(grid.uDiv).attr('id');
}
counter = $(elems,"#gview_"+$.jgrid.jqID(ts.p.id)).length;
- if(ts.p.gridstate == 'visible') {
+ if(ts.p.gridstate === 'visible') {
$(elems,"#gbox_"+$.jgrid.jqID(ts.p.id)).slideUp("fast", function() {
counter--;
if (counter === 0) {
@@ -2588,7 +2828,7 @@
if(onHdCl) {if(!hg) {ts.p.onHeaderClick.call(ts,ts.p.gridstate,e);}}
}
});
- } else if(ts.p.gridstate == 'hidden'){
+ } else if(ts.p.gridstate === 'hidden'){
$(elems,"#gbox_"+$.jgrid.jqID(ts.p.id)).slideDown("fast", function() {
counter--;
if (counter === 0) {
@@ -2627,6 +2867,8 @@
ts.addXmlData = function(d) {addXmlData(d,ts.grid.bDiv);};
ts.addJSONData = function(d) {addJSONData(d,ts.grid.bDiv);};
this.grid.cols = this.rows[0].cells;
+ $(ts).triggerHandler("jqGridInitGrid");
+ if ($.isFunction( ts.p.onInitGrid )) { ts.p.onInitGrid.call(ts); }
populate();ts.p.hiddengrid=false;
});
@@ -2636,11 +2878,11 @@
var $t = this[0];
if (!$t || !$t.grid) {return;}
if (!pName) { return $t.p; }
- else {return typeof($t.p[pName]) != "undefined" ? $t.p[pName] : null;}
+ return $t.p[pName] !== undefined ? $t.p[pName] : null;
},
setGridParam : function (newParams){
return this.each(function(){
- if (this.grid && typeof(newParams) === 'object') {$.extend(true,this.p,newParams);}
+ if (this.grid && typeof newParams === 'object') {$.extend(true,this.p,newParams);}
});
},
getDataIDs : function () {
@@ -2664,7 +2906,7 @@
var $t = this, stat,pt, ner, ia, tpsr, fid;
if(selection === undefined) { return; }
onsr = onsr === false ? false : true;
- pt=$t.rows.namedItem(selection+"");
+ pt=$t.rows.namedItem(String(selection));
if(!pt || !pt.className || pt.className.indexOf( 'ui-state-disabled' ) > -1 ) { return; }
function scrGrid(iR){
var ch = $($t.grid.bDiv)[0].clientHeight,
@@ -2689,7 +2931,7 @@
}
if(!$t.p.multiselect) {
if(pt.className !== "ui-subgrid") {
- if( $t.p.selrow != pt.id) {
+ if( $t.p.selrow !== pt.id) {
$($t.rows.namedItem($t.p.selrow)).removeClass("ui-state-highlight").attr({"aria-selected":"false", "tabindex" : "-1"});
$(pt).addClass("ui-state-highlight").attr({"aria-selected":"true", "tabindex" : "0"});//.focus();
if(fid) {
@@ -2701,8 +2943,10 @@
stat = false;
}
$t.p.selrow = pt.id;
- $($t).triggerHandler("jqGridSelectRow", [pt.id, stat, e]);
- if( $t.p.onSelectRow && onsr) { $t.p.onSelectRow.call($t, pt.id, stat, e); }
+ if( onsr ) {
+ $($t).triggerHandler("jqGridSelectRow", [pt.id, stat, e]);
+ if( $t.p.onSelectRow) { $t.p.onSelectRow.call($t, pt.id, stat, e); }
+ }
}
} else {
//unselect selectall checkbox when deselecting a specific row
@@ -2729,8 +2973,10 @@
}
$("#jqg_"+$.jgrid.jqID($t.p.id)+"_"+$.jgrid.jqID(selection), "#"+$.jgrid.jqID(fid))[$t.p.useProp ? 'prop': 'attr']("checked",stat);
}
- $($t).triggerHandler("jqGridSelectRow", [pt.id, stat, e]);
- if( $t.p.onSelectRow && onsr) { $t.p.onSelectRow.call($t, pt.id , stat, e); }
+ if( onsr ) {
+ $($t).triggerHandler("jqGridSelectRow", [pt.id, stat, e]);
+ if( $t.p.onSelectRow) { $t.p.onSelectRow.call($t, pt.id , stat, e); }
+ }
}
});
},
@@ -2740,7 +2986,7 @@
if( t.p.frozenColumns === true ) {
fid = t.p.id+"_frozen";
}
- if(typeof(rowid) !== "undefined" ) {
+ if(rowid !== undefined ) {
sr = rowid === t.p.selrow ? t.p.selrow : rowid;
$("#"+$.jgrid.jqID(t.p.id)+" tbody:first tr#"+$.jgrid.jqID(sr)).removeClass("ui-state-highlight").attr("aria-selected","false");
if (fid) { $("#"+$.jgrid.jqID(sr), "#"+$.jgrid.jqID(fid)).removeClass("ui-state-highlight"); }
@@ -2782,7 +3028,7 @@
var res = {}, resall, getall=false, len, j=0;
this.each(function(){
var $t = this,nm,ind;
- if(typeof(rowid) == 'undefined') {
+ if(rowid === undefined) {
getall = true;
resall = [];
len = $t.rows.length;
@@ -2797,7 +3043,7 @@
$('td[role="gridcell"]',ind).each( function(i) {
nm = $t.p.colModel[i].name;
if ( nm !== 'cb' && nm !== 'subgrid' && nm !== 'rn') {
- if($t.p.treeGrid===true && nm == $t.p.ExpandColumn) {
+ if($t.p.treeGrid===true && nm === $t.p.ExpandColumn) {
res[nm] = $.jgrid.htmlDecode($("span:first",this).html());
} else {
try {
@@ -2813,16 +3059,14 @@
j++;
}
});
- return resall ? resall: res;
+ return resall || res;
},
delRowData : function(rowid) {
- var success = false, rowInd, ia, ri;
+ var success = false, rowInd, ia;
this.each(function() {
var $t = this;
rowInd = $t.rows.namedItem(rowid);
if(!rowInd) {return false;}
- else {
- ri = rowInd.rowIndex;
$(rowInd).remove();
$t.p.records--;
$t.p.reccount--;
@@ -2830,14 +3074,17 @@
success=true;
if($t.p.multiselect) {
ia = $.inArray(rowid,$t.p.selarrrow);
- if(ia != -1) { $t.p.selarrrow.splice(ia,1);}
+ if(ia !== -1) { $t.p.selarrrow.splice(ia,1);}
}
- if(rowid == $t.p.selrow) {$t.p.selrow=null;}
- }
- if($t.p.datatype == 'local') {
+ if ($t.p.multiselect && $t.p.selarrrow.length > 0) {
+ $t.p.selrow = $t.p.selarrrow[$t.p.selarrrow.length-1];
+ } else {
+ $t.p.selrow = null;
+ }
+ if($t.p.datatype === 'local') {
var id = $.jgrid.stripPref($t.p.idPrefix, rowid),
pos = $t.p._index[id];
- if(typeof(pos) != 'undefined') {
+ if(pos !== undefined) {
$t.p.data.splice(pos,1);
$t.refreshIndex();
}
@@ -2845,7 +3092,7 @@
if( $t.p.altRows === true && success ) {
var cn = $t.p.altclass;
$($t.rows).each(function(i){
- if(i % 2 ==1) { $(this).addClass(cn); }
+ if(i % 2 === 1) { $(this).addClass(cn); }
else { $(this).removeClass(cn); }
});
}
@@ -2863,28 +3110,29 @@
try {
$(this.p.colModel).each(function(i){
nm = this.name;
- if( data[nm] !== undefined) {
- lcdata[nm] = this.formatter && typeof(this.formatter) === 'string' && this.formatter == 'date' ? $.unformat.date.call(t,data[nm],this) : data[nm];
- vl = t.formatter( rowid, data[nm], i, data, 'edit');
+ var dval =$.jgrid.getAccessor(data,nm);
+ if( dval !== undefined) {
+ lcdata[nm] = this.formatter && typeof this.formatter === 'string' && this.formatter === 'date' ? $.unformat.date.call(t,dval,this) : dval;
+ vl = t.formatter( rowid, dval, i, data, 'edit');
title = this.title ? {"title":$.jgrid.stripHtml(vl)} : {};
- if(t.p.treeGrid===true && nm == t.p.ExpandColumn) {
- $("td:eq("+i+") > span:first",ind).html(vl).attr(title);
+ if(t.p.treeGrid===true && nm === t.p.ExpandColumn) {
+ $("td[role='gridcell']:eq("+i+") > span:first",ind).html(vl).attr(title);
} else {
- $("td:eq("+i+")",ind).html(vl).attr(title);
+ $("td[role='gridcell']:eq("+i+")",ind).html(vl).attr(title);
}
}
});
- if(t.p.datatype == 'local') {
+ if(t.p.datatype === 'local') {
var id = $.jgrid.stripPref(t.p.idPrefix, rowid),
- pos = t.p._index[id];
+ pos = t.p._index[id], key;
if(t.p.treeGrid) {
- for(var key in t.p.treeReader ){
- if(lcdata.hasOwnProperty(t.p.treeReader[key])) {
+ for(key in t.p.treeReader){
+ if(t.p.treeReader.hasOwnProperty(key)) {
delete lcdata[t.p.treeReader[key]];
}
}
}
- if(typeof(pos) != 'undefined') {
+ if(pos !== undefined) {
t.p.data[pos] = $.extend(true, t.p.data[pos], lcdata);
}
lcdata = null;
@@ -2918,12 +3166,12 @@
gi = t.p.multiselect ===true ? 1 :0;
si = t.p.subGrid===true ? 1 :0;
if(!aradd) {
- if(typeof(rowid) != 'undefined') { rowid = rowid+"";}
+ if(rowid !== undefined) { rowid = String(rowid);}
else {
rowid = $.jgrid.randId();
if(t.p.keyIndex !== false) {
cnm = t.p.colModel[t.p.keyIndex+gi+si+ni].name;
- if(typeof rdata[0][cnm] != "undefined") { rowid = rdata[0][cnm]; }
+ if(rdata[0][cnm] !== undefined) { rowid = rdata[0][cnm]; }
}
}
}
@@ -2934,7 +3182,12 @@
data = rdata[k];
row=[];
if(aradd) {
- try {rowid = data[cnm];}
+ try {
+ rowid = data[cnm];
+ if(rowid===undefined) {
+ rowid = $.jgrid.randId();
+ }
+ }
catch (e) {rowid = $.jgrid.randId();}
cna = t.p.altRows === true ? (t.rows.length-1)%2 === 0 ? cn : "" : "";
}
@@ -2957,7 +3210,7 @@
nm = cm.name;
lcdata[nm] = data[nm];
v = t.formatter( rowid, $.jgrid.getAccessor(data,nm), i, data );
- prp = t.formatCol(i,1,v, data, rowid, true);
+ prp = t.formatCol(i,1,v, data, rowid, lcdata);
row[row.length] = "<td role=\"gridcell\" "+prp+">"+v+"</td>";
}
row.unshift( t.constructTr(rowid, false, cna, lcdata, data, false ) );
@@ -2997,7 +3250,7 @@
$(t).triggerHandler("jqGridAfterInsertRow", [rowid,data,data]);
if(air) { t.p.afterInsertRow.call(t,rowid,data,data); }
k++;
- if(t.p.datatype == 'local') {
+ if(t.p.datatype === 'local') {
lcdata[t.p.localReader.id] = id;
t.p._index[id] = t.p.data.length;
t.p.data.push(lcdata);
@@ -3005,11 +3258,11 @@
}
}
if( t.p.altRows === true && !aradd) {
- if (pos == "last") {
- if ((t.rows.length-1)%2 == 1) {$(t.rows[t.rows.length-1]).addClass(cn);}
+ if (pos === "last") {
+ if ((t.rows.length-1)%2 === 1) {$(t.rows[t.rows.length-1]).addClass(cn);}
} else {
$(t.rows).each(function(i){
- if(i % 2 ==1) { $(this).addClass(cn); }
+ if(i % 2 ===1) { $(this).addClass(cn); }
else { $(this).removeClass(cn); }
});
}
@@ -3023,41 +3276,42 @@
footerData : function(action,data, format) {
var nm, success=false, res={}, title;
function isEmpty(obj) {
- for(var i in obj) {
+ var i;
+ for(i in obj) {
if (obj.hasOwnProperty(i)) { return false; }
}
return true;
}
- if(typeof(action) == "undefined") { action = "get"; }
- if(typeof(format) != "boolean") { format = true; }
+ if(action === undefined) { action = "get"; }
+ if(typeof format !== "boolean") { format = true; }
action = action.toLowerCase();
this.each(function(){
var t = this, vl;
if(!t.grid || !t.p.footerrow) {return false;}
- if(action == "set") { if(isEmpty(data)) { return false; } }
+ if(action === "set") { if(isEmpty(data)) { return false; } }
success=true;
$(this.p.colModel).each(function(i){
nm = this.name;
- if(action == "set") {
+ if(action === "set") {
if( data[nm] !== undefined) {
vl = format ? t.formatter( "", data[nm], i, data, 'edit') : data[nm];
title = this.title ? {"title":$.jgrid.stripHtml(vl)} : {};
$("tr.footrow td:eq("+i+")",t.grid.sDiv).html(vl).attr(title);
success = true;
}
- } else if(action == "get") {
+ } else if(action === "get") {
res[nm] = $("tr.footrow td:eq("+i+")",t.grid.sDiv).html();
}
});
});
- return action == "get" ? res : success;
+ return action === "get" ? res : success;
},
showHideCol : function(colname,show) {
return this.each(function() {
- var $t = this, fndh=false, brd=$.jgrid.cellWidth()? 0: $t.p.cellLayout, cw;
+ var $t = this, fndh=false, brd=$.jgrid.cell_width ? 0: $t.p.cellLayout, cw;
if (!$t.grid ) {return;}
if( typeof colname === 'string') {colname=[colname];}
- show = show != "none" ? "" : "none";
+ show = show !== "none" ? "" : "none";
var sw = show === "" ? true :false,
gh = $t.p.groupHeader && (typeof $t.p.groupHeader === 'object' || $.isFunction($t.p.groupHeader) );
if(gh) { $($t).jqGrid('destroyGroupHeader', false); }
@@ -3152,9 +3406,8 @@
return this.each(function(){
if (!this.grid ) {return;}
var $t = this, cw,
- initwidth = 0, brd=$.jgrid.cellWidth() ? 0: $t.p.cellLayout, lvc, vc=0, hs=false, scw=$t.p.scrollOffset, aw, gw=0,
- cl = 0,cr;
- if(typeof shrink != 'boolean') {
+ initwidth = 0, brd=$.jgrid.cell_width ? 0: $t.p.cellLayout, lvc, vc=0, hs=false, scw=$t.p.scrollOffset, aw, gw=0, cr;
+ if(typeof shrink !== 'boolean') {
shrink=$t.p.shrinkToFit;
}
if(isNaN(nwidth)) {return;}
@@ -3168,7 +3421,7 @@
if($t.p.toppager ) {$($t.p.toppager).css("width",nwidth+"px");}
if($t.p.toolbar[0] === true){
$($t.grid.uDiv).css("width",nwidth+"px");
- if($t.p.toolbar[1]=="both") {$($t.grid.ubDiv).css("width",nwidth+"px");}
+ if($t.p.toolbar[1]==="both") {$($t.grid.ubDiv).css("width",nwidth+"px");}
}
if($t.p.footerrow) { $($t.grid.sDiv).css("width",nwidth+"px"); }
if(shrink ===false && $t.p.forceFit === true) {$t.p.forceFit=false;}
@@ -3182,7 +3435,6 @@
} else {
vc++;
}
- cl++;
}
});
if(vc === 0) { return; }
@@ -3272,9 +3524,9 @@
return this.each(function(){
var $t = this, pos=-1;
if(!$t.grid) {return;}
- if(typeof(colname) != "undefined") {
+ if(colname !== undefined) {
$($t.p.colModel).each(function(i){
- if (this.name == colname) {
+ if (this.name === colname) {
pos = i;return false;
}
});
@@ -3299,7 +3551,7 @@
if(!$t.grid) {return;}
if(isNaN(colname)) {
$($t.p.colModel).each(function(i){
- if (this.name == colname) {
+ if (this.name === colname) {
pos = i;return false;
}
});
@@ -3316,11 +3568,11 @@
} else {
$(tcell).html(v).attr(title);
}
- if($t.p.datatype == "local") {
+ if($t.p.datatype === "local") {
var cm = $t.p.colModel[pos], index;
- nData = cm.formatter && typeof(cm.formatter) === 'string' && cm.formatter == 'date' ? $.unformat.date.call($t,nData,cm) : nData;
- index = $t.p._index[rowid];
- if(typeof index != "undefined") {
+ nData = cm.formatter && typeof cm.formatter === 'string' && cm.formatter === 'date' ? $.unformat.date.call($t,nData,cm) : nData;
+ index = $t.p._index[$.jgrid.stripPref($t.p.idPrefix, rowid)];
+ if(index !== undefined) {
$t.p.data[index][cm.name] = nData;
}
}
@@ -3362,8 +3614,8 @@
},
getCol : function (col, obj, mathopr) {
var ret = [], val, sum=0, min, max, v;
- obj = typeof (obj) != 'boolean' ? false : obj;
- if(typeof mathopr == 'undefined') { mathopr = false; }
+ obj = typeof obj !== 'boolean' ? false : obj;
+ if(mathopr === undefined) { mathopr = false; }
this.each(function(){
var $t=this, pos=-1;
if(!$t.grid) {return;}
@@ -3387,7 +3639,7 @@
if(mathopr) {
v = parseFloat(val);
sum += v;
- if (max === undefined) {max = min = v}
+ if (max === undefined) {max = min = v;}
min = Math.min(min, v);
max = Math.max(max, v);
}
@@ -3414,7 +3666,7 @@
return this.each(function(){
var $t = this;
if(!$t.grid) {return;}
- if(typeof clearfooter != 'boolean') { clearfooter = false; }
+ if(typeof clearfooter !== 'boolean') { clearfooter = false; }
if($t.p.deepempty) {$("#"+$.jgrid.jqID($t.p.id)+" tbody:first tr:gt(0)").remove();}
else {
var trf = $("#"+$.jgrid.jqID($t.p.id)+" tbody:first tr:first")[0];
@@ -3454,7 +3706,7 @@
expanded = $t.p.treeReader.expanded_field;
//check for arrow keys
if(target) {
- mind = $t.p._index[target.id];
+ mind = $t.p._index[$.jgrid.stripPref($t.p.idPrefix, target.id)];
if(event.keyCode === 37 || event.keyCode === 38 || event.keyCode === 39 || event.keyCode === 40){
// up key
if(event.keyCode === 38 ){
@@ -3535,8 +3787,8 @@
getLocalRow : function (rowid) {
var ret = false, ind;
this.each(function(){
- if(typeof(rowid) !== "undefined") {
- ind = this.p._index[rowid];
+ if(rowid !== undefined) {
+ ind = this.p._index[$.jgrid.stripPref(this.p.idPrefix, rowid)];
if(ind >= 0 ) {
ret = this.p.data[ind];
}
@@ -3546,6 +3798,8 @@
}
});
})(jQuery);
+/*jshint eqeqeq:false */
+/*global jQuery */
(function($){
/**
* jqGrid extension for custom methods
@@ -3558,15 +3812,14 @@
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl-2.0.html
**/
-/*global jQuery, $ */
"use strict";
$.jgrid.extend({
getColProp : function(colname){
var ret ={}, $t = this[0];
if ( !$t.grid ) { return false; }
- var cM = $t.p.colModel;
- for ( var i =0;i<cM.length;i++ ) {
- if ( cM[i].name == colname ) {
+ var cM = $t.p.colModel, i;
+ for ( i=0;i<cM.length;i++ ) {
+ if ( cM[i].name === colname ) {
ret = cM[i];
break;
}
@@ -3578,10 +3831,10 @@
return this.each(function(){
if ( this.grid ) {
if ( obj ) {
- var cM = this.p.colModel;
- for ( var i =0;i<cM.length;i++ ) {
- if ( cM[i].name == colname ) {
- $.extend(this.p.colModel[i],obj);
+ var cM = this.p.colModel, i;
+ for ( i=0;i<cM.length;i++ ) {
+ if ( cM[i].name === colname ) {
+ $.extend(true, this.p.colModel[i],obj);
break;
}
}
@@ -3591,16 +3844,16 @@
},
sortGrid : function(colname,reload, sor){
return this.each(function(){
- var $t=this,idx=-1;
+ var $t=this,idx=-1,i;
if ( !$t.grid ) { return;}
if ( !colname ) { colname = $t.p.sortname; }
- for ( var i=0;i<$t.p.colModel.length;i++ ) {
- if ( $t.p.colModel[i].index == colname || $t.p.colModel[i].name==colname ) {
+ for ( i=0;i<$t.p.colModel.length;i++ ) {
+ if ( $t.p.colModel[i].index === colname || $t.p.colModel[i].name === colname ) {
idx = i;
break;
}
}
- if ( idx!=-1 ){
+ if ( idx !== -1 ){
var sort = $t.p.colModel[idx].sortable;
if ( typeof sort !== 'boolean' ) { sort = true; }
if ( typeof reload !=='boolean' ) { reload = false; }
@@ -3681,16 +3934,16 @@
$("#gbox_"+gid).remove();
});
},
- setGridState : function(state) {
+ setGridState : function(state) {
return this.each(function(){
if ( !this.grid ) {return;}
var $t = this;
- if(state == 'hidden'){
+ if(state === 'hidden'){
$(".ui-jqgrid-bdiv, .ui-jqgrid-hdiv","#gview_"+$.jgrid.jqID($t.p.id)).slideUp("fast");
if($t.p.pager) {$($t.p.pager).slideUp("fast");}
if($t.p.toppager) {$($t.p.toppager).slideUp("fast");}
if($t.p.toolbar[0]===true) {
- if( $t.p.toolbar[1]=='both') {
+ if( $t.p.toolbar[1] === 'both') {
$($t.grid.ubDiv).slideUp("fast");
}
$($t.grid.uDiv).slideUp("fast");
@@ -3698,12 +3951,12 @@
if($t.p.footerrow) { $(".ui-jqgrid-sdiv","#gbox_"+$.jgrid.jqID($t.p.id)).slideUp("fast"); }
$(".ui-jqgrid-titlebar-close span",$t.grid.cDiv).removeClass("ui-icon-circle-triangle-n").addClass("ui-icon-circle-triangle-s");
$t.p.gridstate = 'hidden';
- } else if(state=='visible') {
+ } else if(state === 'visible') {
$(".ui-jqgrid-hdiv, .ui-jqgrid-bdiv","#gview_"+$.jgrid.jqID($t.p.id)).slideDown("fast");
if($t.p.pager) {$($t.p.pager).slideDown("fast");}
if($t.p.toppager) {$($t.p.toppager).slideDown("fast");}
if($t.p.toolbar[0]===true) {
- if( $t.p.toolbar[1]=='both') {
+ if( $t.p.toolbar[1] === 'both') {
$($t.grid.ubDiv).slideDown("fast");
}
$($t.grid.uDiv).slideDown("fast");
@@ -3726,18 +3979,28 @@
searchurl : '',
stringResult: false,
groupOp: 'AND',
- defaultSearch : "bw"
- },p || {});
+ defaultSearch : "bw",
+ searchOperators : false,
+ operandTitle : "Click to select search operation.",
+ operands : { "eq" :"==", "ne":"!","lt":"<","le":"<=","gt":">","ge":">=","bw":"^","bn":"!^","in":"=","ni":"!=","ew":"|","en":"!@","cn":"~","nc":"!~","nu":"#","nn":"!#"}
+ }, $.jgrid.search , p || {});
return this.each(function(){
var $t = this;
if(this.ftoolbar) { return; }
var triggerToolbar = function() {
var sdata={}, j=0, v, nm, sopt={},so;
$.each($t.p.colModel,function(){
+ var $elem = $("#gs_"+$.jgrid.jqID(this.name), (this.frozen===true && $t.p.frozenColumns === true) ? $t.grid.fhDiv : $t.grid.hDiv);
nm = this.index || this.name;
- so = (this.searchoptions && this.searchoptions.sopt) ? this.searchoptions.sopt[0] : this.stype=='select'? 'eq' : p.defaultSearch;
- v = $("#gs_"+$.jgrid.jqID(this.name), (this.frozen===true && $t.p.frozenColumns === true) ? $t.grid.fhDiv : $t.grid.hDiv).val();
- if(v) {
+ if(p.searchOperators ) {
+ so = $elem.parent().prev().children("a").attr("soper") || p.defaultSearch;
+ } else {
+ so = (this.searchoptions && this.searchoptions.sopt) ? this.searchoptions.sopt[0] : this.stype==='select'? 'eq' : p.defaultSearch;
+ }
+ v = this.stype === "custom" && $.isFunction(this.searchoptions.custom_value) && $elem.length > 0 && $elem[0].nodeName.toUpperCase() === "SPAN" ?
+ this.searchoptions.custom_value.call($t, $elem.children(".customelement:first"), "get") :
+ $elem.val();
+ if(v || so==="nu" || so==="nn") {
sdata[nm] = v;
sopt[nm] = so;
j++;
@@ -3748,7 +4011,7 @@
}
});
var sd = j>0 ? true : false;
- if(p.stringResult === true || $t.p.datatype == "local") {
+ if(p.stringResult === true || $t.p.datatype === "local") {
var ruleGroup = "{\"groupOp\":\"" + p.groupOp + "\",\"rules\":[";
var gi=0;
$.each(sdata,function(i,n){
@@ -3778,19 +4041,19 @@
if(saveurl) {$($t).jqGrid("setGridParam",{url:saveurl});}
$($t).triggerHandler("jqGridToolbarAfterSearch");
if($.isFunction(p.afterSearch)){p.afterSearch.call($t);}
- };
- var clearToolbar = function(trigger){
+ },
+ clearToolbar = function(trigger){
var sdata={}, j=0, nm;
- trigger = (typeof trigger != 'boolean') ? true : trigger;
+ trigger = (typeof trigger !== 'boolean') ? true : trigger;
$.each($t.p.colModel,function(){
- var v;
+ var v, $elem = $("#gs_"+$.jgrid.jqID(this.name),(this.frozen===true && $t.p.frozenColumns === true) ? $t.grid.fhDiv : $t.grid.hDiv);
if(this.searchoptions && this.searchoptions.defaultValue !== undefined) { v = this.searchoptions.defaultValue; }
nm = this.index || this.name;
switch (this.stype) {
case 'select' :
- $("#gs_"+$.jgrid.jqID(this.name)+" option",(this.frozen===true && $t.p.frozenColumns === true) ? $t.grid.fhDiv : $t.grid.hDiv).each(function (i){
+ $elem.find("option").each(function (i){
if(i===0) { this.selected = true; }
- if ($(this).val() == v) {
+ if ($(this).val() === v) {
this.selected = true;
return false;
}
@@ -3806,7 +4069,7 @@
}
break;
case 'text':
- $("#gs_"+$.jgrid.jqID(this.name),(this.frozen===true && $t.p.frozenColumns === true) ? $t.grid.fhDiv : $t.grid.hDiv).val(v);
+ $elem.val(v);
if(v !== undefined) {
sdata[nm] = v;
j++;
@@ -3816,10 +4079,15 @@
} catch (y){}
}
break;
+ case 'custom':
+ if ($.isFunction(this.searchoptions.custom_value) && $elem.length > 0 && $elem[0].nodeName.toUpperCase() === "SPAN") {
+ this.searchoptions.custom_value.call($t, $elem.children(".customelement:first"), "set", v);
+ }
+ break;
}
});
var sd = j>0 ? true : false;
- if(p.stringResult === true || $t.p.datatype == "local") {
+ if(p.stringResult === true || $t.p.datatype === "local") {
var ruleGroup = "{\"groupOp\":\"" + p.groupOp + "\",\"rules\":[";
var gi=0;
$.each(sdata,function(i,n){
@@ -3853,11 +4121,11 @@
if(saveurl) {$($t).jqGrid("setGridParam",{url:saveurl});}
$($t).triggerHandler("jqGridToolbarAfterClear");
if($.isFunction(p.afterClear)){p.afterClear();}
- };
- var toggleToolbar = function(){
+ },
+ toggleToolbar = function(){
var trow = $("tr.ui-search-toolbar",$t.grid.hDiv),
trow2 = $t.p.frozenColumns === true ? $("tr.ui-search-toolbar",$t.grid.fhDiv) : false;
- if(trow.css("display")=='none') {
+ if(trow.css("display") === 'none') {
trow.show();
if(trow2) {
trow2.show();
@@ -3868,31 +4136,82 @@
trow2.hide();
}
}
+ },
+ buildRuleMenu = function( elem, left, top ){
+ $("#sopt_menu").remove();
+
+ left=parseInt(left,10);
+ top=parseInt(top,10) + 18;
+
+ var fs = $('.ui-jqgrid-view').css('font-size') || '11px';
+ var str = '<ul id="sopt_menu" class="ui-search-menu" role="menu" tabindex="0" style="font-size:'+fs+';left:'+left+'px;top:'+top+'px;">',
+ selected = $(elem).attr("soper"), selclass,
+ aoprs = [], ina;
+ var i=0, nm =$(elem).attr("colname"),len = $t.p.colModel.length;
+ while(i<len) {
+ if($t.p.colModel[i].name === nm) {
+ break;
+ }
+ i++;
+ }
+ var cm = $t.p.colModel[i], options = $.extend({}, cm.searchoptions);
+ if(!options.sopt) {
+ options.sopt = [];
+ options.sopt[0]= cm.stype==='select' ? 'eq' : p.defaultSearch;
+ }
+ $.each(p.odata, function() { aoprs.push(this.oper); });
+ for ( i = 0 ; i < options.sopt.length; i++) {
+ ina = $.inArray(options.sopt[i],aoprs);
+ if(ina !== -1) {
+ selclass = selected === p.odata[ina].oper ? "ui-state-highlight" : "";
+ str += '<li class="ui-menu-item '+selclass+'" role="presentation"><a class="ui-corner-all g-menu-item" tabindex="0" role="menuitem" value="'+p.odata[ina].oper+'" oper="'+p.operands[p.odata[ina].oper]+'"><table cellspacing="0" cellpadding="0" border="0"><tr><td width="25px">'+p.operands[p.odata[ina].oper]+'</td><td>'+ p.odata[ina].text+'</td></tr></table></a></li>';
+ }
+ }
+ str += "</ul>";
+ $('body').append(str);
+ $("#sopt_menu").addClass("ui-menu ui-widget ui-widget-content ui-corner-all");
+ $("#sopt_menu > li > a").hover(
+ function(){ $(this).addClass("ui-state-hover"); },
+ function(){ $(this).removeClass("ui-state-hover"); }
+ ).click(function( e ){
+ var v = $(this).attr("value"),
+ oper = $(this).attr("oper");
+ $($t).triggerHandler("jqGridToolbarSelectOper", [v, oper, elem]);
+ $("#sopt_menu").hide();
+ $(elem).text(oper).attr("soper",v);
+ if(p.autosearch===true){
+ var inpelm = $(elem).parent().next().children()[0];
+ if( $(inpelm).val() || v==="nu" || v ==="nn") {
+ triggerToolbar();
+ }
+ }
+ });
};
// create the row
- function bindEvents(selector, events) {
- var jElem = $(selector);
- if (jElem[0]) {
- jQuery.each(events, function() {
- if (this.data !== undefined) {
- jElem.bind(this.type, this.data, this.fn);
- } else {
- jElem.bind(this.type, this.fn);
- }
- });
- }
- }
var tr = $("<tr class='ui-search-toolbar' role='rowheader'></tr>");
var timeoutHnd;
$.each($t.p.colModel,function(){
- var cm=this, thd , th, soptions,surl,self;
- th = $("<th role='columnheader' class='ui-state-default ui-th-column ui-th-"+$t.p.direction+"'></th>");
- thd = $("<div style='width:100%;position:relative;height:100%;padding-right:0.3em;'></div>");
+ var cm=this, soptions, surl, self, select = "", sot="=", so, i,
+ th = $("<th role='columnheader' class='ui-state-default ui-th-column ui-th-"+$t.p.direction+"'></th>"),
+ thd = $("<div style='position:relative;height:100%;padding-right:0.3em;padding-left:0.3em;'></div>"),
+ stbl = $("<table class='ui-search-table' cellspacing='0'><tr><td class='ui-search-oper'></td><td class='ui-search-input'></td></tr></table>");
if(this.hidden===true) { $(th).css("display","none");}
this.search = this.search === false ? false : true;
- if(typeof this.stype == 'undefined' ) {this.stype='text';}
+ if(this.stype === undefined) {this.stype='text';}
soptions = $.extend({},this.searchoptions || {});
if(this.search){
+ if(p.searchOperators) {
+ so = (soptions.sopt) ? soptions.sopt[0] : cm.stype==='select' ? 'eq' : p.defaultSearch;
+ for(i = 0;i<p.odata.length;i++) {
+ if(p.odata[i].oper === so) {
+ sot = p.operands[so] || "";
+ break;
+ }
+ }
+ var st = soptions.searchtitle != null ? soptions.searchtitle : p.operandTitle;
+ select = "<a title='"+st+"' style='padding-right: 0.5em;' soper='"+so+"' class='soptclass' colname='"+this.name+"'>"+sot+"</a>";
+ }
+ $("td:eq(0)",stbl).append(select);
switch (this.stype)
{
case "select":
@@ -3907,17 +4226,20 @@
success: function(res) {
if(soptions.buildSelect !== undefined) {
var d = soptions.buildSelect(res);
- if (d) { $(self).append(d); }
+ if (d) {
+ $("td:eq(1)",stbl).append(d);
+ $(self).append(stbl);
+ }
} else {
- $(self).append(res);
+ $("td:eq(1)",stbl).append(res);
+ $(self).append(stbl);
}
if(soptions.defaultValue !== undefined) { $("select",self).val(soptions.defaultValue); }
$("select",self).attr({name:cm.index || cm.name, id: "gs_"+cm.name});
if(soptions.attr) {$("select",self).attr(soptions.attr);}
$("select",self).css({width: "100%"});
// preserve autoserch
- if(soptions.dataInit !== undefined) { soptions.dataInit($("select",self)[0]); }
- if(soptions.dataEvents !== undefined) { bindEvents($("select",self)[0],soptions.dataEvents); }
+ $.jgrid.bindEv.call($t, $("select",self)[0], soptions);
if(p.autosearch===true){
$("select",self).change(function(){
triggerToolbar();
@@ -3942,17 +4264,17 @@
var elem = document.createElement("select");
elem.style.width = "100%";
$(elem).attr({name:cm.index || cm.name, id: "gs_"+cm.name});
- var so, sv, ov;
+ var sv, ov, key, k;
if(typeof oSv === "string") {
so = oSv.split(delim);
- for(var k=0; k<so.length;k++){
+ for(k=0; k<so.length;k++){
sv = so[k].split(sep);
ov = document.createElement("option");
ov.value = sv[0]; ov.innerHTML = sv[1];
elem.appendChild(ov);
}
} else if(typeof oSv === "object" ) {
- for ( var key in oSv) {
+ for (key in oSv) {
if(oSv.hasOwnProperty(key)) {
ov = document.createElement("option");
ov.value = key; ov.innerHTML = oSv[key];
@@ -3962,9 +4284,9 @@
}
if(soptions.defaultValue !== undefined) { $(elem).val(soptions.defaultValue); }
if(soptions.attr) {$(elem).attr(soptions.attr);}
- if(soptions.dataInit !== undefined) { soptions.dataInit(elem); }
- if(soptions.dataEvents !== undefined) { bindEvents(elem, soptions.dataEvents); }
- $(thd).append(elem);
+ $.jgrid.bindEv.call($t, elem , soptions);
+ $("td:eq(1)",stbl).append( elem );
+ $(thd).append(stbl);
if(p.autosearch===true){
$(elem).change(function(){
triggerToolbar();
@@ -3974,17 +4296,19 @@
}
}
break;
- case 'text':
+ case "text":
var df = soptions.defaultValue !== undefined ? soptions.defaultValue: "";
- $(thd).append("<input type='text' style='width:95%;padding:0px;' name='"+(cm.index || cm.name)+"' id='gs_"+cm.name+"' value='"+df+"'/>");
+
+ $("td:eq(1)",stbl).append("<input type='text' style='width:100%;padding:0px;' name='"+(cm.index || cm.name)+"' id='gs_"+cm.name+"' value='"+df+"'/>");
+ $(thd).append(stbl);
+
if(soptions.attr) {$("input",thd).attr(soptions.attr);}
- if(soptions.dataInit !== undefined) { soptions.dataInit($("input",thd)[0]); }
- if(soptions.dataEvents !== undefined) { bindEvents($("input",thd)[0], soptions.dataEvents); }
+ $.jgrid.bindEv.call($t, $("input",thd)[0], soptions);
if(p.autosearch===true){
if(p.searchOnEnter) {
$("input",thd).keypress(function(e){
- var key = e.charCode ? e.charCode : e.keyCode ? e.keyCode : 0;
- if(key == 13){
+ var key = e.charCode || e.keyCode || 0;
+ if(key === 13){
triggerToolbar();
return false;
}
@@ -4012,22 +4336,71 @@
}
}
break;
+ case "custom":
+ $("td:eq(1)",stbl).append("<span style='width:95%;padding:0px;' name='"+(cm.index || cm.name)+"' id='gs_"+cm.name+"'/>");
+ $(thd).append(stbl);
+ try {
+ if($.isFunction(soptions.custom_element)) {
+ var celm = soptions.custom_element.call($t,soptions.defaultValue !== undefined ? soptions.defaultValue: "",soptions);
+ if(celm) {
+ celm = $(celm).addClass("customelement");
+ $(thd).find(">span").append(celm);
+ } else {
+ throw "e2";
+ }
+ } else {
+ throw "e1";
+ }
+ } catch (e) {
+ if (e === "e1") { $.jgrid.info_dialog($.jgrid.errors.errcap,"function 'custom_element' "+$.jgrid.edit.msg.nodefined,$.jgrid.edit.bClose);}
+ if (e === "e2") { $.jgrid.info_dialog($.jgrid.errors.errcap,"function 'custom_element' "+$.jgrid.edit.msg.novalue,$.jgrid.edit.bClose);}
+ else { $.jgrid.info_dialog($.jgrid.errors.errcap,typeof e==="string"?e:e.message,$.jgrid.edit.bClose); }
+ }
+ break;
}
}
$(th).append(thd);
$(tr).append(th);
+ if(!p.searchOperators) {
+ $("td:eq(0)",stbl).hide();
+ }
});
$("table thead",$t.grid.hDiv).append(tr);
+ if(p.searchOperators) {
+ $(".soptclass").click(function(e){
+ var offset = $(this).offset(),
+ left = ( offset.left ),
+ top = ( offset.top);
+ buildRuleMenu(this, left, top );
+ e.stopPropagation();
+ });
+ $("body").on('click', function(e){
+ if(e.target.className !== "soptclass") {
+ $("#sopt_menu").hide();
+ }
+ });
+ }
this.ftoolbar = true;
this.triggerToolbar = triggerToolbar;
this.clearToolbar = clearToolbar;
this.toggleToolbar = toggleToolbar;
});
},
-
+ destroyFilterToolbar: function () {
+ return this.each(function () {
+ if (!this.ftoolbar) {
+ return;
+ }
+ this.triggerToolbar = null;
+ this.clearToolbar = null;
+ this.toggleToolbar = null;
+ this.ftoolbar = false;
+ $(this.grid.hDiv).find("table thead tr.ui-search-toolbar").remove();
+ });
+ },
destroyGroupHeader : function(nullHeader)
{
- if(typeof(nullHeader) == 'undefined') {
+ if(nullHeader === undefined) {
nullHeader = true;
}
return this.each(function()
@@ -4065,7 +4438,6 @@
}
});
},
-
setGroupHeaders : function ( o ) {
o = $.extend({
useColSpanStyle : false,
@@ -4096,8 +4468,8 @@
}
var $firstRow,
inColumnHeader = function (text, columnHeaders) {
- var i = 0, length = columnHeaders.length;
- for (; i < length; i++) {
+ var length = columnHeaders.length, i;
+ for (i = 0; i < length; i++) {
if (columnHeaders[i].startColumnName === text) {
return i;
}
@@ -4236,7 +4608,7 @@
top = top + $($t.grid.topDiv).outerHeight();
}
if($t.p.toolbar[0] === true) {
- if($t.p.toolbar[1] != "bottom") {
+ if($t.p.toolbar[1] !== "bottom") {
top = top + $($t.grid.uDiv).outerHeight();
}
}
@@ -4249,9 +4621,14 @@
$("tr.jqg-first-row-header, tr.jqg-third-row-header", htbl).each(function(){
$("th:gt("+maxfrozen+")",this).remove();
});
- var swapfroz = -1, fdel = -1;
+ var swapfroz = -1, fdel = -1, cs, rs;
$("tr.jqg-second-row-header th", htbl).each(function(){
- var cs= parseInt($(this).attr("colspan"),10);
+ cs= parseInt($(this).attr("colspan"),10);
+ rs= parseInt($(this).attr("rowspan"),10);
+ if(rs) {
+ swapfroz++;
+ fdel++;
+ }
if(cs) {
swapfroz = swapfroz+cs;
fdel++;
@@ -4284,7 +4661,7 @@
$("tr:first td:eq("+index+")",btd).width( w );
});
// sorting stuff
- $($t).bind('jqGridOnSortCol.setFrozenColumns', function (index, idxcol) {
+ $($t).bind('jqGridOnSortCol.setFrozenColumns', function (e, index, idxcol) {
var previousSelectedTh = $("tr.ui-jqgrid-labels:last th:eq("+$t.p.lastsort+")",$t.grid.fhDiv), newSelectedTh = $("tr.ui-jqgrid-labels:last th:eq("+idxcol+")",$t.grid.fhDiv);
@@ -4293,7 +4670,7 @@
$("span.ui-icon-"+$t.p.sortorder,newSelectedTh).removeClass('ui-state-disabled');
$(newSelectedTh).attr("aria-selected","true");
if(!$t.p.viewsortcols[0]) {
- if($t.p.lastsort != idxcol) {
+ if($t.p.lastsort !== idxcol) {
$("span.s-ico",previousSelectedTh).hide();
$("span.s-ico",newSelectedTh).show();
}
@@ -4303,15 +4680,15 @@
// data stuff
//TODO support for setRowData
$("#gview_"+$.jgrid.jqID($t.p.id)).append($t.grid.fbDiv);
- jQuery($t.grid.bDiv).scroll(function () {
- jQuery($t.grid.fbDiv).scrollTop(jQuery(this).scrollTop());
+ $($t.grid.bDiv).scroll(function () {
+ $($t.grid.fbDiv).scrollTop($(this).scrollTop());
});
if($t.p.hoverrows === true) {
$("#"+$.jgrid.jqID($t.p.id)).unbind('mouseover').unbind('mouseout');
}
$($t).bind('jqGridAfterGridComplete.setFrozenColumns', function () {
$("#"+$.jgrid.jqID($t.p.id)+"_frozen").remove();
- jQuery($t.grid.fbDiv).height( jQuery($t.grid.bDiv).height()-16);
+ $($t.grid.fbDiv).height($($t.grid.bDiv).height()-16);
var btbl = $("#"+$.jgrid.jqID($t.p.id)).clone(true);
$("tr",btbl).each(function(){
$("td:gt("+maxfrozen+")",this).remove();
@@ -4361,7 +4738,8 @@
});
}
});
-})(jQuery);/*
+})(jQuery);
+/*
* jqModal - Minimalist Modaling with jQuery
* (http://dev.iceburg.net/jquery/jqmodal/)
*
@@ -4407,7 +4785,6 @@
else o=F;
h.o=(o)?o.addClass(c.overlayClass).prependTo('body'):F;
- if(ie6){$('html,body').css({height:'100%',width:'100%'});if(o){o=o.css({position:'absolute'})[0];for(var y in {Top:1,Left:1})o.style.setExpression(y.toLowerCase(),"(_=(document.documentElement.scroll"+y+" || document.body.scroll"+y+"))+'px'");}}
if(c.ajax) {var r=c.target||h.w,u=c.ajax;r=(typeof r == 'string')?$(r,h.w):$(r);u=(u.substr(0,1) == '@')?$(t).attr(u.substring(1)):u;
r.html(c.ajaxText).load(u,function(){if(c.onLoad)c.onLoad.call(this,h);if(cc)h.w.jqmAddClose($(cc,h.w));e(h);});}
@@ -4422,11 +4799,11 @@
if(h.c.onHide)h.c.onHide(h);else{h.w.hide();if(h.o)h.o.remove();} return F;
},
params:{}};
-var s=0,H=$.jqm.hash,A=[],ie6=$.browser.msie&&($.browser.version == "6.0"),F=false,
-e=function(h){var i=$('<iframe src="javascript:false;document.write(\'\');" class="jqm"></iframe>').css({opacity:0});if(ie6)if(h.o)h.o.html('<p style="width:100%;height:100%"/>').prepend(i);else if(!$('iframe.jqm',h.w)[0])h.w.prepend(i); f(h);},
+var s=0,H=$.jqm.hash,A=[],F=false,
+e=function(h){f(h);},
f=function(h){try{$(':input:visible',h.w)[0].focus();}catch(_){}},
L=function(t){$(document)[t]("keypress",m)[t]("keydown",m)[t]("mousedown",m);},
-m=function(e){var h=H[A[A.length-1]],r=(!$(e.target).parents('.jqmID'+h.s)[0]);if(r)f(h);return !r;},
+m=function(e){var h=H[A[A.length-1]],r=(!$(e.target).parents('.jqmID'+h.s)[0]);if(r){$('.jqmID'+h.s).each(function(){var $self=$(this),offset=$self.offset();if(offset.top<=e.pageY && e.pageY<=offset.top+$self.height() && offset.left<=e.pageX && e.pageX<=offset.left+$self.width()){r=false;return false;}});f(h);}return !r;},
hs=function(w,t,c){return w.each(function(){var s=this._jqm;$(t).each(function() {
if(!this[c]){this[c]=[];$(this).click(function(){for(var i in {jqmShow:1,jqmHide:1})for(var s in this[i])if(H[this[i][s]])H[this[i][s]].w[i](this);return F;});}this[c].push(s);});});};
})(jQuery);/*
@@ -4851,8 +5228,10 @@
* http://www.gnu.org/licenses/gpl-2.0.html
*
**/
+/*jshint eqeqeq:false */
+/*global jQuery */
-;(function($) {
+(function($) {
"use strict";
$.fmatter = {};
//opts can be id:row id for the row, rowdata:the data for the row, colmodel:the column model for this column
@@ -4870,19 +5249,14 @@
isNumber : function(o) {
return typeof o === 'number' && isFinite(o);
},
- isNull : function(o) {
- return o === null;
- },
- isUndefined : function(o) {
- return typeof o === 'undefined';
- },
isValue : function (o) {
return (this.isObject(o) || this.isString(o) || this.isNumber(o) || this.isBoolean(o));
},
isEmpty : function(o) {
if(!this.isString(o) && this.isValue(o)) {
return false;
- }else if (!this.isValue(o)){
+ }
+ if (!this.isValue(o)){
return true;
}
o = $.trim(o).replace(/\ \;/ig,'').replace(/\ \;/ig,'');
@@ -4907,14 +5281,14 @@
}
if($.fmatter.isNumber(nData)) {
var bNegative = (nData < 0);
- var sOutput = nData + "";
- var sDecimalSeparator = (opts.decimalSeparator) ? opts.decimalSeparator : ".";
+ var sOutput = String(nData);
+ var sDecimalSeparator = opts.decimalSeparator || ".";
var nDotIndex;
if($.fmatter.isNumber(opts.decimalPlaces)) {
// Round to the correct decimal place
var nDecimalPlaces = opts.decimalPlaces;
var nDecimal = Math.pow(10, nDecimalPlaces);
- sOutput = Math.round(nData*nDecimal)/nDecimal + "";
+ sOutput = String(Math.round(nData*nDecimal)/nDecimal);
nDotIndex = sOutput.lastIndexOf(".");
if(nDecimalPlaces > 0) {
// Add the decimal separator
@@ -4937,8 +5311,8 @@
nDotIndex = sOutput.lastIndexOf(sDecimalSeparator);
nDotIndex = (nDotIndex > -1) ? nDotIndex : sOutput.length;
var sNewOutput = sOutput.substring(nDotIndex);
- var nCount = -1;
- for (var i=nDotIndex; i>0; i--) {
+ var nCount = -1, i;
+ for (i=nDotIndex; i>0; i--) {
nCount++;
if ((nCount%3 === 0) && (i !== nDotIndex) && (!bNegative || (i > 1))) {
sNewOutput = sThousandsSeparator + sNewOutput;
@@ -4953,196 +5327,59 @@
sOutput = (opts.suffix) ? sOutput + opts.suffix : sOutput;
return sOutput;
- } else {
- return nData;
}
- },
- // Tony Tomov
- // PHP implementation. Sorry not all options are supported.
- // Feel free to add them if you want
- DateFormat : function (format, date, newformat, opts) {
- var token = /\\.|[dDjlNSwzWFmMntLoYyaABgGhHisueIOPTZcrU]/g,
- timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,
- timezoneClip = /[^-+\dA-Z]/g,
- msDateRegExp = new RegExp("^\/Date\\((([-+])?[0-9]+)(([-+])([0-9]{2})([0-9]{2}))?\\)\/$"),
- msMatch = ((typeof date === 'string') ? date.match(msDateRegExp): null),
- pad = function (value, length) {
- value = String(value);
- length = parseInt(length,10) || 2;
- while (value.length < length) { value = '0' + value; }
- return value;
- },
- ts = {m : 1, d : 1, y : 1970, h : 0, i : 0, s : 0, u:0},
- timestamp=0, dM, k,hl,
- dateFormat=["i18n"];
- // Internationalization strings
- dateFormat.i18n = {
- dayNames: opts.dayNames,
- monthNames: opts.monthNames
- };
- if( format in opts.masks ) { format = opts.masks[format]; }
- if( !isNaN( date - 0 ) && String(format).toLowerCase() == "u") {
- //Unix timestamp
- timestamp = new Date( parseFloat(date)*1000 );
- } else if(date.constructor === Date) {
- timestamp = date;
- // Microsoft date format support
- } else if( msMatch !== null ) {
- timestamp = new Date(parseInt(msMatch[1], 10));
- if (msMatch[3]) {
- var offset = Number(msMatch[5]) * 60 + Number(msMatch[6]);
- offset *= ((msMatch[4] == '-') ? 1 : -1);
- offset -= timestamp.getTimezoneOffset();
- timestamp.setTime(Number(Number(timestamp) + (offset * 60 * 1000)));
- }
- } else {
- date = String(date).split(/[\\\/:_;.,\t\T\s-]/);
- format = format.split(/[\\\/:_;.,\t\T\s-]/);
- // parsing for month names
- for(k=0,hl=format.length;k<hl;k++){
- if(format[k] == 'M') {
- dM = $.inArray(date[k],dateFormat.i18n.monthNames);
- if(dM !== -1 && dM < 12){date[k] = dM+1;}
- }
- if(format[k] == 'F') {
- dM = $.inArray(date[k],dateFormat.i18n.monthNames);
- if(dM !== -1 && dM > 11){date[k] = dM+1-12;}
- }
- if(date[k]) {
- ts[format[k].toLowerCase()] = parseInt(date[k],10);
- }
- }
- if(ts.f) {ts.m = ts.f;}
- if( ts.m === 0 && ts.y === 0 && ts.d === 0) {
- return " " ;
- }
- ts.m = parseInt(ts.m,10)-1;
- var ty = ts.y;
- if (ty >= 70 && ty <= 99) {ts.y = 1900+ts.y;}
- else if (ty >=0 && ty <=69) {ts.y= 2000+ts.y;}
- timestamp = new Date(ts.y, ts.m, ts.d, ts.h, ts.i, ts.s, ts.u);
- }
-
- if( newformat in opts.masks ) {
- newformat = opts.masks[newformat];
- } else if ( !newformat ) {
- newformat = 'Y-m-d';
- }
- var
- G = timestamp.getHours(),
- i = timestamp.getMinutes(),
- j = timestamp.getDate(),
- n = timestamp.getMonth() + 1,
- o = timestamp.getTimezoneOffset(),
- s = timestamp.getSeconds(),
- u = timestamp.getMilliseconds(),
- w = timestamp.getDay(),
- Y = timestamp.getFullYear(),
- N = (w + 6) % 7 + 1,
- z = (new Date(Y, n - 1, j) - new Date(Y, 0, 1)) / 86400000,
- flags = {
- // Day
- d: pad(j),
- D: dateFormat.i18n.dayNames[w],
- j: j,
- l: dateFormat.i18n.dayNames[w + 7],
- N: N,
- S: opts.S(j),
- //j < 11 || j > 13 ? ['st', 'nd', 'rd', 'th'][Math.min((j - 1) % 10, 3)] : 'th',
- w: w,
- z: z,
- // Week
- W: N < 5 ? Math.floor((z + N - 1) / 7) + 1 : Math.floor((z + N - 1) / 7) || ((new Date(Y - 1, 0, 1).getDay() + 6) % 7 < 4 ? 53 : 52),
- // Month
- F: dateFormat.i18n.monthNames[n - 1 + 12],
- m: pad(n),
- M: dateFormat.i18n.monthNames[n - 1],
- n: n,
- t: '?',
- // Year
- L: '?',
- o: '?',
- Y: Y,
- y: String(Y).substring(2),
- // Time
- a: G < 12 ? opts.AmPm[0] : opts.AmPm[1],
- A: G < 12 ? opts.AmPm[2] : opts.AmPm[3],
- B: '?',
- g: G % 12 || 12,
- G: G,
- h: pad(G % 12 || 12),
- H: pad(G),
- i: pad(i),
- s: pad(s),
- u: u,
- // Timezone
- e: '?',
- I: '?',
- O: (o > 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4),
- P: '?',
- T: (String(timestamp).match(timezone) || [""]).pop().replace(timezoneClip, ""),
- Z: '?',
- // Full Date/Time
- c: '?',
- r: '?',
- U: Math.floor(timestamp / 1000)
- };
- return newformat.replace(token, function ($0) {
- return $0 in flags ? flags[$0] : $0.substring(1);
- });
+ return nData;
}
};
$.fn.fmatter.defaultFormat = function(cellval, opts) {
- return ($.fmatter.isValue(cellval) && cellval!=="" ) ? cellval : opts.defaultValue ? opts.defaultValue : " ";
+ return ($.fmatter.isValue(cellval) && cellval!=="" ) ? cellval : opts.defaultValue || " ";
};
$.fn.fmatter.email = function(cellval, opts) {
if(!$.fmatter.isEmpty(cellval)) {
return "<a href=\"mailto:" + cellval + "\">" + cellval + "</a>";
- }else {
- return $.fn.fmatter.defaultFormat(cellval,opts );
}
+ return $.fn.fmatter.defaultFormat(cellval,opts );
};
$.fn.fmatter.checkbox =function(cval, opts) {
var op = $.extend({},opts.checkbox), ds;
- if(opts.colModel !== undefined && !$.fmatter.isUndefined(opts.colModel.formatoptions)) {
+ if(opts.colModel !== undefined && opts.colModel.formatoptions !== undefined) {
op = $.extend({},op,opts.colModel.formatoptions);
}
if(op.disabled===true) {ds = "disabled=\"disabled\"";} else {ds="";}
- if($.fmatter.isEmpty(cval) || $.fmatter.isUndefined(cval) ) {cval = $.fn.fmatter.defaultFormat(cval,op);}
- cval=cval+"";cval=cval.toLowerCase();
- var bchk = cval.search(/(false|0|no|off)/i)<0 ? " checked='checked' " : "";
+ if($.fmatter.isEmpty(cval) || cval === undefined ) {cval = $.fn.fmatter.defaultFormat(cval,op);}
+ cval=String(cval);
+ cval=cval.toLowerCase();
+ var bchk = cval.search(/(false|f|0|no|n|off|undefined)/i)<0 ? " checked='checked' " : "";
return "<input type=\"checkbox\" " + bchk + " value=\""+ cval+"\" offval=\"no\" "+ds+ "/>";
};
$.fn.fmatter.link = function(cellval, opts) {
var op = {target:opts.target};
var target = "";
- if(opts.colModel !== undefined && !$.fmatter.isUndefined(opts.colModel.formatoptions)) {
+ if(opts.colModel !== undefined && opts.colModel.formatoptions !== undefined) {
op = $.extend({},op,opts.colModel.formatoptions);
}
if(op.target) {target = 'target=' + op.target;}
if(!$.fmatter.isEmpty(cellval)) {
return "<a "+target+" href=\"" + cellval + "\">" + cellval + "</a>";
- }else {
- return $.fn.fmatter.defaultFormat(cellval,opts);
}
+ return $.fn.fmatter.defaultFormat(cellval,opts);
};
$.fn.fmatter.showlink = function(cellval, opts) {
var op = {baseLinkUrl: opts.baseLinkUrl,showAction:opts.showAction, addParam: opts.addParam || "", target: opts.target, idName: opts.idName},
target = "", idUrl;
- if(opts.colModel !== undefined && !$.fmatter.isUndefined(opts.colModel.formatoptions)) {
+ if(opts.colModel !== undefined && opts.colModel.formatoptions !== undefined) {
op = $.extend({},op,opts.colModel.formatoptions);
}
if(op.target) {target = 'target=' + op.target;}
idUrl = op.baseLinkUrl+op.showAction + '?'+ op.idName+'='+opts.rowId+op.addParam;
if($.fmatter.isString(cellval) || $.fmatter.isNumber(cellval)) { //add this one even if its blank string
return "<a "+target+" href=\"" + idUrl + "\">" + cellval + "</a>";
- }else {
- return $.fn.fmatter.defaultFormat(cellval,opts);
}
+ return $.fn.fmatter.defaultFormat(cellval,opts);
};
$.fn.fmatter.integer = function(cellval, opts) {
var op = $.extend({},opts.integer);
- if(opts.colModel !== undefined && !$.fmatter.isUndefined(opts.colModel.formatoptions)) {
+ if(opts.colModel !== undefined && opts.colModel.formatoptions !== undefined) {
op = $.extend({},op,opts.colModel.formatoptions);
}
if($.fmatter.isEmpty(cellval)) {
@@ -5152,7 +5389,7 @@
};
$.fn.fmatter.number = function (cellval, opts) {
var op = $.extend({},opts.number);
- if(opts.colModel !== undefined && !$.fmatter.isUndefined(opts.colModel.formatoptions)) {
+ if(opts.colModel !== undefined && opts.colModel.formatoptions !== undefined) {
op = $.extend({},op,opts.colModel.formatoptions);
}
if($.fmatter.isEmpty(cellval)) {
@@ -5162,7 +5399,7 @@
};
$.fn.fmatter.currency = function (cellval, opts) {
var op = $.extend({},opts.currency);
- if(opts.colModel !== undefined && !$.fmatter.isUndefined(opts.colModel.formatoptions)) {
+ if(opts.colModel !== undefined && opts.colModel.formatoptions !== undefined) {
op = $.extend({},op,opts.colModel.formatoptions);
}
if($.fmatter.isEmpty(cellval)) {
@@ -5172,26 +5409,26 @@
};
$.fn.fmatter.date = function (cellval, opts, rwd, act) {
var op = $.extend({},opts.date);
- if(opts.colModel !== undefined && !$.fmatter.isUndefined(opts.colModel.formatoptions)) {
+ if(opts.colModel !== undefined && opts.colModel.formatoptions !== undefined) {
op = $.extend({},op,opts.colModel.formatoptions);
}
- if(!op.reformatAfterEdit && act=='edit'){
+ if(!op.reformatAfterEdit && act === 'edit'){
return $.fn.fmatter.defaultFormat(cellval, opts);
- } else if(!$.fmatter.isEmpty(cellval)) {
- return $.fmatter.util.DateFormat(op.srcformat,cellval,op.newformat,op);
- } else {
- return $.fn.fmatter.defaultFormat(cellval, opts);
}
+ if(!$.fmatter.isEmpty(cellval)) {
+ return $.jgrid.parseDate(op.srcformat,cellval,op.newformat,op);
+ }
+ return $.fn.fmatter.defaultFormat(cellval, opts);
};
$.fn.fmatter.select = function (cellval,opts) {
// jqGrid specific
- cellval = cellval + "";
+ cellval = String(cellval);
var oSelect = false, ret=[], sep, delim;
- if(!$.fmatter.isUndefined(opts.colModel.formatoptions)){
+ if(opts.colModel.formatoptions !== undefined){
oSelect= opts.colModel.formatoptions.value;
sep = opts.colModel.formatoptions.separator === undefined ? ":" : opts.colModel.formatoptions.separator;
delim = opts.colModel.formatoptions.delimiter === undefined ? ";" : opts.colModel.formatoptions.delimiter;
- } else if(!$.fmatter.isUndefined(opts.colModel.editoptions)){
+ } else if(opts.colModel.editoptions !== undefined){
oSelect= opts.colModel.editoptions.value;
sep = opts.colModel.editoptions.separator === undefined ? ":" : opts.colModel.editoptions.separator;
delim = opts.colModel.editoptions.delimiter === undefined ? ";" : opts.colModel.editoptions.delimiter;
@@ -5202,8 +5439,8 @@
if(msl) {scell = cellval.split(",");scell = $.map(scell,function(n){return $.trim(n);});}
if ($.fmatter.isString(oSelect)) {
// mybe here we can use some caching with care ????
- var so = oSelect.split(delim), j=0;
- for(var i=0; i<so.length;i++){
+ var so = oSelect.split(delim), j=0, i;
+ for(i=0; i<so.length;i++){
sv = so[i].split(sep);
if(sv.length > 2 ) {
sv[1] = $.map(sv,function(n,i){if(i>0) {return n;}}).join(sep);
@@ -5213,7 +5450,7 @@
ret[j] = sv[1];
j++;
}
- } else if($.trim(sv[0])==$.trim(cellval)) {
+ } else if($.trim(sv[0]) === $.trim(cellval)) {
ret[0] = sv[1];
break;
}
@@ -5232,51 +5469,54 @@
cellval = ret.join(", ");
return cellval === "" ? $.fn.fmatter.defaultFormat(cellval,opts) : cellval;
};
- $.fn.fmatter.rowactions = function(rid,gid,act,pos) {
- var op ={
- keys:false,
- onEdit : null,
- onSuccess: null,
- afterSave:null,
- onError: null,
- afterRestore: null,
- extraparam: {},
- url: null,
- restoreAfterError: true,
- mtype: "POST",
- delOptions: {},
- editOptions : {}
- };
- rid = $.jgrid.jqID( rid );
- gid = $.jgrid.jqID( gid );
- var cm = $('#'+gid)[0].p.colModel[pos];
- if(!$.fmatter.isUndefined(cm.formatoptions)) {
+ $.fn.fmatter.rowactions = function(act) {
+ var $tr = $(this).closest("tr.jqgrow"),
+ rid = $tr.attr("id"),
+ $id = $(this).closest("table.ui-jqgrid-btable").attr('id').replace(/_frozen([^_]*)$/,'$1'),
+ $grid = $("#"+$id),
+ $t = $grid[0],
+ p = $t.p,
+ cm = p.colModel[$.jgrid.getCellIndex(this)],
+ $actionsDiv = cm.frozen ? $("tr#"+rid+" td:eq("+$.jgrid.getCellIndex(this)+") > div",$grid) :$(this).parent(),
+ op = {
+ keys: false,
+ onEdit: null,
+ onSuccess: null,
+ afterSave: null,
+ onError: null,
+ afterRestore: null,
+ extraparam: {},
+ url: null,
+ restoreAfterError: true,
+ mtype: "POST",
+ delOptions: {},
+ editOptions: {}
+ },
+ saverow = function(rowid, res) {
+ if($.isFunction(op.afterSave)) { op.afterSave.call($t, rowid, res); }
+ $actionsDiv.find("div.ui-inline-edit,div.ui-inline-del").show();
+ $actionsDiv.find("div.ui-inline-save,div.ui-inline-cancel").hide();
+ },
+ restorerow = function(rowid) {
+ if($.isFunction(op.afterRestore)) { op.afterRestore.call($t, rowid); }
+ $actionsDiv.find("div.ui-inline-edit,div.ui-inline-del").show();
+ $actionsDiv.find("div.ui-inline-save,div.ui-inline-cancel").hide();
+ };
+
+ if (cm.formatoptions !== undefined) {
op = $.extend(op,cm.formatoptions);
}
- if( !$.fmatter.isUndefined($('#'+gid)[0].p.editOptions) ) {
- op.editOptions = $('#'+gid)[0].p.editOptions;
+ if (p.editOptions !== undefined) {
+ op.editOptions = p.editOptions;
}
- if( !$.fmatter.isUndefined($('#'+gid)[0].p.delOptions) ) {
- op.delOptions = $('#'+gid)[0].p.delOptions;
+ if (p.delOptions !== undefined) {
+ op.delOptions = p.delOptions;
}
- var $t = $("#"+gid)[0];
- var saverow = function( rowid, res) {
- if($.isFunction(op.afterSave)) { op.afterSave.call($t, rowid, res); }
- $("tr#"+rid+" div.ui-inline-edit, "+"tr#"+rid+" div.ui-inline-del","#"+gid + ".ui-jqgrid-btable:first").show();
- $("tr#"+rid+" div.ui-inline-save, "+"tr#"+rid+" div.ui-inline-cancel","#"+gid+ ".ui-jqgrid-btable:first").hide();
- },
- restorerow = function( rowid) {
- if($.isFunction(op.afterRestore) ) { op.afterRestore.call($t, rowid); }
- $("tr#"+rid+" div.ui-inline-edit, "+"tr#"+rid+" div.ui-inline-del","#"+gid+ ".ui-jqgrid-btable:first").show();
- $("tr#"+rid+" div.ui-inline-save, "+"tr#"+rid+" div.ui-inline-cancel","#"+gid+ ".ui-jqgrid-btable:first").hide();
- };
- if( $("#"+rid,"#"+gid).hasClass("jqgrid-new-row") ){
- var opers = $t.p.prmNames,
- oper = opers.oper;
- op.extraparam[oper] = opers.addoper;
+ if ($tr.hasClass("jqgrid-new-row")){
+ op.extraparam[p.prmNames.oper] = p.prmNames.addoper;
}
var actop = {
- keys : op.keys,
+ keys: op.keys,
oneditfunc: op.onEdit,
successfunc: op.onSuccess,
url: op.url,
@@ -5290,55 +5530,55 @@
switch(act)
{
case 'edit':
- $('#'+gid).jqGrid('editRow', rid, actop);
- $("tr#"+rid+" div.ui-inline-edit, "+"tr#"+rid+" div.ui-inline-del","#"+gid+ ".ui-jqgrid-btable:first").hide();
- $("tr#"+rid+" div.ui-inline-save, "+"tr#"+rid+" div.ui-inline-cancel","#"+gid+ ".ui-jqgrid-btable:first").show();
- $($t).triggerHandler("jqGridAfterGridComplete");
+ $grid.jqGrid('editRow', rid, actop);
+ $actionsDiv.find("div.ui-inline-edit,div.ui-inline-del").hide();
+ $actionsDiv.find("div.ui-inline-save,div.ui-inline-cancel").show();
+ $grid.triggerHandler("jqGridAfterGridComplete");
break;
case 'save':
- if ( $('#'+gid).jqGrid('saveRow', rid, actop) ) {
- $("tr#"+rid+" div.ui-inline-edit, "+"tr#"+rid+" div.ui-inline-del","#"+gid+ ".ui-jqgrid-btable:first").show();
- $("tr#"+rid+" div.ui-inline-save, "+"tr#"+rid+" div.ui-inline-cancel","#"+gid+ ".ui-jqgrid-btable:first").hide();
- $($t).triggerHandler("jqGridAfterGridComplete");
+ if ($grid.jqGrid('saveRow', rid, actop)) {
+ $actionsDiv.find("div.ui-inline-edit,div.ui-inline-del").show();
+ $actionsDiv.find("div.ui-inline-save,div.ui-inline-cancel").hide();
+ $grid.triggerHandler("jqGridAfterGridComplete");
}
break;
case 'cancel' :
- $('#'+gid).jqGrid('restoreRow',rid, restorerow);
- $("tr#"+rid+" div.ui-inline-edit, "+"tr#"+rid+" div.ui-inline-del","#"+gid+ ".ui-jqgrid-btable:first").show();
- $("tr#"+rid+" div.ui-inline-save, "+"tr#"+rid+" div.ui-inline-cancel","#"+gid+ ".ui-jqgrid-btable:first").hide();
- $($t).triggerHandler("jqGridAfterGridComplete");
+ $grid.jqGrid('restoreRow', rid, restorerow);
+ $actionsDiv.find("div.ui-inline-edit,div.ui-inline-del").show();
+ $actionsDiv.find("div.ui-inline-save,div.ui-inline-cancel").hide();
+ $grid.triggerHandler("jqGridAfterGridComplete");
break;
case 'del':
- $('#'+gid).jqGrid('delGridRow',rid, op.delOptions);
+ $grid.jqGrid('delGridRow', rid, op.delOptions);
break;
case 'formedit':
- $('#'+gid).jqGrid('setSelection',rid);
- $('#'+gid).jqGrid('editGridRow',rid, op.editOptions);
+ $grid.jqGrid('setSelection', rid);
+ $grid.jqGrid('editGridRow', rid, op.editOptions);
break;
}
};
$.fn.fmatter.actions = function(cellval,opts) {
- var op ={keys:false, editbutton:true, delbutton:true, editformbutton: false};
- if(!$.fmatter.isUndefined(opts.colModel.formatoptions)) {
+ var op={keys:false, editbutton:true, delbutton:true, editformbutton: false},
+ rowid=opts.rowId, str="",ocl;
+ if(opts.colModel.formatoptions !== undefined) {
op = $.extend(op,opts.colModel.formatoptions);
}
- var rowid = opts.rowId, str="",ocl;
- if(typeof(rowid) =='undefined' || $.fmatter.isEmpty(rowid)) {return "";}
+ if(rowid === undefined || $.fmatter.isEmpty(rowid)) {return "";}
if(op.editformbutton){
- ocl = "onclick=jQuery.fn.fmatter.rowactions('"+rowid+"','"+opts.gid+"','formedit',"+opts.pos+"); onmouseover=jQuery(this).addClass('ui-state-hover'); onmouseout=jQuery(this).removeClass('ui-state-hover'); ";
- str =str+ "<div title='"+$.jgrid.nav.edittitle+"' style='float:left;cursor:pointer;' class='ui-pg-div ui-inline-edit' "+ocl+"><span class='ui-icon ui-icon-pencil'></span></div>";
+ ocl = "id='jEditButton_"+rowid+"' onclick=jQuery.fn.fmatter.rowactions.call(this,'formedit'); onmouseover=jQuery(this).addClass('ui-state-hover'); onmouseout=jQuery(this).removeClass('ui-state-hover'); ";
+ str += "<div title='"+$.jgrid.nav.edittitle+"' style='float:left;cursor:pointer;' class='ui-pg-div ui-inline-edit' "+ocl+"><span class='ui-icon ui-icon-pencil'></span></div>";
} else if(op.editbutton){
- ocl = "onclick=jQuery.fn.fmatter.rowactions('"+rowid+"','"+opts.gid+"','edit',"+opts.pos+"); onmouseover=jQuery(this).addClass('ui-state-hover'); onmouseout=jQuery(this).removeClass('ui-state-hover') ";
- str =str+ "<div title='"+$.jgrid.nav.edittitle+"' style='float:left;cursor:pointer;' class='ui-pg-div ui-inline-edit' "+ocl+"><span class='ui-icon ui-icon-pencil'></span></div>";
+ ocl = "id='jEditButton_"+rowid+"' onclick=jQuery.fn.fmatter.rowactions.call(this,'edit'); onmouseover=jQuery(this).addClass('ui-state-hover'); onmouseout=jQuery(this).removeClass('ui-state-hover') ";
+ str += "<div title='"+$.jgrid.nav.edittitle+"' style='float:left;cursor:pointer;' class='ui-pg-div ui-inline-edit' "+ocl+"><span class='ui-icon ui-icon-pencil'></span></div>";
}
if(op.delbutton) {
- ocl = "onclick=jQuery.fn.fmatter.rowactions('"+rowid+"','"+opts.gid+"','del',"+opts.pos+"); onmouseover=jQuery(this).addClass('ui-state-hover'); onmouseout=jQuery(this).removeClass('ui-state-hover'); ";
- str = str+"<div title='"+$.jgrid.nav.deltitle+"' style='float:left;margin-left:5px;' class='ui-pg-div ui-inline-del' "+ocl+"><span class='ui-icon ui-icon-trash'></span></div>";
+ ocl = "id='jDeleteButton_"+rowid+"' onclick=jQuery.fn.fmatter.rowactions.call(this,'del'); onmouseover=jQuery(this).addClass('ui-state-hover'); onmouseout=jQuery(this).removeClass('ui-state-hover'); ";
+ str += "<div title='"+$.jgrid.nav.deltitle+"' style='float:left;margin-left:5px;' class='ui-pg-div ui-inline-del' "+ocl+"><span class='ui-icon ui-icon-trash'></span></div>";
}
- ocl = "onclick=jQuery.fn.fmatter.rowactions('"+rowid+"','"+opts.gid+"','save',"+opts.pos+"); onmouseover=jQuery(this).addClass('ui-state-hover'); onmouseout=jQuery(this).removeClass('ui-state-hover'); ";
- str = str+"<div title='"+$.jgrid.edit.bSubmit+"' style='float:left;display:none' class='ui-pg-div ui-inline-save' "+ocl+"><span class='ui-icon ui-icon-disk'></span></div>";
- ocl = "onclick=jQuery.fn.fmatter.rowactions('"+rowid+"','"+opts.gid+"','cancel',"+opts.pos+"); onmouseover=jQuery(this).addClass('ui-state-hover'); onmouseout=jQuery(this).removeClass('ui-state-hover'); ";
- str = str+"<div title='"+$.jgrid.edit.bCancel+"' style='float:left;display:none;margin-left:5px;' class='ui-pg-div ui-inline-cancel' "+ocl+"><span class='ui-icon ui-icon-cancel'></span></div>";
+ ocl = "id='jSaveButton_"+rowid+"' onclick=jQuery.fn.fmatter.rowactions.call(this,'save'); onmouseover=jQuery(this).addClass('ui-state-hover'); onmouseout=jQuery(this).removeClass('ui-state-hover'); ";
+ str += "<div title='"+$.jgrid.edit.bSubmit+"' style='float:left;display:none' class='ui-pg-div ui-inline-save' "+ocl+"><span class='ui-icon ui-icon-disk'></span></div>";
+ ocl = "id='jCancelButton_"+rowid+"' onclick=jQuery.fn.fmatter.rowactions.call(this,'cancel'); onmouseover=jQuery(this).addClass('ui-state-hover'); onmouseout=jQuery(this).removeClass('ui-state-hover'); ";
+ str += "<div title='"+$.jgrid.edit.bCancel+"' style='float:left;display:none;margin-left:5px;' class='ui-pg-div ui-inline-cancel' "+ocl+"><span class='ui-icon ui-icon-cancel'></span></div>";
return "<div style='margin-left:8px;'>" + str + "</div>";
};
$.unformat = function (cellval,options,pos,cnt) {
@@ -5347,9 +5587,9 @@
op =options.colModel.formatoptions || {}, sep,
re = /([\.\*\_\'\(\)\{\}\+\?\\])/g,
unformatFunc = options.colModel.unformat||($.fn.fmatter[formatType] && $.fn.fmatter[formatType].unformat);
- if(typeof unformatFunc !== 'undefined' && $.isFunction(unformatFunc) ) {
+ if(unformatFunc !== undefined && $.isFunction(unformatFunc) ) {
ret = unformatFunc.call(this, $(cellval).text(), options, cellval);
- } else if(!$.fmatter.isUndefined(formatType) && $.fmatter.isString(formatType) ) {
+ } else if(formatType !== undefined && $.fmatter.isString(formatType) ) {
var opts = $.jgrid.formatter || {}, stripTag;
switch(formatType) {
case 'integer' :
@@ -5398,7 +5638,7 @@
var ret = [];
var cell = $(cellval).text();
if(cnt===true) {return cell;}
- var op = $.extend({}, !$.fmatter.isUndefined(options.colModel.formatoptions) ? options.colModel.formatoptions: options.colModel.editoptions),
+ var op = $.extend({}, options.colModel.formatoptions !== undefined ? options.colModel.formatoptions: options.colModel.editoptions),
sep = op.separator === undefined ? ":" : op.separator,
delim = op.delimiter === undefined ? ";" : op.delimiter;
@@ -5408,8 +5648,8 @@
scell = [], sv;
if(msl) {scell = cell.split(",");scell = $.map(scell,function(n){return $.trim(n);});}
if ($.fmatter.isString(oSelect)) {
- var so = oSelect.split(delim), j=0;
- for(var i=0; i<so.length;i++){
+ var so = oSelect.split(delim), j=0, i;
+ for(i=0; i<so.length;i++){
sv = so[i].split(sep);
if(sv.length > 2 ) {
sv[1] = $.map(sv,function(n,i){if(i>0) {return n;}}).join(sep);
@@ -5419,7 +5659,7 @@
ret[j] = sv[0];
j++;
}
- } else if($.trim(sv[1])==$.trim(cell)) {
+ } else if($.trim(sv[1]) === $.trim(cell)) {
ret[0] = sv[0];
break;
}
@@ -5429,32 +5669,32 @@
ret = $.map(scell, function(n){
var rv;
$.each(oSelect, function(i,val){
- if (val == n) {
+ if (val === n) {
rv = i;
return false;
}
});
- if( typeof(rv) != 'undefined' ) {return rv;}
+ if( rv !== undefined ) {return rv;}
});
}
return ret.join(", ");
- } else {
- return cell || "";
}
+ return cell || "";
};
$.unformat.date = function (cellval, opts) {
var op = $.jgrid.formatter.date || {};
- if(!$.fmatter.isUndefined(opts.formatoptions)) {
+ if(opts.formatoptions !== undefined) {
op = $.extend({},op,opts.formatoptions);
}
if(!$.fmatter.isEmpty(cellval)) {
- return $.fmatter.util.DateFormat(op.newformat,cellval,op.srcformat,op);
- } else {
- return $.fn.fmatter.defaultFormat(cellval, opts);
+ return $.jgrid.parseDate(op.newformat,cellval,op.srcformat,op);
}
+ return $.fn.fmatter.defaultFormat(cellval, opts);
};
})(jQuery);
-;(function($){
+/*jshint eqeqeq:false */
+/*global jQuery */
+(function($){
/*
* jqGrid common function
* Tony Tomov tony(a)trirand.com
@@ -5463,8 +5703,7 @@
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl-2.0.html
*/
-/*global jQuery, $ */
-
+"use strict";
$.extend($.jgrid,{
// Modal functions
showModal : function(h) {
@@ -5477,8 +5716,8 @@
hideModal : function (selector,o) {
o = $.extend({jqm : true, gb :''}, o || {});
if(o.onClose) {
- var oncret = o.onClose(selector);
- if (typeof oncret == 'boolean' && !oncret ) { return; }
+ var oncret = o.gb && typeof o.gb === "string" && o.gb.substr(0,6) === "#gbox_" ? o.onClose.call($("#" + o.gb.substr(6))[0], selector) : o.onClose(selector);
+ if (typeof oncret === 'boolean' && !oncret ) { return; }
}
if ($.fn.jqm && o.jqm === true) {
$(selector).attr("aria-hidden","true").jqmHide();
@@ -5502,10 +5741,10 @@
return [curleft,curtop];
},
createModal : function(aIDs, content, p, insertSelector, posSelector, appendsel, css) {
- p = $.extend(true, $.jgrid.jqModal || {}, p);
+ p = $.extend(true, {}, $.jgrid.jqModal || {}, p);
var mw = document.createElement('div'), rtlsup, self = this;
css = $.extend({}, css || {});
- rtlsup = $(p.gbox).attr("dir") == "rtl" ? true : false;
+ rtlsup = $(p.gbox).attr("dir") === "rtl" ? true : false;
mw.className= "ui-widget ui-widget-content ui-corner-all ui-jqdialog";
mw.id = aIDs.themodal;
var mh = document.createElement('div');
@@ -5514,7 +5753,7 @@
$(mh).append("<span class='ui-jqdialog-title'>"+p.caption+"</span>");
var ahr= $("<a href='javascript:void(0)' class='ui-jqdialog-titlebar-close ui-corner-all'></a>")
.hover(function(){ahr.addClass('ui-state-hover');},
- function(){ahr.removeClass('ui-state-hover');})
+ function(){ahr.removeClass('ui-state-hover');})
.append("<span class='ui-icon ui-icon-closethick'></span>");
$(mh).append(ahr);
if(rtlsup) {
@@ -5532,11 +5771,11 @@
mw.appendChild(mc);
$(mw).prepend(mh);
if(appendsel===true) { $('body').append(mw); } //append as first child in body -for alert dialog
- else if (typeof appendsel == "string")
+ else if (typeof appendsel === "string") {
$(appendsel).append(mw);
- else {$(mw).insertBefore(insertSelector);}
+ } else {$(mw).insertBefore(insertSelector);}
$(mw).css(css);
- if(typeof p.jqModal === 'undefined') {p.jqModal = true;} // internal use
+ if(p.jqModal === undefined) {p.jqModal = true;} // internal use
var coord = {};
if ( $.fn.jqm && p.jqModal === true) {
if(p.left ===0 && p.top===0 && p.overlay) {
@@ -5581,8 +5820,8 @@
overflow: 'hidden'
},coord))
.attr({tabIndex: "-1","role":"dialog","aria-labelledby":aIDs.modalhead,"aria-hidden":"true"});
- if(typeof p.drag == 'undefined') { p.drag=true;}
- if(typeof p.resize == 'undefined') {p.resize=true;}
+ if(p.drag === undefined) { p.drag=true;}
+ if(p.resize === undefined) {p.resize=true;}
if (p.drag) {
$(mh).css('cursor','move');
if($.fn.jqDrag) {
@@ -5595,7 +5834,7 @@
}
if(p.resize) {
if($.fn.jqResize) {
- $(mw).append("<div class='jqResize ui-resizable-handle ui-resizable-se ui-icon ui-icon-gripsmall-diagonal-se ui-icon-grip-diagonal-se'></div>");
+ $(mw).append("<div class='jqResize ui-resizable-handle ui-resizable-se ui-icon ui-icon-gripsmall-diagonal-se'></div>");
$("#"+$.jgrid.jqID(aIDs.themodal)).jqResize(".jqResize",aIDs.scrollelm ? "#"+$.jgrid.jqID(aIDs.scrollelm) : false);
} else {
try {
@@ -5607,7 +5846,7 @@
$(mw).keydown( function( e ) {
if( e.which == 27 ) {
var cone = $("#"+$.jgrid.jqID(aIDs.themodal)).data("onClose") || p.onClose;
- self.hideModal(this,{gb:p.gbox,jqm:p.jqModal,onClose: cone});
+ self.hideModal("#"+$.jgrid.jqID(aIDs.themodal),{gb:p.gbox,jqm:p.jqModal,onClose: cone});
}
});
}
@@ -5636,7 +5875,6 @@
try{$(':input:visible',selector)[0].focus();}catch(_){}
}
},
-
info_dialog : function(caption, content,c_b, modalopt) {
var mopt = {
width:290,
@@ -5644,7 +5882,6 @@
dataheight: 'auto',
drag: true,
resize: false,
- caption:"<b>"+caption+"</b>",
left:250,
top:170,
zIndex : 1000,
@@ -5657,14 +5894,14 @@
// {text:'textbutt', id:"buttid", onClick : function(){...}}
// if the id is not provided we set it like info_button_+ the index in the array - i.e info_button_0,info_button_1...
};
- $.extend(mopt,modalopt || {});
+ $.extend(true, mopt, $.jgrid.jqModal || {}, {caption:"<b>"+caption+"</b>"}, modalopt || {});
var jm = mopt.jqModal, self = this;
if($.fn.jqm && !jm) { jm = false; }
// in case there is no jqModal
- var buttstr ="";
+ var buttstr ="", i;
if(mopt.buttons.length > 0) {
- for(var i=0;i<mopt.buttons.length;i++) {
- if(typeof mopt.buttons[i].id == "undefined") { mopt.buttons[i].id = "info_button_"+i; }
+ for(i=0;i<mopt.buttons.length;i++) {
+ if(mopt.buttons[i].id === undefined) { mopt.buttons[i].id = "info_button_"+i; }
buttstr += "<a href='javascript:void(0)' id='"+mopt.buttons[i].id+"' class='fm-button ui-state-default ui-corner-all'>"+mopt.buttons[i].text+"</a>";
}
}
@@ -5677,7 +5914,7 @@
cnt += "</div>";
try {
- if($("#info_dialog").attr("aria-hidden") == "false") {
+ if($("#info_dialog").attr("aria-hidden") === "false") {
$.jgrid.hideModal("#info_dialog",{jqm:jm});
}
$("#info_dialog").remove();
@@ -5698,7 +5935,11 @@
});
}
$("#closedialog", "#info_id").click(function(){
- self.hideModal("#info_dialog",{jqm:jm});
+ self.hideModal("#info_dialog",{
+ jqm:jm,
+ onClose: $("#info_dialog").data("onClose") || mopt.onClose,
+ gb: $("#info_dialog").data("gbox") || mopt.gbox
+ });
return false;
});
$(".fm-button","#info_dialog").hover(
@@ -5717,27 +5958,27 @@
if($.isFunction(mopt.afterOpen) ) { mopt.afterOpen(); }
try{ $("#info_dialog").focus();} catch (m){}
},
+ bindEv: function (el, opt) {
+ var $t = this;
+ if($.isFunction(opt.dataInit)) {
+ opt.dataInit.call($t,el);
+ }
+ if(opt.dataEvents) {
+ $.each(opt.dataEvents, function() {
+ if (this.data !== undefined) {
+ $(el).bind(this.type, this.data, this.fn);
+ } else {
+ $(el).bind(this.type, this.fn);
+ }
+ });
+ }
+ },
// Form Functions
createEl : function(eltype,options,vl,autowidth, ajaxso) {
var elem = "", $t = this;
- function bindEv (el, opt) {
- if($.isFunction(opt.dataInit)) {
- opt.dataInit.call($t,el);
- }
- if(opt.dataEvents) {
- $.each(opt.dataEvents, function() {
- if (this.data !== undefined) {
- $(el).bind(this.type, this.data, this.fn);
- } else {
- $(el).bind(this.type, this.fn);
- }
- });
- }
- return opt;
- }
function setAttributes(elm, atr, exl ) {
- var exclude = ['dataInit','dataEvents','dataUrl', 'buildSelect','sopt', 'searchhidden', 'defaultValue', 'attr'];
- if(typeof(exl) != "undefined" && $.isArray(exl)) {
+ var exclude = ['dataInit','dataEvents','dataUrl', 'buildSelect','sopt', 'searchhidden', 'defaultValue', 'attr', 'custom_element', 'custom_value'];
+ if(exl !== undefined && $.isArray(exl)) {
$.merge(exclude, exl);
}
$.each(atr, function(key, value){
@@ -5757,10 +5998,9 @@
if(!options.cols) { $(elem).css({width:"98%"});}
} else if (!options.cols) { options.cols = 20; }
if(!options.rows) { options.rows = 2; }
- if(vl==' ' || vl==' ' || (vl.length==1 && vl.charCodeAt(0)==160)) {vl="";}
+ if(vl===' ' || vl===' ' || (vl.length===1 && vl.charCodeAt(0)===160)) {vl="";}
elem.value = vl;
setAttributes(elem, options);
- options = bindEv(elem,options);
$(elem).attr({"role":"textbox","multiline":"true"});
break;
case "checkbox" : //what code for simple checkbox
@@ -5768,7 +6008,7 @@
elem.type = "checkbox";
if( !options.value ) {
var vl1 = vl.toLowerCase();
- if(vl1.search(/(false|0|no|off|undefined)/i)<0 && vl1!=="") {
+ if(vl1.search(/(false|f|0|no|n|off|undefined)/i)<0 && vl1!=="") {
elem.checked=true;
elem.defaultChecked=true;
elem.value = vl;
@@ -5786,7 +6026,6 @@
$(elem).attr("offval",cbval[1]);
}
setAttributes(elem, options, ['value']);
- options = bindEv(elem,options);
$(elem).attr("role","checkbox");
break;
case "select" :
@@ -5798,27 +6037,33 @@
elem.multiple="multiple";
$(elem).attr("aria-multiselectable","true");
} else { msl = false; }
- if(typeof(options.dataUrl) != "undefined") {
+ if(options.dataUrl !== undefined) {
+ var rowid = options.name ? String(options.id).substring(0, String(options.id).length - String(options.name).length - 1) : String(options.id),
+ postData = options.postData || ajaxso.postData;
+
+ if ($t.p && $t.p.idPrefix) {
+ rowid = $.jgrid.stripPref($t.p.idPrefix, rowid);
+ } else {
+ postData = undefined; // don't use postData for searching from jqFilter. One can implement the feature in the future if required.
+ }
$.ajax($.extend({
url: options.dataUrl,
type : "GET",
dataType: "html",
+ data: $.isFunction(postData) ? postData.call($t, rowid, vl, String(options.name)) : postData,
context: {elem:elem, options:options, vl:vl},
success: function(data){
- var a, ovm = [], elem = this.elem, vl = this.vl,
+ var ovm = [], elem = this.elem, vl = this.vl,
options = $.extend({},this.options),
- msl = options.multiple===true;
- if($.isFunction(options.buildSelect)) {
- var b = options.buildSelect.call($t,data);
- a = $(b).html();
- } else {
- a = $(data).html();
+ msl = options.multiple===true,
+ a = $.isFunction(options.buildSelect) ? options.buildSelect.call($t,data) : data;
+ if(typeof a === 'string') {
+ a = $( $.trim( a ) ).html();
}
if(a) {
$(elem).append(a);
setAttributes(elem, options);
- options = bindEv(elem,options);
- if(typeof options.size === 'undefined') { options.size = msl ? 3 : 1;}
+ if(options.size === undefined) { options.size = msl ? 3 : 1;}
if(msl) {
ovm = vl.split(",");
ovm = $.map(ovm,function(n){return $.trim(n);});
@@ -5842,7 +6087,7 @@
},ajaxso || {}));
} else if(options.value) {
var i;
- if(typeof options.size === 'undefined') {
+ if(options.size === undefined) {
options.size = msl ? 3 : 1;
}
if(msl) {
@@ -5864,38 +6109,36 @@
ov.setAttribute("role","option");
ov.value = sv[0]; ov.innerHTML = sv[1];
elem.appendChild(ov);
- if (!msl && ($.trim(sv[0]) == $.trim(vl) || $.trim(sv[1]) == $.trim(vl))) { ov.selected ="selected"; }
+ if (!msl && ($.trim(sv[0]) === $.trim(vl) || $.trim(sv[1]) === $.trim(vl))) { ov.selected ="selected"; }
if (msl && ($.inArray($.trim(sv[1]), ovm)>-1 || $.inArray($.trim(sv[0]), ovm)>-1)) {ov.selected ="selected";}
}
} else if (typeof options.value === 'object') {
- var oSv = options.value;
- for ( var key in oSv) {
+ var oSv = options.value, key;
+ for (key in oSv) {
if (oSv.hasOwnProperty(key ) ){
ov = document.createElement("option");
ov.setAttribute("role","option");
ov.value = key; ov.innerHTML = oSv[key];
elem.appendChild(ov);
- if (!msl && ( $.trim(key) == $.trim(vl) || $.trim(oSv[key]) == $.trim(vl)) ) { ov.selected ="selected"; }
+ if (!msl && ( $.trim(key) === $.trim(vl) || $.trim(oSv[key]) === $.trim(vl)) ) { ov.selected ="selected"; }
if (msl && ($.inArray($.trim(oSv[key]),ovm)>-1 || $.inArray($.trim(key),ovm)>-1)) { ov.selected ="selected"; }
}
}
}
setAttributes(elem, options, ['value']);
- options = bindEv(elem,options);
}
break;
case "text" :
case "password" :
case "button" :
var role;
- if(eltype=="button") { role = "button"; }
+ if(eltype==="button") { role = "button"; }
else { role = "textbox"; }
elem = document.createElement("input");
elem.type = eltype;
elem.value = vl;
setAttributes(elem, options);
- options = bindEv(elem,options);
- if(eltype != "button"){
+ if(eltype !== "button"){
if(autowidth) {
if(!options.size) { $(elem).css({width:"98%"}); }
} else if (!options.size) { options.size = 20; }
@@ -5907,7 +6150,6 @@
elem = document.createElement("input");
elem.type = eltype;
setAttributes(elem, options);
- options = bindEv(elem,options);
break;
case "custom" :
elem = document.createElement("span");
@@ -5924,9 +6166,9 @@
throw "e1";
}
} catch (e) {
- if (e=="e1") { $.jgrid.info_dialog($.jgrid.errors.errcap,"function 'custom_element' "+$.jgrid.edit.msg.nodefined, $.jgrid.edit.bClose);}
- if (e=="e2") { $.jgrid.info_dialog($.jgrid.errors.errcap,"function 'custom_element' "+$.jgrid.edit.msg.novalue,$.jgrid.edit.bClose);}
- else { $.jgrid.info_dialog($.jgrid.errors.errcap,typeof(e)==="string"?e:e.message,$.jgrid.edit.bClose); }
+ if (e==="e1") { $.jgrid.info_dialog($.jgrid.errors.errcap,"function 'custom_element' "+$.jgrid.edit.msg.nodefined, $.jgrid.edit.bClose);}
+ if (e==="e2") { $.jgrid.info_dialog($.jgrid.errors.errcap,"function 'custom_element' "+$.jgrid.edit.msg.novalue,$.jgrid.edit.bClose);}
+ else { $.jgrid.info_dialog($.jgrid.errors.errcap,typeof e==="string"?e:e.message,$.jgrid.edit.bClose); }
}
break;
}
@@ -5939,86 +6181,73 @@
// EXCEPT for centurial years which are not also divisible by 400.
return (((year % 4 === 0) && ( year % 100 !== 0 || (year % 400 === 0))) ? 29 : 28 );
},
- DaysArray = function(n) {
- for (var i = 1; i <= n; i++) {
- this[i] = 31;
- if (i==4 || i==6 || i==9 || i==11) {this[i] = 30;}
- if (i==2) {this[i] = 29;}
- }
- return this;
- };
-
- var tsp = {}, sep;
+ tsp = {}, sep;
format = format.toLowerCase();
//we search for /,-,. for the date separator
- if(format.indexOf("/") != -1) {
+ if(format.indexOf("/") !== -1) {
sep = "/";
- } else if(format.indexOf("-") != -1) {
+ } else if(format.indexOf("-") !== -1) {
sep = "-";
- } else if(format.indexOf(".") != -1) {
+ } else if(format.indexOf(".") !== -1) {
sep = ".";
} else {
sep = "/";
}
format = format.split(sep);
date = date.split(sep);
- if (date.length != 3) { return false; }
- var j=-1,yln, dln=-1, mln=-1;
- for(var i=0;i<format.length;i++){
+ if (date.length !== 3) { return false; }
+ var j=-1,yln, dln=-1, mln=-1, i;
+ for(i=0;i<format.length;i++){
var dv = isNaN(date[i]) ? 0 : parseInt(date[i],10);
tsp[format[i]] = dv;
yln = format[i];
- if(yln.indexOf("y") != -1) { j=i; }
- if(yln.indexOf("m") != -1) { mln=i; }
- if(yln.indexOf("d") != -1) { dln=i; }
+ if(yln.indexOf("y") !== -1) { j=i; }
+ if(yln.indexOf("m") !== -1) { mln=i; }
+ if(yln.indexOf("d") !== -1) { dln=i; }
}
- if (format[j] == "y" || format[j] == "yyyy") {
+ if (format[j] === "y" || format[j] === "yyyy") {
yln=4;
- } else if(format[j] =="yy"){
+ } else if(format[j] ==="yy"){
yln = 2;
} else {
yln = -1;
}
- var daysInMonth = DaysArray(12),
+ var daysInMonth = [0,31,29,31,30,31,30,31,31,30,31,30,31],
strDate;
if (j === -1) {
return false;
- } else {
+ }
strDate = tsp[format[j]].toString();
- if(yln == 2 && strDate.length == 1) {yln = 1;}
- if (strDate.length != yln || (tsp[format[j]]===0 && date[j]!="00")){
+ if(yln === 2 && strDate.length === 1) {yln = 1;}
+ if (strDate.length !== yln || (tsp[format[j]]===0 && date[j]!=="00")){
return false;
}
- }
if(mln === -1) {
return false;
- } else {
+ }
strDate = tsp[format[mln]].toString();
if (strDate.length<1 || tsp[format[mln]]<1 || tsp[format[mln]]>12){
return false;
}
- }
if(dln === -1) {
return false;
- } else {
+ }
strDate = tsp[format[dln]].toString();
- if (strDate.length<1 || tsp[format[dln]]<1 || tsp[format[dln]]>31 || (tsp[format[mln]]==2 && tsp[format[dln]]>daysInFebruary(tsp[format[j]])) || tsp[format[dln]] > daysInMonth[tsp[format[mln]]]){
+ if (strDate.length<1 || tsp[format[dln]]<1 || tsp[format[dln]]>31 || (tsp[format[mln]]===2 && tsp[format[dln]]>daysInFebruary(tsp[format[j]])) || tsp[format[dln]] > daysInMonth[tsp[format[mln]]]){
return false;
}
- }
return true;
},
isEmpty : function(val)
{
if (val.match(/^\s+$/) || val === "") {
return true;
- } else {
+ }
return false;
- }
},
checkTime : function(time){
// checks only hh:ss (and optional am/pm)
- var re = /^(\d{1,2}):(\d{2})([ap]m)?$/,regs;
+ var re = /^(\d{1,2}):(\d{2})([apAP][Mm])?$/,regs;
if(!$.jgrid.isEmpty(time))
{
regs = time.match(re);
@@ -6037,27 +6266,27 @@
}
return true;
},
- checkValues : function(val, valref,g, customobject, nam) {
- var edtrul,i, nm, dft, len;
- if(typeof(customobject) === "undefined") {
- if(typeof(valref)=='string'){
- for( i =0, len=g.p.colModel.length;i<len; i++){
- if(g.p.colModel[i].name==valref) {
- edtrul = g.p.colModel[i].editrules;
+ checkValues : function(val, valref, customobject, nam) {
+ var edtrul,i, nm, dft, len, g = this, cm = g.p.colModel;
+ if(customobject === undefined) {
+ if(typeof valref==='string'){
+ for( i =0, len=cm.length;i<len; i++){
+ if(cm[i].name===valref) {
+ edtrul = cm[i].editrules;
valref = i;
- try { nm = g.p.colModel[i].formoptions.label; } catch (e) {}
+ if(cm[i].formoptions != null) { nm = cm[i].formoptions.label; }
break;
}
}
} else if(valref >=0) {
- edtrul = g.p.colModel[valref].editrules;
+ edtrul = cm[valref].editrules;
}
} else {
edtrul = customobject;
nm = nam===undefined ? "_" : nam;
}
if(edtrul) {
- if(!nm) { nm = g.p.colNames[valref]; }
+ if(!nm) { nm = g.p.colNames != null ? g.p.colNames[valref] : cm[valref].label; }
if(edtrul.required === true) {
if( $.jgrid.isEmpty(val) ) { return [false,nm+": "+$.jgrid.edit.msg.required,""]; }
}
@@ -6068,10 +6297,10 @@
if(isNaN(val)) { return [false,nm+": "+$.jgrid.edit.msg.number,""]; }
}
}
- if(typeof edtrul.minValue != 'undefined' && !isNaN(edtrul.minValue)) {
+ if(edtrul.minValue !== undefined && !isNaN(edtrul.minValue)) {
if (parseFloat(val) < parseFloat(edtrul.minValue) ) { return [false,nm+": "+$.jgrid.edit.msg.minValue+" "+edtrul.minValue,""];}
}
- if(typeof edtrul.maxValue != 'undefined' && !isNaN(edtrul.maxValue)) {
+ if(edtrul.maxValue !== undefined && !isNaN(edtrul.maxValue)) {
if (parseFloat(val) > parseFloat(edtrul.maxValue) ) { return [false,nm+": "+$.jgrid.edit.msg.maxValue+" "+edtrul.maxValue,""];}
}
var filter;
@@ -6085,15 +6314,18 @@
if(edtrul.integer === true) {
if( !(rqfield === false && $.jgrid.isEmpty(val)) ) {
if(isNaN(val)) { return [false,nm+": "+$.jgrid.edit.msg.integer,""]; }
- if ((val % 1 !== 0) || (val.indexOf('.') != -1)) { return [false,nm+": "+$.jgrid.edit.msg.integer,""];}
+ if ((val % 1 !== 0) || (val.indexOf('.') !== -1)) { return [false,nm+": "+$.jgrid.edit.msg.integer,""];}
}
}
if(edtrul.date === true) {
if( !(rqfield === false && $.jgrid.isEmpty(val)) ) {
- if(g.p.colModel[valref].formatoptions && g.p.colModel[valref].formatoptions.newformat) {
- dft = g.p.colModel[valref].formatoptions.newformat;
+ if(cm[valref].formatoptions && cm[valref].formatoptions.newformat) {
+ dft = cm[valref].formatoptions.newformat;
+ if( $.jgrid.formatter.date.masks.hasOwnProperty(dft) ) {
+ dft = $.jgrid.formatter.date.masks[dft];
+ }
} else {
- dft = g.p.colModel[valref].datefmt || "Y-m-d";
+ dft = cm[valref].datefmt || "Y-m-d";
}
if(!$.jgrid.checkDate (dft, val)) { return [false,nm+": "+$.jgrid.edit.msg.date+" - "+dft,""]; }
}
@@ -6112,22 +6344,18 @@
if(edtrul.custom === true) {
if( !(rqfield === false && $.jgrid.isEmpty(val)) ) {
if($.isFunction(edtrul.custom_func)) {
- var ret = edtrul.custom_func.call(g,val,nm);
- if($.isArray(ret)) {
- return ret;
- } else {
- return [false,$.jgrid.edit.msg.customarray,""];
- }
- } else {
- return [false,$.jgrid.edit.msg.customfcheck,""];
+ var ret = edtrul.custom_func.call(g,val,nm,valref);
+ return $.isArray(ret) ? ret : [false,$.jgrid.edit.msg.customarray,""];
}
+ return [false,$.jgrid.edit.msg.customfcheck,""];
}
}
}
return [true,"",""];
}
});
-})(jQuery);/*
+})(jQuery);
+/*
* jqFilter jQuery jqGrid filter addon.
* Copyright (c) 2011, Tony Tomov, tony(a)trirand.com
* Dual licensed under the MIT and GPL licenses
@@ -6154,9 +6382,11 @@
]
}
*/
-/*global jQuery, $, window, navigator */
+/*jshint eqeqeq:false, eqnull:true, devel:true */
+/*global jQuery */
(function ($) {
+"use strict";
$.fn.jqFilter = function( arg ) {
if (typeof arg === 'string') {
@@ -6180,27 +6410,11 @@
errorcheck : true,
showQuery : true,
sopt : null,
- ops : [
- {"name": "eq", "description": "equal", "operator":"="},
- {"name": "ne", "description": "not equal", "operator":"<>"},
- {"name": "lt", "description": "less", "operator":"<"},
- {"name": "le", "description": "less or equal","operator":"<="},
- {"name": "gt", "description": "greater", "operator":">"},
- {"name": "ge", "description": "greater or equal", "operator":">="},
- {"name": "bw", "description": "begins with", "operator":"LIKE"},
- {"name": "bn", "description": "does not begin with", "operator":"NOT LIKE"},
- {"name": "in", "description": "in", "operator":"IN"},
- {"name": "ni", "description": "not in", "operator":"NOT IN"},
- {"name": "ew", "description": "ends with", "operator":"LIKE"},
- {"name": "en", "description": "does not end with", "operator":"NOT LIKE"},
- {"name": "cn", "description": "contains", "operator":"LIKE"},
- {"name": "nc", "description": "does not contain", "operator":"NOT LIKE"},
- {"name": "nu", "description": "is null", "operator":"IS NULL"},
- {"name": "nn", "description": "is not null", "operator":"IS NOT NULL"}
- ],
+ ops : [],
+ operands : null,
numopts : ['eq','ne', 'lt', 'le', 'gt', 'ge', 'nu', 'nn', 'in', 'ni'],
stropts : ['eq', 'ne', 'bw', 'bn', 'ew', 'en', 'cn', 'nc', 'nu', 'nn', 'in', 'ni'],
- _gridsopt : [], // grid translated strings, do not tuch
+ strarr : ['text', 'string', 'blob'],
groupOps : [{ op: "AND", text: "AND" }, { op: "OR", text: "OR" }],
groupButton : true,
ruleButtons : true,
@@ -6221,12 +6435,6 @@
isIE = /msie/i.test(navigator.userAgent) && !window.opera;
// translating the options
- if(this.p._gridsopt.length) {
- // ['eq','ne','lt','le','gt','ge','bw','bn','in','ni','ew','en','cn','nc']
- for(i=0;i<this.p._gridsopt.length;i++) {
- this.p.ops[i].description = this.p._gridsopt[i];
- }
- }
this.p.initFilter = $.extend(true,{},this.p.filter);
// set default values for the columns if they are not set
@@ -6266,17 +6474,20 @@
if(this.p.showQuery) {
$(this).append("<table class='queryresult ui-widget ui-widget-content' style='display:block;max-width:440px;border:0px none;' dir='"+this.p.direction+"'><tbody><tr><td class='query'></td></tr></tbody></table>");
}
+ var getGrid = function () {
+ return $("#" + $.jgrid.jqID(p.id))[0] || null;
+ };
/*
*Perform checking.
*
*/
var checkData = function(val, colModelItem) {
- var ret = [true,""];
+ var ret = [true,""], $t = getGrid();
if($.isFunction(colModelItem.searchrules)) {
- ret = colModelItem.searchrules(val, colModelItem);
+ ret = colModelItem.searchrules.call($t, val, colModelItem);
} else if($.jgrid && $.jgrid.checkValues) {
try {
- ret = $.jgrid.checkValues(val, -1, null, colModelItem.searchrules, colModelItem.label);
+ ret = $.jgrid.checkValues.call($t, val, -1, colModelItem.searchrules, colModelItem.label);
} catch (e) {}
}
if(ret && ret.length && ret[0] === false) {
@@ -6319,7 +6530,7 @@
var table = $("<table class='group ui-widget ui-widget-content' style='border:0px none;'><tbody></tbody></table>"),
// create error message row
align = "left";
- if(this.p.direction == "rtl") {
+ if(this.p.direction === "rtl") {
align = "right";
table.attr("dir","rtl");
}
@@ -6384,7 +6595,7 @@
}
for (i = 0; i < that.p.columns.length; i++) {
// but show only serchable and serchhidden = true fields
- var searchable = (typeof that.p.columns[i].search === 'undefined') ? true: that.p.columns[i].search ,
+ var searchable = (that.p.columns[i].search === undefined) ? true: that.p.columns[i].search,
hidden = (that.p.columns[i].hidden === true),
ignoreHiding = (that.p.columns[i].searchoptions.searchhidden === true);
if ((ignoreHiding && searchable) || (searchable && !hidden)) {
@@ -6396,7 +6607,7 @@
var opr;
if( cm.searchoptions.sopt ) {opr = cm.searchoptions.sopt;}
else if(that.p.sopt) { opr= that.p.sopt; }
- else if (cm.searchtype === 'string') {opr = that.p.stropts;}
+ else if ( $.inArray(cm.searchtype, that.p.strarr) !== -1 ) {opr = that.p.stropts;}
else {opr = that.p.numopts;}
group.rules.push({
@@ -6469,7 +6680,7 @@
// save current entity in a variable so that it could
// be referenced in anonimous method calls
- var that=this, tr = $("<tr></tr>"),
+ var that=this, $t = getGrid(), tr = $("<tr></tr>"),
//document.createElement("tr"),
// first column used for padding
@@ -6504,43 +6715,44 @@
cm.searchoptions.size = 10;
}
}
- var elm = $.jgrid.createEl(cm.inputtype,cm.searchoptions, "", true, that.p.ajaxSelectOptions, true);
+ var elm = $.jgrid.createEl.call($t, cm.inputtype,cm.searchoptions, "", true, that.p.ajaxSelectOptions, true);
$(elm).addClass("input-elm");
//that.createElement(rule, "");
if( cm.searchoptions.sopt ) {op = cm.searchoptions.sopt;}
else if(that.p.sopt) { op= that.p.sopt; }
- else if (cm.searchtype === 'string') {op = that.p.stropts;}
+ else if ($.inArray(cm.searchtype, that.p.strarr) !== -1) {op = that.p.stropts;}
else {op = that.p.numopts;}
// operators
var s ="", so = 0;
aoprs = [];
- $.each(that.p.ops, function() { aoprs.push(this.name) });
+ $.each(that.p.ops, function() { aoprs.push(this.oper); });
for ( i = 0 ; i < op.length; i++) {
ina = $.inArray(op[i],aoprs);
if(ina !== -1) {
if(so===0) {
- rule.op = that.p.ops[ina].name;
+ rule.op = that.p.ops[ina].oper;
}
- s += "<option value='"+that.p.ops[ina].name+"'>"+that.p.ops[ina].description+"</option>";
+ s += "<option value='"+that.p.ops[ina].oper+"'>"+that.p.ops[ina].text+"</option>";
so++;
}
}
$(".selectopts",trpar).empty().append( s );
$(".selectopts",trpar)[0].selectedIndex = 0;
- if( $.browser.msie && $.browser.version < 9) {
- var sw = parseInt($("select.selectopts",trpar)[0].offsetWidth) + 1;
+ if( $.jgrid.msie && $.jgrid.msiever() < 9) {
+ var sw = parseInt($("select.selectopts",trpar)[0].offsetWidth, 10) + 1;
$(".selectopts",trpar).width( sw );
$(".selectopts",trpar).css("width","auto");
}
// data
$(".data",trpar).empty().append( elm );
+ $.jgrid.bindEv.call($t, elm, cm.searchoptions);
$(".input-elm",trpar).bind('change',function( e ) {
var tmo = $(this).hasClass("ui-autocomplete-input") ? 200 :0;
setTimeout(function(){
var elem = e.target;
rule.data = elem.nodeName.toUpperCase() === "SPAN" && cm.searchoptions && $.isFunction(cm.searchoptions.custom_value) ?
- cm.searchoptions.custom_value($(elem).children(".customelement:first"), 'get') : elem.value;
+ cm.searchoptions.custom_value.call($t, $(elem).children(".customelement:first"), 'get') : elem.value;
that.onchange(); // signals that the filter has changed
}, tmo);
});
@@ -6554,8 +6766,8 @@
var j=0;
for (i = 0; i < that.p.columns.length; i++) {
// but show only serchable and serchhidden = true fields
- var searchable = (typeof that.p.columns[i].search === 'undefined') ? true: that.p.columns[i].search ,
- hidden = (that.p.columns[i].hidden === true),
+ var searchable = (that.p.columns[i].search === undefined) ? true: that.p.columns[i].search,
+ hidden = (that.p.columns[i].hidden === true),
ignoreHiding = (that.p.columns[i].searchoptions.searchhidden === true);
if ((ignoreHiding && searchable) || (searchable && !hidden)) {
selected = "";
@@ -6581,8 +6793,11 @@
cm.searchoptions.size = 10;
}
}
- var ruleDataInput = $.jgrid.createEl(cm.inputtype,cm.searchoptions, rule.data, true, that.p.ajaxSelectOptions, true);
-
+ var ruleDataInput = $.jgrid.createEl.call($t, cm.inputtype,cm.searchoptions, rule.data, true, that.p.ajaxSelectOptions, true);
+ if(rule.op === 'nu' || rule.op === 'nn') {
+ $(ruleDataInput).attr('readonly','true');
+ $(ruleDataInput).attr('disabled','true');
+ } //retain the state of disabled text fields in case of null ops
// dropdown for: choosing operator
var ruleOperatorSelect = $("<select class='selectopts'></select>");
ruleOperatorTd.append(ruleOperatorSelect);
@@ -6606,15 +6821,15 @@
// populate drop down with all available operators
if( cm.searchoptions.sopt ) {op = cm.searchoptions.sopt;}
else if(that.p.sopt) { op= that.p.sopt; }
- else if (cm.searchtype === 'string') {op = p.stropts;}
+ else if ($.inArray(cm.searchtype, that.p.strarr) !== -1) {op = that.p.stropts;}
else {op = that.p.numopts;}
str="";
- $.each(that.p.ops, function() { aoprs.push(this.name) });
+ $.each(that.p.ops, function() { aoprs.push(this.oper); });
for ( i = 0; i < op.length; i++) {
ina = $.inArray(op[i],aoprs);
if(ina !== -1) {
- selected = rule.op === that.p.ops[ina].name ? " selected='selected'" : "";
- str += "<option value='"+that.p.ops[ina].name+"'"+selected+">"+that.p.ops[ina].description+"</option>";
+ selected = rule.op === that.p.ops[ina].oper ? " selected='selected'" : "";
+ str += "<option value='"+that.p.ops[ina].oper+"'"+selected+">"+that.p.ops[ina].text+"</option>";
}
}
ruleOperatorSelect.append( str );
@@ -6626,11 +6841,11 @@
// is created previously
//ruleDataInput.setAttribute("type", "text");
ruleDataTd.append(ruleDataInput);
-
+ $.jgrid.bindEv.call($t, ruleDataInput, cm.searchoptions);
$(ruleDataInput)
.addClass("input-elm")
.bind('change', function() {
- rule.data = cm.inputtype === 'custom' ? cm.searchoptions.custom_value($(this).children(".customelement:first"),'get') : $(this).val();
+ rule.data = cm.inputtype === 'custom' ? cm.searchoptions.custom_value.call($t, $(this).children(".customelement:first"),'get') : $(this).val();
that.onchange(); // signals that the filter has changed
});
@@ -6689,17 +6904,16 @@
if (s === "()") {
return ""; // ignore groups that don't have rules
- } else {
- return s;
}
+ return s;
};
this.getStringForRule = function(rule) {
var opUF = "",opC="", i, cm, ret, val,
numtypes = ['int', 'integer', 'float', 'number', 'currency']; // jqGrid
for (i = 0; i < this.p.ops.length; i++) {
- if (this.p.ops[i].name === rule.op) {
- opUF = this.p.ops[i].operator;
- opC = this.p.ops[i].name;
+ if (this.p.ops[i].oper === rule.op) {
+ opUF = this.p.operands.hasOwnProperty(rule.op) ? this.p.operands[rule.op] : "";
+ opC = this.p.ops[i].oper;
break;
}
}
@@ -6709,6 +6923,7 @@
break;
}
}
+ if (cm === undefined) { return ""; }
val = rule.data;
if(opC === 'bw' || opC === 'bn') { val = val+"%"; }
if(opC === 'ew' || opC === 'en') { val = "%"+val; }
@@ -6787,9 +7002,8 @@
if (s === "()") {
return ""; // ignore groups that don't have rules
- } else {
- return s;
}
+ return s;
}
return getStringForGroup(this.p.filter);
@@ -6844,7 +7058,7 @@
},
addFilter: function (pfilter) {
if (typeof pfilter === "string") {
- pfilter = jQuery.jgrid.parse( pfilter );
+ pfilter = $.jgrid.parse( pfilter );
}
this.each(function(){
this.p.filter = pfilter;
@@ -6855,7 +7069,8 @@
});
})(jQuery);
-
+/*jshint eqeqeq:false, eqnull:true, devel:true */
+/*global xmlJsonClass, jQuery */
(function($){
/**
* jqGrid extension for form editing Grid Data
@@ -6866,11 +7081,10 @@
* http://www.gnu.org/licenses/gpl-2.0.html
**/
"use strict";
-/*global xmlJsonClass, jQuery, $ */
var rp_ge = {};
$.jgrid.extend({
searchGrid : function (p) {
- p = $.extend({
+ p = $.extend(true, {
recreateFilter: false,
drag: true,
sField:'searchField',
@@ -6900,9 +7114,6 @@
dataheight: 'auto',
showQuery: false,
errorcheck : true,
- // translation
- // if you want to change or remove the order change it in sopt
- // ['eq','ne','lt','le','gt','ge','bw','bn','in','ni','ew','en','cn','nc'],
sopt: null,
stringResult: undefined,
onClose : null,
@@ -6913,10 +7124,10 @@
columns : [],
tmplNames : null,
tmplFilters : null,
- // translations - later in lang file
tmplLabel : ' Template: ',
showOnLoad: false,
- layer: null
+ layer: null,
+ operands : { "eq" :"=", "ne":"<>","lt":"<","le":"<=","gt":">","ge":">=","bw":"LIKE","bn":"NOT LIKE","in":"IN","ni":"NOT IN","ew":"LIKE","en":"NOT LIKE","cn":"LIKE","nc":"NOT LIKE","nu":"IS NULL","nn":"ISNOT NULL"}
}, $.jgrid.search, p || {});
return this.each(function() {
var $t = this;
@@ -6925,7 +7136,7 @@
showFrm = true,
IDs = {themodal:'searchmod'+fid,modalhead:'searchhd'+fid,modalcontent:'searchcnt'+fid, scrollelm : fid},
defaultFilters = $t.p.postData[p.sFilter];
- if(typeof(defaultFilters) === "string") {
+ if(typeof defaultFilters === "string") {
defaultFilters = $.jgrid.parse( defaultFilters );
}
if(p.recreateFilter === true) {
@@ -6933,7 +7144,7 @@
}
function showFilter(_filter) {
showFrm = $($t).triggerHandler("jqGridFilterBeforeShow", [_filter]);
- if(typeof(showFrm) === "undefined") {
+ if(showFrm === undefined) {
showFrm = true;
}
if(showFrm && $.isFunction(p.beforeShowSearch)) {
@@ -6952,7 +7163,7 @@
} else {
var fil = $("<div><div id='"+fid+"' class='searchFilter' style='overflow:auto'></div></div>").insertBefore("#gview_"+$.jgrid.jqID($t.p.id)),
align = "left", butleft ="";
- if($t.p.direction == "rtl") {
+ if($t.p.direction === "rtl") {
align = "right";
butleft = " style='text-align:left'";
fil.attr("dir","rtl");
@@ -6971,7 +7182,7 @@
}
// find first searchable column and set it if no default filter
if(!found) {
- var searchable = (typeof n.search === 'undefined') ? true: n.search ,
+ var searchable = (n.search === undefined) ? true: n.search ,
hidden = (n.hidden === true),
ignoreHiding = (n.searchoptions && n.searchoptions.searchhidden === true);
if ((ignoreHiding && searchable) || (searchable && !hidden)) {
@@ -6983,6 +7194,8 @@
});
} else {
columns = p.columns;
+ cmi = 0;
+ colnm = columns[0].index || columns[0].name;
}
// old behaviour
if( (!defaultFilters && colnm) || p.multipleSearch === false ) {
@@ -6992,7 +7205,7 @@
} else if(p.sopt && p.sopt.length) {
cmop = p.sopt[0];
}
- defaultFilters = {"groupOp": "AND",rules:[{"field":colnm,"op":cmop,"data":""}]};
+ defaultFilters = {groupOp: "AND", rules: [{field: colnm, op: cmop, data: ""}]};
}
found = false;
if(p.tmplNames && p.tmplNames.length) {
@@ -7017,7 +7230,8 @@
groupButton : p.multipleGroup,
ruleButtons : p.multipleSearch,
afterRedraw : p.afterRedraw,
- _gridsopt : $.jgrid.search.odata,
+ ops : p.odata,
+ operands : p.operands,
ajaxSelectOptions: $t.p.ajaxSelectOptions,
groupOps: p.groupOps,
onChange : function() {
@@ -7028,13 +7242,14 @@
p.afterChange.call($t, $("#"+fid), p);
}
},
- direction : $t.p.direction
+ direction : $t.p.direction,
+ id: $t.p.id
});
fil.append( bt );
if(found && p.tmplFilters && p.tmplFilters.length) {
$(".ui-template", fil).bind('change', function(){
var curtempl = $(this).val();
- if(curtempl=="default") {
+ if(curtempl==="default") {
$("#"+fid).jqFilter('addFilter', defaultFilters);
} else {
$("#"+fid).jqFilter('addFilter', p.tmplFilters[parseInt(curtempl,10)]);
@@ -7081,7 +7296,7 @@
}
$("#"+fid+"_search").bind('click', function(){
var fl = $("#"+fid),
- sdata={}, res ,
+ sdata={}, res,
filters = fl.jqFilter('filterData');
if(p.errorcheck) {
fl[0].hideError();
@@ -7101,7 +7316,7 @@
res = JSON.stringify(filters);
} catch (e2) { }
}
- if(typeof(res)==="string") {
+ if(typeof res==="string") {
sdata[p.sFilter] = res;
$.each([p.sField,p.sValue, p.sOper], function() {sdata[this] = "";});
}
@@ -7158,10 +7373,11 @@
});
},
editGridRow : function(rowid, p){
- p = $.extend({
+ p = $.extend(true, {
top : 0,
left: 0,
width: 300,
+ datawidth: 'auto',
height: 'auto',
dataheight: 'auto',
modal: false,
@@ -7201,7 +7417,8 @@
onClose : null,
ajaxEditOptions : {},
serializeEditData : null,
- viewPagerButtons : true
+ viewPagerButtons : true,
+ overlayClass : 'ui-widget-overlay'
}, $.jgrid.edit, p || {});
rp_ge[$(this)[0].p.id] = p;
return this.each(function(){
@@ -7215,7 +7432,7 @@
onBeforeInit = $.isFunction(rp_ge[$t.p.id].beforeInitData) ? rp_ge[$t.p.id].beforeInitData : false,
onInitializeForm = $.isFunction(rp_ge[$t.p.id].onInitializeForm) ? rp_ge[$t.p.id].onInitializeForm : false,
showFrm = true,
- maxCols = 1, maxRows=0, postdata, extpost, newData, diff, frmoper;
+ maxCols = 1, maxRows=0, postdata, diff, frmoper;
frmgr = $.jgrid.jqID(frmgr);
if (rowid === "new") {
rowid = "_empty";
@@ -7243,8 +7460,8 @@
postdata[nm] = this.editoptions.custom_value.call($t, $("#"+$.jgrid.jqID(nm),frmtb),'get');
if (postdata[nm] === undefined) {throw "e1";}
} catch (e) {
- if (e==="e1") {$.jgrid.info_dialog(jQuery.jgrid.errors.errcap,"function 'custom_value' "+$.jgrid.edit.msg.novalue,jQuery.jgrid.edit.bClose);}
- else {$.jgrid.info_dialog(jQuery.jgrid.errors.errcap,e.message,jQuery.jgrid.edit.bClose);}
+ if (e==="e1") {$.jgrid.info_dialog($.jgrid.errors.errcap,"function 'custom_value' "+$.jgrid.edit.msg.novalue,$.jgrid.edit.bClose);}
+ else {$.jgrid.info_dialog($.jgrid.errors.errcap,e.message,$.jgrid.edit.bClose);}
}
return true;
}
@@ -7261,7 +7478,6 @@
break;
case "select-one":
postdata[this.name]= $("option:selected",this).val();
- extpost[this.name]= $("option:selected",this).text();
break;
case "select-multiple":
postdata[this.name]= $(this).val();
@@ -7273,7 +7489,6 @@
selectedText[i] = $(selected).text();
}
);
- extpost[this.name]= selectedText.join(",");
break;
case "password":
case "text":
@@ -7294,7 +7509,7 @@
for (i =1; i<=maxcols;i++) {
tmpl += tdtmpl;
}
- if(rowid != '_empty') {
+ if(rowid !== '_empty') {
ind = $(obj).jqGrid("getInd",rowid);
}
$(obj.p.colModel).each( function(i) {
@@ -7310,32 +7525,32 @@
if(ind === false) {
tmp = "";
} else {
- if(nm == obj.p.ExpandColumn && obj.p.treeGrid === true) {
- tmp = $("td:eq("+i+")",obj.rows[ind]).text();
+ if(nm === obj.p.ExpandColumn && obj.p.treeGrid === true) {
+ tmp = $("td[role='gridcell']:eq("+i+")",obj.rows[ind]).text();
} else {
try {
- tmp = $.unformat.call(obj, $("td:eq("+i+")",obj.rows[ind]),{rowId:rowid, colModel:this},i);
+ tmp = $.unformat.call(obj, $("td[role='gridcell']:eq("+i+")",obj.rows[ind]),{rowId:rowid, colModel:this},i);
} catch (_) {
- tmp = (this.edittype && this.edittype == "textarea") ? $("td:eq("+i+")",obj.rows[ind]).text() : $("td:eq("+i+")",obj.rows[ind]).html();
+ tmp = (this.edittype && this.edittype === "textarea") ? $("td[role='gridcell']:eq("+i+")",obj.rows[ind]).text() : $("td[role='gridcell']:eq("+i+")",obj.rows[ind]).html();
}
- if(!tmp || tmp == " " || tmp == " " || (tmp.length==1 && tmp.charCodeAt(0)==160) ) {tmp='';}
+ if(!tmp || tmp === " " || tmp === " " || (tmp.length===1 && tmp.charCodeAt(0)===160) ) {tmp='';}
}
}
var opt = $.extend({}, this.editoptions || {} ,{id:nm,name:nm}),
frmopt = $.extend({}, {elmprefix:'',elmsuffix:'',rowabove:false,rowcontent:''}, this.formoptions || {}),
rp = parseInt(frmopt.rowpos,10) || cnt+1,
cp = parseInt((parseInt(frmopt.colpos,10) || 1)*2,10);
- if(rowid == "_empty" && opt.defaultValue ) {
+ if(rowid === "_empty" && opt.defaultValue ) {
tmp = $.isFunction(opt.defaultValue) ? opt.defaultValue.call($t) : opt.defaultValue;
}
if(!this.edittype) {this.edittype = "text";}
if($t.p.autoencode) {tmp = $.jgrid.htmlDecode(tmp);}
elc = $.jgrid.createEl.call($t,this.edittype,opt,tmp,false,$.extend({},$.jgrid.ajaxOptions,obj.p.ajaxSelectOptions || {}));
- if(tmp === "" && this.edittype == "checkbox") {tmp = $(elc).attr("offval");}
- if(tmp === "" && this.edittype == "select") {tmp = $("option:eq(0)",elc).text();}
+ //if(tmp === "" && this.edittype == "checkbox") {tmp = $(elc).attr("offval");}
+ //if(tmp === "" && this.edittype == "select") {tmp = $("option:eq(0)",elc).text();}
if(rp_ge[$t.p.id].checkOnSubmit || rp_ge[$t.p.id].checkOnUpdate) {rp_ge[$t.p.id]._savedData[nm] = tmp;}
$(elc).addClass("FormElement");
- if(this.edittype == 'text' || this.edittype == 'textarea') {
+ if( $.inArray(this.edittype, ['text','textarea','password','select']) > -1) {
$(elc).addClass("ui-widget-content ui-corner-all");
}
trdata = $(tb).find("tr[rowpos="+rp+"]");
@@ -7350,8 +7565,12 @@
$(tb).append(trdata);
trdata[0].rp = rp;
}
- $("td:eq("+(cp-2)+")",trdata[0]).html( typeof frmopt.label === 'undefined' ? obj.p.colNames[i]: frmopt.label);
+ $("td:eq("+(cp-2)+")",trdata[0]).html(frmopt.label === undefined ? obj.p.colNames[i]: frmopt.label);
$("td:eq("+(cp-1)+")",trdata[0]).append(frmopt.elmprefix).append(elc).append(frmopt.elmsuffix);
+ if($.isFunction(opt.custom_value) && rowid !== "_empty" ) {
+ opt.custom_value.call($t, $("#"+nm,"#"+frmgr),'set',tmp);
+ }
+ $.jgrid.bindEv.call($t, elc, opt);
retpos[cnt] = i;
cnt++;
}
@@ -7368,7 +7587,7 @@
var nm,cnt=0,tmp, fld,opt,vl,vlc;
if(rp_ge[$t.p.id].checkOnSubmit || rp_ge[$t.p.id].checkOnUpdate) {rp_ge[$t.p.id]._savedData = {};rp_ge[$t.p.id]._savedData[obj.p.id+"_id"]=rowid;}
var cm = obj.p.colModel;
- if(rowid == '_empty') {
+ if(rowid === '_empty') {
$(cm).each(function(){
nm = this.name;
opt = $.extend({}, this.editoptions || {} );
@@ -7377,9 +7596,9 @@
vl = "";
if(opt.defaultValue ) {
vl = $.isFunction(opt.defaultValue) ? opt.defaultValue.call($t) : opt.defaultValue;
- if(fld[0].type=='checkbox') {
+ if(fld[0].type==='checkbox') {
vlc = vl.toLowerCase();
- if(vlc.search(/(false|0|no|off|undefined)/i)<0 && vlc!=="") {
+ if(vlc.search(/(false|f|0|no|n|off|undefined)/i)<0 && vlc!=="") {
fld[0].checked = true;
fld[0].defaultChecked = true;
fld[0].value = vl;
@@ -7389,11 +7608,11 @@
}
} else {fld.val(vl);}
} else {
- if( fld[0].type=='checkbox' ) {
+ if( fld[0].type==='checkbox' ) {
fld[0].checked = false;
fld[0].defaultChecked = false;
vl = $(fld).attr("offval");
- } else if (fld[0].type && fld[0].type.substr(0,6)=='select') {
+ } else if (fld[0].type && fld[0].type.substr(0,6)==='select') {
fld[0].selectedIndex = 0;
} else {
fld.val(vl);
@@ -7411,13 +7630,13 @@
nm = cm[i].name;
// hidden fields are included in the form
if ( nm !== 'cb' && nm !== 'subgrid' && nm !== 'rn' && cm[i].editable===true) {
- if(nm == obj.p.ExpandColumn && obj.p.treeGrid === true) {
+ if(nm === obj.p.ExpandColumn && obj.p.treeGrid === true) {
tmp = $(this).text();
} else {
try {
tmp = $.unformat.call(obj, $(this),{rowId:rowid, colModel:cm[i]},i);
} catch (_) {
- tmp = cm[i].edittype=="textarea" ? $(this).text() : $(this).html();
+ tmp = cm[i].edittype==="textarea" ? $(this).text() : $(this).html();
}
}
if($t.p.autoencode) {tmp = $.jgrid.htmlDecode(tmp);}
@@ -7429,14 +7648,14 @@
case "button" :
case "image":
case "textarea":
- if(tmp == " " || tmp == " " || (tmp.length==1 && tmp.charCodeAt(0)==160) ) {tmp='';}
+ if(tmp === " " || tmp === " " || (tmp.length===1 && tmp.charCodeAt(0)===160) ) {tmp='';}
$("#"+nm,"#"+fmid).val(tmp);
break;
case "select":
var opv = tmp.split(",");
opv = $.map(opv,function(n){return $.trim(n);});
$("#"+nm+" option","#"+fmid).each(function(){
- if (!cm[i].editoptions.multiple && ($.trim(tmp) == $.trim($(this).text()) || opv[0] == $.trim($(this).text()) || opv[0] == $.trim($(this).val())) ){
+ if (!cm[i].editoptions.multiple && ($.trim(tmp) === $.trim($(this).text()) || opv[0] === $.trim($(this).text()) || opv[0] === $.trim($(this).val())) ){
this.selected= true;
} else if (cm[i].editoptions.multiple){
if( $.inArray($.trim($(this).text()), opv ) > -1 || $.inArray($.trim($(this).val()), opv ) > -1 ){
@@ -7450,19 +7669,17 @@
});
break;
case "checkbox":
- tmp = tmp+"";
+ tmp = String(tmp);
if(cm[i].editoptions && cm[i].editoptions.value) {
var cb = cm[i].editoptions.value.split(":");
- if(cb[0] == tmp) {
- $("#"+nm,"#"+fmid)[$t.p.useProp ? 'prop': 'attr']("checked",true);
- $("#"+nm,"#"+fmid)[$t.p.useProp ? 'prop': 'attr']("defaultChecked",true); //ie
+ if(cb[0] === tmp) {
+ $("#"+nm,"#"+fmid)[$t.p.useProp ? 'prop': 'attr']({"checked":true, "defaultChecked" : true});
} else {
- $("#"+nm,"#"+fmid)[$t.p.useProp ? 'prop': 'attr']("checked", false);
- $("#"+nm,"#"+fmid)[$t.p.useProp ? 'prop': 'attr']("defaultChecked", false); //ie
+ $("#"+nm,"#"+fmid)[$t.p.useProp ? 'prop': 'attr']({"checked":false, "defaultChecked" : false});
}
} else {
tmp = tmp.toLowerCase();
- if(tmp.search(/(false|0|no|off|undefined)/i)<0 && tmp!=="") {
+ if(tmp.search(/(false|f|0|no|n|off|undefined)/i)<0 && tmp!=="") {
$("#"+nm,"#"+fmid)[$t.p.useProp ? 'prop': 'attr']("checked",true);
$("#"+nm,"#"+fmid)[$t.p.useProp ? 'prop': 'attr']("defaultChecked",true); //ie
} else {
@@ -7477,8 +7694,8 @@
cm[i].editoptions.custom_value.call($t, $("#"+nm,"#"+fmid),'set',tmp);
} else {throw "e1";}
} catch (e) {
- if (e=="e1") {$.jgrid.info_dialog(jQuery.jgrid.errors.errcap,"function 'custom_value' "+$.jgrid.edit.msg.nodefined,jQuery.jgrid.edit.bClose);}
- else {$.jgrid.info_dialog(jQuery.jgrid.errors.errcap,e.message,jQuery.jgrid.edit.bClose);}
+ if (e==="e1") {$.jgrid.info_dialog($.jgrid.errors.errcap,"function 'custom_value' "+$.jgrid.edit.msg.nodefined,$.jgrid.edit.bClose);}
+ else {$.jgrid.info_dialog($.jgrid.errors.errcap,e.message,$.jgrid.edit.bClose);}
}
break;
}
@@ -7500,15 +7717,15 @@
var copydata, ret=[true,"",""], onCS = {}, opers = $t.p.prmNames, idname, oper, key, selr, i;
var retvals = $($t).triggerHandler("jqGridAddEditBeforeCheckValues", [$("#"+frmgr), frmoper]);
- if(retvals && typeof(retvals) === 'object') {postdata = retvals;}
+ if(retvals && typeof retvals === 'object') {postdata = retvals;}
if($.isFunction(rp_ge[$t.p.id].beforeCheckValues)) {
- retvals = rp_ge[$t.p.id].beforeCheckValues.call($t, postdata,$("#"+frmgr),postdata[$t.p.id+"_id"] == "_empty" ? opers.addoper : opers.editoper);
- if(retvals && typeof(retvals) === 'object') {postdata = retvals;}
+ retvals = rp_ge[$t.p.id].beforeCheckValues.call($t, postdata,$("#"+frmgr),frmoper);
+ if(retvals && typeof retvals === 'object') {postdata = retvals;}
}
for( key in postdata ){
if(postdata.hasOwnProperty(key)) {
- ret = $.jgrid.checkValues.call($t,postdata[key],key,$t);
+ ret = $.jgrid.checkValues.call($t,postdata[key],key);
if(ret[0] === false) {break;}
}
}
@@ -7516,14 +7733,14 @@
if(ret[0]) {
onCS = $($t).triggerHandler("jqGridAddEditClickSubmit", [rp_ge[$t.p.id], postdata, frmoper]);
if( onCS === undefined && $.isFunction( rp_ge[$t.p.id].onclickSubmit)) {
- onCS = rp_ge[$t.p.id].onclickSubmit.call($t, rp_ge[$t.p.id], postdata) || {};
+ onCS = rp_ge[$t.p.id].onclickSubmit.call($t, rp_ge[$t.p.id], postdata, frmoper) || {};
}
ret = $($t).triggerHandler("jqGridAddEditBeforeSubmit", [postdata, $("#"+frmgr), frmoper]);
if(ret === undefined) {
ret = [true,"",""];
}
if( ret[0] && $.isFunction(rp_ge[$t.p.id].beforeSubmit)) {
- ret = rp_ge[$t.p.id].beforeSubmit.call($t,postdata,$("#"+frmgr));
+ ret = rp_ge[$t.p.id].beforeSubmit.call($t,postdata,$("#"+frmgr), frmoper);
}
}
@@ -7533,8 +7750,8 @@
oper = opers.oper;
idname = opers.id;
// we add to pos data array the action - the name is oper
- postdata[oper] = ($.trim(postdata[$t.p.id+"_id"]) == "_empty") ? opers.addoper : opers.editoper;
- if(postdata[oper] != opers.addoper) {
+ postdata[oper] = ($.trim(postdata[$t.p.id+"_id"]) === "_empty") ? opers.addoper : opers.editoper;
+ if(postdata[oper] !== opers.addoper) {
postdata[idname] = postdata[$t.p.id+"_id"];
} else {
// check to see if we have allredy this field in the form and if yes lieve it
@@ -7543,16 +7760,16 @@
delete postdata[$t.p.id+"_id"];
postdata = $.extend(postdata,rp_ge[$t.p.id].editData,onCS);
if($t.p.treeGrid === true) {
- if(postdata[oper] == opers.addoper) {
+ if(postdata[oper] === opers.addoper) {
selr = $($t).jqGrid("getGridParam", 'selrow');
- var tr_par_id = $t.p.treeGridModel == 'adjacency' ? $t.p.treeReader.parent_id_field : 'parent_id';
+ var tr_par_id = $t.p.treeGridModel === 'adjacency' ? $t.p.treeReader.parent_id_field : 'parent_id';
postdata[tr_par_id] = selr;
}
for(i in $t.p.treeReader){
if($t.p.treeReader.hasOwnProperty(i)) {
var itm = $t.p.treeReader[i];
if(postdata.hasOwnProperty(itm)) {
- if(postdata[oper] == opers.addoper && i === 'parent_id_field') {continue;}
+ if(postdata[oper] === opers.addoper && i === 'parent_id_field') {continue;}
delete postdata[itm];
}
}
@@ -7561,18 +7778,19 @@
postdata[idname] = $.jgrid.stripPref($t.p.idPrefix, postdata[idname]);
var ajaxOptions = $.extend({
- url: rp_ge[$t.p.id].url ? rp_ge[$t.p.id].url : $($t).jqGrid('getGridParam','editurl'),
+ url: rp_ge[$t.p.id].url || $($t).jqGrid('getGridParam','editurl'),
type: rp_ge[$t.p.id].mtype,
data: $.isFunction(rp_ge[$t.p.id].serializeEditData) ? rp_ge[$t.p.id].serializeEditData.call($t,postdata) : postdata,
- complete:function(data,Status){
+ complete:function(data,status){
+ var key;
postdata[idname] = $t.p.idPrefix + postdata[idname];
- if(Status != "success") {
+ if(data.status >= 300 && data.status !== 304) {
ret[0] = false;
ret[1] = $($t).triggerHandler("jqGridAddEditErrorTextFormat", [data, frmoper]);
if ($.isFunction(rp_ge[$t.p.id].errorTextFormat)) {
- ret[1] = rp_ge[$t.p.id].errorTextFormat.call($t, data);
+ ret[1] = rp_ge[$t.p.id].errorTextFormat.call($t, data, frmoper);
} else {
- ret[1] = Status + " Status: '" + data.statusText + "'. Error code: " + data.status;
+ ret[1] = status + " Status: '" + data.statusText + "'. Error code: " + data.status;
}
} else {
// data is posted successful
@@ -7582,20 +7800,13 @@
ret = [true,"",""];
}
if( ret[0] && $.isFunction(rp_ge[$t.p.id].afterSubmit) ) {
- ret = rp_ge[$t.p.id].afterSubmit.call($t, data,postdata);
+ ret = rp_ge[$t.p.id].afterSubmit.call($t, data,postdata, frmoper);
}
}
if(ret[0] === false) {
$("#FormError>td",frmtb).html(ret[1]);
$("#FormError",frmtb).show();
} else {
- // remove some values if formattaer select or checkbox
- $.each($t.p.colModel, function(){
- if(extpost[this.name] && this.formatter && this.formatter=='select') {
- try {delete extpost[this.name];} catch (e) {}
- }
- });
- postdata = $.extend(postdata,extpost);
if($t.p.autoencode) {
$.each(postdata,function(n,v){
postdata[n] = $.jgrid.htmlDecode(v);
@@ -7603,42 +7814,28 @@
}
//rp_ge[$t.p.id].reloadAfterSubmit = rp_ge[$t.p.id].reloadAfterSubmit && $t.p.datatype != "local";
// the action is add
- if(postdata[oper] == opers.addoper ) {
+ if(postdata[oper] === opers.addoper ) {
//id processing
// user not set the id ret[2]
if(!ret[2]) {ret[2] = $.jgrid.randId();}
postdata[idname] = ret[2];
+ if(rp_ge[$t.p.id].reloadAfterSubmit) {
+ $($t).trigger("reloadGrid");
+ } else {
+ if($t.p.treeGrid === true){
+ $($t).jqGrid("addChildNode",ret[2],selr,postdata );
+ } else {
+ $($t).jqGrid("addRowData",ret[2],postdata,p.addedrow);
+ }
+ }
if(rp_ge[$t.p.id].closeAfterAdd) {
- if(rp_ge[$t.p.id].reloadAfterSubmit) {$($t).trigger("reloadGrid");}
- else {
- if($t.p.treeGrid === true){
- $($t).jqGrid("addChildNode",ret[2],selr,postdata );
- } else {
- $($t).jqGrid("addRowData",ret[2],postdata,p.addedrow);
+ if($t.p.treeGrid !== true){
$($t).jqGrid("setSelection",ret[2]);
}
- }
$.jgrid.hideModal("#"+$.jgrid.jqID(IDs.themodal),{gb:"#gbox_"+$.jgrid.jqID(gID),jqm:p.jqModal,onClose: rp_ge[$t.p.id].onClose});
} else if (rp_ge[$t.p.id].clearAfterAdd) {
- if(rp_ge[$t.p.id].reloadAfterSubmit) {$($t).trigger("reloadGrid");}
- else {
- if($t.p.treeGrid === true){
- $($t).jqGrid("addChildNode",ret[2],selr,postdata );
- } else {
- $($t).jqGrid("addRowData",ret[2],postdata,p.addedrow);
- }
- }
fillData("_empty",$t,frmgr);
- } else {
- if(rp_ge[$t.p.id].reloadAfterSubmit) {$($t).trigger("reloadGrid");}
- else {
- if($t.p.treeGrid === true){
- $($t).jqGrid("addChildNode",ret[2],selr,postdata );
- } else {
- $($t).jqGrid("addRowData",ret[2],postdata,p.addedrow);
}
- }
- }
} else {
// the action is update
if(rp_ge[$t.p.id].reloadAfterSubmit) {
@@ -7657,21 +7854,21 @@
copydata = data;
setTimeout(function(){
$($t).triggerHandler("jqGridAddEditAfterComplete", [copydata, postdata, $("#"+frmgr), frmoper]);
- rp_ge[$t.p.id].afterComplete.call($t, copydata, postdata, $("#"+frmgr));
+ rp_ge[$t.p.id].afterComplete.call($t, copydata, postdata, $("#"+frmgr), frmoper);
copydata=null;
},500);
}
- if(rp_ge[$t.p.id].checkOnSubmit || rp_ge[$t.p.id].checkOnUpdate) {
- $("#"+frmgr).data("disabled",false);
- if(rp_ge[$t.p.id]._savedData[$t.p.id+"_id"] !="_empty"){
- for(var key in rp_ge[$t.p.id]._savedData) {
- if(postdata[key]) {
- rp_ge[$t.p.id]._savedData[key] = postdata[key];
+ if(rp_ge[$t.p.id].checkOnSubmit || rp_ge[$t.p.id].checkOnUpdate) {
+ $("#"+frmgr).data("disabled",false);
+ if(rp_ge[$t.p.id]._savedData[$t.p.id+"_id"] !== "_empty"){
+ for(key in rp_ge[$t.p.id]._savedData) {
+ if(rp_ge[$t.p.id]._savedData.hasOwnProperty(key) && postdata[key]) {
+ rp_ge[$t.p.id]._savedData[key] = postdata[key];
+ }
}
}
}
}
- }
rp_ge[$t.p.id].processing=false;
$("#sData", frmtb+"_2").removeClass('ui-state-active');
try{$(':input:visible',"#"+frmgr)[0].focus();} catch (e){}
@@ -7688,17 +7885,17 @@
if (ret[0]) {
if (rp_ge[$t.p.id].useDataProxy) {
var dpret = $t.p.dataProxy.call($t, ajaxOptions, "set_"+$t.p.id);
- if(typeof(dpret) == "undefined") {
+ if(dpret === undefined) {
dpret = [true, ""];
}
if(dpret[0] === false ) {
ret[0] = false;
ret[1] = dpret[1] || "Error deleting the selected row!" ;
} else {
- if(ajaxOptions.data.oper == opers.addoper && rp_ge[$t.p.id].closeAfterAdd ) {
+ if(ajaxOptions.data.oper === opers.addoper && rp_ge[$t.p.id].closeAfterAdd ) {
$.jgrid.hideModal("#"+$.jgrid.jqID(IDs.themodal),{gb:"#gbox_"+$.jgrid.jqID(gID),jqm:p.jqModal, onClose: rp_ge[$t.p.id].onClose});
}
- if(ajaxOptions.data.oper == opers.editoper && rp_ge[$t.p.id].closeAfterEdit ) {
+ if(ajaxOptions.data.oper === opers.editoper && rp_ge[$t.p.id].closeAfterEdit ) {
$.jgrid.hideModal("#"+$.jgrid.jqID(IDs.themodal),{gb:"#gbox_"+$.jgrid.jqID(gID),jqm:p.jqModal, onClose: rp_ge[$t.p.id].onClose});
}
}
@@ -7716,7 +7913,7 @@
function compareData(nObj, oObj ) {
var ret = false,key;
for (key in nObj) {
- if(nObj[key] != oObj[key]) {
+ if(nObj.hasOwnProperty(key) && nObj[key] != oObj[key]) {
ret = true;
break;
}
@@ -7727,10 +7924,9 @@
var stat = true;
$("#FormError",frmtb).hide();
if(rp_ge[$t.p.id].checkOnUpdate) {
- postdata = {};extpost={};
+ postdata = {};
getFormData();
- newData = $.extend({},postdata,extpost);
- diff = compareData(newData,rp_ge[$t.p.id]._savedData);
+ diff = compareData(postdata,rp_ge[$t.p.id]._savedData);
if(diff) {
$("#"+frmgr).data("disabled",true);
$(".confirm","#"+IDs.themodal).show();
@@ -7741,8 +7937,9 @@
}
function restoreInline()
{
- if (rowid !== "_empty" && typeof($t.p.savedRow) !== "undefined" && $t.p.savedRow.length > 0 && $.isFunction($.fn.jqGrid.restoreRow)) {
- for (var i=0;i<$t.p.savedRow.length;i++) {
+ var i;
+ if (rowid !== "_empty" && $t.p.savedRow !== undefined && $t.p.savedRow.length > 0 && $.isFunction($.fn.jqGrid.restoreRow)) {
+ for (i=0;i<$t.p.savedRow.length;i++) {
if ($t.p.savedRow[i].id == rowid) {
$($t).jqGrid('restoreRow',rowid);
break;
@@ -7750,9 +7947,23 @@
}
}
}
- function updateNav(cr,totr){
- if (cr===0) {$("#pData",frmtb+"_2").addClass('ui-state-disabled');} else {$("#pData",frmtb+"_2").removeClass('ui-state-disabled');}
- if (cr==totr) {$("#nData",frmtb+"_2").addClass('ui-state-disabled');} else {$("#nData",frmtb+"_2").removeClass('ui-state-disabled');}
+ function updateNav(cr, posarr){
+ var totr = posarr[1].length-1;
+ if (cr===0) {
+ $("#pData",frmtb+"_2").addClass('ui-state-disabled');
+ } else if( posarr[1][cr-1] !== undefined && $("#"+$.jgrid.jqID(posarr[1][cr-1])).hasClass('ui-state-disabled')) {
+ $("#pData",frmtb+"_2").addClass('ui-state-disabled');
+ } else {
+ $("#pData",frmtb+"_2").removeClass('ui-state-disabled');
+ }
+
+ if (cr===totr) {
+ $("#nData",frmtb+"_2").addClass('ui-state-disabled');
+ } else if( posarr[1][cr+1] !== undefined && $("#"+$.jgrid.jqID(posarr[1][cr+1])).hasClass('ui-state-disabled')) {
+ $("#nData",frmtb+"_2").addClass('ui-state-disabled');
+ } else {
+ $("#nData",frmtb+"_2").removeClass('ui-state-disabled');
+ }
}
function getCurrPos() {
var rowsInGrid = $($t).jqGrid("getDataIDs"),
@@ -7763,11 +7974,11 @@
if ( $("#"+$.jgrid.jqID(IDs.themodal))[0] !== undefined ) {
showFrm = $($t).triggerHandler("jqGridAddEditBeforeInitData", [$("#"+$.jgrid.jqID(frmgr)), frmoper]);
- if(typeof(showFrm) == "undefined") {
+ if(showFrm === undefined) {
showFrm = true;
}
if(showFrm && onBeforeInit) {
- showFrm = onBeforeInit.call($t,$("#"+frmgr));
+ showFrm = onBeforeInit.call($t,$("#"+frmgr), frmoper);
}
if(showFrm === false) {return;}
restoreInline();
@@ -7788,7 +7999,7 @@
// filldata
fillData(rowid,$t,frmgr);
///
- if(rowid=="_empty" || !rp_ge[$t.p.id].viewPagerButtons) {
+ if(rowid==="_empty" || !rp_ge[$t.p.id].viewPagerButtons) {
$("#pData, #nData",frmtb+"_2").hide();
} else {
$("#pData, #nData",frmtb+"_2").show();
@@ -7802,28 +8013,29 @@
$("#"+frmgr).data("disabled",false);
}
$($t).triggerHandler("jqGridAddEditBeforeShowForm", [$("#"+frmgr), frmoper]);
- if(onBeforeShow) { onBeforeShow.call($t, $("#"+frmgr)); }
+ if(onBeforeShow) { onBeforeShow.call($t, $("#"+frmgr), frmoper); }
$("#"+$.jgrid.jqID(IDs.themodal)).data("onClose",rp_ge[$t.p.id].onClose);
- $.jgrid.viewModal("#"+$.jgrid.jqID(IDs.themodal),{gbox:"#gbox_"+$.jgrid.jqID(gID),jqm:p.jqModal, jqM: false, overlay: p.overlay, modal:p.modal});
+ $.jgrid.viewModal("#"+$.jgrid.jqID(IDs.themodal),{gbox:"#gbox_"+$.jgrid.jqID(gID),jqm:p.jqModal, jqM: false, overlay: p.overlay, modal:p.modal, overlayClass : p.overlayClass});
if(!closeovrl) {
- $(".jqmOverlay").click(function(){
+ $("." + $.jgrid.jqID(p.overlayClass)).click(function(){
if(!checkUpdates()) {return false;}
$.jgrid.hideModal("#"+$.jgrid.jqID(IDs.themodal),{gb:"#gbox_"+$.jgrid.jqID(gID),jqm:p.jqModal, onClose: rp_ge[$t.p.id].onClose});
return false;
});
}
$($t).triggerHandler("jqGridAddEditAfterShowForm", [$("#"+frmgr), frmoper]);
- if(onAfterShow) { onAfterShow.call($t, $("#"+frmgr)); }
+ if(onAfterShow) { onAfterShow.call($t, $("#"+frmgr), frmoper); }
} else {
var dh = isNaN(p.dataheight) ? p.dataheight : p.dataheight+"px",
- frm = $("<form name='FormPost' id='"+frmgr+"' class='FormGrid' onSubmit='return false;' style='width:100%;overflow:auto;position:relative;height:"+dh+";'></form>").data("disabled",false),
+ dw = isNaN(p.datawidth) ? p.datawidth : p.datawidth+"px",
+ frm = $("<form name='FormPost' id='"+frmgr+"' class='FormGrid' onSubmit='return false;' style='width:"+dw+";overflow:auto;position:relative;height:"+dh+";'></form>").data("disabled",false),
tbl = $("<table id='"+frmtborg+"' class='EditTable' cellspacing='0' cellpadding='0' border='0'><tbody></tbody></table>");
showFrm = $($t).triggerHandler("jqGridAddEditBeforeInitData", [$("#"+frmgr), frmoper]);
- if(typeof(showFrm) == "undefined") {
+ if(showFrm === undefined) {
showFrm = true;
}
if(showFrm && onBeforeInit) {
- showFrm = onBeforeInit.call($t,$("#"+frmgr));
+ showFrm = onBeforeInit.call($t,$("#"+frmgr,frmoper));
}
if(showFrm === false) {return;}
restoreInline();
@@ -7843,7 +8055,7 @@
// set the id.
// use carefull only to change here colproperties.
// create data
- var rtlb = $t.p.direction == "rtl" ? true :false,
+ var rtlb = $t.p.direction === "rtl" ? true :false,
bp = rtlb ? "nData" : "pData",
bn = rtlb ? "pData" : "nData";
createData(rowid,$t,tbl,maxCols);
@@ -7875,7 +8087,7 @@
p.closeOnEscape = false;
cle = true;
}
- var tms = $("<span></span>").append(frm).append(bt);
+ var tms = $("<div></div>").append(frm).append(bt);
$.jgrid.createModal(IDs,tms,p,"#gview_"+$.jgrid.jqID($t.p.id),$("#gbox_"+$.jgrid.jqID($t.p.id))[0]);
if(rtlb) {
$("#pData, #nData",frmtb+"_2").css("float","right");
@@ -7887,24 +8099,24 @@
$("#"+$.jgrid.jqID(IDs.themodal)).keydown( function( e ) {
var wkey = e.target;
if ($("#"+frmgr).data("disabled")===true ) {return false;}//??
- if(rp_ge[$t.p.id].savekey[0] === true && e.which == rp_ge[$t.p.id].savekey[1]) { // save
- if(wkey.tagName != "TEXTAREA") {
+ if(rp_ge[$t.p.id].savekey[0] === true && e.which === rp_ge[$t.p.id].savekey[1]) { // save
+ if(wkey.tagName !== "TEXTAREA") {
$("#sData", frmtb+"_2").trigger("click");
return false;
}
}
if(e.which === 27) {
if(!checkUpdates()) {return false;}
- if(cle) {$.jgrid.hideModal(this,{gb:p.gbox,jqm:p.jqModal, onClose: rp_ge[$t.p.id].onClose});}
+ if(cle) {$.jgrid.hideModal("#"+$.jgrid.jqID(IDs.themodal),{gb:p.gbox,jqm:p.jqModal, onClose: rp_ge[$t.p.id].onClose});}
return false;
}
if(rp_ge[$t.p.id].navkeys[0]===true) {
- if($("#id_g",frmtb).val() == "_empty") {return true;}
- if(e.which == rp_ge[$t.p.id].navkeys[1]){ //up
+ if($("#id_g",frmtb).val() === "_empty") {return true;}
+ if(e.which === rp_ge[$t.p.id].navkeys[1]){ //up
$("#pData", frmtb+"_2").trigger("click");
return false;
}
- if(e.which == rp_ge[$t.p.id].navkeys[2]){ //down
+ if(e.which === rp_ge[$t.p.id].navkeys[2]){ //down
$("#nData", frmtb+"_2").trigger("click");
return false;
}
@@ -7923,22 +8135,19 @@
p.closeicon = $.extend([true,"left","ui-icon-close"],p.closeicon);
// beforeinitdata after creation of the form
if(p.saveicon[0]===true) {
- $("#sData",frmtb+"_2").addClass(p.saveicon[1] == "right" ? 'fm-button-icon-right' : 'fm-button-icon-left')
+ $("#sData",frmtb+"_2").addClass(p.saveicon[1] === "right" ? 'fm-button-icon-right' : 'fm-button-icon-left')
.append("<span class='ui-icon "+p.saveicon[2]+"'></span>");
}
if(p.closeicon[0]===true) {
- $("#cData",frmtb+"_2").addClass(p.closeicon[1] == "right" ? 'fm-button-icon-right' : 'fm-button-icon-left')
+ $("#cData",frmtb+"_2").addClass(p.closeicon[1] === "right" ? 'fm-button-icon-right' : 'fm-button-icon-left')
.append("<span class='ui-icon "+p.closeicon[2]+"'></span>");
}
if(rp_ge[$t.p.id].checkOnSubmit || rp_ge[$t.p.id].checkOnUpdate) {
bS ="<a href='javascript:void(0)' id='sNew' class='fm-button ui-state-default ui-corner-all' style='z-index:1002'>"+p.bYes+"</a>";
bN ="<a href='javascript:void(0)' id='nNew' class='fm-button ui-state-default ui-corner-all' style='z-index:1002'>"+p.bNo+"</a>";
bC ="<a href='javascript:void(0)' id='cNew' class='fm-button ui-state-default ui-corner-all' style='z-index:1002'>"+p.bExit+"</a>";
- var ii, zI = p.zIndex || 999;zI ++;
- if ($.browser.msie && $.browser.version ==6) {
- ii = '<iframe style="display:block;position:absolute;z-index:-1;filter:Alpha(Opacity=\'0\');" src="javascript:false;"></iframe>';
- } else {ii="";}
- $("<div class='ui-widget-overlay jqgrid-overlay confirm' style='z-index:"+zI+";display:none;'> "+ii+"</div><div class='confirm ui-widget-content ui-jqconfirm' style='z-index:"+(zI+1)+"'>"+p.saveData+"<br/><br/>"+bS+bN+bC+"</div>").insertAfter("#"+frmgr);
+ var zI = p.zIndex || 999;zI ++;
+ $("<div class='"+ p.overlayClass+" jqgrid-overlay confirm' style='z-index:"+zI+";display:none;'> "+"</div><div class='confirm ui-widget-content ui-jqconfirm' style='z-index:"+(zI+1)+"'>"+p.saveData+"<br/><br/>"+bS+bN+bC+"</div>").insertAfter("#"+frmgr);
$("#sNew","#"+$.jgrid.jqID(IDs.themodal)).click(function(){
postIt();
$("#"+frmgr).data("disabled",false);
@@ -7948,7 +8157,7 @@
$("#nNew","#"+$.jgrid.jqID(IDs.themodal)).click(function(){
$(".confirm","#"+$.jgrid.jqID(IDs.themodal)).hide();
$("#"+frmgr).data("disabled",false);
- setTimeout(function(){$(":input","#"+frmgr)[0].focus();},0);
+ setTimeout(function(){$(":input:visible","#"+frmgr)[0].focus();},0);
return false;
});
$("#cNew","#"+$.jgrid.jqID(IDs.themodal)).click(function(){
@@ -7960,37 +8169,36 @@
}
// here initform - only once
$($t).triggerHandler("jqGridAddEditInitializeForm", [$("#"+frmgr), frmoper]);
- if(onInitializeForm) {onInitializeForm.call($t,$("#"+frmgr));}
- if(rowid=="_empty" || !rp_ge[$t.p.id].viewPagerButtons) {$("#pData,#nData",frmtb+"_2").hide();} else {$("#pData,#nData",frmtb+"_2").show();}
+ if(onInitializeForm) {onInitializeForm.call($t,$("#"+frmgr), frmoper);}
+ if(rowid==="_empty" || !rp_ge[$t.p.id].viewPagerButtons) {$("#pData,#nData",frmtb+"_2").hide();} else {$("#pData,#nData",frmtb+"_2").show();}
$($t).triggerHandler("jqGridAddEditBeforeShowForm", [$("#"+frmgr), frmoper]);
- if(onBeforeShow) { onBeforeShow.call($t, $("#"+frmgr));}
+ if(onBeforeShow) { onBeforeShow.call($t, $("#"+frmgr), frmoper);}
$("#"+$.jgrid.jqID(IDs.themodal)).data("onClose",rp_ge[$t.p.id].onClose);
- $.jgrid.viewModal("#"+$.jgrid.jqID(IDs.themodal),{gbox:"#gbox_"+$.jgrid.jqID(gID),jqm:p.jqModal, overlay: p.overlay,modal:p.modal});
+ $.jgrid.viewModal("#"+$.jgrid.jqID(IDs.themodal),{gbox:"#gbox_"+$.jgrid.jqID(gID),jqm:p.jqModal, overlay: p.overlay,modal:p.modal, overlayClass: p.overlayClass});
if(!closeovrl) {
- $(".jqmOverlay").click(function(){
+ $("." + $.jgrid.jqID(p.overlayClass)).click(function(){
if(!checkUpdates()) {return false;}
$.jgrid.hideModal("#"+$.jgrid.jqID(IDs.themodal),{gb:"#gbox_"+$.jgrid.jqID(gID),jqm:p.jqModal, onClose: rp_ge[$t.p.id].onClose});
return false;
});
}
$($t).triggerHandler("jqGridAddEditAfterShowForm", [$("#"+frmgr), frmoper]);
- if(onAfterShow) { onAfterShow.call($t, $("#"+frmgr)); }
+ if(onAfterShow) { onAfterShow.call($t, $("#"+frmgr), frmoper); }
$(".fm-button","#"+$.jgrid.jqID(IDs.themodal)).hover(
function(){$(this).addClass('ui-state-hover');},
function(){$(this).removeClass('ui-state-hover');}
);
$("#sData", frmtb+"_2").click(function(){
- postdata = {};extpost={};
+ postdata = {};
$("#FormError",frmtb).hide();
// all depend on ret array
//ret[0] - succes
//ret[1] - msg if not succes
//ret[2] - the id that will be set if reload after submit false
getFormData();
- if(postdata[$t.p.id+"_id"] == "_empty") {postIt();}
+ if(postdata[$t.p.id+"_id"] === "_empty") {postIt();}
else if(p.checkOnSubmit===true ) {
- newData = $.extend({},postdata,extpost);
- diff = compareData(newData,rp_ge[$t.p.id]._savedData);
+ diff = compareData(postdata,rp_ge[$t.p.id]._savedData);
if(diff) {
$("#"+frmgr).data("disabled",true);
$(".confirm","#"+$.jgrid.jqID(IDs.themodal)).show();
@@ -8012,9 +8220,9 @@
$("#FormError",frmtb).hide();
var npos = getCurrPos();
npos[0] = parseInt(npos[0],10);
- if(npos[0] != -1 && npos[1][npos[0]+1]) {
+ if(npos[0] !== -1 && npos[1][npos[0]+1]) {
$($t).triggerHandler("jqGridAddEditClickPgButtons", ['next',$("#"+frmgr),npos[1][npos[0]]]);
- var nposret = true;
+ var nposret;
if($.isFunction(p.onclickPgButtons)) {
nposret = p.onclickPgButtons.call($t, 'next',$("#"+frmgr),npos[1][npos[0]]);
if( nposret !== undefined && nposret === false ) {return false;}
@@ -8026,7 +8234,7 @@
if($.isFunction(p.afterclickPgButtons)) {
p.afterclickPgButtons.call($t, 'next',$("#"+frmgr),npos[1][npos[0]+1]);
}
- updateNav(npos[0]+1,npos[1].length-1);
+ updateNav(npos[0]+1,npos);
}
return false;
});
@@ -8034,9 +8242,9 @@
if(!checkUpdates()) {return false;}
$("#FormError",frmtb).hide();
var ppos = getCurrPos();
- if(ppos[0] != -1 && ppos[1][ppos[0]-1]) {
+ if(ppos[0] !== -1 && ppos[1][ppos[0]-1]) {
$($t).triggerHandler("jqGridAddEditClickPgButtons", ['prev',$("#"+frmgr),ppos[1][ppos[0]]]);
- var pposret = true;
+ var pposret;
if($.isFunction(p.onclickPgButtons)) {
pposret = p.onclickPgButtons.call($t, 'prev',$("#"+frmgr),ppos[1][ppos[0]]);
if( pposret !== undefined && pposret === false ) {return false;}
@@ -8048,21 +8256,22 @@
if($.isFunction(p.afterclickPgButtons)) {
p.afterclickPgButtons.call($t, 'prev',$("#"+frmgr),ppos[1][ppos[0]-1]);
}
- updateNav(ppos[0]-1,ppos[1].length-1);
+ updateNav(ppos[0]-1,ppos);
}
return false;
});
}
var posInit =getCurrPos();
- updateNav(posInit[0],posInit[1].length-1);
+ updateNav(posInit[0],posInit);
});
},
viewGridRow : function(rowid, p){
- p = $.extend({
+ p = $.extend(true, {
top : 0,
left: 0,
width: 0,
+ datawidth: 'auto',
height: 'auto',
dataheight: 'auto',
modal: false,
@@ -8077,7 +8286,8 @@
onClose: null,
beforeShowForm : null,
beforeInitData : null,
- viewPagerButtons : true
+ viewPagerButtons : true,
+ recreateForm : false
}, $.jgrid.view, p || {});
rp_ge[$(this)[0].p.id] = p;
return this.each(function(){
@@ -8090,18 +8300,21 @@
onBeforeInit = $.isFunction(rp_ge[$t.p.id].beforeInitData) ? rp_ge[$t.p.id].beforeInitData : false,
showFrm = true,
maxCols = 1, maxRows=0;
+ if(p.recreateForm===true && $("#"+$.jgrid.jqID(IDs.themodal))[0] !== undefined) {
+ $("#"+$.jgrid.jqID(IDs.themodal)).remove();
+ }
function focusaref(){ //Sfari 3 issues
if(rp_ge[$t.p.id].closeOnEscape===true || rp_ge[$t.p.id].navkeys[0]===true) {
setTimeout(function(){$(".ui-jqdialog-titlebar-close","#"+$.jgrid.jqID(IDs.modalhead)).focus();},0);
}
}
function createData(rowid,obj,tb,maxcols){
- var nm, hc,trdata, cnt=0,tmp, dc, retpos=[], ind=false,
+ var nm, hc,trdata, cnt=0,tmp, dc, retpos=[], ind=false, i,
tdtmpl = "<td class='CaptionTD form-view-label ui-widget-content' width='"+p.labelswidth+"'> </td><td class='DataTD form-view-data ui-helper-reset ui-widget-content'> </td>", tmpl="",
tdtmpl2 = "<td class='CaptionTD form-view-label ui-widget-content'> </td><td class='DataTD form-view-data ui-widget-content'> </td>",
fmtnum = ['integer','number','currency'],max1 =0, max2=0 ,maxw,setme, viewfld;
- for (var i =1;i<=maxcols;i++) {
- tmpl += i == 1 ? tdtmpl : tdtmpl2;
+ for (i=1;i<=maxcols;i++) {
+ tmpl += i === 1 ? tdtmpl : tdtmpl2;
}
// find max number align rigth with property formatter
$(obj.p.colModel).each( function() {
@@ -8130,12 +8343,12 @@
hc = this.hidden === true ? true : false;
}
dc = hc ? "style='display:none'" : "";
- viewfld = (typeof this.viewable != 'boolean') ? true : this.viewable;
+ viewfld = (typeof this.viewable !== 'boolean') ? true : this.viewable;
if ( nm !== 'cb' && nm !== 'subgrid' && nm !== 'rn' && viewfld) {
if(ind === false) {
tmp = "";
} else {
- if(nm == obj.p.ExpandColumn && obj.p.treeGrid === true) {
+ if(nm === obj.p.ExpandColumn && obj.p.treeGrid === true) {
tmp = $("td:eq("+i+")",obj.rows[ind]).text();
} else {
tmp = $("td:eq("+i+")",obj.rows[ind]).html();
@@ -8157,7 +8370,7 @@
$(tb).append(trdata);
trdata[0].rp = rp;
}
- $("td:eq("+(cp-2)+")",trdata[0]).html('<b>'+ (typeof frmopt.label === 'undefined' ? obj.p.colNames[i]: frmopt.label)+'</b>');
+ $("td:eq("+(cp-2)+")",trdata[0]).html('<b>'+ (frmopt.label === undefined ? obj.p.colNames[i]: frmopt.label)+'</b>');
$("td:eq("+(cp-1)+")",trdata[0]).append("<span>"+tmp+"</span>").attr("id","v_"+nm);
if(setme){
$("td:eq("+(cp-1)+") span",trdata[0]).css({'text-align':'right',width:maxw+"px"});
@@ -8174,7 +8387,7 @@
return retpos;
}
function fillData(rowid,obj){
- var nm, hc,cnt=0,tmp, opt,trv;
+ var nm, hc,cnt=0,tmp,trv;
trv = $(obj).jqGrid("getInd",rowid,true);
if(!trv) {return;}
$('td',trv).each( function(i) {
@@ -8186,12 +8399,11 @@
hc = obj.p.colModel[i].hidden === true ? true : false;
}
if ( nm !== 'cb' && nm !== 'subgrid' && nm !== 'rn') {
- if(nm == obj.p.ExpandColumn && obj.p.treeGrid === true) {
+ if(nm === obj.p.ExpandColumn && obj.p.treeGrid === true) {
tmp = $(this).text();
} else {
tmp = $(this).html();
}
- opt = $.extend({},obj.p.colModel[i].editoptions || {});
nm = $.jgrid.jqID("v_"+nm);
$("#"+nm+" span","#"+frmtb).html(tmp);
if (hc) {$("#"+nm,"#"+frmtb).parents("tr:first").hide();}
@@ -8200,9 +8412,22 @@
});
if(cnt>0) {$("#id_g","#"+frmtb).val(rowid);}
}
- function updateNav(cr,totr){
- if (cr===0) {$("#pData","#"+frmtb+"_2").addClass('ui-state-disabled');} else {$("#pData","#"+frmtb+"_2").removeClass('ui-state-disabled');}
- if (cr==totr) {$("#nData","#"+frmtb+"_2").addClass('ui-state-disabled');} else {$("#nData","#"+frmtb+"_2").removeClass('ui-state-disabled');}
+ function updateNav(cr,posarr){
+ var totr = posarr[1].length-1;
+ if (cr===0) {
+ $("#pData","#"+frmtb+"_2").addClass('ui-state-disabled');
+ } else if( posarr[1][cr-1] !== undefined && $("#"+$.jgrid.jqID(posarr[1][cr-1])).hasClass('ui-state-disabled')) {
+ $("#pData",frmtb+"_2").addClass('ui-state-disabled');
+ } else {
+ $("#pData","#"+frmtb+"_2").removeClass('ui-state-disabled');
+ }
+ if (cr===totr) {
+ $("#nData","#"+frmtb+"_2").addClass('ui-state-disabled');
+ } else if( posarr[1][cr+1] !== undefined && $("#"+$.jgrid.jqID(posarr[1][cr+1])).hasClass('ui-state-disabled')) {
+ $("#nData",frmtb+"_2").addClass('ui-state-disabled');
+ } else {
+ $("#nData","#"+frmtb+"_2").removeClass('ui-state-disabled');
+ }
}
function getCurrPos() {
var rowsInGrid = $($t).jqGrid("getDataIDs"),
@@ -8214,7 +8439,7 @@
if ( $("#"+$.jgrid.jqID(IDs.themodal))[0] !== undefined ) {
if(onBeforeInit) {
showFrm = onBeforeInit.call($t,$("#"+frmgr));
- if(typeof(showFrm) == "undefined") {
+ if(showFrm === undefined) {
showFrm = true;
}
}
@@ -8226,12 +8451,13 @@
$.jgrid.viewModal("#"+$.jgrid.jqID(IDs.themodal),{gbox:"#gbox_"+$.jgrid.jqID(gID),jqm:p.jqModal, jqM: false, overlay: p.overlay, modal:p.modal});
focusaref();
} else {
- var dh = isNaN(p.dataheight) ? p.dataheight : p.dataheight+"px";
- var frm = $("<form name='FormPost' id='"+frmgr_id+"' class='FormGrid' style='width:100%;overflow:auto;position:relative;height:"+dh+";'></form>"),
+ var dh = isNaN(p.dataheight) ? p.dataheight : p.dataheight+"px",
+ dw = isNaN(p.datawidth) ? p.datawidth : p.datawidth+"px",
+ frm = $("<form name='FormPost' id='"+frmgr_id+"' class='FormGrid' style='width:"+dw+";overflow:auto;position:relative;height:"+dh+";'></form>"),
tbl =$("<table id='"+frmtb_id+"' class='EditTable' cellspacing='1' cellpadding='2' border='0' style='table-layout:fixed'><tbody></tbody></table>");
if(onBeforeInit) {
showFrm = onBeforeInit.call($t,$("#"+frmgr));
- if(typeof(showFrm) == "undefined") {
+ if(showFrm === undefined) {
showFrm = true;
}
}
@@ -8244,7 +8470,7 @@
// set the id.
$(frm).append(tbl);
createData(rowid, $t, tbl, maxCols);
- var rtlb = $t.p.direction == "rtl" ? true :false,
+ var rtlb = $t.p.direction === "rtl" ? true :false,
bp = rtlb ? "nData" : "pData",
bn = rtlb ? "pData" : "nData",
@@ -8267,7 +8493,7 @@
});
}
p.gbox = "#gbox_"+$.jgrid.jqID(gID);
- var bt = $("<span></span>").append(frm).append("<table border='0' class='EditTable' id='"+frmtb+"_2'><tbody><tr id='Act_Buttons'><td class='navButton' width='"+p.labelswidth+"'>"+(rtlb ? bN+bP : bP+bN)+"</td><td class='EditButton'>"+bC+"</td></tr></tbody></table>");
+ var bt = $("<div></div>").append(frm).append("<table border='0' class='EditTable' id='"+frmtb+"_2'><tbody><tr id='Act_Buttons'><td class='navButton' width='"+p.labelswidth+"'>"+(rtlb ? bN+bP : bP+bN)+"</td><td class='EditButton'>"+bC+"</td></tr></tbody></table>");
$.jgrid.createModal(IDs,bt,p,"#gview_"+$.jgrid.jqID($t.p.id),$("#gview_"+$.jgrid.jqID($t.p.id))[0]);
if(rtlb) {
$("#pData, #nData","#"+frmtb+"_2").css("float","right");
@@ -8277,7 +8503,7 @@
bt = null;
$("#"+IDs.themodal).keydown( function( e ) {
if(e.which === 27) {
- if(rp_ge[$t.p.id].closeOnEscape) {$.jgrid.hideModal(this,{gb:p.gbox,jqm:p.jqModal, onClose: p.onClose});}
+ if(rp_ge[$t.p.id].closeOnEscape) {$.jgrid.hideModal("#"+$.jgrid.jqID(IDs.themodal),{gb:p.gbox,jqm:p.jqModal, onClose: p.onClose});}
return false;
}
if(p.navkeys[0]===true) {
@@ -8293,11 +8519,11 @@
});
p.closeicon = $.extend([true,"left","ui-icon-close"],p.closeicon);
if(p.closeicon[0]===true) {
- $("#cData","#"+frmtb+"_2").addClass(p.closeicon[1] == "right" ? 'fm-button-icon-right' : 'fm-button-icon-left')
+ $("#cData","#"+frmtb+"_2").addClass(p.closeicon[1] === "right" ? 'fm-button-icon-right' : 'fm-button-icon-left')
.append("<span class='ui-icon "+p.closeicon[2]+"'></span>");
}
if($.isFunction(p.beforeShowForm)) {p.beforeShowForm.call($t,$("#"+frmgr));}
- $.jgrid.viewModal("#"+$.jgrid.jqID(IDs.themodal),{gbox:"#gbox_"+$.jgrid.jqID(gID),jqm:p.jqModal, modal:p.modal});
+ $.jgrid.viewModal("#"+$.jgrid.jqID(IDs.themodal),{gbox:"#gbox_"+$.jgrid.jqID(gID),jqm:p.jqModal,overlay: p.overlay, modal:p.modal});
$(".fm-button:not(.ui-state-disabled)","#"+frmtb+"_2").hover(
function(){$(this).addClass('ui-state-hover');},
function(){$(this).removeClass('ui-state-hover');}
@@ -8311,7 +8537,7 @@
$("#FormError","#"+frmtb).hide();
var npos = getCurrPos();
npos[0] = parseInt(npos[0],10);
- if(npos[0] != -1 && npos[1][npos[0]+1]) {
+ if(npos[0] !== -1 && npos[1][npos[0]+1]) {
if($.isFunction(p.onclickPgButtons)) {
p.onclickPgButtons.call($t,'next',$("#"+frmgr),npos[1][npos[0]]);
}
@@ -8320,7 +8546,7 @@
if($.isFunction(p.afterclickPgButtons)) {
p.afterclickPgButtons.call($t,'next',$("#"+frmgr),npos[1][npos[0]+1]);
}
- updateNav(npos[0]+1,npos[1].length-1);
+ updateNav(npos[0]+1,npos);
}
focusaref();
return false;
@@ -8328,7 +8554,7 @@
$("#pData", "#"+frmtb+"_2").click(function(){
$("#FormError","#"+frmtb).hide();
var ppos = getCurrPos();
- if(ppos[0] != -1 && ppos[1][ppos[0]-1]) {
+ if(ppos[0] !== -1 && ppos[1][ppos[0]-1]) {
if($.isFunction(p.onclickPgButtons)) {
p.onclickPgButtons.call($t,'prev',$("#"+frmgr),ppos[1][ppos[0]]);
}
@@ -8337,18 +8563,18 @@
if($.isFunction(p.afterclickPgButtons)) {
p.afterclickPgButtons.call($t,'prev',$("#"+frmgr),ppos[1][ppos[0]-1]);
}
- updateNav(ppos[0]-1,ppos[1].length-1);
+ updateNav(ppos[0]-1,ppos);
}
focusaref();
return false;
});
}
var posInit =getCurrPos();
- updateNav(posInit[0],posInit[1].length-1);
+ updateNav(posInit[0],posInit);
});
},
delGridRow : function(rowids,p) {
- p = $.extend({
+ p = $.extend(true, {
top : 0,
left: 0,
width: 240,
@@ -8391,11 +8617,11 @@
dtbl = "DelTbl_"+$.jgrid.jqID(gID),postd, idname, opers, oper,
dtbl_id = "DelTbl_" + gID,
IDs = {themodal:'delmod'+gID,modalhead:'delhd'+gID,modalcontent:'delcnt'+gID, scrollelm: dtbl};
- if (jQuery.isArray(rowids)) {rowids = rowids.join();}
+ if ($.isArray(rowids)) {rowids = rowids.join();}
if ( $("#"+$.jgrid.jqID(IDs.themodal))[0] !== undefined ) {
if(onBeforeInit) {
showFrm = onBeforeInit.call($t,$("#"+dtbl));
- if(typeof(showFrm) == "undefined") {
+ if(showFrm === undefined) {
showFrm = true;
}
}
@@ -8410,8 +8636,9 @@
$.jgrid.viewModal("#"+$.jgrid.jqID(IDs.themodal),{gbox:"#gbox_"+$.jgrid.jqID(gID),jqm:rp_ge[$t.p.id].jqModal,jqM: false, overlay: rp_ge[$t.p.id].overlay, modal:rp_ge[$t.p.id].modal});
if(onAfterShow) {rp_ge[$t.p.id].afterShowForm.call($t,$("#"+dtbl));}
} else {
- var dh = isNaN(rp_ge[$t.p.id].dataheight) ? rp_ge[$t.p.id].dataheight : rp_ge[$t.p.id].dataheight+"px";
- var tbl = "<div id='"+dtbl_id+"' class='formdata' style='width:100%;overflow:auto;position:relative;height:"+dh+";'>";
+ var dh = isNaN(rp_ge[$t.p.id].dataheight) ? rp_ge[$t.p.id].dataheight : rp_ge[$t.p.id].dataheight+"px",
+ dw = isNaN(p.datawidth) ? p.datawidth : p.datawidth+"px",
+ tbl = "<div id='"+dtbl_id+"' class='formdata' style='width:"+dw+";overflow:auto;position:relative;height:"+dh+";'>";
tbl += "<table class='DelTable'><tbody>";
// error data
tbl += "<tr id='DelError' style='display:none'><td class='ui-state-error'></td></tr>";
@@ -8427,7 +8654,7 @@
if(onBeforeInit) {
showFrm = onBeforeInit.call($t,$("#"+dtbl));
- if(typeof(showFrm) == "undefined") {
+ if(showFrm === undefined) {
showFrm = true;
}
}
@@ -8440,16 +8667,17 @@
p.delicon = $.extend([true,"left","ui-icon-scissors"],rp_ge[$t.p.id].delicon);
p.cancelicon = $.extend([true,"left","ui-icon-cancel"],rp_ge[$t.p.id].cancelicon);
if(p.delicon[0]===true) {
- $("#dData","#"+dtbl+"_2").addClass(p.delicon[1] == "right" ? 'fm-button-icon-right' : 'fm-button-icon-left')
+ $("#dData","#"+dtbl+"_2").addClass(p.delicon[1] === "right" ? 'fm-button-icon-right' : 'fm-button-icon-left')
.append("<span class='ui-icon "+p.delicon[2]+"'></span>");
}
if(p.cancelicon[0]===true) {
- $("#eData","#"+dtbl+"_2").addClass(p.cancelicon[1] == "right" ? 'fm-button-icon-right' : 'fm-button-icon-left')
+ $("#eData","#"+dtbl+"_2").addClass(p.cancelicon[1] === "right" ? 'fm-button-icon-right' : 'fm-button-icon-left')
.append("<span class='ui-icon "+p.cancelicon[2]+"'></span>");
}
$("#dData","#"+dtbl+"_2").click(function(){
- var ret=[true,""];onCS = {};
- var postdata = $("#DelData>td","#"+dtbl).text(); //the pair is name=val1,val2,...
+ var ret=[true,""], pk,
+ postdata = $("#DelData>td","#"+dtbl).text(); //the pair is name=val1,val2,...
+ onCS = {};
if( $.isFunction( rp_ge[$t.p.id].onclickSubmit ) ) {onCS = rp_ge[$t.p.id].onclickSubmit.call($t,rp_ge[$t.p.id], postdata) || {};}
if( $.isFunction( rp_ge[$t.p.id].beforeSubmit ) ) {ret = rp_ge[$t.p.id].beforeSubmit.call($t,postdata);}
if(ret[0] && !rp_ge[$t.p.id].processing) {
@@ -8461,7 +8689,7 @@
idname = opers.id;
postdata = String(postdata).split(",");
if(!postdata.length) { return false; }
- for( var pk in postdata) {
+ for(pk in postdata) {
if(postdata.hasOwnProperty(pk)) {
postdata[pk] = $.jgrid.stripPref($t.p.idPrefix, postdata[pk]);
}
@@ -8469,16 +8697,17 @@
postd[idname] = postdata.join();
$(this).addClass('ui-state-active');
var ajaxOptions = $.extend({
- url: rp_ge[$t.p.id].url ? rp_ge[$t.p.id].url : $($t).jqGrid('getGridParam','editurl'),
+ url: rp_ge[$t.p.id].url || $($t).jqGrid('getGridParam','editurl'),
type: rp_ge[$t.p.id].mtype,
data: $.isFunction(rp_ge[$t.p.id].serializeDelData) ? rp_ge[$t.p.id].serializeDelData.call($t,postd) : postd,
- complete:function(data,Status){
- if(Status != "success") {
+ complete:function(data,status){
+ var i;
+ if(data.status >= 300 && data.status !== 304) {
ret[0] = false;
if ($.isFunction(rp_ge[$t.p.id].errorTextFormat)) {
ret[1] = rp_ge[$t.p.id].errorTextFormat.call($t,data);
} else {
- ret[1] = Status + " Status: '" + data.statusText + "'. Error code: " + data.status;
+ ret[1] = status + " Status: '" + data.statusText + "'. Error code: " + data.status;
}
} else {
// data is posted successful
@@ -8491,13 +8720,13 @@
$("#DelError>td","#"+dtbl).html(ret[1]);
$("#DelError","#"+dtbl).show();
} else {
- if(rp_ge[$t.p.id].reloadAfterSubmit && $t.p.datatype != "local") {
+ if(rp_ge[$t.p.id].reloadAfterSubmit && $t.p.datatype !== "local") {
$($t).trigger("reloadGrid");
} else {
if($t.p.treeGrid===true){
try {$($t).jqGrid("delTreeNode",$t.p.idPrefix+postdata[0]);} catch(e){}
} else {
- for(var i=0;i<postdata.length;i++) {
+ for(i=0;i<postdata.length;i++) {
$($t).jqGrid("delRowData",$t.p.idPrefix+ postdata[i]);
}
}
@@ -8525,7 +8754,7 @@
if (ret[0]) {
if (rp_ge[$t.p.id].useDataProxy) {
var dpret = $t.p.dataProxy.call($t, ajaxOptions, "del_"+$t.p.id);
- if(typeof(dpret) == "undefined") {
+ if(dpret === undefined) {
dpret = [true, ""];
}
if(dpret[0] === false ) {
@@ -8586,15 +8815,15 @@
}, $.jgrid.nav, o ||{});
return this.each(function() {
if(this.nav) {return;}
- var alertIDs = {themodal:'alertmod',modalhead:'alerthd',modalcontent:'alertcnt'},
+ var alertIDs = {themodal: 'alertmod_' + this.p.id, modalhead: 'alerthd_' + this.p.id,modalcontent: 'alertcnt_' + this.p.id},
$t = this, twd, tdw;
- if(!$t.grid || typeof elem != 'string') {return;}
+ if(!$t.grid || typeof elem !== 'string') {return;}
if ($("#"+alertIDs.themodal)[0] === undefined) {
if(!o.alerttop && !o.alertleft) {
- if (typeof window.innerWidth != 'undefined') {
+ if (window.innerWidth !== undefined) {
o.alertleft = window.innerWidth;
o.alerttop = window.innerHeight;
- } else if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientWidth != 'undefined' && document.documentElement.clientWidth !== 0) {
+ } else if (document.documentElement !== undefined && document.documentElement.clientWidth !== undefined && document.documentElement.clientWidth !== 0) {
o.alertleft = document.documentElement.clientWidth;
o.alerttop = document.documentElement.clientHeight;
} else {
@@ -8604,11 +8833,37 @@
o.alertleft = o.alertleft/2 - parseInt(o.alertwidth,10)/2;
o.alerttop = o.alerttop/2-25;
}
- $.jgrid.createModal(alertIDs,"<div>"+o.alerttext+"</div><span tabindex='0'><span tabindex='-1' id='jqg_alrt'></span></span>",{gbox:"#gbox_"+$.jgrid.jqID($t.p.id),jqModal:true,drag:true,resize:true,caption:o.alertcap,top:o.alerttop,left:o.alertleft,width:o.alertwidth,height: o.alertheight,closeOnEscape:o.closeOnEscape, zIndex: o.alertzIndex},"","",true);
+ $.jgrid.createModal(alertIDs,
+ "<div>"+o.alerttext+"</div><span tabindex='0'><span tabindex='-1' id='jqg_alrt'></span></span>",
+ {
+ gbox:"#gbox_"+$.jgrid.jqID($t.p.id),
+ jqModal:true,
+ drag:true,
+ resize:true,
+ caption:o.alertcap,
+ top:o.alerttop,
+ left:o.alertleft,
+ width:o.alertwidth,
+ height: o.alertheight,
+ closeOnEscape:o.closeOnEscape,
+ zIndex: o.alertzIndex
+ },
+ "#gview_"+$.jgrid.jqID($t.p.id),
+ $("#gbox_"+$.jgrid.jqID($t.p.id))[0],
+ true
+ );
}
- var clone = 1;
+ var clone = 1, i,
+ onHoverIn = function () {
+ if (!$(this).hasClass('ui-state-disabled')) {
+ $(this).addClass("ui-state-hover");
+ }
+ },
+ onHoverOut = function () {
+ $(this).removeClass("ui-state-hover");
+ };
if(o.cloneToTop && $t.p.toppager) {clone = 2;}
- for(var i = 0; i<clone; i++) {
+ for(i = 0; i<clone; i++) {
var tbd,
navtbl = $("<table cellspacing='0' cellpadding='0' border='0' class='ui-pg-table navtable' style='float:left;table-layout:auto;'><tbody><tr></tr></tbody></table>"),
sep = "<td class='ui-pg-button ui-state-disabled' style='width:4px;'><span class='ui-separator'></span></td>",
@@ -8616,7 +8871,7 @@
if(i===0) {
pgid = elem;
elemids = $t.p.id;
- if(pgid == $t.p.toppager) {
+ if(pgid === $t.p.toppager) {
elemids += "_top";
clone = 1;
}
@@ -8624,7 +8879,7 @@
pgid = $t.p.toppager;
elemids = $t.p.id+"_top";
}
- if($t.p.direction == "rtl") {$(navtbl).attr("dir","rtl").css("float","right");}
+ if($t.p.direction === "rtl") {$(navtbl).attr("dir","rtl").css("float","right");}
if (o.add) {
pAdd = pAdd || {};
tbd = $("<td class='ui-pg-button ui-corner-all'></td>");
@@ -8641,14 +8896,7 @@
}
}
return false;
- }).hover(
- function () {
- if (!$(this).hasClass('ui-state-disabled')) {
- $(this).addClass("ui-state-hover");
- }
- },
- function () {$(this).removeClass("ui-state-hover");}
- );
+ }).hover(onHoverIn, onHoverOut);
tbd = null;
}
if (o.edit) {
@@ -8673,14 +8921,7 @@
}
}
return false;
- }).hover(
- function () {
- if (!$(this).hasClass('ui-state-disabled')) {
- $(this).addClass("ui-state-hover");
- }
- },
- function () {$(this).removeClass("ui-state-hover");}
- );
+ }).hover(onHoverIn, onHoverOut);
tbd = null;
}
if (o.view) {
@@ -8705,14 +8946,7 @@
}
}
return false;
- }).hover(
- function () {
- if (!$(this).hasClass('ui-state-disabled')) {
- $(this).addClass("ui-state-hover");
- }
- },
- function () {$(this).removeClass("ui-state-hover");}
- );
+ }).hover(onHoverIn, onHoverOut);
tbd = null;
}
if (o.del) {
@@ -8742,14 +8976,7 @@
}
}
return false;
- }).hover(
- function () {
- if (!$(this).hasClass('ui-state-disabled')) {
- $(this).addClass("ui-state-hover");
- }
- },
- function () {$(this).removeClass("ui-state-hover");}
- );
+ }).hover(onHoverIn, onHoverOut);
tbd = null;
}
if(o.add || o.edit || o.del || o.view) {$("tr",navtbl).append(sep);}
@@ -8769,14 +8996,7 @@
}
}
return false;
- }).hover(
- function () {
- if (!$(this).hasClass('ui-state-disabled')) {
- $(this).addClass("ui-state-hover");
- }
- },
- function () {$(this).removeClass("ui-state-hover");}
- );
+ }).hover(onHoverIn, onHoverOut);
if (pSearch.showOnLoad && pSearch.showOnLoad === true) {
$(tbd,navtbl).click();
}
@@ -8795,7 +9015,9 @@
try {
var gID = $t.p.id;
$t.p.postData.filters ="";
+ try {
$("#fbox_"+$.jgrid.jqID(gID)).jqFilter('resetFilter');
+ } catch(ef) {}
if($.isFunction($t.clearToolbar)) {$t.clearToolbar.call($t,false);}
} catch (e) {}
switch (o.refreshstate) {
@@ -8809,14 +9031,7 @@
if($.isFunction(o.afterRefresh)) {o.afterRefresh.call($t);}
}
return false;
- }).hover(
- function () {
- if (!$(this).hasClass('ui-state-disabled')) {
- $(this).addClass("ui-state-hover");
- }
- },
- function () {$(this).removeClass("ui-state-hover");}
- );
+ }).hover(onHoverIn, onHoverOut);
tbd = null;
}
tdw = $(".ui-jqgrid").css("font-size") || "11px";
@@ -8852,13 +9067,13 @@
if (findnav) {
if( p.id && $("#"+$.jgrid.jqID(p.id), findnav)[0] !== undefined ) {return;}
var tbd = $("<td></td>");
- if(p.buttonicon.toString().toUpperCase() == "NONE") {
+ if(p.buttonicon.toString().toUpperCase() === "NONE") {
$(tbd).addClass('ui-pg-button ui-corner-all').append("<div class='ui-pg-div'>"+p.caption+"</div>");
} else {
$(tbd).addClass('ui-pg-button ui-corner-all').append("<div class='ui-pg-div'><span class='ui-icon "+p.buttonicon+"'></span>"+p.caption+"</div>");
}
if(p.id) {$(tbd).attr("id",p.id);}
- if(p.position=='first'){
+ if(p.position==='first'){
if(findnav.rows[0].cells.length ===0 ) {
$("tr",findnav).append(tbd);
} else {
@@ -8889,7 +9104,8 @@
navSeparatorAdd:function (elem,p) {
p = $.extend({
sepclass : "ui-separator",
- sepcontent: ''
+ sepcontent: '',
+ position : "last"
}, p ||{});
return this.each(function() {
if( !this.grid) {return;}
@@ -8897,17 +9113,26 @@
var findnav = $(".navtable",elem)[0];
if(findnav) {
var sep = "<td class='ui-pg-button ui-state-disabled' style='width:4px;'><span class='"+p.sepclass+"'></span>"+p.sepcontent+"</td>";
- $("tr",findnav).append(sep);
+ if (p.position === 'first') {
+ if (findnav.rows[0].cells.length === 0) {
+ $("tr", findnav).append(sep);
+ } else {
+ $("tr td:eq(0)", findnav).before(sep);
+ }
+ } else {
+ $("tr", findnav).append(sep);
+ }
}
});
},
GridToForm : function( rowid, formid ) {
return this.each(function(){
- var $t = this;
+ var $t = this, i;
if (!$t.grid) {return;}
var rowdata = $($t).jqGrid("getRowData",rowid);
if (rowdata) {
- for(var i in rowdata) {
+ for(i in rowdata) {
+ if(rowdata.hasOwnProperty(i)) {
if ( $("[name="+$.jgrid.jqID(i)+"]",formid).is("input:radio") || $("[name="+$.jgrid.jqID(i)+"]",formid).is("input:checkbox")) {
$("[name="+$.jgrid.jqID(i)+"]",formid).each( function() {
if( $(this).val() == rowdata[i] ) {
@@ -8922,6 +9147,7 @@
}
}
}
+ }
});
},
FormToGrid : function(rowid, formid, mode, position){
@@ -8935,13 +9161,15 @@
$.each(fields, function(i, field){
griddata[field.name] = field.value;
});
- if(mode=='add') {$($t).jqGrid("addRowData",rowid,griddata, position);}
- else if(mode=='set') {$($t).jqGrid("setRowData",rowid,griddata);}
+ if(mode==='add') {$($t).jqGrid("addRowData",rowid,griddata, position);}
+ else if(mode==='set') {$($t).jqGrid("setRowData",rowid,griddata);}
});
}
});
})(jQuery);
-;(function($){
+/*jshint eqeqeq:false, eqnull:true, devel:true */
+/*global jQuery */
+(function($){
/**
* jqGrid extension for manipulating Grid Data
* Tony Tomov tony(a)trirand.com
@@ -8950,8 +9178,6 @@
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl-2.0.html
**/
-//jsHint options
-/*global alert, $, jQuery */
"use strict";
$.jgrid.inlineEdit = $.jgrid.inlineEdit || {};
$.jgrid.extend({
@@ -8963,17 +9189,17 @@
if( $.type(args[0]) === "object" ) {
o = args[0];
} else {
- if (typeof keys !== "undefined") { o.keys = keys; }
+ if (keys !== undefined) { o.keys = keys; }
if ($.isFunction(oneditfunc)) { o.oneditfunc = oneditfunc; }
if ($.isFunction(successfunc)) { o.successfunc = successfunc; }
- if (typeof url !== "undefined") { o.url = url; }
- if (typeof extraparam !== "undefined") { o.extraparam = extraparam; }
+ if (url !== undefined) { o.url = url; }
+ if (extraparam !== undefined) { o.extraparam = extraparam; }
if ($.isFunction(aftersavefunc)) { o.aftersavefunc = aftersavefunc; }
if ($.isFunction(errorfunc)) { o.errorfunc = errorfunc; }
if ($.isFunction(afterrestorefunc)) { o.afterrestorefunc = afterrestorefunc; }
// last two not as param, but as object (sorry)
- //if (typeof restoreAfterError !== "undefined") { o.restoreAfterError = restoreAfterError; }
- //if (typeof mtype !== "undefined") { o.mtype = mtype || "POST"; }
+ //if (restoreAfterError !== undefined) { o.restoreAfterError = restoreAfterError; }
+ //if (mtype !== undefined) { o.mtype = mtype || "POST"; }
}
o = $.extend(true, {
keys : false,
@@ -8995,20 +9221,20 @@
ind = $($t).jqGrid("getInd",rowid,true);
if( ind === false ) {return;}
editable = $(ind).attr("editable") || "0";
- if (editable == "0" && !$(ind).hasClass("not-editable-row")) {
+ if (editable === "0" && !$(ind).hasClass("not-editable-row")) {
cm = $t.p.colModel;
$('td[role="gridcell"]',ind).each( function(i) {
nm = cm[i].name;
- var treeg = $t.p.treeGrid===true && nm == $t.p.ExpandColumn;
+ var treeg = $t.p.treeGrid===true && nm === $t.p.ExpandColumn;
if(treeg) { tmp = $("span:first",this).html();}
else {
try {
tmp = $.unformat.call($t,this,{rowId:rowid, colModel:cm[i]},i);
} catch (_) {
- tmp = ( cm[i].edittype && cm[i].edittype == 'textarea' ) ? $(this).text() : $(this).html();
+ tmp = ( cm[i].edittype && cm[i].edittype === 'textarea' ) ? $(this).text() : $(this).html();
}
}
- if ( nm != 'cb' && nm != 'subgrid' && nm != 'rn') {
+ if ( nm !== 'cb' && nm !== 'subgrid' && nm !== 'rn') {
if($t.p.autoencode) { tmp = $.jgrid.htmlDecode(tmp); }
svr[nm]=tmp;
if(cm[i].editable===true) {
@@ -9017,13 +9243,14 @@
else { $(this).html(""); }
var opt = $.extend({},cm[i].editoptions || {},{id:rowid+"_"+nm,name:nm});
if(!cm[i].edittype) { cm[i].edittype = "text"; }
- if(tmp == " " || tmp == " " || (tmp.length==1 && tmp.charCodeAt(0)==160) ) {tmp='';}
+ if(tmp === " " || tmp === " " || (tmp.length===1 && tmp.charCodeAt(0)===160) ) {tmp='';}
var elc = $.jgrid.createEl.call($t,cm[i].edittype,opt,tmp,true,$.extend({},$.jgrid.ajaxOptions,$t.p.ajaxSelectOptions || {}));
$(elc).addClass("editable");
if(treeg) { $("span:first",this).append(elc); }
else { $(this).append(elc); }
+ $.jgrid.bindEv.call($t, elc, opt);
//Again IE
- if(cm[i].edittype == "select" && typeof(cm[i].editoptions)!=="undefined" && cm[i].editoptions.multiple===true && typeof(cm[i].editoptions.dataUrl)==="undefined" && $.browser.msie) {
+ if(cm[i].edittype === "select" && cm[i].editoptions!==undefined && cm[i].editoptions.multiple===true && cm[i].editoptions.dataUrl===undefined && $.jgrid.msie) {
$(elc).width($(elc).width());
}
cnt++;
@@ -9047,7 +9274,7 @@
}
if (e.keyCode === 13) {
var ta = e.target;
- if(ta.tagName == 'TEXTAREA') { return true; }
+ if(ta.tagName === 'TEXTAREA') { return true; }
if( $($t).jqGrid("saveRow", rowid, o ) ) {
if($t.p._inlinenav) {
try {
@@ -9073,8 +9300,8 @@
o = args[0];
} else {
if ($.isFunction(successfunc)) { o.successfunc = successfunc; }
- if (typeof url !== "undefined") { o.url = url; }
- if (typeof extraparam !== "undefined") { o.extraparam = extraparam; }
+ if (url !== undefined) { o.url = url; }
+ if (extraparam !== undefined) { o.extraparam = extraparam; }
if ($.isFunction(aftersavefunc)) { o.aftersavefunc = aftersavefunc; }
if ($.isFunction(errorfunc)) { o.errorfunc = errorfunc; }
if ($.isFunction(afterrestorefunc)) { o.afterrestorefunc = afterrestorefunc; }
@@ -9097,13 +9324,13 @@
ind = $($t).jqGrid("getInd",rowid,true);
if(ind === false) {return success;}
editable = $(ind).attr("editable");
- o.url = o.url ? o.url : $t.p.editurl;
+ o.url = o.url || $t.p.editurl;
if (editable==="1") {
var cm;
$('td[role="gridcell"]',ind).each(function(i) {
cm = $t.p.colModel[i];
nm = cm.name;
- if ( nm != 'cb' && nm != 'subgrid' && cm.editable===true && nm != 'rn' && !$(this).hasClass('not-editable-cell')) {
+ if ( nm !== 'cb' && nm !== 'subgrid' && cm.editable===true && nm !== 'rn' && !$(this).hasClass('not-editable-cell')) {
switch (cm.edittype) {
case "checkbox":
var cbv = ["Yes","No"];
@@ -9133,7 +9360,7 @@
);
tmp2[nm] = selectedText.join(",");
}
- if(cm.formatter && cm.formatter == 'select') { tmp2={}; }
+ if(cm.formatter && cm.formatter === 'select') { tmp2={}; }
break;
case 'custom' :
try {
@@ -9142,13 +9369,13 @@
if (tmp[nm] === undefined) { throw "e2"; }
} else { throw "e1"; }
} catch (e) {
- if (e=="e1") { $.jgrid.info_dialog($.jgrid.errors.errcap,"function 'custom_value' "+$.jgrid.edit.msg.nodefined,$.jgrid.edit.bClose); }
- if (e=="e2") { $.jgrid.info_dialog($.jgrid.errors.errcap,"function 'custom_value' "+$.jgrid.edit.msg.novalue,$.jgrid.edit.bClose); }
+ if (e==="e1") { $.jgrid.info_dialog($.jgrid.errors.errcap,"function 'custom_value' "+$.jgrid.edit.msg.nodefined,$.jgrid.edit.bClose); }
+ if (e==="e2") { $.jgrid.info_dialog($.jgrid.errors.errcap,"function 'custom_value' "+$.jgrid.edit.msg.novalue,$.jgrid.edit.bClose); }
else { $.jgrid.info_dialog($.jgrid.errors.errcap,e.message,$.jgrid.edit.bClose); }
}
break;
}
- cv = $.jgrid.checkValues(tmp[nm],i,$t);
+ cv = $.jgrid.checkValues.call($t,tmp[nm],i);
if(cv[0] === false) {
cv[1] = tmp[nm] + " " + cv[1];
return false;
@@ -9163,40 +9390,72 @@
});
if (cv[0] === false){
try {
- var positions = $.jgrid.findPos($("#"+$.jgrid.jqID(rowid), $t.grid.bDiv)[0]);
- $.jgrid.info_dialog($.jgrid.errors.errcap,cv[1],$.jgrid.edit.bClose,{left:positions[0],top:positions[1]});
+ var tr = $t.rows.namedItem(rowid), positions = $.jgrid.findPos(tr);
+ $.jgrid.info_dialog($.jgrid.errors.errcap,cv[1],$.jgrid.edit.bClose,{left:positions[0],top:positions[1]+$(tr).outerHeight()});
} catch (e) {
alert(cv[1]);
}
return success;
}
- var idname, opers, oper;
- opers = $t.p.prmNames;
- oper = opers.oper;
- idname = opers.id;
+ var idname, opers = $t.p.prmNames, oldRowId = rowid;
+ if ($t.p.keyIndex === false) {
+ idname = opers.id;
+ } else {
+ idname = $t.p.colModel[$t.p.keyIndex +
+ ($t.p.rownumbers === true ? 1 : 0) +
+ ($t.p.multiselect === true ? 1 : 0) +
+ ($t.p.subGrid === true ? 1 : 0)].name;
+ }
if(tmp) {
- tmp[oper] = opers.editoper;
- tmp[idname] = rowid;
- if(typeof($t.p.inlineData) == 'undefined') { $t.p.inlineData ={}; }
+ tmp[opers.oper] = opers.editoper;
+ if (tmp[idname] === undefined || tmp[idname]==="") {
+ tmp[idname] = rowid;
+ } else if (ind.id !== $t.p.idPrefix + tmp[idname]) {
+ // rename rowid
+ var oldid = $.jgrid.stripPref($t.p.idPrefix, rowid);
+ if ($t.p._index[oldid] !== undefined) {
+ $t.p._index[tmp[idname]] = $t.p._index[oldid];
+ delete $t.p._index[oldid];
+ }
+ rowid = $t.p.idPrefix + tmp[idname];
+ $(ind).attr("id", rowid);
+ if ($t.p.selrow === oldRowId) {
+ $t.p.selrow = rowid;
+ }
+ if ($.isArray($t.p.selarrrow)) {
+ var i = $.inArray(oldRowId, $t.p.selarrrow);
+ if (i>=0) {
+ $t.p.selarrrow[i] = rowid;
+ }
+ }
+ if ($t.p.multiselect) {
+ var newCboxId = "jqg_" + $t.p.id + "_" + rowid;
+ $("input.cbox",ind)
+ .attr("id", newCboxId)
+ .attr("name", newCboxId);
+ }
+ // TODO: to test the case of frozen columns
+ }
+ if($t.p.inlineData === undefined) { $t.p.inlineData ={}; }
tmp = $.extend({},tmp,$t.p.inlineData,o.extraparam);
}
- if (o.url == 'clientArray') {
+ if (o.url === 'clientArray') {
tmp = $.extend({},tmp, tmp2);
if($t.p.autoencode) {
$.each(tmp,function(n,v){
tmp[n] = $.jgrid.htmlDecode(v);
});
}
- var resp = $($t).jqGrid("setRowData",rowid,tmp);
+ var k, resp = $($t).jqGrid("setRowData",rowid,tmp);
$(ind).attr("editable","0");
- for( var k=0;k<$t.p.savedRow.length;k++) {
- if( $t.p.savedRow[k].id == rowid) {fr = k; break;}
+ for(k=0;k<$t.p.savedRow.length;k++) {
+ if( String($t.p.savedRow[k].id) === String(oldRowId)) {fr = k; break;}
}
if(fr >= 0) { $t.p.savedRow.splice(fr,1); }
$($t).triggerHandler("jqGridInlineAfterSaveRow", [rowid, resp, tmp, o]);
if( $.isFunction(o.aftersavefunc) ) { o.aftersavefunc.call($t, rowid,resp, o); }
success = true;
- $(ind).unbind("keydown");
+ $(ind).removeClass("jqgrid-new-row").unbind("keydown");
} else {
$("#lui_"+$.jgrid.jqID($t.p.id)).show();
tmp3 = $.extend({},tmp,tmp3);
@@ -9209,14 +9468,14 @@
complete: function(res,stat){
$("#lui_"+$.jgrid.jqID($t.p.id)).hide();
if (stat === "success"){
- var ret = true, sucret;
+ var ret = true, sucret, k;
sucret = $($t).triggerHandler("jqGridInlineSuccessSaveRow", [res, rowid, o]);
if (!$.isArray(sucret)) {sucret = [true, tmp];}
if (sucret[0] && $.isFunction(o.successfunc)) {sucret = o.successfunc.call($t, res);}
if($.isArray(sucret)) {
// expect array - status, data, rowid
ret = sucret[0];
- tmp = sucret[1] ? sucret[1] : tmp;
+ tmp = sucret[1] || tmp;
} else {
ret = sucret;
}
@@ -9229,14 +9488,14 @@
tmp = $.extend({},tmp, tmp2);
$($t).jqGrid("setRowData",rowid,tmp);
$(ind).attr("editable","0");
- for( var k=0;k<$t.p.savedRow.length;k++) {
- if( $t.p.savedRow[k].id == rowid) {fr = k; break;}
+ for(k=0;k<$t.p.savedRow.length;k++) {
+ if( String($t.p.savedRow[k].id) === String(rowid)) {fr = k; break;}
}
if(fr >= 0) { $t.p.savedRow.splice(fr,1); }
$($t).triggerHandler("jqGridInlineAfterSaveRow", [rowid, res, tmp, o]);
if( $.isFunction(o.aftersavefunc) ) { o.aftersavefunc.call($t, rowid,res); }
success = true;
- $(ind).unbind("keydown");
+ $(ind).removeClass("jqgrid-new-row").unbind("keydown");
} else {
$($t).triggerHandler("jqGridInlineErrorSaveRow", [rowid, res, stat, null, o]);
if($.isFunction(o.errorfunc) ) {
@@ -9279,17 +9538,17 @@
} else {
if ($.isFunction(afterrestorefunc)) { o.afterrestorefunc = afterrestorefunc; }
}
- o = $.extend(true, $.jgrid.inlineEdit, o );
+ o = $.extend(true, {}, $.jgrid.inlineEdit, o );
// End compatible
return this.each(function(){
- var $t= this, fr, ind, ares={};
+ var $t= this, fr, ind, ares={}, k;
if (!$t.grid ) { return; }
ind = $($t).jqGrid("getInd",rowid,true);
if(ind === false) {return;}
- for( var k=0;k<$t.p.savedRow.length;k++) {
- if( $t.p.savedRow[k].id == rowid) {fr = k; break;}
+ for(k=0;k<$t.p.savedRow.length;k++) {
+ if( String($t.p.savedRow[k].id) === String(rowid)) {fr = k; break;}
}
if(fr >= 0) {
if($.isFunction($.fn.datepicker)) {
@@ -9298,7 +9557,7 @@
} catch (e) {}
}
$.each($t.p.colModel, function(){
- if(this.editable === true && this.name in $t.p.savedRow[fr] ) {
+ if(this.editable === true && $t.p.savedRow[fr].hasOwnProperty(this.name)) {
ares[this.name] = $t.p.savedRow[fr][this.name];
}
});
@@ -9306,7 +9565,10 @@
$(ind).attr("editable","0").unbind("keydown");
$t.p.savedRow.splice(fr,1);
if($("#"+$.jgrid.jqID(rowid), "#"+$.jgrid.jqID($t.p.id)).hasClass("jqgrid-new-row")){
- setTimeout(function(){$($t).jqGrid("delRowData",rowid);},0);
+ setTimeout(function(){
+ $($t).jqGrid("delRowData",rowid);
+ $($t).jqGrid('showAddEditButtons');
+ },0);
}
}
$($t).triggerHandler("jqGridInlineAfterRestoreRow", [rowid]);
@@ -9318,7 +9580,7 @@
},
addRow : function ( p ) {
p = $.extend(true, {
- rowID : "new_row",
+ rowID : null,
initdata : {},
position :"first",
useDefValues : true,
@@ -9328,6 +9590,7 @@
return this.each(function(){
if (!this.grid ) { return; }
var $t = this;
+ p.rowID = $.isFunction(p.rowID) ? p.rowID.call($t, p) : ( (p.rowID != null) ? p.rowID : $.jgrid.randId());
if(p.useDefValues === true) {
$($t.p.colModel).each(function(){
if( this.editoptions && this.editoptions.defaultValue ) {
@@ -9352,7 +9615,7 @@
});
},
inlineNav : function (elem, o) {
- o = $.extend({
+ o = $.extend(true,{
edit: true,
editicon: "ui-icon-pencil",
add: true,
@@ -9361,7 +9624,7 @@
saveicon:"ui-icon-disk",
cancel: true,
cancelicon:"ui-icon-cancel",
- addParams : {useFormatter : false,rowID : "new_row"},
+ addParams : {addRowParams: {extraparam: {}}},
editParams : {},
restoreAfterSelect : true
}, $.jgrid.nav, o ||{});
@@ -9392,7 +9655,7 @@
"successfunc" : ap.onSuccess,
"url" : ap.url,
"extraparam" : ap.extraparam,
- "aftersavefunc" : ap.afterSavef,
+ "aftersavefunc" : ap.afterSave,
"errorfunc": ap.onError,
"afterrestorefunc" : ap.afterRestore
};
@@ -9448,16 +9711,18 @@
var sr = $t.p.savedRow[0].id;
if(sr) {
var opers = $t.p.prmNames,
- oper = opers.oper;
- if(!o.editParams.extraparam) {
- o.editParams.extraparam = {};
- }
+ oper = opers.oper, tmpParams = {};
if($("#"+$.jgrid.jqID(sr), "#"+gID ).hasClass("jqgrid-new-row")) {
- o.editParams.extraparam[oper] = opers.addoper;
+ o.addParams.addRowParams.extraparam[oper] = opers.addoper;
+ tmpParams = o.addParams.addRowParams;
} else {
+ if(!o.editParams.extraparam) {
+ o.editParams.extraparam = {};
+ }
o.editParams.extraparam[oper] = opers.editoper;
+ tmpParams = o.editParams;
}
- if( $($t).jqGrid('saveRow', sr, o.editParams) ) {
+ if( $($t).jqGrid('saveRow', sr, tmpParams) ) {
$($t).jqGrid('showAddEditButtons');
}
} else {
@@ -9474,9 +9739,14 @@
buttonicon : o.cancelicon,
id : $t.p.id+"_ilcancel",
onClickButton : function () {
- var sr = $t.p.savedRow[0].id;
+ var sr = $t.p.savedRow[0].id, cancelPrm = {};
if(sr) {
- $($t).jqGrid('restoreRow', sr, o.editParams);
+ if($("#"+$.jgrid.jqID(sr), "#"+gID ).hasClass("jqgrid-new-row")) {
+ cancelPrm = o.addParams.addRowParams;
+ } else {
+ cancelPrm = o.editParams;
+ }
+ $($t).jqGrid('restoreRow', sr, cancelPrm);
$($t).jqGrid('showAddEditButtons');
} else {
$.jgrid.viewModal("#alertmod",{gbox:"#gbox_"+gID,jqm:true});$("#jqg_alrt").focus();
@@ -9494,7 +9764,7 @@
$t.p.beforeSelectRow = function(id, stat) {
var ret = true;
if($t.p.savedRow.length > 0 && $t.p._inlinenav===true && ( id !== $t.p.selrow && $t.p.selrow !==null) ) {
- if($t.p.selrow == o.addParams.rowID ) {
+ if($t.p.selrow === o.addParams.rowID ) {
$($t).jqGrid('delRowData', $t.p.selrow);
} else {
$($t).jqGrid('restoreRow', $t.p.selrow, o.editParams);
@@ -9523,7 +9793,9 @@
//end inline edit
});
})(jQuery);
-;(function($){
+/*jshint eqeqeq:false */
+/*global jQuery */
+(function($){
/*
**
* jqGrid extension for cellediting Grid Data
@@ -9577,7 +9849,7 @@
}
cm = $t.p.colModel[iCol];
nm = cm.name;
- if (nm=='subgrid' || nm=='cb' || nm=='rn') {return;}
+ if (nm==='subgrid' || nm==='cb' || nm==='rn') {return;}
cc = $("td:eq("+iCol+")",$t.rows[iRow]);
if (cm.editable===true && ed===true && !cc.hasClass("not-editable-cell")) {
if(parseInt($t.p.iCol,10)>=0 && parseInt($t.p.iRow,10)>=0) {
@@ -9589,7 +9861,7 @@
try {
tmp = $.unformat.call($t,cc,{rowId: $t.rows[iRow].id, colModel:cm},iCol);
} catch (_) {
- tmp = ( cm.edittype && cm.edittype == 'textarea' ) ? $(cc).text() : $(cc).html();
+ tmp = ( cm.edittype && cm.edittype === 'textarea' ) ? $(cc).text() : $(cc).html();
}
if($t.p.autoencode) { tmp = $.jgrid.htmlDecode(tmp); }
if (!cm.edittype) {cm.edittype = "text";}
@@ -9606,6 +9878,7 @@
$t.p.beforeEditCell.call($t, $t.rows[iRow].id,nm,tmp,iRow,iCol);
}
$(cc).html("").append(elc).attr("tabindex","0");
+ $.jgrid.bindEv.call($t, elc, opt);
window.setTimeout(function () { $(elc).focus();},0);
$("input, select, textarea",cc).bind("keydown",function(e) {
if (e.keyCode === 27) {
@@ -9699,9 +9972,9 @@
if (v===undefined) { throw "e2";} else { v2=v; }
} else { throw "e1"; }
} catch (e) {
- if (e=="e1") { $.jgrid.info_dialog(jQuery.jgrid.errors.errcap,"function 'custom_value' "+$.jgrid.edit.msg.nodefined,jQuery.jgrid.edit.bClose); }
- if (e=="e2") { $.jgrid.info_dialog(jQuery.jgrid.errors.errcap,"function 'custom_value' "+$.jgrid.edit.msg.novalue,jQuery.jgrid.edit.bClose); }
- else {$.jgrid.info_dialog(jQuery.jgrid.errors.errcap,e.message,jQuery.jgrid.edit.bClose); }
+ if (e==="e1") { $.jgrid.info_dialog($.jgrid.errors.errcap,"function 'custom_value' "+$.jgrid.edit.msg.nodefined,$.jgrid.edit.bClose); }
+ if (e==="e2") { $.jgrid.info_dialog($.jgrid.errors.errcap,"function 'custom_value' "+$.jgrid.edit.msg.novalue,$.jgrid.edit.bClose); }
+ else {$.jgrid.info_dialog($.jgrid.errors.errcap,e.message,$.jgrid.edit.bClose); }
}
break;
}
@@ -9713,7 +9986,7 @@
var vv = $t.p.beforeSaveCell.call($t, $t.rows[iRow].id,nm, v, iRow,iCol);
if (vv) {v = vv; v2=vv;}
}
- var cv = $.jgrid.checkValues(v,iCol,$t);
+ var cv = $.jgrid.checkValues.call($t,v,iCol);
if(cv[0] === true) {
var addpost = $($t).triggerHandler("jqGridBeforeSubmitCell", [$t.rows[iRow].id, nm, v, iRow, iCol]) || {};
if ($.isFunction($t.p.beforeSubmitCell)) {
@@ -9721,7 +9994,7 @@
if (!addpost) {addpost={};}
}
if( $("input.hasDatepicker",cc).length >0) { $("input.hasDatepicker",cc).datepicker('hide'); }
- if ($t.p.cellsubmit == 'remote') {
+ if ($t.p.cellsubmit === 'remote') {
if ($t.p.cellurl) {
var postdata = {};
if($t.p.autoencode) { v = $.jgrid.htmlEncode(v); }
@@ -9742,7 +10015,7 @@
complete: function (result, stat) {
$("#lui_"+$t.p.id).hide();
$t.grid.hDiv.loading = false;
- if (stat == 'success') {
+ if (stat === 'success') {
var ret = $($t).triggerHandler("jqGridAfterSubmitCell", [$t, result, postdata.id, nm, v, iRow, iCol]) || [true, ''];
if (ret[0] === true && $.isFunction($t.p.afterSubmitCell)) {
ret = $t.p.afterSubmitCell.call($t, result,postdata.id,nm,v,iRow,iCol);
@@ -9783,7 +10056,7 @@
} catch (e) {}
}
}
- if ($t.p.cellsubmit == 'clientArray') {
+ if ($t.p.cellsubmit === 'clientArray') {
$(cc).empty();
$($t).jqGrid("setCell",$t.rows[iRow].id,iCol, v2, false, false, true);
$(cc).addClass("dirty-cell");
@@ -9804,11 +10077,7 @@
$($t).jqGrid("restoreCell",iRow,iCol);
}
}
- if ($.browser.opera) {
- $("#"+$.jgrid.jqID($t.p.knv)).attr("tabindex","-1").focus();
- } else {
- window.setTimeout(function () { $("#"+$.jgrid.jqID($t.p.knv)).attr("tabindex","-1").focus();},0);
- }
+ window.setTimeout(function () { $("#"+$.jgrid.jqID($t.p.knv)).attr("tabindex","-1").focus();},0);
});
},
restoreCell : function(iRow, iCol) {
@@ -9837,10 +10106,10 @@
},
nextCell : function (iRow,iCol) {
return this.each(function (){
- var $t = this, nCol=false;
+ var $t = this, nCol=false, i;
if (!$t.grid || $t.p.cellEdit !== true) {return;}
// try to find next editable cell
- for (var i=iCol+1; i<$t.p.colModel.length; i++) {
+ for (i=iCol+1; i<$t.p.colModel.length; i++) {
if ( $t.p.colModel[i].editable ===true) {
nCol = i; break;
}
@@ -9856,10 +10125,10 @@
},
prevCell : function (iRow,iCol) {
return this.each(function (){
- var $t = this, nCol=false;
+ var $t = this, nCol=false, i;
if (!$t.grid || $t.p.cellEdit !== true) {return;}
// try to find next editable cell
- for (var i=iCol-1; i>=0; i--) {
+ for (i=iCol-1; i>=0; i--) {
if ( $t.p.colModel[i].editable ===true) {
nCol = i; break;
}
@@ -9879,26 +10148,26 @@
if (!$t.grid || $t.p.cellEdit !== true ) {return;}
// trick to process keydown on non input elements
$t.p.knv = $t.p.id + "_kn";
- var selection = $("<div style='position:absolute;top:-1000000px;width:1px;height:1px;' tabindex='0'><div tabindex='-1' style='width:1px;height:1px;' id='"+$t.p.knv+"'></div></div>"),
+ var selection = $("<div style='position:fixed;top:0px;width:1px;height:1px;' tabindex='0'><div tabindex='-1' style='width:1px;height:1px;' id='"+$t.p.knv+"'></div></div>"),
i, kdir;
function scrollGrid(iR, iC, tp){
- if (tp.substr(0,1)=='v') {
+ if (tp.substr(0,1)==='v') {
var ch = $($t.grid.bDiv)[0].clientHeight,
st = $($t.grid.bDiv)[0].scrollTop,
nROT = $t.rows[iR].offsetTop+$t.rows[iR].clientHeight,
pROT = $t.rows[iR].offsetTop;
- if(tp == 'vd') {
+ if(tp === 'vd') {
if(nROT >= ch) {
$($t.grid.bDiv)[0].scrollTop = $($t.grid.bDiv)[0].scrollTop + $t.rows[iR].clientHeight;
}
}
- if(tp == 'vu'){
+ if(tp === 'vu'){
if (pROT < st ) {
$($t.grid.bDiv)[0].scrollTop = $($t.grid.bDiv)[0].scrollTop - $t.rows[iR].clientHeight;
}
}
}
- if(tp=='h') {
+ if(tp==='h') {
var cw = $($t.grid.bDiv)[0].clientWidth,
sl = $($t.grid.bDiv)[0].scrollLeft,
nCOL = $t.rows[iR].cells[iC].offsetLeft+$t.rows[iR].cells[iC].clientWidth,
@@ -9912,7 +10181,7 @@
}
function findNextVisible(iC,act){
var ind, i;
- if(act == 'lft') {
+ if(act === 'lft') {
ind = iC+1;
for (i=iC;i>=0;i--){
if ($t.p.colModel[i].hidden !== true) {
@@ -9921,7 +10190,7 @@
}
}
}
- if(act == 'rgt') {
+ if(act === 'rgt') {
ind = iC-1;
for (i=iC; i<$t.p.colModel.length;i++){
if ($t.p.colModel[i].hidden !== true) {
@@ -9938,7 +10207,7 @@
.focus()
.keydown(function (e){
kdir = e.keyCode;
- if($t.p.direction == "rtl") {
+ if($t.p.direction === "rtl") {
if(kdir===37) { kdir = 39;}
else if (kdir===39) { kdir = 37; }
}
@@ -9993,7 +10262,7 @@
$('td',this).each( function(i) {
nm = $t.p.colModel[i].name;
if ( nm !== 'cb' && nm !== 'subgrid') {
- if (mthd=='dirty') {
+ if (mthd==='dirty') {
if ($(this).hasClass('dirty-cell')) {
try {
res[nm] = $.unformat.call($t,this,{rowId:$t.rows[j].id, colModel:$t.p.colModel[i]},i);
@@ -10020,7 +10289,9 @@
/// end cell editing
});
})(jQuery);
-;(function($){
+/*jshint eqeqeq:false */
+/*global jQuery */
+(function($){
/**
* jqGrid extension for SubGrid Data
* Tony Tomov tony(a)trirand.com
@@ -10033,7 +10304,7 @@
$.jgrid.extend({
setSubGrid : function () {
return this.each(function (){
- var $t = this, cm,
+ var $t = this, cm, i,
suboptions = {
plusicon : "ui-icon-plus",
minusicon : "ui-icon-minus",
@@ -10045,11 +10316,11 @@
};
$t.p.subGridOptions = $.extend(suboptions, $t.p.subGridOptions || {});
$t.p.colNames.unshift("");
- $t.p.colModel.unshift({name:'subgrid',width: $.browser.safari ? $t.p.subGridWidth+$t.p.cellLayout : $t.p.subGridWidth,sortable: false,resizable:false,hidedlg:true,search:false,fixed:true});
+ $t.p.colModel.unshift({name:'subgrid',width: $.jgrid.cell_width ? $t.p.subGridWidth+$t.p.cellLayout : $t.p.subGridWidth,sortable: false,resizable:false,hidedlg:true,search:false,fixed:true});
cm = $t.p.subGridModel;
if(cm[0]) {
cm[0].align = $.extend([],cm[0].align || []);
- for(var i=0;i<cm[0].name.length;i++) { cm[0].align[i] = cm[0].align[i] || 'left';}
+ for(i=0;i<cm[0].name.length;i++) { cm[0].align[i] = cm[0].align[i] || 'left';}
}
});
},
@@ -10122,7 +10393,7 @@
if (sjxml){
sgmap = ts.p.jsonReader.subgrid;
result = $.jgrid.getAccessor(sjxml, sgmap.root);
- if ( typeof result !== 'undefined' ) {
+ if ( result !== undefined ) {
for (i=0;i<result.length;i++) {
cur = result[i];
trdiv = $("<tr class='ui-widget-content ui-subtblcell'></tr>");
@@ -10327,7 +10598,8 @@
* http://www.gnu.org/licenses/gpl.html
**/
-/*global document, jQuery, $ */
+/*jshint eqeqeq:false */
+/*global jQuery */
(function($) {
"use strict";
$.jgrid.extend({
@@ -10343,10 +10615,10 @@
loaded = $t.p.treeReader.loaded, lft, rgt, curLevel, ident,lftpos, twrap,
ldat, lf;
while(i<len) {
- var ind = $t.rows[i].id, dind = $t.p._index[ind], expan;
+ var ind = $.jgrid.stripPref($t.p.idPrefix, $t.rows[i].id), dind = $t.p._index[ind], expan;
ldat = $t.p.data[dind];
//$t.rows[i].level = ldat[level];
- if($t.p.treeGridModel == 'nested') {
+ if($t.p.treeGridModel === 'nested') {
if(!ldat[isLeaf]) {
lft = parseInt(ldat[$t.p.treeReader.left_field],10);
rgt = parseInt(ldat[$t.p.treeReader.right_field],10);
@@ -10367,17 +10639,17 @@
lftpos = curLevel -1;
}
twrap = "<div class='tree-wrap tree-wrap-"+$t.p.direction+"' style='width:"+(ident*18)+"px;'>";
- twrap += "<div style='"+($t.p.direction=="rtl" ? "right:" : "left:")+(lftpos*18)+"px;' class='ui-icon ";
+ twrap += "<div style='"+($t.p.direction==="rtl" ? "right:" : "left:")+(lftpos*18)+"px;' class='ui-icon ";
if(ldat[loaded] !== undefined) {
- if(ldat[loaded]=="true" || ldat[loaded]===true) {
+ if(ldat[loaded]==="true" || ldat[loaded]===true) {
ldat[loaded] = true;
} else {
ldat[loaded] = false;
}
}
- if(ldat[isLeaf] == "true" || ldat[isLeaf] === true) {
+ if(ldat[isLeaf] === "true" || ldat[isLeaf] === true) {
twrap += ((ldat[icon] !== undefined && ldat[icon] !== "") ? ldat[icon] : $t.p.treeIcons.leaf)+" tree-leaf treeclick";
ldat[isLeaf] = true;
lf="leaf";
@@ -10385,7 +10657,7 @@
ldat[isLeaf] = false;
lf="";
}
- ldat[expanded] = ((ldat[expanded] == "true" || ldat[expanded] === true) ? true : false) && ldat[loaded];
+ ldat[expanded] = ((ldat[expanded] === "true" || ldat[expanded] === true) ? true : false) && (ldat[loaded] || ldat[loaded] === undefined);
if(ldat[expanded] === false) {
twrap += ((ldat[isLeaf] === true) ? "'" : $t.p.treeIcons.plus+" tree-plus treeclick'");
} else {
@@ -10406,7 +10678,7 @@
.find("div.treeclick")
.bind("click",function(e){
var target = e.target || e.srcElement,
- ind2 =$(target,$t.rows).closest("tr.jqgrow")[0].id,
+ ind2 =$.jgrid.stripPref($t.p.idPrefix,$(target,$t.rows).closest("tr.jqgrow")[0].id),
pos = $t.p._index[ind2];
if(!$t.p.data[pos][isLeaf]){
if($t.p.data[pos][expanded]){
@@ -10425,7 +10697,7 @@
.css("cursor","pointer")
.bind("click",function(e) {
var target = e.target || e.srcElement,
- ind2 =$(target,$t.rows).closest("tr.jqgrow")[0].id,
+ ind2 =$.jgrid.stripPref($t.p.idPrefix,$(target,$t.rows).closest("tr.jqgrow")[0].id),
pos = $t.p._index[ind2];
if(!$t.p.data[pos][isLeaf]){
if($t.p.data[pos][expanded]){
@@ -10447,7 +10719,7 @@
},
setTreeGrid : function() {
return this.each(function (){
- var $t = this, i=0, pico, ecol = false, nm, key, dupcols=[];
+ var $t = this, i=0, pico, ecol = false, nm, key, tkey, dupcols=[];
if(!$t.p.treeGrid) {return;}
if(!$t.p.treedatatype ) {$.extend($t.p,{treedatatype: $t.p.datatype});}
$t.p.subGrid = false;$t.p.altRows =false;
@@ -10456,9 +10728,9 @@
if($t.p.rowTotal === null ) { $t.p.rowNum = 10000; }
$t.p.multiselect = false;$t.p.rowList = [];
$t.p.expColInd = 0;
- pico = 'ui-icon-triangle-1-' + ($t.p.direction=="rtl" ? 'w' : 'e');
+ pico = 'ui-icon-triangle-1-' + ($t.p.direction==="rtl" ? 'w' : 'e');
$t.p.treeIcons = $.extend({plus:pico,minus:'ui-icon-triangle-1-s',leaf:'ui-icon-radio-off'},$t.p.treeIcons || {});
- if($t.p.treeGridModel == 'nested') {
+ if($t.p.treeGridModel === 'nested') {
$t.p.treeReader = $.extend({
level_field: "level",
left_field:"lft",
@@ -10468,7 +10740,7 @@
loaded: "loaded",
icon_field: "icon"
},$t.p.treeReader);
- } else if($t.p.treeGridModel == 'adjacency') {
+ } else if($t.p.treeGridModel === 'adjacency') {
$t.p.treeReader = $.extend({
level_field: "level",
parent_id_field: "parent",
@@ -10481,14 +10753,14 @@
for ( key in $t.p.colModel){
if($t.p.colModel.hasOwnProperty(key)) {
nm = $t.p.colModel[key].name;
- if( nm == $t.p.ExpandColumn && !ecol ) {
+ if( nm === $t.p.ExpandColumn && !ecol ) {
ecol = true;
$t.p.expColInd = i;
}
i++;
//
- for(var tkey in $t.p.treeReader) {
- if($t.p.treeReader[tkey] == nm) {
+ for(tkey in $t.p.treeReader) {
+ if($t.p.treeReader.hasOwnProperty(tkey) && $t.p.treeReader[tkey] === nm) {
dupcols.push(nm);
}
}
@@ -10513,7 +10785,7 @@
expanded = $t.p.treeReader.expanded_field,
rows = $t.rows;
$(childern).each(function(){
- var id = $.jgrid.getAccessor(this,$t.p.localReader.id);
+ var id = $t.p.idPrefix + $.jgrid.getAccessor(this,$t.p.localReader.id);
$(rows.namedItem(id)).css("display","");
if(this[expanded]) {
$($t).jqGrid("expandRow",this);
@@ -10530,7 +10802,7 @@
expanded = $t.p.treeReader.expanded_field,
rows = $t.rows;
$(childern).each(function(){
- var id = $.jgrid.getAccessor(this,$t.p.localReader.id);
+ var id = $t.p.idPrefix + $.jgrid.getAccessor(this,$t.p.localReader.id);
$(rows.namedItem(id)).css("display","none");
if(this[expanded]){
$($t).jqGrid("collapseRow",this);
@@ -10556,7 +10828,7 @@
case 'adjacency' :
var parent_id = $t.p.treeReader.parent_id_field;
$($t.p.data).each(function(){
- if(this[parent_id] === null || String(this[parent_id]).toLowerCase() == "null") {
+ if(this[parent_id] === null || String(this[parent_id]).toLowerCase() === "null") {
result.push(this);
}
});
@@ -10604,7 +10876,7 @@
var parent_id = $t.p.treeReader.parent_id_field,
dtid = $t.p.localReader.id;
$(this.p.data).each(function(){
- if(this[dtid] == rc[parent_id] ) {
+ if(this[dtid] === $.jgrid.stripPref($t.p.idPrefix, rc[parent_id]) ) {
result = this;
return false;
}
@@ -10635,7 +10907,7 @@
var parent_id = $t.p.treeReader.parent_id_field,
dtid = $t.p.localReader.id;
$(this.p.data).each(function(){
- if(this[parent_id] == rc[dtid]) {
+ if(this[parent_id] == $.jgrid.stripPref($t.p.idPrefix, rc[dtid])) {
result.push(this);
}
});
@@ -10669,7 +10941,7 @@
$(this.p.data).each(function(i){
len = result.length;
for (i = 0; i < len; i++) {
- if (result[i][dtid] == this[parent_id]) {
+ if ($.jgrid.stripPref($t.p.idPrefix, result[i][dtid]) === this[parent_id]) {
result.push(this);
break;
}
@@ -10740,7 +11012,7 @@
if(!rc[expanded]) {
var id = $.jgrid.getAccessor(rc,this.p.localReader.id);
- var rc1 = $("#"+$.jgrid.jqID(id),this.grid.bDiv)[0];
+ var rc1 = $("#" + this.p.idPrefix + $.jgrid.jqID(id),this.grid.bDiv)[0];
var position = this.p._index[id];
if( $(this).jqGrid("isNodeLoaded",this.p.data[position]) ) {
rc[expanded] = true;
@@ -10750,14 +11022,14 @@
$("div.treeclick",rc1).removeClass(this.p.treeIcons.plus+" tree-plus").addClass(this.p.treeIcons.minus+" tree-minus");
this.p.treeANode = rc1.rowIndex;
this.p.datatype = this.p.treedatatype;
- if(this.p.treeGridModel == 'nested') {
+ if(this.p.treeGridModel === 'nested') {
$(this).jqGrid("setGridParam",{postData:{nodeid:id,n_left:rc[lft],n_right:rc[rgt],n_level:rc[level]}});
} else {
$(this).jqGrid("setGridParam",{postData:{nodeid:id,parentid:rc[parent],n_level:rc[level]}} );
}
$(this).trigger("reloadGrid");
rc[loaded] = true;
- if(this.p.treeGridModel == 'nested') {
+ if(this.p.treeGridModel === 'nested') {
$(this).jqGrid("setGridParam",{postData:{nodeid:'',n_left:'',n_right:'',n_level:''}});
} else {
$(this).jqGrid("setGridParam",{postData:{nodeid:'',parentid:'',n_level:''}});
@@ -10773,7 +11045,7 @@
if(rc[expanded]) {
rc[expanded] = false;
var id = $.jgrid.getAccessor(rc,this.p.localReader.id);
- var rc1 = $("#"+$.jgrid.jqID(id),this.grid.bDiv)[0];
+ var rc1 = $("#" + this.p.idPrefix + $.jgrid.jqID(id),this.grid.bDiv)[0];
$("div.treeclick",rc1).removeClass(this.p.treeIcons.minus+" tree-minus").addClass(this.p.treeIcons.plus+" tree-plus");
}
});
@@ -10830,7 +11102,7 @@
},
delTreeNode : function (rowid) {
return this.each(function () {
- var $t = this, rid = $t.p.localReader.id,
+ var $t = this, rid = $t.p.localReader.id, i,
left = $t.p.treeReader.left_field,
right = $t.p.treeReader.right_field, myright, width, res, key;
if(!$t.grid || !$t.p.treeGrid) {return;}
@@ -10841,7 +11113,7 @@
width = myright - parseInt($t.p.data[rc][left],10) + 1;
var dr = $($t).jqGrid("getFullTreeNode",$t.p.data[rc]);
if(dr.length>0){
- for (var i=0;i<dr.length;i++){
+ for (i=0;i<dr.length;i++){
$($t).jqGrid("delRowData",dr[i][rid]);
}
}
@@ -10871,7 +11143,7 @@
}
});
},
- addChildNode : function( nodeid, parentid, data ) {
+ addChildNode : function( nodeid, parentid, data, expandData ) {
//return this.each(function(){
var $t = this[0];
if(data) {
@@ -10885,8 +11157,8 @@
right = $t.p.treeReader.right_field,
loaded = $t.p.treeReader.loaded,
method, parentindex, parentdata, parentlevel, i, len, max=0, rowind = parentid, leaf, maxright;
-
- if ( typeof nodeid === 'undefined' || nodeid === null ) {
+ if(expandData===undefined) {expandData = false;}
+ if ( nodeid === undefined || nodeid === null ) {
i = $t.p.data.length-1;
if( i>= 0 ) {
while(i>=0){max = Math.max(max, parseInt($t.p.data[i][$t.p.localReader.id],10)); i--;}
@@ -10894,48 +11166,48 @@
nodeid = max+1;
}
var prow = $($t).jqGrid('getInd', parentid);
- leaf = false;
- // if not a parent we assume root
- if ( parentid === undefined || parentid === null || parentid==="") {
- parentid = null;
- rowind = null;
- method = 'last';
- parentlevel = $t.p.tree_root_level;
- i = $t.p.data.length+1;
+ leaf = false;
+ // if not a parent we assume root
+ if ( parentid === undefined || parentid === null || parentid==="") {
+ parentid = null;
+ rowind = null;
+ method = 'last';
+ parentlevel = $t.p.tree_root_level;
+ i = $t.p.data.length+1;
+ } else {
+ method = 'after';
+ parentindex = $t.p._index[parentid];
+ parentdata = $t.p.data[parentindex];
+ parentid = parentdata[$t.p.localReader.id];
+ parentlevel = parseInt(parentdata[level],10)+1;
+ var childs = $($t).jqGrid('getFullTreeNode', parentdata);
+ // if there are child nodes get the last index of it
+ if(childs.length) {
+ i = childs[childs.length-1][$t.p.localReader.id];
+ rowind = i;
+ i = $($t).jqGrid('getInd',rowind)+1;
} else {
- method = 'after';
- parentindex = $t.p._index[parentid];
- parentdata = $t.p.data[parentindex];
- parentid = parentdata[$t.p.localReader.id];
- parentlevel = parseInt(parentdata[level],10)+1;
- var childs = $($t).jqGrid('getFullTreeNode', parentdata);
- // if there are child nodes get the last index of it
- if(childs.length) {
- i = childs[childs.length-1][$t.p.localReader.id];
- rowind = i;
- i = $($t).jqGrid('getInd',rowind)+1;
- } else {
- i = $($t).jqGrid('getInd', parentid)+1;
- }
- // if the node is leaf
- if(parentdata[isLeaf]) {
- leaf = true;
- parentdata[expanded] = true;
- //var prow = $($t).jqGrid('getInd', parentid);
- $($t.rows[prow])
- .find("span.cell-wrapperleaf").removeClass("cell-wrapperleaf").addClass("cell-wrapper")
- .end()
- .find("div.tree-leaf").removeClass($t.p.treeIcons.leaf+" tree-leaf").addClass($t.p.treeIcons.minus+" tree-minus");
- $t.p.data[parentindex][isLeaf] = false;
- parentdata[loaded] = true;
- }
+ i = $($t).jqGrid('getInd', parentid)+1;
}
- len = i+1;
+ // if the node is leaf
+ if(parentdata[isLeaf]) {
+ leaf = true;
+ parentdata[expanded] = true;
+ //var prow = $($t).jqGrid('getInd', parentid);
+ $($t.rows[prow])
+ .find("span.cell-wrapperleaf").removeClass("cell-wrapperleaf").addClass("cell-wrapper")
+ .end()
+ .find("div.tree-leaf").removeClass($t.p.treeIcons.leaf+" tree-leaf").addClass($t.p.treeIcons.minus+" tree-minus");
+ $t.p.data[parentindex][isLeaf] = false;
+ parentdata[loaded] = true;
+ }
+ }
+ len = i+1;
- data[expanded] = false;
- data[loaded] = true;
+ if( data[expanded]===undefined) {data[expanded]= false;}
+ if( data[loaded]===undefined ) { data[loaded] = false;}
data[level] = parentlevel;
- data[isLeaf] = true;
+ if( data[isLeaf]===undefined) {data[isLeaf]= true;}
if( $t.p.treeGridModel === "adjacency") {
data[parent] = parentid;
}
@@ -10989,7 +11261,7 @@
$($t).jqGrid('addRowData', nodeid, data, method, rowind);
$($t).jqGrid('setTreeNode', i, len);
}
- if(parentdata && !parentdata[expanded]) {
+ if(parentdata && !parentdata[expanded] && expandData) {
$($t.rows[prow])
.find("div.treeclick")
.click();
@@ -10999,27 +11271,29 @@
}
});
})(jQuery);
+/*jshint eqeqeq:false, eqnull:true */
+/*global jQuery */
// Grouping module
-;(function($){
+(function($){
"use strict";
$.extend($.jgrid,{
template : function(format){ //jqgformat
- var args = $.makeArray(arguments).slice(1), j = 1;
- if(format===undefined) { format = ""; }
+ var args = $.makeArray(arguments).slice(1), j, al = args.length;
+ if(format==null) { format = ""; }
return format.replace(/\{([\w\-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g, function(m,i){
if(!isNaN(parseInt(i,10))) {
- j++;
return args[parseInt(i,10)];
- } else {
- var nmarr = args[ j ],
- k = nmarr.length;
- while(k--) {
- if(i===nmarr[k].nm) {
- return nmarr[k].v;
- break;
+ }
+ for(j=0; j < al;j++) {
+ if($.isArray(args[j])) {
+ var nmarr = args[ j ],
+ k = nmarr.length;
+ while(k--) {
+ if(i===nmarr[k].nm) {
+ return nmarr[k].v;
+ }
}
}
- j++;
}
});
}
@@ -11027,30 +11301,29 @@
$.jgrid.extend({
groupingSetup : function () {
return this.each(function (){
- var $t = this,
- grp = $t.p.groupingView;
+ var $t = this, i, j, cml, cm = $t.p.colModel, grp = $t.p.groupingView;
if(grp !== null && ( (typeof grp === 'object') || $.isFunction(grp) ) ) {
if(!grp.groupField.length) {
$t.p.grouping = false;
} else {
- if ( typeof(grp.visibiltyOnNextGrouping) === 'undefined') {
+ if (grp.visibiltyOnNextGrouping === undefined) {
grp.visibiltyOnNextGrouping = [];
}
grp.lastvalues=[];
grp.groups =[];
grp.counters =[];
- for(var i=0;i<grp.groupField.length;i++) {
+ for(i=0;i<grp.groupField.length;i++) {
if(!grp.groupOrder[i]) {
grp.groupOrder[i] = 'asc';
}
if(!grp.groupText[i]) {
grp.groupText[i] = '{0}';
}
- if( typeof(grp.groupColumnShow[i]) !== 'boolean') {
+ if( typeof grp.groupColumnShow[i] !== 'boolean') {
grp.groupColumnShow[i] = true;
}
- if( typeof(grp.groupSummary[i]) !== 'boolean') {
+ if( typeof grp.groupSummary[i] !== 'boolean') {
grp.groupSummary[i] = false;
}
if(grp.groupColumnShow[i] === true) {
@@ -11062,8 +11335,7 @@
}
}
grp.summary =[];
- var cm = $t.p.colModel;
- for(var j=0, cml = cm.length; j < cml; j++) {
+ for(j=0, cml = cm.length; j < cml; j++) {
if(cm[j].summaryType) {
grp.summary.push({nm:cm[j].name,st:cm[j].summaryType, v: '', sr: cm[j].summaryRound, srt: cm[j].summaryRoundType || 'round'});
}
@@ -11076,18 +11348,26 @@
},
groupingPrepare : function (rData, gdata, record, irow) {
this.each(function(){
- var grp = this.p.groupingView, $t= this;
- var grlen = grp.groupField.length,
+ var grp = this.p.groupingView, $t= this, i,
+ grlen = grp.groupField.length,
fieldName,
v,
+ displayName,
+ displayValue,
changed = 0;
- for(var i=0;i<grlen;i++) {
+ for(i=0;i<grlen;i++) {
fieldName = grp.groupField[i];
+ displayName = grp.displayField[i];
v = record[fieldName];
+ displayValue = displayName == null ? null : record[displayName];
+
+ if( displayValue == null ) {
+ displayValue = v;
+ }
if( v !== undefined ) {
if(irow === 0 ) {
// First record always starts a new group
- grp.groups.push({idx:i,dataIndex:fieldName,value:v, startRow: irow, cnt:1, summary : [] } );
+ grp.groups.push({idx:i,dataIndex:fieldName,value:v, displayValue: displayValue, startRow: irow, cnt:1, summary : [] } );
grp.lastvalues[i] = v;
grp.counters[i] = {cnt:1, pos:grp.groups.length-1, summary: $.extend(true,[],grp.summary)};
$.each(grp.counters[i].summary,function() {
@@ -11099,9 +11379,9 @@
});
grp.groups[grp.counters[i].pos].summary = grp.counters[i].summary;
} else {
- if( (typeof(v) !== "object" && (grp.lastvalues[i] !== v) ) ) {
+ if (typeof v !== "object" && ($.isArray(grp.isInTheSameGroup) && $.isFunction(grp.isInTheSameGroup[i]) ? ! grp.isInTheSameGroup[i].call($t, grp.lastvalues[i], v, i, grp): grp.lastvalues[i] !== v)) {
// This record is not in same group as previous one
- grp.groups.push({idx:i,dataIndex:fieldName,value:v, startRow: irow, cnt:1, summary : [] } );
+ grp.groups.push({idx:i,dataIndex:fieldName,value:v, displayValue: displayValue, startRow: irow, cnt:1, summary : [] } );
grp.lastvalues[i] = v;
changed = 1;
grp.counters[i] = {cnt:1, pos:grp.groups.length-1, summary: $.extend(true,[],grp.summary)};
@@ -11116,7 +11396,7 @@
} else {
if (changed === 1) {
// This group has changed because an earlier group changed.
- grp.groups.push({idx:i,dataIndex:fieldName,value:v, startRow: irow, cnt:1, summary : [] } );
+ grp.groups.push({idx:i,dataIndex:fieldName,value:v, displayValue: displayValue, startRow: irow, cnt:1, summary : [] } );
grp.lastvalues[i] = v;
grp.counters[i] = {cnt:1, pos:grp.groups.length-1, summary: $.extend(true,[],grp.summary)};
$.each(grp.counters[i].summary,function() {
@@ -11152,6 +11432,7 @@
var $t = this,
grp = $t.p.groupingView,
strpos = hid.split('_'),
+ uidpos,
//uid = hid.substring(0,strpos+1),
num = parseInt(strpos[strpos.length-2], 10);
strpos.splice(strpos.length-2,2);
@@ -11179,7 +11460,12 @@
} else {
if(r){
while(r) {
- if( $(r).hasClass(uid+"_"+String(num) ) || $(r).hasClass(uid+"_"+String(num-1))) { break; }
+ uidpos = r.className.indexOf(uid);
+ if(uidpos !== -1) {
+ if( parseInt(r.className.substring(uidpos+uid.length + 1),10) <= num) {
+ break;
+ }
+ }
$(r).hide();
r = r.nextSibling;
}
@@ -11190,7 +11476,12 @@
} else {
if(r){
while(r) {
- if($(r).hasClass(uid+"_"+String(num)) || $(r).hasClass(uid+"_"+String(num-1)) ) { break; }
+ uidpos = r.className.indexOf(uid);
+ if(uidpos !== -1) {
+ if( parseInt(r.className.substring(uidpos+uid.length + 1),10) <= num) {
+ break;
+ }
+ }
$(r).show();
tspan = $(r).find("span."+"tree-wrap-"+$t.p.direction);
if( tspan && $(tspan).hasClass(plus) ) {
@@ -11211,11 +11502,11 @@
return this.each(function(){
var $t = this,
grp = $t.p.groupingView,
- str = "", icon = "", hid, clid, pmrtl = grp.groupCollapse ? grp.plusicon : grp.minusicon, gv, cp=[], ii, len =grp.groupField.length;
+ str = "", icon = "", hid, clid, pmrtl = grp.groupCollapse ? grp.plusicon : grp.minusicon, gv, cp=[], len =grp.groupField.length;
pmrtl += " tree-wrap-"+$t.p.direction;
- ii = 0;
$.each($t.p.colModel, function (i,n){
- for(var ii=0;ii<len;ii++) {
+ var ii;
+ for(ii=0;ii<len;ii++) {
if(grp.groupField[ii] === n.name ) {
cp[ii] = i;
break;
@@ -11224,17 +11515,23 @@
});
var toEnd = 0;
function findGroupIdx( ind , offset, grp) {
+ var ret = false, i;
if(offset===0) {
- return grp[ind];
+ ret = grp[ind];
} else {
var id = grp[ind].idx;
- if(id===0) { return grp[ind]; }
- for(var i=ind;i >= 0; i--) {
- if(grp[i].idx === id-offset) {
- return grp[i];
+ if(id===0) {
+ ret = grp[ind];
+ } else {
+ for(i=ind;i >= 0; i--) {
+ if(grp[i].idx === id-offset) {
+ ret = grp[i];
+ break;
+ }
}
}
}
+ return ret;
}
var sumreverse = $.makeArray(grp.groupSummary);
sumreverse.reverse();
@@ -11244,16 +11541,19 @@
hid = clid+"_"+i;
icon = "<span style='cursor:pointer;' class='ui-icon "+pmrtl+"' onclick=\"jQuery('#"+$.jgrid.jqID($t.p.id)+"').jqGrid('groupingToggle','"+hid+"');return false;\"></span>";
try {
- gv = $t.formatter(hid, n.value, cp[n.idx], n.value );
+ if ($.isArray(grp.formatDisplayField) && $.isFunction(grp.formatDisplayField[n.idx])) {
+ n.displayValue = grp.formatDisplayField[n.idx].call($t, n.displayValue, n.value, $t.p.colModel[cp[n.idx]], n.idx, grp);
+ }
+ gv = $t.formatter(hid, n.displayValue, cp[n.idx], n.value );
} catch (egv) {
- gv = n.value;
+ gv = n.displayValue;
}
str += "<tr id=\""+hid+"\" role=\"row\" class= \"ui-widget-content jqgroup ui-row-"+$t.p.direction+" "+clid+"\"><td style=\"padding-left:"+(n.idx * 12) + "px;"+"\" colspan=\""+colspans+"\">"+icon+$.jgrid.template(grp.groupText[n.idx], gv, n.cnt, n.summary)+"</td></tr>";
var leaf = len-1 === n.idx;
if( leaf ) {
- var gg = grp.groups[i+1];
+ var gg = grp.groups[i+1], k, kk, ik;
var end = gg !== undefined ? grp.groups[i+1].startRow : grdata.length;
- for(var kk=n.startRow;kk<end;kk++) {
+ for(kk=n.startRow;kk<end;kk++) {
str += grdata[kk].join('');
}
var jj;
@@ -11265,7 +11565,7 @@
}
toEnd = grp.groupField.length - jj;
}
- for (var ik = 0; ik < toEnd; ik++) {
+ for (ik = 0; ik < toEnd; ik++) {
if(!sumreverse[ik]) { continue; }
var hhdr = "";
if(grp.groupCollapse && !grp.showSummaryOnHide) {
@@ -11275,7 +11575,7 @@
var fdata = findGroupIdx(i, ik, grp.groups),
cm = $t.p.colModel,
vv, grlen = fdata.cnt;
- for(var k=0; k<colspans;k++) {
+ for(k=0; k<colspans;k++) {
var tmpdata = "<td "+$t.formatCol(k,1,'')+"> </td>",
tplfld = "{0}";
$.each(fdata.summary,function(){
@@ -11283,7 +11583,7 @@
if(cm[k].summaryTpl) {
tplfld = cm[k].summaryTpl;
}
- if(typeof(this.st) === 'string' && this.st.toLowerCase() === 'avg') {
+ if(typeof this.st === 'string' && this.st.toLowerCase() === 'avg') {
if(this.v && grlen > 0) {
this.v = (this.v/grlen);
}
@@ -11312,14 +11612,14 @@
groupingGroupBy : function (name, options ) {
return this.each(function(){
var $t = this;
- if(typeof(name) === "string") {
+ if(typeof name === "string") {
name = [name];
}
var grp = $t.p.groupingView;
$t.p.grouping = true;
//Set default, in case visibilityOnNextGrouping is undefined
- if (typeof grp.visibiltyOnNextGrouping === "undefined") {
+ if (grp.visibiltyOnNextGrouping === undefined) {
grp.visibiltyOnNextGrouping = [];
}
var i;
@@ -11341,14 +11641,14 @@
groupingRemove : function (current) {
return this.each(function(){
var $t = this;
- if(typeof(current) === 'undefined') {
+ if(current === undefined) {
current = true;
}
$t.p.grouping = false;
if(current===true) {
- var grp = $t.p.groupingView;
+ var grp = $t.p.groupingView, i;
// show previous hidden groups if they are hidden and weren't removed yet
- for(var i=0;i<grp.groupField.length;i++) {
+ for(i=0;i<grp.groupField.length;i++) {
if (!grp.groupColumnShow[i] && grp.visibiltyOnNextGrouping[i]) {
$($t).jqGrid('showCol', grp.groupField);
}
@@ -11385,9 +11685,8 @@
if(v==="") {v=0;}
if(rc.hasOwnProperty(field)) {
return v+1;
- } else {
- return 0;
}
+ return 0;
},
avg: function() {
@@ -11395,7 +11694,7 @@
// so use sum instead of duplicating the code (?)
return funcs.sum();
}
- }
+ };
if(!funcs[fn]) {
throw ("jqGrid Grouping No such method: " + fn);
@@ -11403,11 +11702,10 @@
var res = funcs[fn]();
if (round != null) {
- if (roundType == 'fixed')
+ if (roundType === 'fixed') {
res = res.toFixed(round);
- else {
+ } else {
var mul = Math.pow(10, round);
-
res = Math.round(res * mul) / mul;
}
}
@@ -11417,7 +11715,9 @@
}
});
})(jQuery);
-;(function($){
+/*jshint eqeqeq:false, eqnull:true, devel:true */
+/*global jQuery, xmlJsonClass */
+(function($){
/*
* jqGrid extension for constructing Grid Data from external file
* Tony Tomov tony(a)trirand.com
@@ -11426,8 +11726,6 @@
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl-2.0.html
**/
-//jsHint options
-/*global jQuery, $, alert, xmlJsonClass */
"use strict";
$.jgrid.extend({
@@ -11452,11 +11750,11 @@
var $t = this;
var xmlConvert = function (xml,o) {
var cnfg = $(o.xmlGrid.config,xml)[0];
- var xmldata = $(o.xmlGrid.data,xml)[0], jstr, jstr1;
+ var xmldata = $(o.xmlGrid.data,xml)[0], jstr, jstr1, key;
if(xmlJsonClass.xml2json && $.jgrid.parse) {
jstr = xmlJsonClass.xml2json(cnfg," ");
jstr = $.jgrid.parse(jstr);
- for(var key in jstr) {
+ for(key in jstr) {
if(jstr.hasOwnProperty(key)) {
jstr1=jstr[key];
}
@@ -11476,7 +11774,7 @@
}
};
var jsonConvert = function (jsonstr,o){
- if (jsonstr && typeof jsonstr == 'string') {
+ if (jsonstr && typeof jsonstr === 'string') {
var _jsonparse = false;
if($.jgrid.useJSON) {
$.jgrid.useJSON = false;
@@ -11504,7 +11802,7 @@
data: o.impData,
dataType:"xml",
complete: function(xml,stat) {
- if(stat == 'success') {
+ if(stat === 'success') {
xmlConvert(xml.responseXML,o);
$($t).triggerHandler("jqGridImportComplete", [xml, o]);
if($.isFunction(o.importComplete)) {
@@ -11517,8 +11815,8 @@
break;
case 'xmlstring' :
// we need to make just the conversion and use the same code as xml
- if(o.impstring && typeof o.impstring == 'string') {
- var xmld = $.jgrid.stringToDoc(o.impstring);
+ if(o.impstring && typeof o.impstring === 'string') {
+ var xmld = $.parseXML(o.impstring);
if(xmld) {
xmlConvert(xmld,o);
$($t).triggerHandler("jqGridImportComplete", [xmld, o]);
@@ -11549,7 +11847,7 @@
}, o.ajaxOptions ));
break;
case 'jsonstring' :
- if(o.impstring && typeof o.impstring == 'string') {
+ if(o.impstring && typeof o.impstring === 'string') {
jsonConvert(o.impstring,o );
$($t).triggerHandler("jqGridImportComplete", [o.impstring, o]);
if($.isFunction(o.importComplete)) {
@@ -11570,7 +11868,7 @@
var ret = null;
this.each(function () {
if(!this.grid) { return;}
- var gprm = $.extend(true, {},$(this).jqGrid("getGridParam"));
+ var key, gprm = $.extend(true, {},$(this).jqGrid("getGridParam"));
// we need to check for:
// 1.multiselect, 2.subgrid 3. treegrid and remove the unneded columns from colNames
if(gprm.rownumbers) {
@@ -11587,7 +11885,7 @@
}
gprm.knv = null;
if(gprm.treeGrid) {
- for (var key in gprm.treeReader) {
+ for (key in gprm.treeReader) {
if(gprm.treeReader.hasOwnProperty(key)) {
gprm.colNames.splice(gprm.colNames.length-1);
gprm.colModel.splice(gprm.colModel.length-1);
@@ -11620,18 +11918,21 @@
return this.each(function(){
if(!this.grid) { return;}
var url;
- if(o.exptype == "remote") {
+ if(o.exptype === "remote") {
var pdata = $.extend({},this.p.postData);
pdata[o.oper] = o.tag;
var params = jQuery.param(pdata);
- if(o.url.indexOf("?") != -1) { url = o.url+"&"+params; }
+ if(o.url.indexOf("?") !== -1) { url = o.url+"&"+params; }
else { url = o.url+"?"+params; }
window.location = url;
}
});
}
});
-})(jQuery);;(function($){
+})(jQuery);
+/*jshint evil:true, eqeqeq:false, eqnull:true, devel:true */
+/*global jQuery */
+(function($){
/*
**
* jqGrid addons using jQuery UI
@@ -11641,10 +11942,11 @@
* http://www.gnu.org/licenses/gpl-2.0.html
* depends on jQuery UI
**/
-if ($.browser.msie && $.browser.version==8) {
+"use strict";
+if ($.jgrid.msie && $.jgrid.msiever()===8) {
$.expr[":"].hidden = function(elem) {
return elem.offsetWidth === 0 || elem.offsetHeight === 0 ||
- elem.style.display == "none";
+ elem.style.display === "none";
};
}
// requiere load multiselect before grid
@@ -11653,17 +11955,17 @@
if ($.ui.multiselect ) {
if($.ui.multiselect.prototype._setSelected) {
var setSelected = $.ui.multiselect.prototype._setSelected;
- $.ui.multiselect.prototype._setSelected = function(item,selected) {
- var ret = setSelected.call(this,item,selected);
- if (selected && this.selectedList) {
- var elt = this.element;
- this.selectedList.find('li').each(function() {
- if ($(this).data('optionLink')) {
- $(this).data('optionLink').remove().appendTo(elt);
- }
- });
- }
- return ret;
+ $.ui.multiselect.prototype._setSelected = function(item,selected) {
+ var ret = setSelected.call(this,item,selected);
+ if (selected && this.selectedList) {
+ var elt = this.element;
+ this.selectedList.find('li').each(function() {
+ if ($(this).data('optionLink')) {
+ $(this).data('optionLink').remove().appendTo(elt);
+ }
+ });
+ }
+ return ret;
};
}
if($.ui.multiselect.prototype.destroy) {
@@ -11674,7 +11976,7 @@
$.widget.prototype.destroy.apply(this, arguments);
} else {
$.Widget.prototype.destroy.apply(this, arguments);
- }
+ }
};
}
$.jgrid._multiselect = true;
@@ -11713,7 +12015,7 @@
var permutation = [];
th.each(function() {
var id = $(">div", this).get(0).id.replace(/^jqgh_/, "").replace(tid,"");
- if (id in cmMap) {
+ if (cmMap.hasOwnProperty(id)) {
permutation.push(cmMap[id]);
}
});
@@ -11802,8 +12104,8 @@
"close": function() {
opts.cleanup(true);
},
- "modal" : opts.modal ? opts.modal : false,
- "resizable": opts.resizable ? opts.resizable : true,
+ "modal" : opts.modal || false,
+ "resizable": opts.resizable || true,
"width": opts.width+20
}, opts.dialog_opts || {});
},
@@ -11845,7 +12147,7 @@
}, $.jgrid.col, opts || {});
if($.ui) {
if ($.ui.multiselect ) {
- if(opts.msel == "multiselect") {
+ if(opts.msel === "multiselect") {
if(!$.jgrid._multiselect) {
// should be in language file
alert("Multiselect plugin loaded after jqGrid. Please load the plugin before the jqGrid!");
@@ -11885,11 +12187,11 @@
}
select.append("<option value='"+i+"' "+
- (this.hidden?"":"selected='selected'")+">"+jQuery.jgrid.stripHtml(colNames[i])+"</option>");
+ (this.hidden?"":"selected='selected'")+">"+$.jgrid.stripHtml(colNames[i])+"</option>");
});
function call(fn, obj) {
if (!fn) { return; }
- if (typeof fn == 'string') {
+ if (typeof fn === 'string') {
if ($.fn[fn]) {
$.fn[fn].apply(obj, $.makeArray(arguments).slice(2));
}
@@ -11958,7 +12260,7 @@
},
gridDnD : function(opts) {
return this.each(function(){
- var $t = this;
+ var $t = this, i, cn;
if(!$t.grid) { return; }
// Currently we disable a treeGrid drag and drop
if($t.p.treeGrid) { return; }
@@ -11966,14 +12268,14 @@
function updateDnD ()
{
var datadnd = $.data($t,"dnd");
- $("tr.jqgrow:not(.ui-draggable)",$t).draggable($.isFunction(datadnd.drag) ? datadnd.drag.call($($t),datadnd) : datadnd.drag);
+ $("tr.jqgrow:not(.ui-draggable)",$t).draggable($.isFunction(datadnd.drag) ? datadnd.drag.call($($t),datadnd) : datadnd.drag);
}
var appender = "<table id='jqgrid_dnd' class='ui-jqgrid-dnd'></table>";
if($("#jqgrid_dnd")[0] === undefined) {
$('body').append(appender);
}
- if(typeof opts == 'string' && opts == 'updateDnD' && $t.p.jqgdnd===true) {
+ if(typeof opts === 'string' && opts === 'updateDnD' && $t.p.jqgdnd===true) {
updateDnD();
return;
}
@@ -11981,9 +12283,10 @@
"drag" : function (opts) {
return $.extend({
start : function (ev, ui) {
+ var i, subgid;
// if we are in subgrid mode try to collapse the node
if($t.p.subGrid) {
- var subgid = $(ui.helper).attr("id");
+ subgid = $(ui.helper).attr("id");
try {
$($t).jqGrid('collapseSubGridRow',subgid);
} catch (e) {}
@@ -11991,8 +12294,8 @@
// hack
// drag and drop does not insert tr in table, when the table has no rows
// we try to insert new empty row on the target(s)
- for (var i=0;i<$.data($t,"dnd").connectWith.length;i++){
- if($($.data($t,"dnd").connectWith[i]).jqGrid('getGridParam','reccount') == "0" ){
+ for (i=0;i<$.data($t,"dnd").connectWith.length;i++){
+ if($($.data($t,"dnd").connectWith[i]).jqGrid('getGridParam','reccount') === 0 ){
$($.data($t,"dnd").connectWith[i]).jqGrid('addRowData','jqg_empty_row',{});
}
}
@@ -12003,13 +12306,14 @@
if(opts.onstart && $.isFunction(opts.onstart) ) { opts.onstart.call($($t),ev,ui); }
},
stop :function(ev,ui) {
+ var i, ids;
if(ui.helper.dropped && !opts.dragcopy) {
- var ids = $(ui.helper).attr("id");
+ ids = $(ui.helper).attr("id");
if(ids === undefined) { ids = $(this).attr("id"); }
$($t).jqGrid('delRowData',ids );
}
// if we have a empty row inserted from start event try to delete it
- for (var i=0;i<$.data($t,"dnd").connectWith.length;i++){
+ for (i=0;i<$.data($t,"dnd").connectWith.length;i++){
$($.data($t,"dnd").connectWith[i]).jqGrid('delRowData','jqg_empty_row');
}
if(opts.onstop && $.isFunction(opts.onstop) ) { opts.onstop.call($($t),ev,ui); }
@@ -12022,8 +12326,8 @@
if (!$(d).hasClass('jqgrow')) { return d;}
var tid = $(d).closest("table.ui-jqgrid-btable");
if(tid.length > 0 && $.data(tid[0],"dnd") !== undefined) {
- var cn = $.data(tid[0],"dnd").connectWith;
- return $.inArray('#'+$.jgrid.jqID(this.id),cn) != -1 ? true : false;
+ var cn = $.data(tid[0],"dnd").connectWith;
+ return $.inArray('#'+$.jgrid.jqID(this.id),cn) !== -1 ? true : false;
}
return false;
},
@@ -12032,18 +12336,20 @@
var accept = $(ui.draggable).attr("id");
var getdata = ui.draggable.parent().parent().jqGrid('getRowData',accept);
if(!opts.dropbyname) {
- var j =0, tmpdata = {}, nm;
+ var j =0, tmpdata = {}, nm, key;
var dropmodel = $("#"+$.jgrid.jqID(this.id)).jqGrid('getGridParam','colModel');
try {
- for (var key in getdata) {
+ for (key in getdata) {
+ if (getdata.hasOwnProperty(key)) {
nm = dropmodel[j].name;
- if( !(nm == 'cb' || nm =='rn' || nm == 'subgrid' )) {
+ if( !(nm === 'cb' || nm === 'rn' || nm === 'subgrid' )) {
if(getdata.hasOwnProperty(key) && dropmodel[j]) {
tmpdata[nm] = getdata[key];
}
}
j++;
}
+ }
getdata = tmpdata;
} catch (e) {}
}
@@ -12052,7 +12358,7 @@
//parameters to this callback - event, element, data to be inserted, sender, reciever
// should return object which will be inserted into the reciever
var datatoinsert = opts.beforedrop.call(this,ev,ui,getdata,$('#'+$.jgrid.jqID($t.p.id)),$(this));
- if (typeof datatoinsert != "undefined" && datatoinsert !== null && typeof datatoinsert == "object") { getdata = datatoinsert; }
+ if (datatoinsert !== undefined && datatoinsert !== null && typeof datatoinsert === "object") { getdata = datatoinsert; }
}
if(ui.helper.dropped) {
var grid;
@@ -12097,12 +12403,12 @@
opts.connectWith = $.map(opts.connectWith,function(n){return $.trim(n);});
$.data($t,"dnd",opts);
- if($t.p.reccount != "0" && !$t.p.jqgdnd) {
+ if($t.p.reccount !== 0 && !$t.p.jqgdnd) {
updateDnD();
}
$t.p.jqgdnd = true;
- for (var i=0;i<opts.connectWith.length;i++){
- var cn =opts.connectWith[i];
+ for (i=0;i<opts.connectWith.length;i++){
+ cn =opts.connectWith[i];
$(cn).droppable($.isFunction(opts.drop) ? opts.drop.call($($t),opts) : opts.drop);
}
});
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/jquery.jqGrid.src.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/grid.addons.js
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/grid.addons.js 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/grid.addons.js 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,6 +1,5 @@
(function($){
-/*
- * %%Ignore-License
+/* %%Ignore-License
* jqGrid methods without support. Use as you wish
* Tony Tomov tony(a)trirand.com
* http://trirand.com/blog/
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/grid.addons.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/grid.postext.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/grid.setcolumns.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/jquery.contextmenu.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/jquery.searchFilter.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/jquery.tablednd.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/searchFilter.css
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/searchFilter.css 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/searchFilter.css 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,4 +1,4 @@
-/* %%Ignore-License */
+/*%%Ignore-License*/
.ui-searchFilter { display: none; position: absolute; z-index: 770; overflow: visible;}
.ui-searchFilter table {position:relative; margin:0em; width:auto}
.ui-searchFilter table td {margin: 0em; padding: 1px;}
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/searchFilter.css
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/ui.multiselect.css
===================================================================
--- sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/ui.multiselect.css 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/ui.multiselect.css 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,5 +1,4 @@
-/* %%Ignore-License
- Multiselect
+/* %%Ignore-License Multiselect
----------------------------------*/
.ui-multiselect { border: solid 1px; font-size: 0.8em; }
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/ui.multiselect.css
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: sandbox/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/ui.multiselect.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/site/rst/index.rst.vm
===================================================================
--- sandbox/nuiton-js-jqgrid/src/site/rst/index.rst.vm 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/site/rst/index.rst.vm 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,8 +1,8 @@
.. -
.. * #%L
.. * Nuiton JS :: jqGrid
-.. * $Id:$
-.. * $HeadURL:$
+.. * $Id$
+.. * $HeadURL$
.. * %%
.. * Copyright (C) 2012 - 2013 CodeLutin
.. * %%
@@ -33,7 +33,7 @@
.. _documentation: http://www.trirand.com/jqgridwiki/doku.php
Use
-===
+---
Maven part::
@@ -90,6 +90,7 @@
- jqgrid-hr: specifique i18n
- jqgrid-hr1250: specifique i18n
- jqgrid-hu: specifique i18n
+- jqgrid-id: specifique i18n
- jqgrid-is: specifique i18n
- jqgrid-it: specifique i18n
- jqgrid-ja: specifique i18n
@@ -111,6 +112,7 @@
- jqgrid-tr: specifique i18n
- jqgrid-tw: specifique i18n
- jqgrid-ua: specifique i18n
+- jqgrid-vi: specifique i18n
Available CSS
-------------
Property changes on: sandbox/nuiton-js-jqgrid/src/site/rst/index.rst.vm
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jqgrid/src/site/site_en.xml
===================================================================
--- sandbox/nuiton-js-jqgrid/src/site/site_en.xml 2013-07-19 21:34:13 UTC (rev 165)
+++ sandbox/nuiton-js-jqgrid/src/site/site_en.xml 2013-07-19 21:45:03 UTC (rev 166)
@@ -1,8 +1,8 @@
<!--
#%L
Nuiton JS :: jqGrid
- $Id:$
- $HeadURL:$
+ $Id$
+ $HeadURL$
%%
Copyright (C) 2012 - 2013 CodeLutin
%%
@@ -45,8 +45,8 @@
<menu ref="parent"/>
- <menu name="Utilisateurs">
- <item name="Accueil" href="index.html"/>
+ <menu name="Users">
+ <item name="Home" href="index.html"/>
</menu>
<menu ref="reports"/>
Property changes on: sandbox/nuiton-js-jqgrid/src/site/site_en.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
1
0
r165 - in sandbox/nuiton-js-jquery: . src/main/resources/META-INF/nuiton-js src/main/resources/nuiton-js-jquery src/site src/site/rst
by echatellier@users.nuiton.org July 19, 2013
by echatellier@users.nuiton.org July 19, 2013
July 19, 2013
Author: echatellier
Date: 2013-07-19 23:34:13 +0200 (Fri, 19 Jul 2013)
New Revision: 165
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/165
Log:
Fix jquery package
Removed:
sandbox/nuiton-js-jquery/changelog.txt
Modified:
sandbox/nuiton-js-jquery/LICENSE.txt
sandbox/nuiton-js-jquery/README.txt
sandbox/nuiton-js-jquery/pom.xml
sandbox/nuiton-js-jquery/src/main/resources/META-INF/nuiton-js/wro-jquery.xml
sandbox/nuiton-js-jquery/src/main/resources/nuiton-js-jquery/jquery-1.10.2.js
sandbox/nuiton-js-jquery/src/site/rst/index.rst.vm
sandbox/nuiton-js-jquery/src/site/site_en.xml
Property changes on: sandbox/nuiton-js-jquery/LICENSE.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: sandbox/nuiton-js-jquery/README.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Deleted: sandbox/nuiton-js-jquery/changelog.txt
===================================================================
--- sandbox/nuiton-js-jquery/changelog.txt 2013-07-19 21:33:12 UTC (rev 164)
+++ sandbox/nuiton-js-jquery/changelog.txt 2013-07-19 21:34:13 UTC (rev 165)
@@ -1,2 +0,0 @@
-Please refer to the release note :
- http://maven-site.nuiton.org/nuiton-js/changes-report.html
Property changes on: sandbox/nuiton-js-jquery/pom.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jquery/src/main/resources/META-INF/nuiton-js/wro-jquery.xml
===================================================================
--- sandbox/nuiton-js-jquery/src/main/resources/META-INF/nuiton-js/wro-jquery.xml 2013-07-19 21:33:12 UTC (rev 164)
+++ sandbox/nuiton-js-jquery/src/main/resources/META-INF/nuiton-js/wro-jquery.xml 2013-07-19 21:34:13 UTC (rev 165)
@@ -1,8 +1,8 @@
<!--
#%L
Nuiton JS :: JQuery
- $Id:$
- $HeadURL:$
+ $Id$
+ $HeadURL$
%%
Copyright (C) 2012 - 2013 CodeLutin, Chatellier Eric
%%
Property changes on: sandbox/nuiton-js-jquery/src/main/resources/META-INF/nuiton-js/wro-jquery.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: sandbox/nuiton-js-jquery/src/main/resources/nuiton-js-jquery/jquery-1.10.2.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jquery/src/site/rst/index.rst.vm
===================================================================
--- sandbox/nuiton-js-jquery/src/site/rst/index.rst.vm 2013-07-19 21:33:12 UTC (rev 164)
+++ sandbox/nuiton-js-jquery/src/site/rst/index.rst.vm 2013-07-19 21:34:13 UTC (rev 165)
@@ -1,8 +1,8 @@
.. -
.. * #%L
.. * Nuiton JS :: JQuery
-.. * $Id:$
-.. * $HeadURL:$
+.. * $Id$
+.. * $HeadURL$
.. * %%
.. * Copyright (C) 2012 - 2013 CodeLutin
.. * %%
@@ -33,7 +33,7 @@
.. _documentation: http://api.jquery.com/
Use
-===
+---
Maven part::
Property changes on: sandbox/nuiton-js-jquery/src/site/rst/index.rst.vm
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: sandbox/nuiton-js-jquery/src/site/site_en.xml
===================================================================
--- sandbox/nuiton-js-jquery/src/site/site_en.xml 2013-07-19 21:33:12 UTC (rev 164)
+++ sandbox/nuiton-js-jquery/src/site/site_en.xml 2013-07-19 21:34:13 UTC (rev 165)
@@ -1,8 +1,8 @@
<!--
#%L
Nuiton JS :: JQuery
- $Id:$
- $HeadURL:$
+ $Id$
+ $HeadURL$
%%
Copyright (C) 2012 - 2013 CodeLutin
%%
@@ -45,8 +45,8 @@
<menu ref="parent"/>
- <menu name="Utilisateurs">
- <item name="Accueil" href="index.html"/>
+ <menu name="Users">
+ <item name="Home" href="index.html"/>
</menu>
<menu ref="reports"/>
Property changes on: sandbox/nuiton-js-jquery/src/site/site_en.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
1
0