Nuiton-js-commits
Threads by month
- ----- 2026 -----
- 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
Author: bpoussin
Date: 2013-01-22 14:56:16 +0100 (Tue, 22 Jan 2013)
New Revision: 22
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/22
Log:
ajout de la documentation du plugin maven
Modified:
trunk/src/site/rst/index.rst
Modified: trunk/src/site/rst/index.rst
===================================================================
--- trunk/src/site/rst/index.rst 2013-01-22 13:44:59 UTC (rev 21)
+++ trunk/src/site/rst/index.rst 2013-01-22 13:56:16 UTC (rev 22)
@@ -131,7 +131,61 @@
postProcessors=cssVariables,jsMin
uriLocators=servletContext,uri,classpath
+Utilisation du plugin Maven pour générer les ressources
+=======================================================
+Voici un exemple d'utilisation. La différence avec la configuraiton standard
+est la déclaration de **org.nuiton.js.wro.NuitonJsMavenWroManagerFactory** comme
+wroManagerFactory et la déclation des dépendances vers les ressources js et css::
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>ro.isdc.wro4j</groupId>
+ <artifactId>wro4j-maven-plugin</artifactId>
+ <version>1.6.2</version>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.nuiton.js</groupId>
+ <artifactId>nuiton-js-jquery</artifactId>
+ <version>1.8.3-1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.nuiton.js</groupId>
+ <artifactId>nuiton-js-jqgrid</artifactId>
+ <version>4.4.1-1</version>
+ </dependency>
+ </dependencies>
+
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+
+ <configuration>
+ <targetGroups>MonApp</targetGroups>
+ <minimize>true</minimize>
+ <destinationFolder>${basedir}/src/main/webapp/wro/</destinationFolder>
+ <contextFolder>${basedir}/src/main/webapp/</contextFolder>
+ <wroFile>${basedir}/src/main/webapp/WEB-INF/wro.xml</wroFile>
+ <wroManagerFactory>org.nuiton.js.wro.NuitonJsMavenWroManagerFactory</wroManagerFactory>
+ <extraConfigFile>${basedir}/src/main/webapp/WEB-INF/wro.properties</extraConfigFile>
+ </configuration>
+ </plugin>
+ </plugin>
+ </build>
+
+Vous pouvez alors dans vos pages utiliser::
+
+ <link href="<c:url value='/wro/MonApp.css'/>" rel="stylesheet" type="text/css"/>
+ <script type="text/javascript" src="<c:url value='/wro/MonApp.js'/>"></script>
+
+
Création d'un nouveau module
============================
1
0
r21 - in trunk: . nuiton-js-jqgrid nuiton-js-jquery/src/main/resources/META-INF/nuiton-js nuiton-js-wro nuiton-js-wro/src/main/java/org/nuiton/js/wro
by bpoussin@users.nuiton.org 22 Jan '13
by bpoussin@users.nuiton.org 22 Jan '13
22 Jan '13
Author: bpoussin
Date: 2013-01-22 14:44:59 +0100 (Tue, 22 Jan 2013)
New Revision: 21
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/21
Log:
ajout du WroManagerFactory a utiliser pour le plugin maven
Added:
trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/NuitonJsMavenWroManagerFactory.java
Modified:
trunk/nuiton-js-jqgrid/
trunk/nuiton-js-jquery/src/main/resources/META-INF/nuiton-js/wro-jquery.xml
trunk/nuiton-js-wro/pom.xml
trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/NuitonJsWroConfigurationFactory.java
trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/NuitonJsXmlModelFactory.java
trunk/pom.xml
Property changes on: trunk/nuiton-js-jqgrid
___________________________________________________________________
Added: svn:ignore
+ target
Modified: trunk/nuiton-js-jquery/src/main/resources/META-INF/nuiton-js/wro-jquery.xml
===================================================================
--- trunk/nuiton-js-jquery/src/main/resources/META-INF/nuiton-js/wro-jquery.xml 2013-01-19 11:25:15 UTC (rev 20)
+++ trunk/nuiton-js-jquery/src/main/resources/META-INF/nuiton-js/wro-jquery.xml 2013-01-22 13:44:59 UTC (rev 21)
@@ -1,5 +1,5 @@
<groups xmlns="http://www.isdc.ro/wro">
<group name='jquery'>
- <js>classpath:nuiton-js-jquery/**.js</js>
+ <js>classpath:nuiton-js-jquery/*.js</js>
</group>
</groups>
Modified: trunk/nuiton-js-wro/pom.xml
===================================================================
(Binary files differ)
Property changes on: trunk/nuiton-js-wro/pom.xml
___________________________________________________________________
Deleted: svn:mime-type
- application/xml
Added: 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 (rev 0)
+++ trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/NuitonJsMavenWroManagerFactory.java 2013-01-22 13:44:59 UTC (rev 21)
@@ -0,0 +1,65 @@
+package org.nuiton.js.wro;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+import ro.isdc.wro.manager.factory.standalone.StandaloneContext;
+import ro.isdc.wro.maven.plugin.manager.factory.ConfigurableWroManagerFactory;
+import ro.isdc.wro.model.factory.WroModelFactory;
+
+/**
+ *
+ * @author poussin
+ * @version $Revision$
+ *
+ * Last update: $Date$
+ * by : $Author$
+ */
+public class NuitonJsMavenWroManagerFactory extends ConfigurableWroManagerFactory {
+ protected StandaloneContext standaloneContext;
+ protected File configProperties;
+
+
+ @Override
+ public void initialize(final StandaloneContext standaloneContext) {
+ super.initialize(standaloneContext);
+ this.standaloneContext = standaloneContext;
+ }
+
+ @Override
+ protected WroModelFactory newModelFactory() {
+ return new NuitonJsXmlModelFactory() {
+ @Override
+ protected InputStream getModelResourceAsStream() throws IOException {
+ InputStream stream = new BufferedInputStream(
+ new FileInputStream(standaloneContext.getWroFile()));
+ return stream;
+ }
+ };
+ }
+
+ @Override
+ protected Properties createProperties() {
+ Properties result = new NuitonJsWroConfigurationFactory(){
+ @Override
+ protected String getUserConfigPath() {
+ return configProperties.getAbsolutePath();
+ }
+ @Override
+ protected InputStream loadAsStream(String file) throws Exception {
+ return new BufferedInputStream(new FileInputStream(file));
+ }
+ }.initProperties();
+ return result;
+ }
+
+ @Override
+ public void setExtraConfigFile(final File extraProperties) {
+ super.setExtraConfigFile(extraProperties);
+ this.configProperties = extraProperties;
+ }
+
+}
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-01-19 11:25:15 UTC (rev 20)
+++ trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/NuitonJsWroConfigurationFactory.java 2013-01-22 13:44:59 UTC (rev 21)
@@ -1,5 +1,6 @@
package org.nuiton.js.wro;
+import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
import javax.servlet.FilterConfig;
@@ -18,7 +19,7 @@
* dans la config:
* <li> managerFactoryClassName=org.nuiton.js.wro.NuitonJsWroManagerFactory
* <li> debug=true
- * <li> preProcessors=fallbackCssDataUri,cssUrlRewriting,cssImport,semicolonAppender,cssMin
+ * <li> preProcessors=fallbackCssDataUri,cssUrlRewriting,cssImport,semicolonAppender,cssMinJawr
* <li> postProcessors=cssVariables,jsMin
* <li> uriLocators=servletContext,uri,classpath
*
@@ -72,7 +73,7 @@
String file = getUserConfigPath();
try {
LOG.debug("loading config resource from: {}", file);
- propertyStream = getServletContext().getResourceAsStream(file);
+ propertyStream = loadAsStream(file);
Validate.notNull(propertyStream);
Properties props = new Properties();
props.load(propertyStream);
@@ -86,6 +87,11 @@
return result;
}
+ protected InputStream loadAsStream(String file) throws Exception {
+ InputStream result = getServletContext().getResourceAsStream(file);
+ return result;
+ }
+
protected ServletContext getServletContext() {
ServletContext result;
if (filterConfig != null) {
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-01-19 11:25:15 UTC (rev 20)
+++ trunk/nuiton-js-wro/src/main/java/org/nuiton/js/wro/NuitonJsXmlModelFactory.java 2013-01-22 13:44:59 UTC (rev 21)
@@ -48,7 +48,7 @@
}
}
- // on continue avec le fichier par defaut /WEB-INF/wro.properties
+ // on continue avec le fichier par defaut /WEB-INF/wro.xml
try {
// on ne reutilise pas create du super car la methode commence
// par un new model :(. Or on veut conserve les imports qui viennent
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2013-01-19 11:25:15 UTC (rev 20)
+++ trunk/pom.xml 2013-01-22 13:44:59 UTC (rev 21)
@@ -51,6 +51,12 @@
</dependency>
<dependency>
+ <groupId>ro.isdc.wro4j</groupId>
+ <artifactId>wro4j-maven-plugin</artifactId>
+ <version>${wroVersion}</version>
+ </dependency>
+
+ <dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>${servletApiVersion}</version>
@@ -111,7 +117,7 @@
<properties>
- <wroVersion>1.5.0</wroVersion>
+ <wroVersion>1.6.2</wroVersion>
<slf4jVersion>1.7.2</slf4jVersion>
<servletApiVersion>2.5</servletApiVersion>
1
0
Author: bpoussin
Date: 2013-01-19 12:25:15 +0100 (Sat, 19 Jan 2013)
New Revision: 20
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/20
Log:
ajout de la lib jqgrid 4.4.1
Added:
trunk/nuiton-js-jqgrid/
trunk/nuiton-js-jqgrid/LICENSE.txt
trunk/nuiton-js-jqgrid/README.txt
trunk/nuiton-js-jqgrid/changelog.txt
trunk/nuiton-js-jqgrid/generate-i18n-group.sh
trunk/nuiton-js-jqgrid/pom.xml
trunk/nuiton-js-jqgrid/src/
trunk/nuiton-js-jqgrid/src/main/
trunk/nuiton-js-jqgrid/src/main/resources/
trunk/nuiton-js-jqgrid/src/main/resources/META-INF/
trunk/nuiton-js-jqgrid/src/main/resources/META-INF/nuiton-js/
trunk/nuiton-js-jqgrid/src/main/resources/META-INF/nuiton-js/wro-jqgrid.xml
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/css/
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/css/ellipsis-xbl.xml
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/css/ui.jqgrid.css
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ar.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-bg.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-bg1251.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-cat.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-cn.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-cs.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-da.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-de.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-dk.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-el.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-en.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-es.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-fa.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-fi.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-fr.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-gl.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-he.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-hr.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-hr1250.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-hu.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-is.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-it.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ja.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-kr.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-lt.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-mne.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-nl.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-no.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-pl.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-pt-br.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-pt.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ro.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ru.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sk.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sr-latin.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sr.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sv.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-th.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-tr.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-tw.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ua.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/jquery.jqGrid.src.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/grid.addons.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/grid.postext.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/grid.setcolumns.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/jquery.contextmenu.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/jquery.searchFilter.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/jquery.tablednd.js
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/searchFilter.css
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/ui.multiselect.css
trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/ui.multiselect.js
trunk/nuiton-js-jqgrid/src/site/
trunk/nuiton-js-jqgrid/src/site/rst/
trunk/nuiton-js-jqgrid/src/site/rst/index.rst
trunk/nuiton-js-jqgrid/src/site/site_fr.xml
Modified:
trunk/pom.xml
Added: trunk/nuiton-js-jqgrid/LICENSE.txt
===================================================================
--- trunk/nuiton-js-jqgrid/LICENSE.txt (rev 0)
+++ trunk/nuiton-js-jqgrid/LICENSE.txt 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,166 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
+
Added: trunk/nuiton-js-jqgrid/README.txt
===================================================================
--- trunk/nuiton-js-jqgrid/README.txt (rev 0)
+++ trunk/nuiton-js-jqgrid/README.txt 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1 @@
+
Added: trunk/nuiton-js-jqgrid/changelog.txt
===================================================================
--- trunk/nuiton-js-jqgrid/changelog.txt (rev 0)
+++ trunk/nuiton-js-jqgrid/changelog.txt 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,2 @@
+Please refer to the release note :
+ http://maven-site.nuiton.org/nuiton-js/changes-report.html
Added: trunk/nuiton-js-jqgrid/generate-i18n-group.sh
===================================================================
--- trunk/nuiton-js-jqgrid/generate-i18n-group.sh (rev 0)
+++ trunk/nuiton-js-jqgrid/generate-i18n-group.sh 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# Permet de genere le code XML necessaire pour la declaration des themes
+# il faut ensuite mettre ce qui est genere dans le fichier META-INF/nuiton-js/nuiton-js-jquery-ui.xml
+#
+for t in src/main/resources/nuiton-js-jqgrid/js/i18n/*; do
+ f=$(basename $t)
+ n=$(basename $t .js | sed 's/grid.locale-//g')
+ echo -e " <group name='jqgrid-$n'>\n <css>classpath:nuiton-js-jqgrid/js/i18n/$f</css>\n </group>\n"
+done
Property changes on: trunk/nuiton-js-jqgrid/generate-i18n-group.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/nuiton-js-jqgrid/pom.xml
===================================================================
--- trunk/nuiton-js-jqgrid/pom.xml (rev 0)
+++ trunk/nuiton-js-jqgrid/pom.xml 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- ************************************************************* -->
+ <!-- *** POM Relationships *************************************** -->
+ <!-- ************************************************************* -->
+
+ <parent>
+ <groupId>org.nuiton.js</groupId>
+ <artifactId>nuiton-js-parent</artifactId>
+ <version>0.1-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>nuiton-js-jqgrid</artifactId>
+ <version>4.4.1-1-SNAPSHOT</version>
+
+ <name>Nuiton JS :: jqGrid</name>
+ <description>jqGrid jar packaging</description>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.nuiton.js</groupId>
+ <artifactId>nuiton-js-jquery</artifactId>
+ <version>[1.7.2,)</version> <!-- jqgrid compatible avec jquery >= 1.8 -->
+ <scope>runtime</scope>
+ </dependency>
+
+ </dependencies>
+
+</project>
Added: trunk/nuiton-js-jqgrid/src/main/resources/META-INF/nuiton-js/wro-jqgrid.xml
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/META-INF/nuiton-js/wro-jqgrid.xml (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/META-INF/nuiton-js/wro-jqgrid.xml 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,219 @@
+<groups xmlns="http://www.isdc.ro/wro">
+
+ <import>classpath:META-INF/nuiton-js/wro-jquery.xml</import>
+
+ <group name='jqgrid'>
+ <group-ref>jquery</group-ref>
+ <group-ref>jqgrid-only</group-ref>
+ </group>
+
+ <group name='jqgrid-only'>
+ <css>classpath:nuiton-js-jqgrid/css/*.css</css>
+ <js>classpath:nuiton-js-jqgrid/js/*.js</js>
+ </group>
+
+ <!--
+ | plugin
+ +-->
+
+ <group name='jqgrid-addons'>
+ <js>classpath:nuiton-js-jqgrid/plugins/grid.addons.js</js>
+ </group>
+
+ <group name='jqgrid-postext'>
+ <js>classpath:nuiton-js-jqgrid/plugins/grid.postext.js</js>
+ </group>
+
+ <group name='jqgrid-setcolumns'>
+ <js>classpath:nuiton-js-jqgrid/plugins/grid.setcolumns.js</js>
+ </group>
+
+ <group name='jqgrid-contextmenu'>
+ <js>classpath:nuiton-js-jqgrid/plugins/jquery.contextmenu.js</js>
+ </group>
+
+ <group name='jqgrid-searchFilter'>
+ <css>classpath:nuiton-js-jqgrid/plugins/searchFilter.css</css>
+ <js>classpath:nuiton-js-jqgrid/plugins/jquery.searchFilter.js</js>
+ </group>
+
+ <group name='jqgrid-tablednd'>
+ <js>classpath:nuiton-js-jqgrid/plugins/jquery.tablednd.js</js>
+ </group>
+
+ <group name='jqgrid-multiselect'>
+ <css>classpath:nuiton-js-jqgrid/plugins/ui.multiselect.css</css>
+ <js>classpath:nuiton-js-jqgrid/plugins/ui.multiselect.js</js>
+ </group>
+
+
+ <!--
+ | le reste du fichier est genere par
+ | generate-i18n-group.sh a la racine du module
+ +-->
+
+ <group name='jqgrid-ar'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-ar.js</css>
+ </group>
+
+ <group name='jqgrid-bg'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-bg.js</css>
+ </group>
+
+ <group name='jqgrid-bg1251'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-bg1251.js</css>
+ </group>
+
+ <group name='jqgrid-cat'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-cat.js</css>
+ </group>
+
+ <group name='jqgrid-cn'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-cn.js</css>
+ </group>
+
+ <group name='jqgrid-cs'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-cs.js</css>
+ </group>
+
+ <group name='jqgrid-da'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-da.js</css>
+ </group>
+
+ <group name='jqgrid-de'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-de.js</css>
+ </group>
+
+ <group name='jqgrid-dk'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-dk.js</css>
+ </group>
+
+ <group name='jqgrid-el'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-el.js</css>
+ </group>
+
+ <group name='jqgrid-en'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-en.js</css>
+ </group>
+
+ <group name='jqgrid-es'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-es.js</css>
+ </group>
+
+ <group name='jqgrid-fa'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-fa.js</css>
+ </group>
+
+ <group name='jqgrid-fi'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-fi.js</css>
+ </group>
+
+ <group name='jqgrid-fr'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-fr.js</css>
+ </group>
+
+ <group name='jqgrid-gl'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-gl.js</css>
+ </group>
+
+ <group name='jqgrid-he'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-he.js</css>
+ </group>
+
+ <group name='jqgrid-hr'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-hr.js</css>
+ </group>
+
+ <group name='jqgrid-hr1250'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-hr1250.js</css>
+ </group>
+
+ <group name='jqgrid-hu'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-hu.js</css>
+ </group>
+
+ <group name='jqgrid-is'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-is.js</css>
+ </group>
+
+ <group name='jqgrid-it'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-it.js</css>
+ </group>
+
+ <group name='jqgrid-ja'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-ja.js</css>
+ </group>
+
+ <group name='jqgrid-kr'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-kr.js</css>
+ </group>
+
+ <group name='jqgrid-lt'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-lt.js</css>
+ </group>
+
+ <group name='jqgrid-mne'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-mne.js</css>
+ </group>
+
+ <group name='jqgrid-nl'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-nl.js</css>
+ </group>
+
+ <group name='jqgrid-no'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-no.js</css>
+ </group>
+
+ <group name='jqgrid-pl'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-pl.js</css>
+ </group>
+
+ <group name='jqgrid-pt-br'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-pt-br.js</css>
+ </group>
+
+ <group name='jqgrid-pt'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-pt.js</css>
+ </group>
+
+ <group name='jqgrid-ro'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-ro.js</css>
+ </group>
+
+ <group name='jqgrid-ru'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-ru.js</css>
+ </group>
+
+ <group name='jqgrid-sk'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-sk.js</css>
+ </group>
+
+ <group name='jqgrid-sr-latin'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-sr-latin.js</css>
+ </group>
+
+ <group name='jqgrid-sr'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-sr.js</css>
+ </group>
+
+ <group name='jqgrid-sv'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-sv.js</css>
+ </group>
+
+ <group name='jqgrid-th'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-th.js</css>
+ </group>
+
+ <group name='jqgrid-tr'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-tr.js</css>
+ </group>
+
+ <group name='jqgrid-tw'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-tw.js</css>
+ </group>
+
+ <group name='jqgrid-ua'>
+ <css>classpath:nuiton-js-jqgrid/js/i18n/grid.locale-ua.js</css>
+ </group>
+
+</groups>
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/css/ellipsis-xbl.xml
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/css/ellipsis-xbl.xml (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/css/ellipsis-xbl.xml 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<bindings
+ xmlns="http://www.mozilla.org/xbl"
+ xmlns:xbl="http://www.mozilla.org/xbl"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+ <binding id="ellipsis">
+ <content>
+ <xul:window><!-- xul:window tag required for FF2 -->
+ <xul:description crop="end" xbl:inherits="value=xbl:text"><children/></xul:description>
+ </xul:window>
+ </content>
+ </binding>
+</bindings>
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/css/ui.jqgrid.css
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/css/ui.jqgrid.css (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/css/ui.jqgrid.css 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,144 @@
+/*Grid*/
+.ui-jqgrid {position: relative;}
+.ui-jqgrid .ui-jqgrid-view {position: relative;left:0px; top: 0px; padding: .0em; 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-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-hbox {float: left; padding-right: 20px;}
+.ui-jqgrid .ui-jqgrid-htable {table-layout:fixed;margin:0em;}
+.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-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;}
+.ui-jqgrid .ui-jqgrid-resize {height:20px !important;position: relative; cursor :e-resize;display: inline;overflow: hidden;}
+.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-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}
+/* 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 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;}
+.ui-jqgrid tr.jqgfirstrow td {padding: 0 2px 0 2px;border-right-width: 1px; border-right-style: solid;}
+.ui-jqgrid tr.jqgroup 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;}
+.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 .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 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-pager-control {position: relative;}
+.ui-jqgrid .ui-pg-table {position: relative; padding-bottom:2px; width:auto; margin: 0em;}
+.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-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-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 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 .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 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-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;}
+.ui-jqgrid .jqgrid-overlay {display:none;z-index:100;}
+* html .jqgrid-overlay {width: expression(this.parentNode.offsetWidth+'px');height: expression(this.parentNode.offsetHeight+'px');}
+* .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; }
+/*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; }
+.ui-jqdialog .ui-jqdialog-title { margin: .1em 0 .2em; }
+.ui-jqdialog .ui-jqdialog-titlebar-close { position: absolute; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
+
+.ui-jqdialog .ui-jqdialog-titlebar-close span { display: block; margin: 1px; }
+.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;}
+/* 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;}
+.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 input.FormElement {padding:.3em}
+.ui-jqdialog-content .data-line {padding-top:.1em;border: 0px 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 .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; }
+.fm-button-icon-right { padding-right: 1.9em; }
+.fm-button-icon-left .ui-icon { right: auto; left: .2em; margin-left: 0; position: absolute; top: 50%; margin-top: -8px; }
+.fm-button-icon-right .ui-icon { left: auto; right: .2em; margin-left: 0; position: absolute; top: 50%; margin-top: -8px;}
+#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;}
+/* 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 {
+ margin: -1px;
+}
+/* Tree Grid */
+.ui-jqgrid .tree-wrap {float: left; position: relative;height: 18px;white-space: nowrap;overflow: hidden;}
+.ui-jqgrid .tree-minus {position: absolute; height: 18px; width: 18px; overflow: hidden;}
+.ui-jqgrid .tree-plus {position: absolute; height: 18px; width: 18px; overflow: hidden;}
+.ui-jqgrid .tree-leaf {position: absolute; height: 18px; width: 18px;overflow: hidden;}
+.ui-jqgrid .treeclick {cursor: pointer;}
+/* moda dialog */
+* iframe.jqm {position:absolute;top:0;left:0;z-index:-1;width: expression(this.parentNode.offsetWidth+'px');height: expression(this.parentNode.offsetHeight+'px');}
+.ui-jqgrid-dnd tr td {border-right-width: 1px; border-right-color: inherit; border-right-style: solid; height:20px}
+/* 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 .tree-wrap-ltr {float: left;}
+.ui-jqgrid .tree-wrap-rtl {float: right;}
+.ui-jqgrid .ui-ellipsis {text-overflow:ellipsis;}
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ar.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ar.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ar.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,127 @@
+;(function($){
+/**
+ * jqGrid Arabic Translation
+ *
+ * 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: "تسجيل {0} - {1} على {2}",
+ emptyrecords: "لا يوجد تسجيل",
+ loadtext: "تحميل...",
+ pgtext : "صفحة {0} على {1}"
+ },
+ search : {
+ caption: "بحث...",
+ Find: "بحث",
+ Reset: "إلغاء",
+ odata : ['يساوي', 'يختلف', 'أقل', 'أقل أو يساوي','أكبر','أكبر أو يساوي', 'يبدأ بـ','لا يبدأ بـ','est dans',"n'est pas dans",'ينته بـ','لا ينته بـ','يحتوي','لا يحتوي'],
+ groupOps: [ { op: "مع", text: "الكل" }, { op: "أو", text: "لا أحد" } ],
+ matchText: " توافق",
+ rulesText: " قواعد"
+ },
+ edit : {
+ addCaption: "اضافة",
+ editCaption: "تحديث",
+ bSubmit: "تثبيث",
+ bCancel: "إلغاء",
+ bClose: "غلق",
+ saveData: "تغيرت المعطيات هل تريد التسجيل ?",
+ bYes: "نعم",
+ bNo: "لا",
+ bExit: "إلغاء",
+ msg: {
+ required: "خانة إجبارية",
+ number: "سجل رقم صحيح",
+ minValue: "يجب أن تكون القيمة أكبر أو تساوي 0",
+ maxValue: "يجب أن تكون القيمة أقل أو تساوي 0",
+ email: "بريد غير صحيح",
+ integer: "سجل عدد طبييعي صحيح",
+ url: "ليس عنوانا صحيحا. البداية الصحيحة ('http://' أو 'https://')",
+ nodefined : " ليس محدد!",
+ novalue : " قيمة الرجوع مطلوبة!",
+ customarray : "يجب على الدالة الشخصية أن تنتج جدولا",
+ customfcheck : "الدالة الشخصية مطلوبة في حالة التحقق الشخصي"
+ }
+ },
+ view : {
+ caption: "رأيت التسجيلات",
+ bClose: "غلق"
+ },
+ del : {
+ caption: "حذف",
+ msg: "حذف التسجيلات المختارة ?",
+ bSubmit: "حذف",
+ bCancel: "إلغاء"
+ },
+ nav : {
+ edittext: " ",
+ edittitle: "تغيير التسجيل المختار",
+ addtext:" ",
+ addtitle: "إضافة تسجيل",
+ deltext: " ",
+ deltitle: "حذف التسجيل المختار",
+ searchtext: " ",
+ searchtitle: "بحث عن تسجيل",
+ refreshtext: "",
+ refreshtitle: "تحديث الجدول",
+ alertcap: "تحذير",
+ alerttext: "يرجى إختيار السطر",
+ viewtext: "",
+ viewtitle: "إظهار السطر المختار"
+ },
+ col : {
+ caption: "إظهار/إخفاء الأعمدة",
+ bSubmit: "تثبيث",
+ bCancel: "إلغاء"
+ },
+ errors : {
+ errcap : "خطأ",
+ nourl : "لا يوجد عنوان محدد",
+ norecords: "لا يوجد تسجيل للمعالجة",
+ model : "عدد العناوين (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: [
+ "الأحد", "الإثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت",
+ "الأحد", "الإثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"
+ ],
+ monthNames: [
+ "جانفي", "فيفري", "مارس", "أفريل", "ماي", "جوان", "جويلية", "أوت", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر",
+ "جانفي", "فيفري", "مارس", "أفريل", "ماي", "جوان", "جويلية", "أوت", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"
+ ],
+ AmPm : ["صباحا","مساءا","صباحا","مساءا"],
+ S: function (j) {return j == 1 ? 'er' : 'e';},
+ 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);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-bg.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-bg.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-bg.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,133 @@
+;(function($){
+/**
+ * jqGrid Bulgarian 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: "{0} - {1} от {2}",
+ emptyrecords: "Няма запис(и)",
+ loadtext: "Зареждам...",
+ pgtext : "Стр. {0} от {1}"
+ },
+ search : {
+ caption: "Търсене...",
+ Find: "Намери",
+ Reset: "Изчисти",
+ odata : ['равно', 'различно', 'по-малко', 'по-малко или=','по-голямо','по-голямо или =', 'започва с','не започва с','се намира в','не се намира в','завършва с','не завършава с','съдържа', 'не съдържа' ],
+ groupOps: [ { op: "AND", text: " И " }, { op: "OR", text: "ИЛИ" } ],
+ matchText: " включи",
+ rulesText: " клауза"
+ },
+ edit : {
+ addCaption: "Нов Запис",
+ editCaption: "Редакция Запис",
+ bSubmit: "Запиши",
+ bCancel: "Изход",
+ bClose: "Затвори",
+ saveData: "Данните са променени! Да съхраня ли промените?",
+ bYes : "Да",
+ bNo : "Не",
+ bExit : "Отказ",
+ msg: {
+ required:"Полето е задължително",
+ number:"Въведете валидно число!",
+ minValue:"стойността трябва да е по-голяма или равна от",
+ maxValue:"стойността трябва да е по-малка или равна от",
+ email: "не е валиден ел. адрес",
+ integer: "Въведете валидно цяло число",
+ date: "Въведете валидна дата",
+ url: "e невалиден URL. Изискава се префикс('http://' или 'https://')",
+ nodefined : " е недефинирана!",
+ novalue : " изисква връщане на стойност!",
+ customarray : "Потреб. Функция трябва да върне масив!",
+ customfcheck : "Потребителска функция е задължителна при този тип елемент!"
+ }
+ },
+ view : {
+ caption: "Преглед запис",
+ bClose: "Затвори"
+ },
+ del : {
+ caption: "Изтриване",
+ msg: "Да изтрия ли избраният запис?",
+ bSubmit: "Изтрий",
+ bCancel: "Отказ"
+ },
+ nav : {
+ edittext: " ",
+ edittitle: "Редакция избран запис",
+ addtext:" ",
+ addtitle: "Добавяне нов запис",
+ deltext: " ",
+ deltitle: "Изтриване избран запис",
+ searchtext: " ",
+ searchtitle: "Търсене запис(и)",
+ refreshtext: "",
+ refreshtitle: "Обнови таблица",
+ alertcap: "Предупреждение",
+ alerttext: "Моля, изберете запис",
+ viewtext: "",
+ viewtitle: "Преглед избран запис"
+ },
+ col : {
+ caption: "Избери колони",
+ bSubmit: "Ок",
+ bCancel: "Изход"
+ },
+ errors : {
+ errcap : "Грешка",
+ nourl : "Няма посочен url адрес",
+ norecords: "Няма запис за обработка",
+ model : "Модела не съответства на имената!"
+ },
+ 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: [
+ "Нед", "Пон", "Вт", "Ср", "Чет", "Пет", "Съб",
+ "Неделя", "Понеделник", "Вторник", "Сряда", "Четвъртък", "Петък", "Събота"
+ ],
+ monthNames: [
+ "Яну", "Фев", "Мар", "Апр", "Май", "Юни", "Юли", "Авг", "Сеп", "Окт", "Нов", "Дек",
+ "Януари", "Февруари", "Март", "Април", "Май", "Юни", "Юли", "Август", "Септември", "Октомври", "Ноември", "Декември"
+ ],
+ AmPm : ["","","",""],
+ S: function (j) {
+ if(j==7 || j==8 || j== 27 || j== 28) {
+ return 'ми';
+ }
+ return ['ви', 'ри', 'ти'][Math.min((j - 1) % 10, 2)];
+ },
+ 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);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-bg1251.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-bg1251.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-bg1251.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,133 @@
+;(function($){
+/**
+ * jqGrid Bulgarian 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: "{0} - {1} �� {2}",
+ emptyrecords: "���� �����(�)",
+ loadtext: "��������...",
+ pgtext : "���. {0} �� {1}"
+ },
+ search : {
+ caption: "�������...",
+ Find: "������",
+ Reset: "�������",
+ odata : ['�����', '��������', '��-�����', '��-����� ���=','��-������','��-������ ��� =', '������� �','�� ������� �','�� ������ �','�� �� ������ �','�������� �','�� ��������� �','�������', '�� �������' ],
+ groupOps: [ { op: "AND", text: " � " }, { op: "OR", text: "���" } ],
+ matchText: " ������",
+ rulesText: " ������"
+ },
+ edit : {
+ addCaption: "��� �����",
+ editCaption: "�������� �����",
+ bSubmit: "������",
+ bCancel: "�����",
+ bClose: "�������",
+ saveData: "������� �� ���������! �� ������� �� ���������?",
+ bYes : "��",
+ bNo : "��",
+ bExit : "�����",
+ msg: {
+ required:"������ � ������������",
+ number:"�������� ������� �����!",
+ minValue:"���������� ������ �� � ��-������ ��� ����� ��",
+ maxValue:"���������� ������ �� � ��-����� ��� ����� ��",
+ email: "�� � ������� ��. �����",
+ integer: "�������� ������� ���� �����",
+ date: "�������� ������� ����",
+ url: "e ��������� URL. �������� �� �������('http://' ��� 'https://')",
+ nodefined : " � ������������!",
+ novalue : " ������� ������� �� ��������!",
+ customarray : "������. ������� ������ �� ����� �����!",
+ customfcheck : "������������� ������� � ������������ ��� ���� ��� �������!"
+ }
+ },
+ view : {
+ caption: "������� �����",
+ bClose: "�������"
+ },
+ del : {
+ caption: "���������",
+ msg: "�� ������ �� ��������� �����?",
+ bSubmit: "������",
+ bCancel: "�����"
+ },
+ nav : {
+ edittext: " ",
+ edittitle: "�������� ������ �����",
+ addtext:" ",
+ addtitle: "�������� ��� �����",
+ deltext: " ",
+ deltitle: "��������� ������ �����",
+ searchtext: " ",
+ searchtitle: "������� �����(�)",
+ refreshtext: "",
+ refreshtitle: "������ �������",
+ alertcap: "��������������",
+ alerttext: "����, �������� �����",
+ viewtext: "",
+ viewtitle: "������� ������ �����"
+ },
+ col : {
+ caption: "����� ������",
+ bSubmit: "��",
+ bCancel: "�����"
+ },
+ errors : {
+ errcap : "������",
+ nourl : "���� ������� url �����",
+ norecords: "���� ����� �� ���������",
+ model : "������ �� ����������� �� �������!"
+ },
+ 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: [
+ "���", "���", "��", "��", "���", "���", "���",
+ "������", "����������", "�������", "�����", "���������", "�����", "������"
+ ],
+ monthNames: [
+ "���", "���", "���", "���", "���", "���", "���", "���", "���", "���", "���", "���",
+ "������", "��������", "����", "�����", "���", "���", "���", "������", "���������", "��������", "�������", "��������"
+ ],
+ AmPm : ["","","",""],
+ S: function (j) {
+ if(j==7 || j==8 || j== 27 || j== 28) {
+ return '��';
+ }
+ return ['��', '��', '��'][Math.min((j - 1) % 10, 2)];
+ },
+ 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);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-cat.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-cat.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-cat.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,129 @@
+;(function($){
+/**
+ * jqGrid Catalan Translation
+ * Traducció jqGrid en Catatà per Faserline, S.L.
+ * http://www.faserline.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: "Mostrant {0} - {1} de {2}",
+ emptyrecords: "Sense registres que mostrar",
+ loadtext: "Carregant...",
+ pgtext : "Pàgina {0} de {1}"
+ },
+ search : {
+ 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"
+ },
+ edit : {
+ addCaption: "Afegir registre",
+ editCaption: "Modificar registre",
+ bSubmit: "Guardar",
+ bCancel: "Cancelar",
+ bClose: "Tancar",
+ saveData: "Les dades han canviat. Guardar canvis?",
+ bYes : "Yes",
+ bNo : "No",
+ bExit : "Cancel",
+ msg: {
+ required:"Camp obligatori",
+ number:"Introdueixi un nombre",
+ minValue:"El valor ha de ser major o igual que ",
+ maxValue:"El valor ha de ser menor o igual a ",
+ email: "no és una direcció de correu vàlida",
+ integer: "Introdueixi un valor enter",
+ date: "Introdueixi una data correcta ",
+ url: "no és una URL vàlida. Prefix requerit ('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: "Veure registre",
+ bClose: "Tancar"
+ },
+ del : {
+ caption: "Eliminar",
+ msg: "¿Desitja eliminar els registres seleccionats?",
+ bSubmit: "Eliminar",
+ bCancel: "Cancelar"
+ },
+ nav : {
+ edittext: " ",
+ edittitle: "Modificar fila seleccionada",
+ addtext:" ",
+ addtitle: "Agregar nova fila",
+ deltext: " ",
+ deltitle: "Eliminar fila seleccionada",
+ searchtext: " ",
+ searchtitle: "Cercar informació",
+ refreshtext: "",
+ refreshtitle: "Refrescar taula",
+ alertcap: "Avís",
+ alerttext: "Seleccioni una fila",
+ viewtext: " ",
+ viewtitle: "Veure fila seleccionada"
+ },
+// setcolumns module
+ col : {
+ caption: "Mostrar/ocultar columnes",
+ bSubmit: "Enviar",
+ bCancel: "Cancelar"
+ },
+ errors : {
+ errcap : "Error",
+ nourl : "No s'ha especificat una URL",
+ norecords: "No hi ha dades per processar",
+ model : "Les columnes de noms són diferents de les columnes del model"
+ },
+ 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: [
+ "Dg", "Dl", "Dt", "Dc", "Dj", "Dv", "Ds",
+ "Diumenge", "Dilluns", "Dimarts", "Dimecres", "Dijous", "Divendres", "Dissabte"
+ ],
+ monthNames: [
+ "Gen", "Febr", "Març", "Abr", "Maig", "Juny", "Jul", "Ag", "Set", "Oct", "Nov", "Des",
+ "Gener", "Febrer", "Març", "Abril", "Maig", "Juny", "Juliol", "Agost", "Setembre", "Octubre", "Novembre", "Desembre"
+ ],
+ 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: '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: 'show',
+ target: '',
+ checkbox : {disabled:true},
+ idName : 'id'
+ }
+});
+})(jQuery);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-cn.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-cn.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-cn.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,133 @@
+;(function($){
+/**
+ * jqGrid Chinese Translation for v4.2
+ * henryyan 2011.11.30
+ * http://www.wsria.com
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * update 2011.11.30
+ * add double u3000 SPACE for search:odata to fix SEARCH box display err when narrow width from only use of eq/ne/cn/in/lt/gt operator under IE6/7
+**/
+$.jgrid = $.jgrid || {};
+$.extend($.jgrid,{
+ defaults : {
+ recordtext: "{0} - {1}\u3000共 {2} 条", // 共字前是全角空格
+ emptyrecords: "无数据显示",
+ loadtext: "读取中...",
+ pgtext : " {0} 共 {1} 页"
+ },
+ search : {
+ 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: " 规则"
+ },
+ edit : {
+ addCaption: "添加记录",
+ editCaption: "编辑记录",
+ bSubmit: "提交",
+ bCancel: "取消",
+ bClose: "关闭",
+ saveData: "数据已改变,是否保存?",
+ bYes : "是",
+ bNo : "否",
+ bExit : "取消",
+ msg: {
+ required:"此字段必需",
+ number:"请输入有效数字",
+ minValue:"输值必须大于等于 ",
+ maxValue:"输值必须小于等于 ",
+ email: "这不是有效的e-mail地址",
+ integer: "请输入有效整数",
+ date: "请输入有效时间",
+ url: "无效网址。前缀必须为 ('http://' 或 'https://')",
+ nodefined : " 未定义!",
+ novalue : " 需要返回值!",
+ customarray : "自定义函数需要返回数组!",
+ customfcheck : "Custom function should be present in case of custom checking!"
+
+ }
+ },
+ view : {
+ caption: "查看记录",
+ bClose: "关闭"
+ },
+ del : {
+ caption: "删除",
+ msg: "删除所选记录?",
+ bSubmit: "删除",
+ bCancel: "取消"
+ },
+ nav : {
+ edittext: "",
+ edittitle: "编辑所选记录",
+ addtext:"",
+ addtitle: "添加新记录",
+ deltext: "",
+ deltitle: "删除所选记录",
+ searchtext: "",
+ searchtitle: "查找",
+ refreshtext: "",
+ refreshtitle: "刷新表格",
+ alertcap: "注意",
+ alerttext: "请选择记录",
+ viewtext: "",
+ viewtitle: "查看所选记录"
+ },
+ col : {
+ caption: "选择列",
+ bSubmit: "确定",
+ bCancel: "取消"
+ },
+ errors : {
+ errcap : "错误",
+ nourl : "没有设置url",
+ norecords: "没有要处理的记录",
+ model : "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: [
+ "Sun", "Mon", "Tue", "Wed", "Thr", "Fri", "Sat",
+ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
+ ],
+ monthNames: [
+ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
+ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
+ ],
+ 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: 'm-d-Y',
+ masks : {
+ ISO8601Long:"Y-m-d H:i:s",
+ ISO8601Short:"Y-m-d",
+ ShortDate: "Y/j/n",
+ 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);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-cs.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-cs.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-cs.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,129 @@
+;(function($){
+/**
+ * jqGrid Czech Translation
+ * Pavel Jirak pavel.jirak(a)jipas.cz
+ * doplnil Thomas Wagner xwagne01(a)stud.fit.vutbr.cz
+ * 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: "Zobrazeno {0} - {1} z {2} záznamů",
+ emptyrecords: "Nenalezeny žádné záznamy",
+ loadtext: "Načítám...",
+ pgtext : "Strana {0} z {1}"
+ },
+ search : {
+ 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"
+ },
+ edit : {
+ addCaption: "Přidat záznam",
+ editCaption: "Editace záznamu",
+ bSubmit: "Uložit",
+ bCancel: "Storno",
+ bClose: "Zavřít",
+ saveData: "Data byla změněna! Uložit změny?",
+ bYes : "Ano",
+ bNo : "Ne",
+ bExit : "Zrušit",
+ msg: {
+ required:"Pole je vyžadováno",
+ number:"Prosím, vložte validní číslo",
+ minValue:"hodnota musí být větší než nebo rovná ",
+ maxValue:"hodnota musí být menší než nebo rovná ",
+ email: "není validní e-mail",
+ integer: "Prosím, vložte celé číslo",
+ date: "Prosím, vložte validní datum",
+ url: "není platnou URL. Vyžadován prefix ('http://' or 'https://')",
+ nodefined : " není definován!",
+ novalue : " je vyžadována návratová hodnota!",
+ customarray : "Custom function mělá vrátit pole!",
+ customfcheck : "Custom function by měla být přítomna v případě custom checking!"
+ }
+ },
+ view : {
+ caption: "Zobrazit záznam",
+ bClose: "Zavřít"
+ },
+ del : {
+ caption: "Smazat",
+ msg: "Smazat vybraný(é) záznam(y)?",
+ bSubmit: "Smazat",
+ bCancel: "Storno"
+ },
+ nav : {
+ edittext: " ",
+ edittitle: "Editovat vybraný řádek",
+ addtext:" ",
+ addtitle: "Přidat nový řádek",
+ deltext: " ",
+ deltitle: "Smazat vybraný záznam ",
+ searchtext: " ",
+ searchtitle: "Najít záznamy",
+ refreshtext: "",
+ refreshtitle: "Obnovit tabulku",
+ alertcap: "Varování",
+ alerttext: "Prosím, vyberte řádek",
+ viewtext: "",
+ viewtitle: "Zobrazit vybraný řádek"
+ },
+ col : {
+ caption: "Zobrazit/Skrýt sloupce",
+ bSubmit: "Uložit",
+ bCancel: "Storno"
+ },
+ errors : {
+ errcap : "Chyba",
+ nourl : "Není nastavena url",
+ norecords: "Žádné záznamy ke zpracování",
+ model : "Délka 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: [
+ "Ne", "Po", "Út", "St", "Čt", "Pá", "So",
+ "Neděle", "Pondělí", "Úterý", "Středa", "Čtvrtek", "Pátek", "Sobota"
+ ],
+ monthNames: [
+ "Led", "Úno", "Bře", "Dub", "Kvě", "Čer", "Čvc", "Srp", "Zář", "Říj", "Lis", "Pro",
+ "Leden", "Únor", "Březen", "Duben", "Květen", "Červen", "Červenec", "Srpen", "Září", "Říjen", "Listopad", "Prosinec"
+ ],
+ AmPm : ["do","od","DO","OD"],
+ 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',
+ 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);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-da.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-da.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-da.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,129 @@
+;(function($){
+/**
+ * jqGrid Danish Translation
+ * Aesiras A/S
+ * http://www.aesiras.dk
+ * 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: "Vis {0} - {1} of {2}",
+ emptyrecords: "Ingen linjer fundet",
+ loadtext: "Henter...",
+ pgtext : "Side {0} af {1}"
+ },
+ search : {
+ 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"
+ },
+ edit : {
+ addCaption: "Tilføj",
+ editCaption: "Ret",
+ bSubmit: "Send",
+ bCancel: "Annuller",
+ bClose: "Luk",
+ saveData: "Data er ændret. Gem data?",
+ bYes : "Ja",
+ bNo : "Nej",
+ bExit : "Fortryd",
+ 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 gyldig email",
+ integer: "Indtast venligst et gyldigt heltal",
+ date: "Indtast venligst en gyldig datoværdi",
+ url: "er ugyldig URL. Prefix mangler ('http://' or 'https://')",
+ nodefined : " er ikke defineret!",
+ novalue : " returværdi kræves!",
+ customarray : "Custom function should return array!",
+ customfcheck : "Custom function should be present in case of custom checking!"
+ }
+ },
+ view : {
+ caption: "Vis linje",
+ bClose: "Luk"
+ },
+ del : {
+ caption: "Slet",
+ msg: "Slet valgte linje(r)?",
+ bSubmit: "Slet",
+ bCancel: "Fortryd"
+ },
+ nav : {
+ edittext: " ",
+ edittitle: "Rediger valgte linje",
+ addtext:" ",
+ addtitle: "Tilføj ny linje",
+ deltext: " ",
+ deltitle: "Slet valgte linje",
+ searchtext: " ",
+ searchtitle: "Find linjer",
+ refreshtext: "",
+ refreshtitle: "Indlæs igen",
+ alertcap: "Advarsel",
+ alerttext: "Vælg venligst linje",
+ viewtext: "",
+ viewtitle: "Vis valgte linje"
+ },
+ col : {
+ caption: "Vis/skjul kolonner",
+ bSubmit: "Opdatere",
+ bCancel: "Fortryd"
+ },
+ errors : {
+ errcap : "Fejl",
+ nourl : "Ingen url valgt",
+ norecords: "Ingen linjer 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", "Tir", "Ons", "Tor", "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'
+ }
+});
+// DA
+})(jQuery);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-de.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-de.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-de.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,172 @@
+;(function($){
+/**
+ * jqGrid German Translation
+ * Version 1.0.0 (developed for jQuery Grid 3.3.1)
+ * Olaf Klöppel opensource(a)blue-hit.de
+ * http://blue-hit.de/
+ *
+ * Updated for jqGrid 3.8
+ * Andreas Flack
+ * http://www.contentcontrol-berlin.de
+ *
+ * Updated for jQuery 4.4
+ * Oleg Kiriljuk oleg.kiriljuk(a)ok-soft-gmbh.com
+ * the format corresponds now the format from
+ * https://github.com/jquery/globalize/blob/master/lib/cultures/globalize.cult…
+ *
+ * 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: "Zeige {0} - {1} von {2}",
+ emptyrecords: "Keine Datensätze vorhanden",
+ loadtext: "Lädt...",
+ pgtext : "Seite {0} von {1}"
+ },
+ search : {
+ 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)"
+ },
+ edit : {
+ addCaption: "Datensatz hinzufügen",
+ editCaption: "Datensatz bearbeiten",
+ bSubmit: "Speichern",
+ bCancel: "Abbrechen",
+ bClose: "Schließen",
+ saveData: "Daten wurden geändert! Änderungen speichern?",
+ bYes : "ja",
+ bNo : "nein",
+ bExit : "abbrechen",
+ msg: {
+ required:"Feld ist erforderlich",
+ number: "Bitte geben Sie eine Zahl ein",
+ minValue:"Wert muss größer oder gleich sein, als ",
+ maxValue:"Wert muss kleiner oder gleich sein, als ",
+ email: "ist keine gültige E-Mail-Adresse",
+ integer: "Bitte geben Sie eine Ganzzahl ein",
+ date: "Bitte geben Sie ein gültiges Datum ein",
+ url: "ist keine gültige URL. Präfix muss eingegeben werden ('http://' oder 'https://')",
+ nodefined : " ist nicht definiert!",
+ novalue : " Rückgabewert ist erforderlich!",
+ customarray : "Benutzerdefinierte Funktion sollte ein Array zurückgeben!",
+ customfcheck : "Benutzerdefinierte Funktion sollte im Falle der benutzerdefinierten Überprüfung vorhanden sein!"
+ }
+ },
+ view : {
+ caption: "Datensatz anzeigen",
+ bClose: "Schließen"
+ },
+ del : {
+ caption: "Löschen",
+ msg: "Ausgewählte Datensätze löschen?",
+ bSubmit: "Löschen",
+ bCancel: "Abbrechen"
+ },
+ nav : {
+ edittext: " ",
+ edittitle: "Ausgewählte Zeile editieren",
+ addtext:" ",
+ addtitle: "Neue Zeile einfügen",
+ deltext: " ",
+ deltitle: "Ausgewählte Zeile löschen",
+ searchtext: " ",
+ searchtitle: "Datensatz suchen",
+ refreshtext: "",
+ refreshtitle: "Tabelle neu laden",
+ alertcap: "Warnung",
+ alerttext: "Bitte Zeile auswählen",
+ viewtext: "",
+ viewtitle: "Ausgewählte Zeile anzeigen"
+ },
+ col : {
+ caption: "Spalten auswählen",
+ bSubmit: "Speichern",
+ bCancel: "Abbrechen"
+ },
+ errors : {
+ errcap : "Fehler",
+ nourl : "Keine URL angegeben",
+ norecords: "Keine Datensätze zu bearbeiten",
+ model : "colNames und colModel sind unterschiedlich lang!"
+ },
+ 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: [
+ "So", "Mo", "Di", "Mi", "Do", "Fr", "Sa",
+ "Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"
+ ],
+ monthNames: [
+ "Jan", "Feb", "Mar", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez",
+ "Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"
+ ],
+ AmPm : ["","","",""],
+ 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',
+ 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
+ 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.yyyy"
+ // 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",
+ // 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
+ },
+ baseLinkUrl: '',
+ showAction: '',
+ target: '',
+ checkbox : {disabled:true},
+ idName : 'id'
+ }
+});
+})(jQuery);
\ No newline at end of file
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-dk.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-dk.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-dk.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,128 @@
+;(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 : ['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);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-el.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-el.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-el.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,127 @@
+;(function($){
+/**
+ * jqGrid Greek (el) Translation
+ * Alex Cicovic
+ * http://www.alexcicovic.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: "View {0} - {1} of {2}",
+ emptyrecords: "No records to view",
+ loadtext: "Φόρτωση...",
+ pgtext : "Page {0} of {1}"
+ },
+ search : {
+ 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"
+ },
+ edit : {
+ addCaption: "Εισαγωγή Εγγραφής",
+ editCaption: "Επεξεργασία Εγγραφής",
+ bSubmit: "Καταχώρηση",
+ bCancel: "Άκυρο",
+ bClose: "Κλείσιμο",
+ saveData: "Data has been changed! Save changes?",
+ bYes : "Yes",
+ bNo : "No",
+ bExit : "Cancel",
+ msg: {
+ required:"Το πεδίο είναι απαραίτητο",
+ number:"Το πεδίο δέχεται μόνο αριθμούς",
+ minValue:"Η τιμή πρέπει να είναι μεγαλύτερη ή ίση του ",
+ maxValue:"Η τιμή πρέπει να είναι μικρότερη ή ίση του ",
+ email: "Η διεύθυνση e-mail δεν είναι έγκυρη",
+ integer: "Το πεδίο δέχεται μόνο ακέραιους αριθμούς",
+ 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: "Διαγραφή",
+ msg: "Διαγραφή των επιλεγμένων εγγραφών;",
+ bSubmit: "Ναι",
+ bCancel: "Άκυρο"
+ },
+ nav : {
+ edittext: " ",
+ edittitle: "Επεξεργασία επιλεγμένης εγγραφής",
+ addtext:" ",
+ addtitle: "Εισαγωγή νέας εγγραφής",
+ deltext: " ",
+ deltitle: "Διαγραφή επιλεγμένης εγγραφής",
+ searchtext: " ",
+ searchtitle: "Εύρεση Εγγραφών",
+ refreshtext: "",
+ refreshtitle: "Ανανέωση Πίνακα",
+ alertcap: "Προσοχή",
+ alerttext: "Δεν έχετε επιλέξει εγγραφή",
+ viewtext: "",
+ viewtitle: "View selected row"
+ },
+ col : {
+ caption: "Εμφάνιση / Απόκρυψη Στηλών",
+ bSubmit: "ΟΚ",
+ bCancel: "Άκυρο"
+ },
+ errors : {
+ errcap : "Σφάλμα",
+ nourl : "Δεν έχει δοθεί διεύθυνση χειρισμού για τη συγκεκριμένη ενέργεια",
+ norecords: "Δεν υπάρχουν εγγραφές προς επεξεργασία",
+ model : "Άνισος αριθμός πεδίων 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: [
+ "Κυρ", "Δευ", "Τρι", "Τετ", "Πεμ", "Παρ", "Σαβ",
+ "Κυριακή", "Δευτέρα", "Τρίτη", "Τετάρτη", "Πέμπτη", "Παρασκευή", "Σάββατο"
+ ],
+ monthNames: [
+ "Ιαν", "Φεβ", "Μαρ", "Απρ", "Μαι", "Ιουν", "Ιουλ", "Αυγ", "Σεπ", "Οκτ", "Νοε", "Δεκ",
+ "Ιανουάριος", "Φεβρουάριος", "Μάρτιος", "Απρίλιος", "Μάιος", "Ιούνιος", "Ιούλιος", "Αύγουστος", "Σεπτέμβριος", "Οκτώβριος", "Νοέμβριος", "Δεκέμβριος"
+ ],
+ AmPm : ["πμ","μμ","ΠΜ","ΜΜ"],
+ S: function (j) {return j == 1 || j > 1 ? ['η'][Math.min((j - 1) % 10, 3)] : ''},
+ 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);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-en.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-en.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-en.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,169 @@
+;(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: "View {0} - {1} of {2}",
+ emptyrecords: "No records to view",
+ loadtext: "Loading...",
+ pgtext : "Page {0} of {1}"
+ },
+ search : {
+ 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"
+ },
+ edit : {
+ addCaption: "Add Record",
+ editCaption: "Edit Record",
+ bSubmit: "Submit",
+ bCancel: "Cancel",
+ bClose: "Close",
+ saveData: "Data has been changed! Save changes?",
+ bYes : "Yes",
+ bNo : "No",
+ bExit : "Cancel",
+ msg: {
+ required:"Field is required",
+ number:"Please, enter valid number",
+ minValue:"value must be greater than or equal to ",
+ maxValue:"value must be less than or equal to",
+ email: "is not a valid e-mail",
+ integer: "Please, enter valid integer value",
+ date: "Please, enter valid date value",
+ 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: "Delete",
+ msg: "Delete selected record(s)?",
+ bSubmit: "Delete",
+ bCancel: "Cancel"
+ },
+ nav : {
+ edittext: "",
+ edittitle: "Edit selected row",
+ addtext:"",
+ addtitle: "Add new row",
+ deltext: "",
+ deltitle: "Delete selected row",
+ searchtext: "",
+ searchtitle: "Find records",
+ refreshtext: "",
+ refreshtitle: "Reload Grid",
+ alertcap: "Warning",
+ alerttext: "Please, select row",
+ viewtext: "",
+ viewtitle: "View selected row"
+ },
+ col : {
+ caption: "Select columns",
+ bSubmit: "Ok",
+ bCancel: "Cancel"
+ },
+ errors : {
+ errcap : "Error",
+ nourl : "No url is set",
+ norecords: "No records to process",
+ model : "Length of 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: [
+ "Sun", "Mon", "Tue", "Wed", "Thr", "Fri", "Sat",
+ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
+ ],
+ monthNames: [
+ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
+ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
+ ],
+ 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',
+ 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);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-es.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-es.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-es.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,129 @@
+;(function($){
+/**
+ * jqGrid Spanish Translation
+ * Traduccion jqGrid en Español por Yamil Bracho
+ * Traduccion corregida y ampliada por Faserline, S.L.
+ * http://www.faserline.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: "Mostrando {0} - {1} de {2}",
+ emptyrecords: "Sin registros que mostrar",
+ loadtext: "Cargando...",
+ pgtext : "Página {0} de {1}"
+ },
+ search : {
+ 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"
+ },
+ edit : {
+ addCaption: "Agregar registro",
+ editCaption: "Modificar registro",
+ bSubmit: "Guardar",
+ bCancel: "Cancelar",
+ bClose: "Cerrar",
+ saveData: "Se han modificado los datos, ¿guardar cambios?",
+ bYes : "Si",
+ bNo : "No",
+ bExit : "Cancelar",
+ msg: {
+ required:"Campo obligatorio",
+ number:"Introduzca un número",
+ minValue:"El valor debe ser mayor o igual a ",
+ maxValue:"El valor debe ser menor o igual a ",
+ email: "no es una dirección de correo válida",
+ integer: "Introduzca un valor entero",
+ date: "Introduza una fecha correcta ",
+ url: "no es una URL válida. Prefijo requerido ('http://' or 'https://')",
+ nodefined : " no está definido.",
+ novalue : " valor de retorno es requerido.",
+ customarray : "La función personalizada debe devolver un array.",
+ customfcheck : "La función personalizada debe estar presente en el caso de validación personalizada."
+ }
+ },
+ view : {
+ caption: "Consultar registro",
+ bClose: "Cerrar"
+ },
+ del : {
+ caption: "Eliminar",
+ msg: "¿Desea eliminar los registros seleccionados?",
+ bSubmit: "Eliminar",
+ bCancel: "Cancelar"
+ },
+ nav : {
+ edittext: " ",
+ edittitle: "Modificar fila seleccionada",
+ addtext:" ",
+ addtitle: "Agregar nueva fila",
+ deltext: " ",
+ deltitle: "Eliminar fila seleccionada",
+ searchtext: " ",
+ searchtitle: "Buscar información",
+ refreshtext: "",
+ refreshtitle: "Recargar datos",
+ alertcap: "Aviso",
+ alerttext: "Seleccione una fila",
+ viewtext: "",
+ viewtitle: "Ver fila seleccionada"
+ },
+ col : {
+ caption: "Mostrar/ocultar columnas",
+ bSubmit: "Enviar",
+ bCancel: "Cancelar"
+ },
+ errors : {
+ errcap : "Error",
+ nourl : "No se ha especificado una URL",
+ norecords: "No hay datos para procesar",
+ model : "Las columnas de nombres son diferentes de las columnas de modelo"
+ },
+ 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: [
+ "Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sa",
+ "Domingo", "Lunes", "Martes", "Miercoles", "Jueves", "Viernes", "Sabado"
+ ],
+ monthNames: [
+ "Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic",
+ "Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"
+ ],
+ 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: '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);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-fa.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-fa.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-fa.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,146 @@
+;(function ($) {
+/**
+ * jqGrid Persian Translation
+ * 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: "نمابش {0} - {1} از {2}",
+ emptyrecords: "رکوردی یافت نشد",
+ loadtext: "بارگزاري...",
+ pgtext: "صفحه {0} از {1}"
+ },
+ search: {
+ caption: "جستجو...",
+ Find: "يافته ها",
+ Reset: "از نو",
+ odata: ['برابر', 'نا برابر', 'به', 'کوچکتر', 'از', 'بزرگتر', 'شروع با', 'شروع نشود با', 'نباشد', 'عضو این نباشد', 'اتمام با', 'تمام نشود با', 'حاوی', 'نباشد حاوی'],
+ groupOps: [{
+ op: "AND",
+ text: "کل"
+ },
+ {
+ op: "OR",
+ text: "مجموع"
+ }],
+ matchText: " حاوی",
+ rulesText: " اطلاعات"
+ },
+ edit: {
+ addCaption: "اضافه کردن رکورد",
+ editCaption: "ويرايش رکورد",
+ bSubmit: "ثبت",
+ bCancel: "انصراف",
+ bClose: "بستن",
+ saveData: "دیتا تعییر کرد! ذخیره شود؟",
+ bYes: "بله",
+ bNo: "خیر",
+ bExit: "انصراف",
+ msg: {
+ required: "فيلدها بايد ختما پر شوند",
+ number: "لطفا عدد وعتبر وارد کنيد",
+ minValue: "مقدار وارد شده بايد بزرگتر يا مساوي با",
+ maxValue: "مقدار وارد شده بايد کوچکتر يا مساوي",
+ email: "پست الکترونيک وارد شده معتبر نيست",
+ integer: "لطفا يک عدد صحيح وارد کنيد",
+ date: "لطفا يک تاريخ معتبر وارد کنيد",
+ url: "این آدرس صحیح نمی باشد. پیشوند نیاز است ('http://' یا 'https://')",
+ nodefined: " تعریف نشده!",
+ novalue: " مقدار برگشتی اجباری است!",
+ customarray: "تابع شما باید مقدار آرایه داشته باشد!",
+ customfcheck: "برای داشتن متد دلخواه شما باید سطون با چکینگ دلخواه داشته باشید!"
+ }
+ },
+ view: {
+ caption: "نمایش رکورد",
+ bClose: "بستن"
+ },
+ del: {
+ caption: "حذف",
+ msg: "از حذف گزينه هاي انتخاب شده مطمئن هستيد؟",
+ bSubmit: "حذف",
+ bCancel: "ابطال"
+ },
+ nav: {
+ edittext: " ",
+ edittitle: "ويرايش رديف هاي انتخاب شده",
+ addtext: " ",
+ addtitle: "افزودن رديف جديد",
+ deltext: " ",
+ deltitle: "حذف ردبف هاي انتخاب شده",
+ searchtext: " ",
+ searchtitle: "جستجوي رديف",
+ refreshtext: "",
+ refreshtitle: "بازيابي مجدد صفحه",
+ alertcap: "اخطار",
+ alerttext: "لطفا يک رديف انتخاب کنيد",
+ viewtext: "",
+ viewtitle: "نمایش رکورد های انتخاب شده"
+ },
+ col: {
+ caption: "نمايش/عدم نمايش ستون",
+ bSubmit: "ثبت",
+ bCancel: "انصراف"
+ },
+ errors: {
+ errcap: "خطا",
+ nourl: "هيچ آدرسي تنظيم نشده است",
+ norecords: "هيچ رکوردي براي پردازش موجود نيست",
+ model: "طول نام ستون ها محالف ستون هاي مدل مي باشد!"
+ },
+ formatter: {
+ integer: {
+ thousandsSeparator: " ",
+ defaultValue: "0"
+ },
+ number: {
+ decimalSeparator: ".",
+ thousandsSeparator: " ",
+ decimalPlaces: 2,
+ defaultValue: "0.00"
+ },
+ currency: {
+ decimalSeparator: ".",
+ thousandsSeparator: " ",
+ decimalPlaces: 2,
+ prefix: "",
+ suffix: "",
+ defaultValue: "0"
+ },
+ date: {
+ dayNames: ["يک", "دو", "سه", "چهار", "پنج", "جمع", "شنب", "يکشنبه", "دوشنبه", "سه شنبه", "چهارشنبه", "پنجشنبه", "جمعه", "شنبه"],
+ monthNames: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "ژانويه", "فوريه", "مارس", "آوريل", "مه", "ژوئن", "ژوئيه", "اوت", "سپتامبر", "اکتبر", "نوامبر", "December"],
+ AmPm: ["ب.ظ", "ب.ظ", "ق.ظ", "ق.ظ"],
+ 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
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-fi.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-fi.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-fi.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,130 @@
+;(function($){
+/**
+ * jqGrid (fi) Finnish Translation
+ * Jukka Inkeri awot.fi 2010-05-19
+ * Alex Grönholm alex.gronholm(a)nextday.fi 2011-05-18
+ * http://awot.fi
+ * 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: "Rivit {0} - {1} / {2}",
+ emptyrecords: "Ei näytettäviä",
+ loadtext: "Haetaan...",
+ pgtext: "Sivu {0} / {1}"
+ },
+ search: {
+ 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: ""
+ },
+ edit: {
+ addCaption: "Uusi rivi",
+ editCaption: "Muokkaa riviä",
+ bSubmit: "OK",
+ bCancel: "Peru",
+ bClose: "Sulje",
+ saveData: "Tietoja muutettu! Tallennetaanko?",
+ bYes: "Kyllä",
+ bNo: "Ei",
+ bExit: "Peru",
+ msg: {
+ required: "pakollinen",
+ number: "Anna kelvollinen nro",
+ minValue: "arvon oltava suurempi tai yhtäsuuri kuin ",
+ maxValue: "arvon oltava pienempi tai yhtäsuuri kuin ",
+ email: "ei ole kelvollinen säpostiosoite",
+ integer: "Anna kelvollinen kokonaisluku",
+ date: "Anna kelvollinen pvm",
+ url: "Ei ole kelvollinen linkki(URL). Alku oltava ('http://' tai 'https://')",
+ nodefined: " ei ole määritelty!",
+ novalue: " paluuarvo vaaditaan!",
+ customarray: "Oman funktion tulee palauttaa jono!",
+ customfcheck: "Oma funktio on määriteltävä räätälöityä tarkastusta varten!"
+ }
+ },
+ view: {
+ caption: "Näytä rivi",
+ bClose: "Sulje"
+ },
+ del: {
+ caption: "Poista",
+ msg: "Poista valitut rivit?",
+ bSubmit: "Poista",
+ bCancel: "Peru"
+ },
+ nav: {
+ edittext: "",
+ edittitle: "Muokkaa valittua riviä",
+ addtext: "",
+ addtitle: "Uusi rivi",
+ deltext: "",
+ deltitle: "Poista valittu rivi",
+ searchtext: "",
+ searchtitle: "Etsi tietoja",
+ refreshtext: "",
+ refreshtitle: "Lataa uudelleen",
+ alertcap: "Varoitus",
+ alerttext: "Valitse rivi",
+ viewtext: "",
+ viewtitle: "Näyta valitut rivit"
+ },
+ col: {
+ caption: "Valitse sarakkeet",
+ bSubmit: "OK",
+ bCancel: "Peru"
+ },
+ errors : {
+ errcap: "Virhe",
+ nourl: "URL on asettamatta",
+ norecords: "Ei muokattavia tietoja",
+ model: "Pituus 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: [
+ "Su", "Ma", "Ti", "Ke", "To", "Pe", "La",
+ "Sunnuntai", "Maanantai", "Tiistai", "Keskiviikko", "Torstai", "Perjantai", "Lauantai"
+ ],
+ monthNames: [
+ "Tam", "Hel", "Maa", "Huh", "Tou", "Kes", "Hei", "Elo", "Syy", "Lok", "Mar", "Jou",
+ "Tammikuu", "Helmikuu", "Maaliskuu", "Huhtikuu", "Toukokuu", "Kesäkuu", "Heinäkuu", "Elokuu", "Syyskuu", "Lokakuu", "Marraskuu", "Joulukuu"
+ ],
+ 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: 'd.m.Y',
+ masks: {
+ ISO8601Long:"Y-m-d H:i:s",
+ ISO8601Short:"Y-m-d",
+ ShortDate: "d.m.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'
+ }
+});
+// FI
+})(jQuery);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-fr.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-fr.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-fr.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,127 @@
+;(function($){
+/**
+ * jqGrid French 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: "Enregistrements {0} - {1} sur {2}",
+ emptyrecords: "Aucun enregistrement à afficher",
+ loadtext: "Chargement...",
+ pgtext : "Page {0} sur {1}"
+ },
+ search : {
+ 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"
+ },
+ edit : {
+ addCaption: "Ajouter",
+ editCaption: "Editer",
+ bSubmit: "Valider",
+ bCancel: "Annuler",
+ bClose: "Fermer",
+ saveData: "Les données ont changé ! Enregistrer les modifications ?",
+ bYes: "Oui",
+ bNo: "Non",
+ bExit: "Annuler",
+ msg: {
+ required: "Champ obligatoire",
+ number: "Saisissez un nombre correct",
+ minValue: "La valeur doit être supérieure ou égale à",
+ maxValue: "La valeur doit être inférieure ou égale à",
+ email: "n'est pas un email correct",
+ integer: "Saisissez un entier correct",
+ url: "n'est pas une adresse correcte. Préfixe requis ('http://' or 'https://')",
+ nodefined : " n'est pas défini!",
+ novalue : " la valeur de retour est requise!",
+ customarray : "Une fonction personnalisée devrait retourner un tableau (array)!",
+ customfcheck : "Une fonction personnalisée devrait être présente dans le cas d'une vérification personnalisée!"
+ }
+ },
+ view : {
+ caption: "Voir les enregistrement",
+ bClose: "Fermer"
+ },
+ del : {
+ caption: "Supprimer",
+ msg: "Supprimer les enregistrements sélectionnés ?",
+ bSubmit: "Supprimer",
+ bCancel: "Annuler"
+ },
+ nav : {
+ edittext: " ",
+ edittitle: "Editer la ligne sélectionnée",
+ addtext:" ",
+ addtitle: "Ajouter une ligne",
+ deltext: " ",
+ deltitle: "Supprimer la ligne sélectionnée",
+ searchtext: " ",
+ searchtitle: "Chercher un enregistrement",
+ refreshtext: "",
+ refreshtitle: "Recharger le tableau",
+ alertcap: "Avertissement",
+ alerttext: "Veuillez sélectionner une ligne",
+ viewtext: "",
+ viewtitle: "Afficher la ligne sélectionnée"
+ },
+ col : {
+ caption: "Afficher/Masquer les colonnes",
+ bSubmit: "Valider",
+ bCancel: "Annuler"
+ },
+ errors : {
+ errcap : "Erreur",
+ nourl : "Aucune adresse n'est paramétrée",
+ norecords: "Aucun enregistrement à traiter",
+ model : "Nombre de titres (colNames) <> Nombre de données (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: [
+ "Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam",
+ "Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi"
+ ],
+ monthNames: [
+ "Jan", "Fév", "Mar", "Avr", "Mai", "Jui", "Jul", "Aou", "Sep", "Oct", "Nov", "Déc",
+ "Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Aout", "Septembre", "Octobre", "Novembre", "Décembre"
+ ],
+ AmPm : ["am","pm","AM","PM"],
+ S: function (j) {return j == 1 ? 'er' : 'e';},
+ 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);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-gl.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-gl.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-gl.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,127 @@
+;(function($){
+/**
+ * jqGrid Galician Translation
+ * Translated by Jorge Barreiro <yortx.barry(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
+**/
+$.jgrid = $.jgrid || {};
+$.extend($.jgrid,{
+ defaults : {
+ recordtext: "Amosando {0} - {1} de {2}",
+ emptyrecords: "Sen rexistros que amosar",
+ loadtext: "Cargando...",
+ pgtext : "Páxina {0} de {1}"
+ },
+ search : {
+ 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"
+ },
+ edit : {
+ addCaption: "Engadir rexistro",
+ editCaption: "Modificar rexistro",
+ bSubmit: "Gardar",
+ bCancel: "Cancelar",
+ bClose: "Pechar",
+ saveData: "Modificáronse os datos, quere gardar os cambios?",
+ bYes : "Si",
+ bNo : "Non",
+ bExit : "Cancelar",
+ msg: {
+ required:"Campo obrigatorio",
+ number:"Introduza un número",
+ minValue:"O valor debe ser maior ou igual a ",
+ maxValue:"O valor debe ser menor ou igual a ",
+ email: "non é un enderezo de correo válido",
+ integer: "Introduza un valor enteiro",
+ date: "Introduza unha data correcta ",
+ url: "non é unha URL válida. Prefixo requerido ('http://' ou 'https://')",
+ nodefined : " non está definido.",
+ novalue : " o valor de retorno é obrigatorio.",
+ customarray : "A función persoalizada debe devolver un array.",
+ customfcheck : "A función persoalizada debe estar presente no caso de ter validación persoalizada."
+ }
+ },
+ view : {
+ caption: "Consultar rexistro",
+ bClose: "Pechar"
+ },
+ del : {
+ caption: "Eliminar",
+ msg: "Desexa eliminar os rexistros seleccionados?",
+ bSubmit: "Eliminar",
+ bCancel: "Cancelar"
+ },
+ nav : {
+ edittext: " ",
+ edittitle: "Modificar a fila seleccionada",
+ addtext:" ",
+ addtitle: "Engadir unha nova fila",
+ deltext: " ",
+ deltitle: "Eliminar a fila seleccionada",
+ searchtext: " ",
+ searchtitle: "Buscar información",
+ refreshtext: "",
+ refreshtitle: "Recargar datos",
+ alertcap: "Aviso",
+ alerttext: "Seleccione unha fila",
+ viewtext: "",
+ viewtitle: "Ver fila seleccionada"
+ },
+ col : {
+ caption: "Mostrar/ocultar columnas",
+ bSubmit: "Enviar",
+ bCancel: "Cancelar"
+ },
+ errors : {
+ errcap : "Erro",
+ nourl : "Non especificou unha URL",
+ norecords: "Non hai datos para procesar",
+ model : "As columnas de nomes son diferentes das columnas de modelo"
+ },
+ 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: [
+ "Do", "Lu", "Ma", "Me", "Xo", "Ve", "Sa",
+ "Domingo", "Luns", "Martes", "Mércoles", "Xoves", "Vernes", "Sábado"
+ ],
+ monthNames: [
+ "Xan", "Feb", "Mar", "Abr", "Mai", "Xuñ", "Xul", "Ago", "Set", "Out", "Nov", "Dec",
+ "Xaneiro", "Febreiro", "Marzo", "Abril", "Maio", "Xuño", "Xullo", "Agosto", "Setembro", "Outubro", "Novembro", "Decembro"
+ ],
+ 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: '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);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-he.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-he.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-he.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,128 @@
+;(function($){
+/**
+ * jqGrid Hebrew Translation
+ * Shuki Shukrun shukrun.shuki(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: "מציג {0} - {1} מתוך {2}",
+ emptyrecords: "אין רשומות להציג",
+ loadtext: "טוען...",
+ pgtext : "דף {0} מתוך {1}"
+ },
+ search : {
+ caption: "מחפש...",
+ Find: "חפש",
+ Reset: "התחל",
+ odata : ['שווה', 'לא שווה', 'קטן', 'קטן או שווה','גדול','גדול או שווה', 'מתחיל ב','לא מתחיל ב','נמצא ב','לא נמצא ב','מסתיים ב','לא מסתיים ב','מכיל','לא מכיל'],
+ groupOps: [ { op: "AND", text: "הכל" }, { op: "OR", text: "אחד מ" } ],
+ matchText: " תואם",
+ rulesText: " חוקים"
+ },
+ edit : {
+ addCaption: "הוסף רשומה",
+ editCaption: "ערוך רשומה",
+ bSubmit: "שלח",
+ bCancel: "בטל",
+ bClose: "סגור",
+ saveData: "נתונים השתנו! לשמור?",
+ bYes : "כן",
+ bNo : "לא",
+ bExit : "בטל",
+ msg: {
+ required:"שדה חובה",
+ number:"אנא, הכנס מספר תקין",
+ minValue:"ערך צריך להיות גדול או שווה ל ",
+ maxValue:"ערך צריך להיות קטן או שווה ל ",
+ email: "היא לא כתובת איימל תקינה",
+ integer: "אנא, הכנס מספר שלם",
+ date: "אנא, הכנס תאריך תקין",
+ url: "הכתובת אינה תקינה. דרושה תחילית ('http://' או '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: "הצג רשומה",
+ bClose: "סגור"
+ },
+ del : {
+ caption: "מחק",
+ msg: "האם למחוק את הרשומה/ות המסומנות?",
+ bSubmit: "מחק",
+ bCancel: "בטל"
+ },
+ nav : {
+ edittext: "",
+ edittitle: "ערוך שורה מסומנת",
+ addtext:"",
+ addtitle: "הוסף שורה חדשה",
+ deltext: "",
+ deltitle: "מחק שורה מסומנת",
+ searchtext: "",
+ searchtitle: "חפש רשומות",
+ refreshtext: "",
+ refreshtitle: "טען גריד מחדש",
+ alertcap: "אזהרה",
+ alerttext: "אנא, בחר שורה",
+ viewtext: "",
+ viewtitle: "הצג שורה מסומנת"
+ },
+ col : {
+ caption: "הצג/הסתר עמודות",
+ bSubmit: "שלח",
+ bCancel: "בטל"
+ },
+ errors : {
+ errcap : "שגיאה",
+ nourl : "לא הוגדרה כתובת url",
+ norecords: "אין רשומות לעבד",
+ model : "אורך של 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: [
+ "א", "ב", "ג", "ד", "ה", "ו", "ש",
+ "ראשון", "שני", "שלישי", "רביעי", "חמישי", "שישי", "שבת"
+ ],
+ monthNames: [
+ "ינו", "פבר", "מרץ", "אפר", "מאי", "יונ", "יול", "אוג", "ספט", "אוק", "נוב", "דצמ",
+ "ינואר", "פברואר", "מרץ", "אפריל", "מאי", "יוני", "יולי", "אוגוסט", "ספטמבר", "אוקטובר", "נובמבר", "דצמבר"
+ ],
+ AmPm : ["לפני הצהרים","אחר הצהרים","לפני הצהרים","אחר הצהרים"],
+ S: function (j) {return j < 11 || j > 13 ? ['', '', '', ''][Math.min((j - 1) % 10, 3)] : ''},
+ 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);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-hr.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-hr.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-hr.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,129 @@
+;(function($){
+/**
+ * jqGrid 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: "Pregled {0} - {1} od {2}",
+ emptyrecords: "Nema zapisa",
+ loadtext: "Učitavam...",
+ pgtext : "Stranica {0} od {1}"
+ },
+ search : {
+ caption: "pretraživanje...",
+ Find: "Traži",
+ 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"
+ },
+ edit : {
+ addCaption: "Dodaj zapis",
+ editCaption: "Promijeni zapis",
+ bSubmit: "Preuzmi",
+ bCancel: "Odustani",
+ bClose: "Zatvri",
+ saveData: "Podaci su promijenjeni! Preuzmi promijene?",
+ bYes : "Da",
+ bNo : "Ne",
+ bExit : "Odustani",
+ 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",
+ email: "neispravan e-mail",
+ integer: "Molim, unjeti ispravan cijeli broj (integer)",
+ date: "Molim, unjeti ispravan datum ",
+ url: "neispravan URL. Prefiks je obavezan ('http://' or 'https://')",
+ nodefined : " nije definiran!",
+ novalue : " zahtjevan podatak je obavezan!",
+ customarray : "Opcionalna funkcija trebala bi bili polje (array)!",
+ customfcheck : "Custom function should be present in case of custom checking!"
+
+ }
+ },
+ view : {
+ caption: "Otvori zapis",
+ bClose: "Zatvori"
+ },
+ del : {
+ caption: "Obriši",
+ msg: "Obriši označen zapis ili više njih?",
+ bSubmit: "Obriši",
+ bCancel: "Odustani"
+ },
+ nav : {
+ edittext: "",
+ edittitle: "Promijeni obilježeni red",
+ addtext:"",
+ addtitle: "Dodaj novi red",
+ deltext: "",
+ deltitle: "Obriši obilježeni red",
+ searchtext: "",
+ searchtitle: "Potraži zapise",
+ refreshtext: "",
+ refreshtitle: "Ponovo preuzmi podatke",
+ alertcap: "Upozorenje",
+ alerttext: "Molim, odaberi red",
+ viewtext: "",
+ viewtitle: "Pregled obilježenog reda"
+ },
+ col : {
+ caption: "Obilježi kolonu",
+ bSubmit: "Uredu",
+ bCancel: "Odustani"
+ },
+ errors : {
+ errcap : "Greška",
+ nourl : "Nedostaje URL",
+ norecords: "Bez zapisa za obradu",
+ model : "Duljina 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: [
+ "Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub",
+ "Nedjelja", "Ponedjeljak", "Utorak", "Srijeda", "Četvrtak", "Petak", "Subota"
+ ],
+ monthNames: [
+ "Sij", "Vel", "Ožu", "Tra", "Svi", "Lip", "Srp", "Kol", "Ruj", "Lis", "Stu", "Pro",
+ "Siječanj", "Veljača", "Ožujak", "Travanj", "Svibanj", "Lipanj", "Srpanj", "Kolovoz", "Rujan", "Listopad", "Studeni", "Prosinac"
+ ],
+ AmPm : ["am","pm","AM","PM"],
+ 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, j. 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'
+ }
+});
+})(jQuery);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-hr1250.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-hr1250.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-hr1250.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,129 @@
+;(function($){
+/**
+ * jqGrid 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: "Pregled {0} - {1} od {2}",
+ emptyrecords: "Nema zapisa",
+ loadtext: "U�itavam...",
+ pgtext : "Stranica {0} od {1}"
+ },
+ search : {
+ caption: "pretra�ivanje...",
+ Find: "Tra�i",
+ 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"
+ },
+ edit : {
+ addCaption: "Dodaj zapis",
+ editCaption: "Promijeni zapis",
+ bSubmit: "Preuzmi",
+ bCancel: "Odustani",
+ bClose: "Zatvri",
+ saveData: "Podaci su promijenjeni! Preuzmi promijene?",
+ bYes : "Da",
+ bNo : "Ne",
+ bExit : "Odustani",
+ 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",
+ email: "neispravan e-mail",
+ integer: "Molim, unjeti ispravan cijeli broj (integer)",
+ date: "Molim, unjeti ispravan datum ",
+ url: "neispravan URL. Prefiks je obavezan ('http://' or 'https://')",
+ nodefined : " nije definiran!",
+ novalue : " zahtjevan podatak je obavezan!",
+ customarray : "Opcionalna funkcija trebala bi bili polje (array)!",
+ customfcheck : "Custom function should be present in case of custom checking!"
+
+ }
+ },
+ view : {
+ caption: "Otvori zapis",
+ bClose: "Zatvori"
+ },
+ del : {
+ caption: "Obri�i",
+ msg: "Obri�i ozna�en zapis ili vi�e njih?",
+ bSubmit: "Obri�i",
+ bCancel: "Odustani"
+ },
+ nav : {
+ edittext: "",
+ edittitle: "Promijeni obilje�eni red",
+ addtext:"",
+ addtitle: "Dodaj novi red",
+ deltext: "",
+ deltitle: "Obri�i obilje�eni red",
+ searchtext: "",
+ searchtitle: "Potra�i zapise",
+ refreshtext: "",
+ refreshtitle: "Ponovo preuzmi podatke",
+ alertcap: "Upozorenje",
+ alerttext: "Molim, odaberi red",
+ viewtext: "",
+ viewtitle: "Pregled obilje�enog reda"
+ },
+ col : {
+ caption: "Obilje�i kolonu",
+ bSubmit: "Uredu",
+ bCancel: "Odustani"
+ },
+ errors : {
+ errcap : "Gre�ka",
+ nourl : "Nedostaje URL",
+ norecords: "Bez zapisa za obradu",
+ model : "Duljina 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: [
+ "Ned", "Pon", "Uto", "Sri", "�et", "Pet", "Sub",
+ "Nedjelja", "Ponedjeljak", "Utorak", "Srijeda", "�etvrtak", "Petak", "Subota"
+ ],
+ monthNames: [
+ "Sij", "Vel", "O�u", "Tra", "Svi", "Lip", "Srp", "Kol", "Ruj", "Lis", "Stu", "Pro",
+ "Sije�anj", "Velja�a", "O�ujak", "Travanj", "Svibanj", "Lipanj", "Srpanj", "Kolovoz", "Rujan", "Listopad", "Studeni", "Prosinac"
+ ],
+ AmPm : ["am","pm","AM","PM"],
+ 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, j. 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'
+ }
+});
+})(jQuery);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-hu.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-hu.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-hu.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,130 @@
+;(function($){
+/**
+ * jqGrid Hungarian Translation
+ * Őrszigety Ádám udx6bs(a)freemail.hu
+ * 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: "Oldal {0} - {1} / {2}",
+ emptyrecords: "Nincs találat",
+ loadtext: "Betöltés...",
+ pgtext : "Oldal {0} / {1}"
+ },
+ search : {
+ 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"
+ },
+ edit : {
+ addCaption: "Új tétel",
+ editCaption: "Tétel szerkesztése",
+ bSubmit: "Mentés",
+ bCancel: "Mégse",
+ bClose: "Bezárás",
+ saveData: "A tétel megváltozott! Tétel mentése?",
+ bYes : "Igen",
+ bNo : "Nem",
+ bExit : "Mégse",
+ msg: {
+ required:"Kötelező mező",
+ number:"Kérjük, adjon meg egy helyes számot",
+ minValue:"Nagyobb vagy egyenlőnek kell lenni mint ",
+ maxValue:"Kisebb vagy egyenlőnek kell lennie mint",
+ email: "hibás emailcím",
+ integer: "Kérjük adjon meg egy helyes egész számot",
+ date: "Kérjük adjon meg egy helyes dátumot",
+ url: "nem helyes cím. Előtag kötelező ('http://' vagy 'https://')",
+ nodefined : " nem definiált!",
+ novalue : " visszatérési érték kötelező!!",
+ customarray : "Custom function should return array!",
+ customfcheck : "Custom function should be present in case of custom checking!"
+
+ }
+ },
+ view : {
+ caption: "Tétel megtekintése",
+ bClose: "Bezárás"
+ },
+ del : {
+ caption: "Törlés",
+ msg: "Kiválaztott tétel(ek) törlése?",
+ bSubmit: "Törlés",
+ bCancel: "Mégse"
+ },
+ nav : {
+ edittext: "",
+ edittitle: "Tétel szerkesztése",
+ addtext:"",
+ addtitle: "Új tétel hozzáadása",
+ deltext: "",
+ deltitle: "Tétel törlése",
+ searchtext: "",
+ searchtitle: "Keresés",
+ refreshtext: "",
+ refreshtitle: "Frissítés",
+ alertcap: "Figyelmeztetés",
+ alerttext: "Kérem válasszon tételt.",
+ viewtext: "",
+ viewtitle: "Tétel megtekintése"
+ },
+ col : {
+ caption: "Oszlopok kiválasztása",
+ bSubmit: "Ok",
+ bCancel: "Mégse"
+ },
+ errors : {
+ errcap : "Hiba",
+ nourl : "Nincs URL beállítva",
+ norecords: "Nincs feldolgozásra váró tétel",
+ model : "colNames és colModel hossza nem egyenlő!"
+ },
+ 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: [
+ "Va", "Hé", "Ke", "Sze", "Csü", "Pé", "Szo",
+ "Vasárnap", "Hétfő", "Kedd", "Szerda", "Csütörtök", "Péntek", "Szombat"
+ ],
+ monthNames: [
+ "Jan", "Feb", "Már", "Ápr", "Máj", "Jún", "Júl", "Aug", "Szep", "Okt", "Nov", "Dec",
+ "Január", "Február", "Március", "Áprili", "Május", "Június", "Július", "Augusztus", "Szeptember", "Október", "November", "December"
+ ],
+ AmPm : ["de","du","DE","DU"],
+ S: function (j) {return '.-ik';},
+ srcformat: 'Y-m-d',
+ newformat: 'Y/m/d',
+ masks : {
+ ISO8601Long:"Y-m-d H:i:s",
+ ISO8601Short:"Y-m-d",
+ ShortDate: "Y/j/n",
+ LongDate: "Y. F hó d., l",
+ FullDateTime: "l, F d, Y g:i:s A",
+ MonthDay: "F d",
+ ShortTime: "a g:i",
+ LongTime: "a g:i:s",
+ SortableDateTime: "Y-m-d\\TH:i:s",
+ UniversalSortableDateTime: "Y-m-d H:i:sO",
+ YearMonth: "Y, F"
+ },
+ reformatAfterEdit : false
+ },
+ baseLinkUrl: '',
+ showAction: '',
+ target: '',
+ checkbox : {disabled:true},
+ idName : 'id'
+ }
+});
+})(jQuery);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-is.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-is.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-is.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,127 @@
+;(function($){
+/**
+ * jqGrid Icelandic Translation
+ * jtm(a)hi.is Univercity of Iceland
+ * 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: "Skoða {0} - {1} af {2}",
+ emptyrecords: "Engar færslur",
+ loadtext: "Hleður...",
+ pgtext : "Síða {0} af {1}"
+ },
+ search : {
+ 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"
+ },
+ edit : {
+ addCaption: "Bæta við færslu",
+ editCaption: "Breyta færslu",
+ bSubmit: "Vista",
+ bCancel: "Hætta við",
+ bClose: "Loka",
+ saveData: "Gögn hafa breyst! Vista breytingar?",
+ bYes : "Já",
+ bNo : "Nei",
+ bExit : "Hætta við",
+ msg: {
+ required:"Reitur er nauðsynlegur",
+ number:"Vinsamlega settu inn tölu",
+ minValue:"gildi verður að vera meira en eða jafnt og ",
+ maxValue:"gildi verður að vera minna en eða jafnt og ",
+ email: "er ekki löglegt email",
+ integer: "Vinsamlega settu inn tölu",
+ date: "Vinsamlega setti inn dagsetningu",
+ url: "er ekki löglegt URL. Vantar ('http://' eða 'https://')",
+ nodefined : " er ekki skilgreint!",
+ novalue : " skilagildi nauðsynlegt!",
+ customarray : "Fall skal skila fylki!",
+ customfcheck : "Fall skal vera skilgreint!"
+ }
+ },
+ view : {
+ caption: "Skoða færslu",
+ bClose: "Loka"
+ },
+ del : {
+ caption: "Eyða",
+ msg: "Eyða völdum færslum ?",
+ bSubmit: "Eyða",
+ bCancel: "Hætta við"
+ },
+ nav : {
+ edittext: " ",
+ edittitle: "Breyta færslu",
+ addtext:" ",
+ addtitle: "Ný færsla",
+ deltext: " ",
+ deltitle: "Eyða færslu",
+ searchtext: " ",
+ searchtitle: "Leita",
+ refreshtext: "",
+ refreshtitle: "Endurhlaða",
+ alertcap: "Viðvörun",
+ alerttext: "Vinsamlega veldu færslu",
+ viewtext: "",
+ viewtitle: "Skoða valda færslu"
+ },
+ col : {
+ caption: "Sýna / fela dálka",
+ bSubmit: "Vista",
+ bCancel: "Hætta við"
+ },
+ errors : {
+ errcap : "Villa",
+ nourl : "Vantar slóð",
+ norecords: "Engar færslur valdar",
+ model : "Lengd 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: [
+ "Sun", "Mán", "Þri", "Mið", "Fim", "Fös", "Lau",
+ "Sunnudagur", "Mánudagur", "Þriðjudagur", "Miðvikudagur", "Fimmtudagur", "Föstudagur", "Laugardagur"
+ ],
+ monthNames: [
+ "Jan", "Feb", "Mar", "Apr", "Maí", "Jún", "Júl", "Ágú", "Sep", "Oct", "Nóv", "Des",
+ "Janúar", "Febrúar", "Mars", "Apríl", "Maí", "Júný", "Júlý", "Ágúst", "September", "Október", "Nóvember", "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: '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);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-it.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-it.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-it.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1 @@
+(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
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ja.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ja.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ja.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,156 @@
+;(function($){
+/**
+ * jqGrid Japanese Translation
+ * OKADA Yoshitada okada.dev(a)sth.jp
+ * 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: "{2} \u4EF6\u4E2D {0} - {1} \u3092\u8868\u793A ",
+ emptyrecords: "\u8868\u793A\u3059\u308B\u30EC\u30B3\u30FC\u30C9\u304C\u3042\u308A\u307E\u305B\u3093",
+ loadtext: "\u8aad\u307f\u8fbc\u307f\u4e2d...",
+ pgtext : "{1} \u30DA\u30FC\u30B8\u4E2D {0} \u30DA\u30FC\u30B8\u76EE "
+ },
+ search : {
+ 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"],
+ groupOps: [{
+ op: "AND",
+ text: "\u3059\u3079\u3066\u306E"
+ },
+ {
+ 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",
+ editCaption: "\u30ec\u30b3\u30fc\u30c9\u7de8\u96c6",
+ bSubmit: "\u9001\u4fe1",
+ bCancel: "\u30ad\u30e3\u30f3\u30bb\u30eb",
+ bClose: "\u9589\u3058\u308b",
+ saveData: "\u30C7\u30FC\u30BF\u304C\u5909\u66F4\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u4FDD\u5B58\u3057\u307E\u3059\u304B\uFF1F",
+ bYes: "\u306F\u3044",
+ bNo: "\u3044\u3044\u3048",
+ bExit: "\u30AD\u30E3\u30F3\u30BB\u30EB",
+ msg: {
+ required:"\u3053\u306e\u9805\u76ee\u306f\u5fc5\u9808\u3067\u3059\u3002",
+ number:"\u6b63\u3057\u3044\u6570\u5024\u3092\u5165\u529b\u3057\u3066\u4e0b\u3055\u3044\u3002",
+ minValue:"\u6b21\u306e\u5024\u4ee5\u4e0a\u3067\u5165\u529b\u3057\u3066\u4e0b\u3055\u3044\u3002",
+ maxValue:"\u6b21\u306e\u5024\u4ee5\u4e0b\u3067\u5165\u529b\u3057\u3066\u4e0b\u3055\u3044\u3002",
+ email: "e-mail\u304c\u6b63\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3002",
+ integer: "\u6b63\u3057\u3044\u6574\u6570\u5024\u3092\u5165\u529b\u3057\u3066\u4e0b\u3055\u3044\u3002",
+ date: "\u6b63\u3057\u3044\u5024\u3092\u5165\u529b\u3057\u3066\u4e0b\u3055\u3044\u3002",
+ url: "\u306F\u6709\u52B9\u306AURL\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\20\u30D7\u30EC\u30D5\u30A3\u30C3\u30AF\u30B9\u304C\u5FC5\u8981\u3067\u3059\u3002 ('http://' \u307E\u305F\u306F 'https://')",
+ nodefined: " \u304C\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u305B\u3093",
+ novalue: " \u623B\u308A\u5024\u304C\u5FC5\u8981\u3067\u3059",
+ customarray: "\u30AB\u30B9\u30BF\u30E0\u95A2\u6570\u306F\u914D\u5217\u3092\u8FD4\u3059\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059",
+ customfcheck: "\u30AB\u30B9\u30BF\u30E0\u691C\u8A3C\u306B\u306F\u30AB\u30B9\u30BF\u30E0\u95A2\u6570\u304C\u5FC5\u8981\u3067\u3059"
+ }
+ },
+ view : {
+ caption: "\u30EC\u30B3\u30FC\u30C9\u3092\u8868\u793A",
+ bClose: "\u9589\u3058\u308B"
+ },
+ del : {
+ caption: "\u524a\u9664",
+ msg: "\u9078\u629e\u3057\u305f\u30ec\u30b3\u30fc\u30c9\u3092\u524a\u9664\u3057\u307e\u3059\u304b\uff1f",
+ bSubmit: "\u524a\u9664",
+ bCancel: "\u30ad\u30e3\u30f3\u30bb\u30eb"
+ },
+ nav : {
+ edittext: " ",
+ edittitle: "\u9078\u629e\u3057\u305f\u884c\u3092\u7de8\u96c6",
+ addtext:" ",
+ addtitle: "\u884c\u3092\u65b0\u898f\u8ffd\u52a0",
+ deltext: " ",
+ deltitle: "\u9078\u629e\u3057\u305f\u884c\u3092\u524a\u9664",
+ searchtext: " ",
+ searchtitle: "\u30ec\u30b3\u30fc\u30c9\u691c\u7d22",
+ refreshtext: "",
+ refreshtitle: "\u30b0\u30ea\u30c3\u30c9\u3092\u30ea\u30ed\u30fc\u30c9",
+ alertcap: "\u8b66\u544a",
+ alerttext: "\u884c\u3092\u9078\u629e\u3057\u3066\u4e0b\u3055\u3044\u3002",
+ viewtext: "",
+ viewtitle: "\u9078\u629E\u3057\u305F\u884C\u3092\u8868\u793A"
+ },
+ col : {
+ caption: "\u5217\u3092\u8868\u793a\uff0f\u96a0\u3059",
+ bSubmit: "\u9001\u4fe1",
+ bCancel: "\u30ad\u30e3\u30f3\u30bb\u30eb"
+ },
+ errors : {
+ errcap : "\u30a8\u30e9\u30fc",
+ nourl : "URL\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002",
+ norecords: "\u51e6\u7406\u5bfe\u8c61\u306e\u30ec\u30b3\u30fc\u30c9\u304c\u3042\u308a\u307e\u305b\u3093\u3002",
+ model : "colNames\u306e\u9577\u3055\u304ccolModel\u3068\u4e00\u81f4\u3057\u307e\u305b\u3093\u3002"
+ },
+ formatter : {
+ integer: {
+ thousandsSeparator: ",",
+ defaultValue: '0'
+ },
+ number: {
+ decimalSeparator: ".",
+ thousandsSeparator: ",",
+ decimalPlaces: 2,
+ defaultValue: '0.00'
+ },
+ currency: {
+ decimalSeparator: ".",
+ thousandsSeparator: ",",
+ decimalPlaces: 0,
+ prefix: "",
+ suffix: "",
+ defaultValue: '0'
+ },
+ date : {
+ dayNames: [
+ "\u65e5", "\u6708", "\u706b", "\u6c34", "\u6728", "\u91d1", "\u571f",
+ "\u65e5", "\u6708", "\u706b", "\u6c34", "\u6728", "\u91d1", "\u571f"
+ ],
+ monthNames: [
+ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12",
+ "1\u6708", "2\u6708", "3\u6708", "4\u6708", "5\u6708", "6\u6708", "7\u6708", "8\u6708", "9\u6708", "10\u6708", "11\u6708", "12\u6708"
+ ],
+ AmPm : ["am","pm","AM","PM"],
+ S: function (j) { return "\u756a\u76ee"; },
+ 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);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-kr.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-kr.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-kr.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,129 @@
+;(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: "보기 {0} - {1} / {2}",
+ emptyrecords: "표시할 행이 없습니다",
+ loadtext: "조회중...",
+ pgtext : "페이지 {0} / {1}"
+ },
+ search : {
+ caption: "검색...",
+ Find: "찾기",
+ Reset: "초기화",
+ odata : ['같다', '같지 않다', '작다', '작거나 같다','크다','크거나 같다', '로 시작한다','로 시작하지 않는다','내에 있다','내에 있지 않다','로 끝난다','로 끝나지 않는다','내에 존재한다','내에 존재하지 않는다'],
+ groupOps: [ { op: "AND", text: "전부" }, { op: "OR", text: "임의" } ],
+ matchText: " 일치하다",
+ rulesText: " 적용하다"
+ },
+ edit : {
+ addCaption: "행 추가",
+ editCaption: "행 수정",
+ bSubmit: "전송",
+ bCancel: "취소",
+ bClose: "닫기",
+ saveData: "자료가 변경되었습니다! 저장하시겠습니까?",
+ bYes : "예",
+ bNo : "아니오",
+ bExit : "취소",
+ msg: {
+ required:"필수항목입니다",
+ number:"유효한 번호를 입력해 주세요",
+ minValue:"입력값은 크거나 같아야 합니다",
+ maxValue:"입력값은 작거나 같아야 합니다",
+ email: "유효하지 않은 이메일주소입니다",
+ integer: "유효한 숫자를 입력하세요",
+ date: "유효한 날짜를 입력하세요",
+ url: "은 유효하지 않은 URL입니다. 문장앞에 다음단어가 필요합니다('http://' or 'https://')",
+ nodefined : " 은 정의도지 않았습니다!",
+ novalue : " 반환값이 필요합니다!",
+ customarray : "사용자정의 함수는 배열을 반환해야 합니다!",
+ customfcheck : "Custom function should be present in case of custom checking!"
+
+ }
+ },
+ view : {
+ caption: "행 조회",
+ bClose: "닫기"
+ },
+ del : {
+ caption: "삭제",
+ msg: "선택된 행을 삭제하시겠습니까?",
+ bSubmit: "삭제",
+ bCancel: "취소"
+ },
+ nav : {
+ edittext: "",
+ edittitle: "선택된 행 편집",
+ addtext:"",
+ addtitle: "행 삽입",
+ deltext: "",
+ deltitle: "선택된 행 삭제",
+ searchtext: "",
+ searchtitle: "행 찾기",
+ refreshtext: "",
+ refreshtitle: "그리드 갱신",
+ alertcap: "경고",
+ alerttext: "행을 선택하세요",
+ viewtext: "",
+ viewtitle: "선택된 행 조회"
+ },
+ col : {
+ caption: "열을 선택하세요",
+ bSubmit: "확인",
+ bCancel: "취소"
+ },
+ errors : {
+ errcap : "오류",
+ nourl : "설정된 url이 없습니다",
+ norecords: "처리할 행이 없습니다",
+ model : "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: [
+ "Sun", "Mon", "Tue", "Wed", "Thr", "Fri", "Sat",
+ "일", "월", "화", "수", "목", "금", "토"
+ ],
+ monthNames: [
+ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
+ "1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"
+ ],
+ 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: 'm-d-Y',
+ masks : {
+ ISO8601Long:"Y-m-d H:i:s",
+ ISO8601Short:"Y-m-d",
+ ShortDate: "Y/j/n",
+ 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);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-lt.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-lt.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-lt.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,129 @@
+;(function($){
+/**
+ * jqGrid Lithuanian Translation
+ * aur1mas aur1mas(a)devnet.lt
+ * http://aur1mas.devnet.lt
+ * 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: "Peržiūrima {0} - {1} iš {2}",
+ emptyrecords: "Įrašų nėra",
+ loadtext: "Kraunama...",
+ pgtext : "Puslapis {0} iš {1}"
+ },
+ search : {
+ 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"
+ },
+ edit : {
+ addCaption: "Sukurti įrašą",
+ editCaption: "Redaguoti įrašą",
+ bSubmit: "Išsaugoti",
+ bCancel: "Atšaukti",
+ bClose: "Uždaryti",
+ saveData: "Duomenys buvo pakeisti! Išsaugoti pakeitimus?",
+ bYes : "Taip",
+ bNo : "Ne",
+ bExit : "Atšaukti",
+ msg: {
+ required:"Privalomas laukas",
+ number:"Įveskite tinkamą numerį",
+ minValue:"reikšmė turi būti didesnė arba lygi ",
+ maxValue:"reikšmė turi būti mažesnė arba lygi",
+ email: "neteisingas el. pašto adresas",
+ integer: "Įveskite teisingą sveikąjį skaičių",
+ date: "Įveskite teisingą datą",
+ url: "blogas adresas. Nepamirškite pridėti ('http://' arba 'https://')",
+ nodefined : " nėra apibrėžta!",
+ novalue : " turi būti gražinama kokia nors reikšmė!",
+ customarray : "Custom f-ja turi grąžinti masyvą!",
+ customfcheck : "Custom f-ja tūrėtų būti sukurta, prieš bandant ją naudoti!"
+
+ }
+ },
+ view : {
+ caption: "Peržiūrėti įrašus",
+ bClose: "Uždaryti"
+ },
+ del : {
+ caption: "Ištrinti",
+ msg: "Ištrinti pažymėtus įrašus(-ą)?",
+ bSubmit: "Ištrinti",
+ bCancel: "Atšaukti"
+ },
+ nav : {
+ edittext: "",
+ edittitle: "Redaguoti pažymėtą eilutę",
+ addtext:"",
+ addtitle: "Pridėti naują eilutę",
+ deltext: "",
+ deltitle: "Ištrinti pažymėtą eilutę",
+ searchtext: "",
+ searchtitle: "Rasti įrašus",
+ refreshtext: "",
+ refreshtitle: "Perkrauti lentelę",
+ alertcap: "Įspėjimas",
+ alerttext: "Pasirinkite eilutę",
+ viewtext: "",
+ viewtitle: "Peržiūrėti pasirinktą eilutę"
+ },
+ col : {
+ caption: "Pasirinkti stulpelius",
+ bSubmit: "Gerai",
+ bCancel: "Atšaukti"
+ },
+ errors : {
+ errcap : "Klaida",
+ nourl : "Url reikšmė turi būti perduota",
+ norecords: "Nėra įrašų, kuriuos būtų galima apdoroti",
+ model : "colNames skaičius <> colModel skaičiui!"
+ },
+ 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: [
+ "Sek", "Pir", "Ant", "Tre", "Ket", "Pen", "Šeš",
+ "Sekmadienis", "Pirmadienis", "Antradienis", "Trečiadienis", "Ketvirtadienis", "Penktadienis", "Šeštadienis"
+ ],
+ monthNames: [
+ "Sau", "Vas", "Kov", "Bal", "Geg", "Bir", "Lie", "Rugj", "Rugs", "Spa", "Lap", "Gru",
+ "Sausis", "Vasaris", "Kovas", "Balandis", "Gegužė", "Birželis", "Liepa", "Rugpjūtis", "Rugsėjis", "Spalis", "Lapkritis", "Gruodis"
+ ],
+ 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: '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);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-mne.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-mne.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-mne.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,129 @@
+;(function($){
+/**
+ * jqGrid Montenegrian Translation
+ * Bild Studio info(a)bild-studio.net
+ * http://www.bild-studio.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: "Pregled {0} - {1} od {2}",
+ emptyrecords: "Ne postoji nijedan zapis",
+ loadtext: "Učitivanje...",
+ 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: " primjeni",
+ rulesText: " pravila"
+ },
+ edit : {
+ addCaption: "Dodaj zapis",
+ editCaption: "Izmjeni zapis",
+ bSubmit: "Pošalji",
+ bCancel: "Odustani",
+ bClose: "Zatvori",
+ saveData: "Podatak je izmjenjen! Sačuvaj izmjene?",
+ bYes : "Da",
+ bNo : "Ne",
+ bExit : "Odustani",
+ msg: {
+ required:"Polje je obavezno",
+ number:"Unesite ispravan broj",
+ minValue:"vrijednost mora biti veća od ili jednaka sa ",
+ maxValue:"vrijednost mora biti manja ili jednaka sa",
+ email: "nije ispravna email adresa, nije valjda da ne umiješ ukucati mail!?",
+ integer: "Ne zajebaji se unesi cjelobrojnu vrijednost ",
+ date: "Unesite ispravan datum",
+ url: "nije ispravan URL. Potreban je prefiks ('http://' or 'https://')",
+ nodefined : " nije definisan!",
+ novalue : " zahtjevana je povratna vrijednost!",
+ customarray : "Prilagođena funkcija treba da vrati niz!",
+ customfcheck : "Prilagođena funkcija treba da bude prisutana u slučaju prilagođene provjere!"
+
+ }
+ },
+ view : {
+ caption: "Pogledaj zapis",
+ bClose: "Zatvori"
+ },
+ del : {
+ caption: "Izbrisi",
+ msg: "Izbrisi izabran(e) zapise(e)?",
+ bSubmit: "Izbriši",
+ bCancel: "Odbaci"
+ },
+ nav : {
+ edittext: "",
+ edittitle: "Izmjeni izabrani red",
+ addtext:"",
+ addtitle: "Dodaj novi red",
+ deltext: "",
+ deltitle: "Izbriši izabran red",
+ searchtext: "",
+ searchtitle: "Nađi zapise",
+ refreshtext: "",
+ refreshtitle: "Ponovo učitaj podatke",
+ alertcap: "Upozorenje",
+ alerttext: "Izaberite red",
+ viewtext: "",
+ viewtitle: "Pogledaj izabrani red"
+ },
+ col : {
+ caption: "Izaberi kolone",
+ bSubmit: "OK",
+ bCancel: "Odbaci"
+ },
+ errors : {
+ errcap : "Greška",
+ nourl : "Nije postavljen URL",
+ norecords: "Nema zapisa za obradu",
+ model : "Dužina modela 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: [
+ "Ned", "Pon", "Uto", "Sre", "Čet", "Pet", "Sub",
+ "Nedelja", "Ponedeljak", "Utorak", "Srijeda", "Četvrtak", "Petak", "Subota"
+ ],
+ monthNames: [
+ "Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Avg", "Sep", "Okt", "Nov", "Dec",
+ "Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"
+ ],
+ 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: '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);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-nl.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-nl.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-nl.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,149 @@
+(function(a) {
+a.jgrid = a.jgrid || {};
+a.extend(a.jgrid,{
+ defaults:
+ {
+ recordtext: "regels {0} - {1} van {2}",
+ emptyrecords: "Geen data gevonden.",
+ loadtext: "laden...",
+ pgtext: "pagina {0} van {1}"
+ },
+ search:
+ {
+ 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"
+ },
+ edit:
+ {
+ addCaption: "Nieuw",
+ editCaption: "Bewerken",
+ bSubmit: "Opslaan",
+ bCancel: "Annuleren",
+ bClose: "Sluiten",
+ saveData: "Er is data aangepast! Wijzigingen opslaan?",
+ bYes: "Ja",
+ bNo: "Nee",
+ bExit: "Sluiten",
+ msg:
+ {
+ required: "Veld is verplicht",
+ number: "Voer a.u.b. geldig nummer in",
+ minValue: "Waarde moet groter of gelijk zijn aan ",
+ maxValue: "Waarde moet kleiner of gelijks zijn aan",
+ email: "is geen geldig e-mailadres",
+ integer: "Voer a.u.b. een geldig getal in",
+ date: "Voer a.u.b. een geldige waarde in",
+ url: "is geen geldige URL. Prefix is verplicht ('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: "Tonen",
+ bClose: "Sluiten"
+ },
+ del:
+ {
+ caption: "Verwijderen",
+ msg: "Verwijder geselecteerde regel(s)?",
+ bSubmit: "Verwijderen",
+ bCancel: "Annuleren"
+ },
+ nav:
+ {
+ edittext: "",
+ edittitle: "Bewerken",
+ addtext: "",
+ addtitle: "Nieuw",
+ deltext: "",
+ deltitle: "Verwijderen",
+ searchtext: "",
+ searchtitle: "Zoeken",
+ refreshtext: "",
+ refreshtitle: "Vernieuwen",
+ alertcap: "Waarschuwing",
+ alerttext: "Selecteer a.u.b. een regel",
+ viewtext: "",
+ viewtitle: "Openen"
+ },
+ col:
+ {
+ caption: "Tonen/verbergen kolommen",
+ bSubmit: "OK",
+ bCancel: "Annuleren"
+ },
+ errors:
+ {
+ errcap: "Fout",
+ nourl: "Er is geen URL gedefinieerd",
+ norecords: "Geen data om te verwerken",
+ model: "Lengte van 'colNames' is niet gelijk aan 'colModel'!"
+ },
+ formatter:
+ {
+ integer:
+ {
+ thousandsSeparator: ".",
+ defaultValue: "0"
+ },
+ number:
+ {
+ decimalSeparator: ",",
+ thousandsSeparator: ".",
+ decimalPlaces: 2,
+ defaultValue: "0.00"
+ },
+ currency:
+ {
+ decimalSeparator: ",",
+ thousandsSeparator: ".",
+ decimalPlaces: 2,
+ prefix: "EUR ",
+ suffix: "",
+ defaultValue: "0.00"
+ },
+ date:
+ {
+ dayNames: ["Zo", "Ma", "Di", "Wo", "Do", "Vr", "Za", "Zondag", "Maandag", "Dinsdag", "Woensdag", "Donderdag", "Vrijdag", "Zaterdag"],
+ monthNames: ["Jan", "Feb", "Maa", "Apr", "Mei", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "Januari", "Februari", "Maart", "April", "Mei", "Juni", "Juli", "Augustus", "September", "October", "November", "December"],
+ 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 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"
+ }
+ });
+})(jQuery);
\ No newline at end of file
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-no.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-no.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-no.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1 @@
+(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);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-pl.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-pl.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-pl.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,133 @@
+;(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 : ['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'
+ }
+});
+})(jQuery);
\ No newline at end of file
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-pt-br.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-pt-br.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-pt-br.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,131 @@
+;(function($){
+/**
+ * jqGrid Brazilian-Portuguese Translation
+ * Sergio Righi sergio.righi(a)gmail.com
+ * http://curve.com.br
+ *
+ * Updated by Jonnas Fonini
+ * http://fonini.net
+ * 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: "Ver {0} - {1} de {2}",
+ emptyrecords: "Nenhum registro para visualizar",
+ loadtext: "Carregando...",
+ pgtext : "Página {0} de {1}"
+ },
+ search : {
+ 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"
+ },
+ edit : {
+ addCaption: "Incluir",
+ editCaption: "Alterar",
+ bSubmit: "Enviar",
+ bCancel: "Cancelar",
+ bClose: "Fechar",
+ saveData: "Os dados foram alterados! Salvar alterações?",
+ bYes : "Sim",
+ bNo : "Não",
+ bExit : "Cancelar",
+ msg: {
+ required:"Campo obrigatório",
+ number:"Por favor, informe um número válido",
+ minValue:"valor deve ser igual ou maior que ",
+ maxValue:"valor deve ser menor ou igual a",
+ email: "este e-mail não é válido",
+ integer: "Por favor, informe um valor inteiro",
+ date: "Por favor, informe uma data válida",
+ url: "não é uma URL válida. Prefixo obrigatório ('http://' or 'https://')",
+ nodefined : " não está definido!",
+ novalue : " um valor de retorno é obrigatório!",
+ customarray : "Função customizada deve retornar um array!",
+ customfcheck : "Função customizada deve estar presente em caso de validação customizada!"
+ }
+ },
+ view : {
+ caption: "Ver Registro",
+ bClose: "Fechar"
+ },
+ del : {
+ caption: "Apagar",
+ msg: "Apagar registro(s) selecionado(s)?",
+ bSubmit: "Apagar",
+ bCancel: "Cancelar"
+ },
+ nav : {
+ edittext: " ",
+ edittitle: "Alterar registro selecionado",
+ addtext:" ",
+ addtitle: "Incluir novo registro",
+ deltext: " ",
+ deltitle: "Apagar registro selecionado",
+ searchtext: " ",
+ searchtitle: "Procurar registros",
+ refreshtext: "",
+ refreshtitle: "Recarregando tabela",
+ alertcap: "Aviso",
+ alerttext: "Por favor, selecione um registro",
+ viewtext: "",
+ viewtitle: "Ver linha selecionada"
+ },
+ col : {
+ caption: "Mostrar/Esconder Colunas",
+ bSubmit: "Enviar",
+ bCancel: "Cancelar"
+ },
+ errors : {
+ errcap : "Erro",
+ nourl : "Nenhuma URL definida",
+ norecords: "Sem registros para exibir",
+ model : "Comprimento de colNames <> colModel!"
+ },
+ formatter : {
+ integer : {thousandsSeparator: " ", defaultValue: '0'},
+ number : {decimalSeparator:",", thousandsSeparator: " ", decimalPlaces: 2, defaultValue: '0,00'},
+ currency : {decimalSeparator:",", thousandsSeparator: ".", decimalPlaces: 2, prefix: "R$ ", suffix:"", defaultValue: '0,00'},
+ date : {
+ dayNames: [
+ "Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb",
+ "Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"
+ ],
+ monthNames: [
+ "Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez",
+ "Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"
+ ],
+ AmPm : ["am","pm","AM","PM"],
+ S: function (j) {return j < 11 || j > 13 ? ['º', 'º', 'º', 'º'][Math.min((j - 1) % 10, 3)] : 'º'},
+ 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);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-pt.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-pt.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-pt.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,126 @@
+;(function($){
+/**
+ * jqGrid Portuguese Translation
+* Tradu��o da jqGrid em Portugues por Frederico Carvalho, http://www.eyeviewdesign.pt
+ * 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: "No records to view",
+ loadtext: "A carregar...",
+ pgtext : "Page {0} of {1}"
+ },
+ search : {
+ 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"
+ },
+ edit : {
+ addCaption: "Adicionar Registo",
+ editCaption: "Modificar Registo",
+ bSubmit: "Submeter",
+ bCancel: "Cancelar",
+ bClose: "Fechar",
+ saveData: "Data has been changed! Save changes?",
+ bYes : "Yes",
+ bNo : "No",
+ bExit : "Cancel",
+ msg: {
+ required:"Campo obrigat�rio",
+ number:"Por favor, introduza um numero",
+ minValue:"O valor deve ser maior ou igual que",
+ maxValue:"O valor deve ser menor ou igual a",
+ email: "N�o � um endere�o de email v�lido",
+ integer: "Por favor, introduza um numero inteiro",
+ 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: "Eliminar",
+ msg: "Deseja eliminar o(s) registo(s) seleccionado(s)?",
+ bSubmit: "Eliminar",
+ bCancel: "Cancelar"
+ },
+ nav : {
+ edittext: " ",
+ edittitle: "Modificar registo seleccionado",
+ addtext:" ",
+ addtitle: "Adicionar novo registo",
+ deltext: " ",
+ deltitle: "Eliminar registo seleccionado",
+ searchtext: " ",
+ searchtitle: "Procurar",
+ refreshtext: "",
+ refreshtitle: "Actualizar",
+ alertcap: "Aviso",
+ alerttext: "Por favor, seleccione um registo",
+ viewtext: "",
+ viewtitle: "View selected row"
+ },
+ col : {
+ caption: "Mostrar/Ocultar Colunas",
+ bSubmit: "Enviar",
+ bCancel: "Cancelar"
+ },
+ errors : {
+ errcap : "Erro",
+ nourl : "N�o especificou um url",
+ norecords: "N�o existem dados para processar",
+ model : "Tamanho do 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", "Seg", "Ter", "Qua", "Qui", "Sex", "Sab",
+ "Domingo", "Segunda-Feira", "Ter�a-Feira", "Quarta-Feira", "Quinta-Feira", "Sexta-Feira", "S�bado"
+ ],
+ monthNames: [
+ "Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez",
+ "Janeiro", "Fevereiro", "Mar�o", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"
+ ],
+ AmPm : ["am","pm","AM","PM"],
+ S: function (j) {return j < 11 || j > 13 ? ['�', '�', '�', '�'][Math.min((j - 1) % 10, 3)] : '�'},
+ 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);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ro.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ro.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ro.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,140 @@
+;(function($){
+/**
+ * jqGrid Romanian Translation
+ * Alexandru Emil Lupu contact(a)alecslupu.ro
+ * http://www.alecslupu.ro/
+ * 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: "Vizualizare {0} - {1} din {2}",
+ emptyrecords: "Nu există înregistrări de vizualizat",
+ loadtext: "Încărcare...",
+ pgtext : "Pagina {0} din {1}"
+ },
+ search : {
+ 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"
+ },
+ edit : {
+ addCaption: "Adăugare înregistrare",
+ editCaption: "Modificare înregistrare",
+ bSubmit: "Salvează",
+ bCancel: "Anulare",
+ bClose: "Închide",
+ saveData: "Informațiile au fost modificate! Salvați modificările?",
+ bYes : "Da",
+ bNo : "Nu",
+ bExit : "Anulare",
+ msg: {
+ required:"Câmpul este obligatoriu",
+ number:"Vă rugăm introduceți un număr valid",
+ minValue:"valoarea trebuie sa fie mai mare sau egală cu",
+ maxValue:"valoarea trebuie sa fie mai mică sau egală cu",
+ email: "nu este o adresă de e-mail validă",
+ integer: "Vă rugăm introduceți un număr valid",
+ date: "Vă rugăm să introduceți o dată validă",
+ url: "Nu este un URL valid. Prefixul este necesar('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: "Vizualizare înregistrare",
+ bClose: "Închidere"
+ },
+ del : {
+ caption: "Ștegere",
+ msg: "Ștergeți înregistrarea (înregistrările) selectate?",
+ bSubmit: "Șterge",
+ bCancel: "Anulare"
+ },
+ nav : {
+ edittext: "",
+ edittitle: "Modifică rândul selectat",
+ addtext:"",
+ addtitle: "Adaugă rând nou",
+ deltext: "",
+ deltitle: "Șterge rândul selectat",
+ searchtext: "",
+ searchtitle: "Căutare înregistrări",
+ refreshtext: "",
+ refreshtitle: "Reîncarcare Grid",
+ alertcap: "Avertisment",
+ alerttext: "Vă rugăm să selectați un rând",
+ viewtext: "",
+ viewtitle: "Vizualizează rândul selectat"
+ },
+ col : {
+ caption: "Arată/Ascunde coloanele",
+ bSubmit: "Salvează",
+ bCancel: "Anulare"
+ },
+ errors : {
+ errcap : "Eroare",
+ nourl : "Niciun url nu este setat",
+ norecords: "Nu sunt înregistrări de procesat",
+ model : "Lungimea 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: [
+ "Dum", "Lun", "Mar", "Mie", "Joi", "Vin", "Sâm",
+ "Duminică", "Luni", "Marți", "Miercuri", "Joi", "Vineri", "Sâmbătă"
+ ],
+ monthNames: [
+ "Ian", "Feb", "Mar", "Apr", "Mai", "Iun", "Iul", "Aug", "Sep", "Oct", "Noi", "Dec",
+ "Ianuarie", "Februarie", "Martie", "Aprilie", "Mai", "Iunie", "Iulie", "August", "Septembrie", "Octombrie", "Noiembrie", "Decembrie"
+ ],
+ AmPm : ["am","pm","AM","PM"],
+ /*
+ Here is a problem in romanian:
+ M / F
+ 1st = primul / prima
+ 2nd = Al doilea / A doua
+ 3rd = Al treilea / A treia
+ 4th = Al patrulea/ A patra
+ 5th = Al cincilea / A cincea
+ 6th = Al șaselea / A șasea
+ 7th = Al șaptelea / A șaptea
+ ....
+ */
+ 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',
+ 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);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ru.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ru.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ru.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,128 @@
+;(function($){
+/**
+ * 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
+ * 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: "Просмотр {0} - {1} из {2}",
+ emptyrecords: "Нет записей для просмотра",
+ loadtext: "Загрузка...",
+ pgtext : "Стр. {0} из {1}"
+ },
+ search : {
+ caption: "Поиск...",
+ Find: "Найти",
+ Reset: "Сброс",
+ odata : ['равно', 'не равно', 'меньше', 'меньше или равно','больше','больше или равно', 'начинается с','не начинается с','находится в','не находится в','заканчивается на','не заканчивается на','содержит','не содержит'],
+ groupOps: [ { op: "AND", text: "все" }, { op: "OR", text: "любой" } ],
+ matchText: " совпадает",
+ rulesText: " правила"
+ },
+ edit : {
+ addCaption: "Добавить запись",
+ editCaption: "Редактировать запись",
+ bSubmit: "Сохранить",
+ bCancel: "Отмена",
+ bClose: "Закрыть",
+ saveData: "Данные были измененны! Сохранить изменения?",
+ bYes : "Да",
+ bNo : "Нет",
+ bExit : "Отмена",
+ msg: {
+ required:"Поле является обязательным",
+ number:"Пожалуйста, введите правильное число",
+ minValue:"значение должно быть больше либо равно",
+ maxValue:"значение должно быть меньше либо равно",
+ 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!"
+ }
+ },
+ view : {
+ caption: "Просмотр записи",
+ bClose: "Закрыть"
+ },
+ del : {
+ caption: "Удалить",
+ msg: "Удалить выбранную запись(и)?",
+ bSubmit: "Удалить",
+ bCancel: "Отмена"
+ },
+ nav : {
+ edittext: " ",
+ edittitle: "Редактировать выбранную запись",
+ addtext:" ",
+ addtitle: "Добавить новую запись",
+ deltext: " ",
+ deltitle: "Удалить выбранную запись",
+ searchtext: " ",
+ searchtitle: "Найти записи",
+ refreshtext: "",
+ refreshtitle: "Обновить таблицу",
+ alertcap: "Внимание",
+ alerttext: "Пожалуйста, выберите запись",
+ viewtext: "",
+ viewtitle: "Просмотреть выбранную запись"
+ },
+ col : {
+ caption: "Показать/скрыть столбцы",
+ bSubmit: "Сохранить",
+ bCancel: "Отмена"
+ },
+ errors : {
+ errcap : "Ошибка",
+ nourl : "URL не установлен",
+ norecords: "Нет записей для обработки",
+ model : "Число полей не соответствует числу столбцов таблицы!"
+ },
+ 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: [
+ "Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб",
+ "Воскресение", "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота"
+ ],
+ monthNames: [
+ "Янв", "Фев", "Мар", "Апр", "Май", "Июн", "Июл", "Авг", "Сен", "Окт", "Ноя", "Дек",
+ "Январь", "Февраль", "Март", "Апрель", "Май", "Июнь", "Июль", "Август", "Сентябрь", "Октябрь", "Ноябрь", "Декабрь"
+ ],
+ 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: '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",
+ MonthDay: "F d",
+ 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'
+ }
+});
+})(jQuery);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sk.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sk.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sk.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,128 @@
+;(function($){
+/**
+ * jqGrid Slovak Translation
+ * Milan Cibulka
+ * 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: "Zobrazených {0} - {1} z {2} záznamov",
+ emptyrecords: "Neboli nájdené žiadne záznamy",
+ loadtext: "Načítám...",
+ pgtext : "Strana {0} z {1}"
+ },
+ search : {
+ 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"
+ },
+ edit : {
+ addCaption: "Pridať záznam",
+ editCaption: "Editácia záznamov",
+ bSubmit: "Uložiť",
+ bCancel: "Storno",
+ bClose: "Zavrieť",
+ saveData: "Údaje boli zmenené! Uložiť zmeny?",
+ bYes : "Ano",
+ bNo : "Nie",
+ bExit : "Zrušiť",
+ msg: {
+ required:"Pole je požadované",
+ number:"Prosím, vložte valídne číslo",
+ minValue:"hodnota musí býť väčšia ako alebo rovná ",
+ maxValue:"hodnota musí býť menšia ako alebo rovná ",
+ email: "nie je valídny e-mail",
+ integer: "Prosím, vložte celé číslo",
+ date: "Prosím, vložte valídny dátum",
+ url: "nie je platnou URL. Požadovaný prefix ('http://' alebo 'https://')",
+ nodefined : " nie je definovaný!",
+ novalue : " je vyžadovaná návratová hodnota!",
+ customarray : "Custom function mala vrátiť pole!",
+ customfcheck : "Custom function by mala byť prítomná v prípade custom checking!"
+ }
+ },
+ view : {
+ caption: "Zobraziť záznam",
+ bClose: "Zavrieť"
+ },
+ del : {
+ caption: "Zmazať",
+ msg: "Zmazať vybraný(é) záznam(y)?",
+ bSubmit: "Zmazať",
+ bCancel: "Storno"
+ },
+ nav : {
+ edittext: " ",
+ edittitle: "Editovať vybraný riadok",
+ addtext:" ",
+ addtitle: "Pridať nový riadek",
+ deltext: " ",
+ deltitle: "Zmazať vybraný záznam ",
+ searchtext: " ",
+ searchtitle: "Nájsť záznamy",
+ refreshtext: "",
+ refreshtitle: "Obnoviť tabuľku",
+ alertcap: "Varovanie",
+ alerttext: "Prosím, vyberte riadok",
+ viewtext: "",
+ viewtitle: "Zobraziť vybraný riadok"
+ },
+ col : {
+ caption: "Zobrazit/Skrýť stĺpce",
+ bSubmit: "Uložiť",
+ bCancel: "Storno"
+ },
+ errors : {
+ errcap : "Chyba",
+ nourl : "Nie je nastavená url",
+ norecords: "Žiadne záznamy k spracovaniu",
+ model : "Dĺžka 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: [
+ "Ne", "Po", "Ut", "St", "Št", "Pi", "So",
+ "Nedela", "Pondelok", "Utorok", "Streda", "Štvrtok", "Piatek", "Sobota"
+ ],
+ monthNames: [
+ "Jan", "Feb", "Mar", "Apr", "Máj", "Jún", "Júl", "Aug", "Sep", "Okt", "Nov", "Dec",
+ "Január", "Február", "Marec", "Apríl", "Máj", "Jún", "Júl", "August", "September", "Október", "November", "December"
+ ],
+ AmPm : ["do","od","DO","OD"],
+ 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',
+ 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);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sr-latin.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sr-latin.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sr-latin.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,129 @@
+;(function($){
+/**
+ * jqGrid Serbian latin Translation
+ * Bild Studio info(a)bild-studio.net
+ * http://www.bild-studio.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: "Pregled {0} - {1} od {2}",
+ emptyrecords: "Ne postoji nijedan zapis",
+ loadtext: "Učitivanje...",
+ 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"
+ },
+ edit : {
+ addCaption: "Dodaj zapis",
+ editCaption: "Izmeni zapis",
+ bSubmit: "Pošalji",
+ bCancel: "Odustani",
+ bClose: "Zatvori",
+ saveData: "Podatak je izmenjen! Sačuvaj izmene?",
+ bYes : "Da",
+ bNo : "Ne",
+ bExit : "Odustani",
+ msg: {
+ required: "Polje je obavezno",
+ number: "Unesite ispravan broj",
+ minValue: "vrednost mora biti veća od ili jednaka sa ",
+ maxValue: "vrednost mora biti manja ili jednaka sa",
+ email: "nije ispravna email adresa, nije valjda da ne umeš ukucati mail!?",
+ integer: "Unesi celobrojnu vrednost ",
+ date: "Unesite ispravan datum",
+ url: "nije ispravan URL. Potreban je prefiks ('http://' or 'https://')",
+ nodefined : " nije definisan!",
+ novalue : " zahtevana je povratna vrednost!",
+ customarray : "Prilagođena funkcija treba da vrati niz!",
+ customfcheck : "Prilagođena funkcija treba da bude prisutana u slučaju prilagođene provere!"
+
+ }
+ },
+ view : {
+ caption: "Pogledaj zapis",
+ bClose: "Zatvori"
+ },
+ del : {
+ caption: "Izbrisi",
+ msg: "Izbrisi izabran(e) zapise(e)?",
+ bSubmit: "Izbriši",
+ bCancel: "Odbaci"
+ },
+ nav : {
+ edittext: "",
+ edittitle: "Izmeni izabrani red",
+ addtext:"",
+ addtitle: "Dodaj novi red",
+ deltext: "",
+ deltitle: "Izbriši izabran red",
+ searchtext: "",
+ searchtitle: "Nađi zapise",
+ refreshtext: "",
+ refreshtitle: "Ponovo učitaj podatke",
+ alertcap: "Upozorenje",
+ alerttext: "Izaberite red",
+ viewtext: "",
+ viewtitle: "Pogledaj izabrani red"
+ },
+ col : {
+ caption: "Izaberi kolone",
+ bSubmit: "OK",
+ bCancel: "Odbaci"
+ },
+ errors : {
+ errcap : "Greška",
+ nourl : "Nije postavljen URL",
+ norecords: "Nema zapisa za obradu",
+ model : "Dužina modela 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: [
+ "Ned", "Pon", "Uto", "Sre", "Čet", "Pet", "Sub",
+ "Nedelja", "Ponedeljak", "Utorak", "Srijeda", "Četvrtak", "Petak", "Subota"
+ ],
+ monthNames: [
+ "Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Avg", "Sep", "Okt", "Nov", "Dec",
+ "Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"
+ ],
+ 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: '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);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sr.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sr.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sr.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,129 @@
+;(function($){
+/**
+ * jqGrid Serbian Translation
+ * Александар Миловац(Aleksandar Milovac) aleksandar.milovac(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: "Преглед {0} - {1} од {2}",
+ emptyrecords: "Не постоји ниједан запис",
+ loadtext: "Учитавање...",
+ pgtext : "Страна {0} од {1}"
+ },
+ search : {
+ caption: "Тражење...",
+ Find: "Тражи",
+ Reset: "Ресетуј",
+ odata : ['једнако', 'није једнако', 'мање', 'мање или једнако','веће','веће или једнако', 'почиње са','не почиње са','је у','није у','завршава са','не завршава са','садржи','не садржи'],
+ groupOps: [ { op: "И", text: "сви" }, { op: "ИЛИ", text: "сваки" } ],
+ matchText: " match",
+ rulesText: " правила"
+ },
+ edit : {
+ addCaption: "Додај запис",
+ editCaption: "Измени запис",
+ bSubmit: "Пошаљи",
+ bCancel: "Одустани",
+ bClose: "Затвори",
+ saveData: "Податак је измењен! Сачувај измене?",
+ bYes : "Да",
+ bNo : "Не",
+ bExit : "Одустани",
+ msg: {
+ required:"Поље је обавезно",
+ number:"Молим, унесите исправан број",
+ minValue:"вредност мора бити већа од или једнака са ",
+ maxValue:"вредност мора бити мања од или једнака са",
+ email: "није исправна имејл адреса",
+ integer: "Молим, унесите исправну целобројну вредност ",
+ date: "Молим, унесите исправан датум",
+ url: "није исправан УРЛ. Потребан је префикс ('http://' or 'https://')",
+ nodefined : " није дефинисан!",
+ novalue : " захтевана је повратна вредност!",
+ customarray : "Custom function should return array!",
+ customfcheck : "Custom function should be present in case of custom checking!"
+
+ }
+ },
+ view : {
+ caption: "Погледај запис",
+ bClose: "Затвори"
+ },
+ del : {
+ caption: "Избриши",
+ msg: "Избриши изабран(е) запис(е)?",
+ bSubmit: "Ибриши",
+ bCancel: "Одбаци"
+ },
+ nav : {
+ edittext: "",
+ edittitle: "Измени изабрани ред",
+ addtext:"",
+ addtitle: "Додај нови ред",
+ deltext: "",
+ deltitle: "Избриши изабран ред",
+ searchtext: "",
+ searchtitle: "Нађи записе",
+ refreshtext: "",
+ refreshtitle: "Поново учитај податке",
+ alertcap: "Упозорење",
+ alerttext: "Молим, изаберите ред",
+ viewtext: "",
+ viewtitle: "Погледај изабрани ред"
+ },
+ col : {
+ caption: "Изабери колоне",
+ bSubmit: "ОК",
+ bCancel: "Одбаци"
+ },
+ errors : {
+ errcap : "Грешка",
+ nourl : "Није постављен URL",
+ norecords: "Нема записа за обраду",
+ model : "Дужина модела 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: [
+ "Нед", "Пон", "Уто", "Сре", "Чет", "Пет", "Суб",
+ "Недеља", "Понедељак", "Уторак", "Среда", "Четвртак", "Петак", "Субота"
+ ],
+ monthNames: [
+ "Јан", "Феб", "Мар", "Апр", "Мај", "Јун", "Јул", "Авг", "Сеп", "Окт", "Нов", "Дец",
+ "Јануар", "Фебруар", "Март", "Април", "Мај", "Јун", "Јул", "Август", "Септембар", "Октобар", "Новембар", "Децембар"
+ ],
+ 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: '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);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sv.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sv.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-sv.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,128 @@
+;(function($){
+/**
+ * jqGrid Swedish Translation
+ * Harald Normann harald.normann(a)wts.se, harald.normann(a)gmail.com
+ * http://www.worldteamsoftware.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: "Visar {0} - {1} av {2}",
+ emptyrecords: "Det finns inga poster att visa",
+ loadtext: "Laddar...",
+ pgtext : "Sida {0} av {1}"
+ },
+ search : {
+ 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"
+ },
+ edit : {
+ addCaption: "Ny Post",
+ editCaption: "Redigera Post",
+ bSubmit: "Spara",
+ bCancel: "Avbryt",
+ bClose: "Stäng",
+ saveData: "Data har ändrats! Spara förändringar?",
+ bYes : "Ja",
+ bNo : "Nej",
+ bExit : "Avbryt",
+ msg: {
+ required:"Fältet är obligatoriskt",
+ number:"Välj korrekt nummer",
+ minValue:"värdet måste vara större än eller lika med",
+ maxValue:"värdet måste vara mindre än eller lika med",
+ email: "är inte korrekt e-post adress",
+ integer: "Var god ange korrekt heltal",
+ date: "Var god ange korrekt datum",
+ url: "är inte en korrekt URL. Prefix måste anges ('http://' or 'https://')",
+ nodefined : " är inte definierad!",
+ novalue : " returvärde måste anges!",
+ customarray : "Custom funktion måste returnera en vektor!",
+ customfcheck : "Custom funktion måste finnas om Custom kontroll sker!"
+ }
+ },
+ view : {
+ caption: "Visa Post",
+ bClose: "Stäng"
+ },
+ del : {
+ caption: "Radera",
+ msg: "Radera markerad(e) post(er)?",
+ bSubmit: "Radera",
+ bCancel: "Avbryt"
+ },
+ nav : {
+ edittext: "",
+ edittitle: "Redigera markerad rad",
+ addtext:"",
+ addtitle: "Skapa ny post",
+ deltext: "",
+ deltitle: "Radera markerad rad",
+ searchtext: "",
+ searchtitle: "Sök poster",
+ refreshtext: "",
+ refreshtitle: "Uppdatera data",
+ alertcap: "Varning",
+ alerttext: "Ingen rad är markerad",
+ viewtext: "",
+ viewtitle: "Visa markerad rad"
+ },
+ col : {
+ caption: "Välj Kolumner",
+ bSubmit: "OK",
+ bCancel: "Avbryt"
+ },
+ errors : {
+ errcap : "Fel",
+ nourl : "URL saknas",
+ norecords: "Det finns inga poster att bearbeta",
+ model : "Antal colNames <> colModel!"
+ },
+ formatter : {
+ integer : {thousandsSeparator: " ", defaultValue: '0'},
+ number : {decimalSeparator:",", thousandsSeparator: " ", decimalPlaces: 2, defaultValue: '0,00'},
+ currency : {decimalSeparator:",", thousandsSeparator: " ", decimalPlaces: 2, prefix: "", suffix:"Kr", defaultValue: '0,00'},
+ date : {
+ dayNames: [
+ "Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör",
+ "Söndag", "Måndag", "Tisdag", "Onsdag", "Torsdag", "Fredag", "Lördag"
+ ],
+ monthNames: [
+ "Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec",
+ "Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December"
+ ],
+ AmPm : ["fm","em","FM","EM"],
+ 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',
+ 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);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-th.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-th.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-th.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,129 @@
+;(function($){
+/**
+ * jqGrid Thai Translation
+ * Kittituch Manakul m.kittituch(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: "แสดง {0} - {1} จาก {2}",
+ emptyrecords: "ไม่พบข้อมูล",
+ loadtext: "กำลังร้องขอข้อมูล...",
+ pgtext : "หน้า {0} จาก {1}"
+ },
+ search : {
+ caption: "กำลังค้นหา...",
+ Find: "ค้นหา",
+ Reset: "คืนค่ากลับ",
+ odata : ['เท่ากับ', 'ไม่เท่ากับ', 'น้อยกว่า', 'ไม่มากกว่า','มากกกว่า','ไม่น้อยกว่า', 'ขึ้นต้นด้วย','ไม่ขึ้นต้นด้วย','มีคำใดคำหนึ่งใน','ไม่มีคำใดคำหนึ่งใน','ลงท้ายด้วย','ไม่ลงท้ายด้วย','มีคำว่า','ไม่มีคำว่า'],
+ groupOps: [ { op: "และ", text: "ทั้งหมด" }, { op: "หรือ", text: "ใดๆ" } ],
+ matchText: " ตรงกันกับ",
+ rulesText: " ตามกฏ"
+ },
+ edit : {
+ addCaption: "เพิ่มข้อมูล",
+ editCaption: "แก้ไขข้อมูล",
+ bSubmit: "บันทึก",
+ bCancel: "ยกเลิก",
+ bClose: "ปิด",
+ saveData: "คุณต้องการบันทึการแก้ไข ใช่หรือไม่?",
+ bYes : "บันทึก",
+ bNo : "ละทิ้งการแก้ไข",
+ bExit : "ยกเลิก",
+ msg: {
+ required:"ข้อมูลนี้จำเป็น",
+ number:"กรุณากรอกหมายเลขให้ถูกต้อง",
+ minValue:"ค่าของข้อมูลนี้ต้องไม่น้อยกว่า",
+ maxValue:"ค่าของข้อมูลนี้ต้องไม่มากกว่า",
+ email: "อีเมลล์นี้ไม่ถูกต้อง",
+ integer: "กรุณากรอกเป็นจำนวนเต็ม",
+ date: "กรุณากรอกวันที่ให้ถูกต้อง",
+ url: "URL ไม่ถูกต้อง URL จำเป็นต้องขึ้นต้นด้วย 'http://' หรือ 'https://'",
+ nodefined : "ไม่ได้ถูกกำหนดค่า!",
+ novalue : "ต้องการการคืนค่า!",
+ customarray : "ฟังก์ชันที่สร้างขึ้นต้องส่งค่ากลับเป็นแบบแอเรย์",
+ customfcheck : "ระบบต้องการฟังก์ชันที่สร้างขึ้นสำหรับการตรวจสอบ!"
+
+ }
+ },
+ view : {
+ caption: "เรียกดูข้อมูล",
+ bClose: "ปิด"
+ },
+ del : {
+ caption: "ลบข้อมูล",
+ msg: "คุณต้องการลบข้อมูลที่ถูกเลือก ใช่หรือไม่?",
+ bSubmit: "ต้องการลบ",
+ bCancel: "ยกเลิก"
+ },
+ nav : {
+ edittext: "",
+ edittitle: "แก้ไขข้อมูล",
+ addtext:"",
+ addtitle: "เพิ่มข้อมูล",
+ deltext: "",
+ deltitle: "ลบข้อมูล",
+ searchtext: "",
+ searchtitle: "ค้นหาข้อมูล",
+ refreshtext: "",
+ refreshtitle: "รีเฟรช",
+ alertcap: "คำเตือน",
+ alerttext: "กรุณาเลือกข้อมูล",
+ viewtext: "",
+ viewtitle: "ดูรายละเอียดข้อมูล"
+ },
+ col : {
+ caption: "กรุณาเลือกคอลัมน์",
+ bSubmit: "ตกลง",
+ bCancel: "ยกเลิก"
+ },
+ errors : {
+ errcap : "เกิดความผิดพลาด",
+ nourl : "ไม่ได้กำหนด URL",
+ norecords: "ไม่มีข้อมูลให้ดำเนินการ",
+ model : "จำนวนคอลัมน์ไม่เท่ากับจำนวนคอลัมน์โมเดล!"
+ },
+ 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: [
+ "อา", "จ", "อ", "พ", "พฤ", "ศ", "ส",
+ "อาทิตย์", "จันทร์", "อังคาร", "พุธ", "พฤหัสบดี", "ศูกร์", "เสาร์"
+ ],
+ monthNames: [
+ "ม.ค.", "ก.พ.", "มี.ค.", "เม.ย.", "พ.ค.", "มิ.ย.", "ก.ค.", "ส.ค.", "ก.ย.", "ต.ค.", "พ.ย.", "ธ.ค.",
+ "มกราคม", "กุมภาพันธ์", "มีนาคม", "เมษายน", "พฤษภาคม", "มิถุนายน", "กรกฏาคม", "สิงหาคม", "กันยายน", "ตุลาคม", "พฤศจิกายน", "ธันวาคม"
+ ],
+ AmPm : ["am","pm","AM","PM"],
+ 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: "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);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-tr.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-tr.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-tr.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,127 @@
+;(function($){
+/**
+ * jqGrid Turkish Translation
+ * Erhan Gündoğan (erhan(a)trposta.net)
+ * http://blog.zakkum.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: "{0}-{1} listeleniyor. Toplam:{2}",
+ emptyrecords: "Kayıt bulunamadı",
+ loadtext: "Yükleniyor...",
+ pgtext : "{0}/{1}. Sayfa"
+ },
+ search : {
+ 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"
+ },
+ edit : {
+ addCaption: "Kayıt Ekle",
+ editCaption: "Kayıt Düzenle",
+ bSubmit: "Gönder",
+ bCancel: "İptal",
+ bClose: "Kapat",
+ saveData: "Veriler değişti! Kayıt edilsin mi?",
+ bYes : "Evet",
+ bNo : "Hayıt",
+ bExit : "İptal",
+ msg: {
+ required:"Alan gerekli",
+ number:"Lütfen bir numara giriniz",
+ minValue:"girilen değer daha büyük ya da buna eşit olmalıdır",
+ maxValue:"girilen değer daha küçük ya da buna eşit olmalıdır",
+ email: "geçerli bir e-posta adresi değildir",
+ integer: "Lütfen bir tamsayı giriniz",
+ url: "Geçerli bir URL değil. ('http://' or 'https://') ön eki gerekli.",
+ 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: "Kayıt Görüntüle",
+ bClose: "Kapat"
+ },
+ del : {
+ caption: "Sil",
+ msg: "Seçilen kayıtlar silinsin mi?",
+ bSubmit: "Sil",
+ bCancel: "İptal"
+ },
+ nav : {
+ edittext: " ",
+ edittitle: "Seçili satırı düzenle",
+ addtext:" ",
+ addtitle: "Yeni satır ekle",
+ deltext: " ",
+ deltitle: "Seçili satırı sil",
+ searchtext: " ",
+ searchtitle: "Kayıtları bul",
+ refreshtext: "",
+ refreshtitle: "Tabloyu yenile",
+ alertcap: "Uyarı",
+ alerttext: "Lütfen bir satır seçiniz",
+ viewtext: "",
+ viewtitle: "Seçilen satırı görüntüle"
+ },
+ col : {
+ caption: "Sütunları göster/gizle",
+ bSubmit: "Gönder",
+ bCancel: "İptal"
+ },
+ errors : {
+ errcap : "Hata",
+ nourl : "Bir url yapılandırılmamış",
+ norecords: "İşlem yapılacak bir kayıt yok",
+ model : "colNames uzunluğu <> 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: [
+ "Paz", "Pts", "Sal", "Çar", "Per", "Cum", "Cts",
+ "Pazar", "Pazartesi", "Salı", "Çarşamba", "Perşembe", "Cuma", "Cumartesi"
+ ],
+ monthNames: [
+ "Oca", "Şub", "Mar", "Nis", "May", "Haz", "Tem", "Ağu", "Eyl", "Eki", "Kas", "Ara",
+ "Ocak", "Şubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "Ağustos", "Eylül", "Ekim", "Kasım", "Aralık"
+ ],
+ 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: '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);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-tw.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-tw.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-tw.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,130 @@
+;(function($){
+/**
+ * jqGrid Chinese (Taiwan) Translation for v4.2
+ * linquize
+ * https://github.com/linquize/jqGrid
+ * 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: "{0} - {1} 共 {2} 條",
+ emptyrecords: "沒有記錄",
+ loadtext: "載入中...",
+ pgtext : " {0} 共 {1} 頁"
+ },
+ search : {
+ caption: "搜尋...",
+ Find: "搜尋",
+ Reset: "重設",
+ odata : ['等於 ', '不等於 ', '小於 ', '小於等於 ','大於 ','大於等於 ', '開始於 ','不開始於 ','在其中 ','不在其中 ','結束於 ','不結束於 ','包含 ','不包含 '],
+ groupOps: [ { op: "AND", text: "所有" }, { op: "OR", text: "任一" } ],
+ matchText: " 匹配",
+ rulesText: " 規則"
+ },
+ edit : {
+ addCaption: "新增記錄",
+ editCaption: "編輯記錄",
+ bSubmit: "提交",
+ bCancel: "取消",
+ bClose: "關閉",
+ saveData: "資料已改變,是否儲存?",
+ bYes : "是",
+ bNo : "否",
+ bExit : "取消",
+ msg: {
+ required:"此欄必要",
+ number:"請輸入有效的數字",
+ minValue:"值必須大於等於 ",
+ maxValue:"值必須小於等於 ",
+ email: "不是有效的e-mail地址",
+ integer: "請輸入有效整数",
+ date: "請輸入有效時間",
+ url: "網址無效。前綴必須為 ('http://' 或 'https://')",
+ nodefined : " 未定義!",
+ novalue : " 需要傳回值!",
+ customarray : "自訂函數應傳回陣列!",
+ customfcheck : "自訂檢查應有自訂函數!"
+
+ }
+ },
+ view : {
+ caption: "查看記錄",
+ bClose: "關閉"
+ },
+ del : {
+ caption: "刪除",
+ msg: "刪除已選記錄?",
+ bSubmit: "刪除",
+ bCancel: "取消"
+ },
+ nav : {
+ edittext: "",
+ edittitle: "編輯已選列",
+ addtext:"",
+ addtitle: "新增列",
+ deltext: "",
+ deltitle: "刪除已選列",
+ searchtext: "",
+ searchtitle: "搜尋記錄",
+ refreshtext: "",
+ refreshtitle: "重新整理表格",
+ alertcap: "警告",
+ alerttext: "請選擇列",
+ viewtext: "",
+ viewtitle: "檢視已選列"
+ },
+ col : {
+ caption: "選擇欄",
+ bSubmit: "確定",
+ bCancel: "取消"
+ },
+ errors : {
+ errcap : "錯誤",
+ nourl : "未設定URL",
+ norecords: "無需要處理的記錄",
+ model : "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: [
+ "日", "一", "二", "三", "四", "五", "六",
+ "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"
+ ],
+ monthNames: [
+ "一", "二", "三", "四", "五", "六", "七", "八", "九", "十", "十一", "十二",
+ "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"
+ ],
+ AmPm : ["上午","下午","上午","下午"],
+ 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',
+ masks : {
+ ISO8601Long:"Y-m-d H:i:s",
+ ISO8601Short:"Y-m-d",
+ ShortDate: "Y/j/n",
+ 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);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ua.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ua.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/i18n/grid.locale-ua.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,128 @@
+;(function($){
+/**
+ * jqGrid Ukrainian Translation v1.0 02.07.2009
+ * Sergey Dyagovchenko
+ * http://d.sumy.ua
+ * 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: "Перегляд {0} - {1} з {2}",
+ emptyrecords: "Немає записів для перегляду",
+ loadtext: "Завантаження...",
+ pgtext : "Стор. {0} з {1}"
+ },
+ search : {
+ caption: "Пошук...",
+ Find: "Знайти",
+ Reset: "Скидання",
+ odata : ['рівно', 'не рівно', 'менше', 'менше або рівне','більше','більше або рівне', 'починається з','не починається з','знаходиться в','не знаходиться в','закінчується на','не закінчується на','містить','не містить'],
+ groupOps: [ { op: "AND", text: "все" }, { op: "OR", text: "будь-який" } ],
+ matchText: " збігається",
+ rulesText: " правила"
+ },
+ edit : {
+ addCaption: "Додати запис",
+ editCaption: "Змінити запис",
+ bSubmit: "Зберегти",
+ bCancel: "Відміна",
+ bClose: "Закрити",
+ saveData: "До данних були внесені зміни! Зберегти зміни?",
+ bYes : "Так",
+ bNo : "Ні",
+ bExit : "Відміна",
+ msg: {
+ required:"Поле є обов'язковим",
+ number:"Будь ласка, введіть правильне число",
+ minValue:"значення повинне бути більше або дорівнює",
+ maxValue:"значення повинно бути менше або дорівнює",
+ email: "некоректна адреса електронної пошти",
+ integer: "Будь ласка, введення дійсне ціле значення",
+ date: "Будь ласка, введення дійсне значення дати",
+ url: "не дійсний 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!"
+ }
+ },
+ view : {
+ caption: "Переглянути запис",
+ bClose: "Закрити"
+ },
+ del : {
+ caption: "Видалити",
+ msg: "Видалити обраний запис(и)?",
+ bSubmit: "Видалити",
+ bCancel: "Відміна"
+ },
+ nav : {
+ edittext: " ",
+ edittitle: "Змінити вибраний запис",
+ addtext:" ",
+ addtitle: "Додати новий запис",
+ deltext: " ",
+ deltitle: "Видалити вибраний запис",
+ searchtext: " ",
+ searchtitle: "Знайти записи",
+ refreshtext: "",
+ refreshtitle: "Оновити таблицю",
+ alertcap: "Попередження",
+ alerttext: "Будь ласка, виберіть запис",
+ viewtext: "",
+ viewtitle: "Переглянути обраний запис"
+ },
+ col : {
+ caption: "Показати/Приховати стовпці",
+ bSubmit: "Зберегти",
+ bCancel: "Відміна"
+ },
+ errors : {
+ errcap : "Помилка",
+ nourl : "URL не задан",
+ norecords: "Немає записів для обробки",
+ model : "Число полів не відповідає числу стовпців таблиці!"
+ },
+ 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: [
+ "Нд", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб",
+ "Неділя", "Понеділок", "Вівторок", "Середа", "Четвер", "П'ятниця", "Субота"
+ ],
+ monthNames: [
+ "Січ", "Лют", "Бер", "Кві", "Тра", "Чер", "Лип", "Сер", "Вер", "Жов", "Лис", "Гру",
+ "Січень", "Лютий", "Березень", "Квітень", "Травень", "Червень", "Липень", "Серпень", "Вересень", "Жовтень", "Листопад", "Грудень"
+ ],
+ 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: '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",
+ MonthDay: "F d",
+ 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'
+ }
+});
+})(jQuery);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/jquery.jqGrid.src.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/jquery.jqGrid.src.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/js/jquery.jqGrid.src.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,12248 @@
+// ==ClosureCompiler==
+// @compilation_level SIMPLE_OPTIMIZATIONS
+
+/**
+ * @license jqGrid 4.4.1 - 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
+ */
+//jsHint options
+/*global document, window, jQuery, DOMParser, ActiveXObject, $, alert */
+
+(function ($) {
+"use strict";
+$.jgrid = $.jgrid || {};
+$.extend($.jgrid,{
+ version : "4.4.1",
+ htmlDecode : function(value){
+ 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){
+ return !value ? value : String(value).replace(/&/g, "&").replace(/\"/g, """).replace(/</g, "<").replace(/>/g, ">");
+ },
+ format : function(format){ //jqgformat
+ var args = $.makeArray(arguments).slice(1);
+ if(format===undefined) { format = ""; }
+ return format.replace(/\{(\d+)\}/g, function(m, i){
+ return args[i];
+ });
+ },
+ 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); }
+ return c.cellIndex;
+ },
+ stripHtml : function(v) {
+ v = 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") {
+ 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) { js = "{}"; }
+ 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];
+ }
+ }
+ if(format[k] == 'F') {
+ dM = $.inArray(date[k],dfmt);
+ if(dM !== -1 && dM > 11){
+ date[k] = dM+1-12;
+ tsp.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] == '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] === 'g') {
+ tsp.h = parseInt(date[k], 10);
+ }
+ if(date[k] !== undefined) {
+ tsp[format[k].toLowerCase()] = parseInt(date[k],10);
+ }
+ }
+ 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; }
+ }
+ return new Date(tsp.y, tsp.m, tsp.d, tsp.h, tsp.i, tsp.s, tsp.u);
+ },
+ jqID : function(sid){
+ return String(sid).replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g,"\\$&");
+ },
+ guid : 1,
+ uidPref: 'jqg',
+ randId : function( prefix ) {
+ return (prefix? prefix: $.jgrid.uidPref) + ($.jgrid.guid++);
+ },
+ getAccessor : function(obj, expr) {
+ var ret,p,prm = [], i;
+ if( typeof expr === 'function') { return expr(obj); }
+ ret = obj[expr];
+ if(ret===undefined) {
+ try {
+ if ( typeof expr === 'string' ) {
+ prm = expr.split('.');
+ }
+ i = prm.length;
+ if( i ) {
+ ret = obj;
+ while (ret && i--) {
+ p = prm.shift();
+ ret = ret[p];
+ }
+ }
+ } catch (e) {}
+ }
+ return ret;
+ },
+ getXmlData: function (obj, expr, returnObj) {
+ 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>"),
+ testCell = $testDiv.appendTo("body")
+ .find("td")
+ .width();
+ $testDiv.remove();
+ return testCell !== 5;
+ },
+ ajaxOptions: {},
+ from : function(source){
+ // Original Author Hugo Bonacci
+ // License MIT http://jlinq.codeplex.com/license
+ var QueryObject=function(d,q){
+ if(typeof(d)=="string"){
+ d=$.data(d);
+ }
+ var self=this,
+ _data=d,
+ _usecase=true,
+ _trim=false,
+ _query=q,
+ _stripNum = /[\$,%]/g,
+ _lastCommand=null,
+ _lastField=null,
+ _orDepth=0,
+ _negate=false,
+ _queuedOperator="",
+ _sorting=[],
+ _useProperties=true;
+ if(typeof(d)=="object"&&d.push) {
+ if(d.length>0){
+ if(typeof(d[0])!="object"){
+ _useProperties=false;
+ }else{
+ _useProperties=true;
+ }
+ }
+ }else{
+ throw "data provides is not an array";
+ }
+ this._hasData=function(){
+ return _data===null?false:_data.length===0?false:true;
+ };
+ this._getStr=function(s){
+ var phrase=[];
+ if(_trim){
+ phrase.push("jQuery.trim(");
+ }
+ phrase.push("String("+s+")");
+ if(_trim){
+ phrase.push(")");
+ }
+ if(!_usecase){
+ phrase.push(".toLowerCase()");
+ }
+ return phrase.join("");
+ };
+ this._strComp=function(val){
+ if(typeof(val)=="string"){
+ return".toString()";
+ }else{
+ return"";
+ }
+ };
+ this._group=function(f,u){
+ return({field:f.toString(),unique:u,items:[]});
+ };
+ this._toStr=function(phrase){
+ if(_trim){
+ phrase=$.trim(phrase);
+ }
+ phrase=phrase.toString().replace(/\\/g,'\\\\').replace(/\"/g,'\\"');
+ return _usecase ? phrase : phrase.toLowerCase();
+ };
+ this._funcLoop=function(func){
+ var results=[];
+ $.each(_data,function(i,v){
+ results.push(func(v));
+ });
+ return results;
+ };
+ this._append=function(s){
+ var i;
+ if(_query===null){
+ _query="";
+ } else {
+ _query+=_queuedOperator === "" ? " && " :_queuedOperator;
+ }
+ for (i=0;i<_orDepth;i++){
+ _query+="(";
+ }
+ if(_negate){
+ _query+="!";
+ }
+ _query+="("+s+")";
+ _negate=false;
+ _queuedOperator="";
+ _orDepth=0;
+ };
+ this._setCommand=function(f,c){
+ _lastCommand=f;
+ _lastField=c;
+ };
+ this._resetNegate=function(){
+ _negate=false;
+ };
+ this._repeatCommand=function(f,v){
+ if(_lastCommand===null){
+ return self;
+ }
+ if(f!==null&&v!==null){
+ return _lastCommand(f,v);
+ }
+ if(_lastField===null){
+ return _lastCommand(f);
+ }
+ if(!_useProperties){
+ return _lastCommand(f);
+ }
+ return _lastCommand(_lastField,f);
+ };
+ this._equals=function(a,b){
+ return(self._compare(a,b,1)===0);
+ };
+ this._compare=function(a,b,d){
+ var toString = Object.prototype.toString;
+ if( d === undefined) { d = 1; }
+ if(a===undefined) { a = null; }
+ if(b===undefined) { b = null; }
+ if(a===null && b===null){
+ return 0;
+ }
+ if(a===null&&b!==null){
+ return 1;
+ }
+ if(a!==null&&b===null){
+ return -1;
+ }
+ if (toString.call(a) === '[object Date]' && toString.call(b) === '[object Date]') {
+ if (a < b) { return -d; }
+ if (a > b) { return d; }
+ return 0;
+ }
+ if(!_usecase && typeof(a) !== "number" && typeof(b) !== "number" ) {
+ a=String(a).toLowerCase();
+ b=String(b).toLowerCase();
+ }
+ if(a<b){return -d;}
+ if(a>b){return d;}
+ return 0;
+ };
+ this._performSort=function(){
+ if(_sorting.length===0){return;}
+ _data=self._doSort(_data,0);
+ };
+ this._doSort=function(d,q){
+ var by=_sorting[q].by,
+ dir=_sorting[q].dir,
+ type = _sorting[q].type,
+ dfmt = _sorting[q].datefmt;
+ 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++){
+ 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,
+ findSortKey;
+
+ if(type === undefined ) { type = "text"; }
+ 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') {
+ findSortKey = function($cell) {
+ return $cell ? parseFloat(String($cell).replace(_stripNum, '')) : 0;
+ };
+ } else if(type == 'date' || type == 'datetime') {
+ findSortKey = function($cell) {
+ return $.jgrid.parseDate(dfmt,$cell).getTime();
+ };
+ } else if($.isFunction(type)) {
+ findSortKey = type;
+ } else {
+ findSortKey = function($cell) {
+ if(!$cell) {$cell ="";}
+ return $.trim(String($cell).toUpperCase());
+ };
+ }
+ $.each(data,function(i,v){
+ ab = by!=="" ? $.jgrid.getAccessor(v,by) : v;
+ if(ab === undefined) { ab = ""; }
+ ab = findSortKey(ab, v);
+ _sortData.push({ 'vSort': ab,'index':i});
+ });
+
+ _sortData.sort(function(a,b){
+ a = a.vSort;
+ b = b.vSort;
+ return self._compare(a,b,newDir);
+ });
+ j=0;
+ var nrec= data.length;
+ // overhead, but we do not change the original data.
+ while(j<nrec) {
+ i = _sortData[j].index;
+ sortData.push(data[i]);
+ j++;
+ }
+ return sortData;
+ };
+ this._getGroup=function(data,by,dir,type, dfmt){
+ var results=[],
+ group=null,
+ last=null, val;
+ $.each(self._getOrder(data,by,dir,type, dfmt),function(i,v){
+ val = $.jgrid.getAccessor(v, by);
+ if(val === undefined) { val = ""; }
+ if(!self._equals(last,val)){
+ last=val;
+ if(group !== null){
+ results.push(group);
+ }
+ group=self._group(by,val);
+ }
+ group.items.push(v);
+ });
+ if(group !== null){
+ results.push(group);
+ }
+ return results;
+ };
+ this.ignoreCase=function(){
+ _usecase=false;
+ return self;
+ };
+ this.useCase=function(){
+ _usecase=true;
+ return self;
+ };
+ this.trim=function(){
+ _trim=true;
+ return self;
+ };
+ this.noTrim=function(){
+ _trim=false;
+ return self;
+ };
+ this.execute=function(){
+ var match=_query, results=[];
+ if(match === null){
+ return self;
+ }
+ $.each(_data,function(){
+ if(eval(match)){results.push(this);}
+ });
+ _data=results;
+ return self;
+ };
+ this.data=function(){
+ return _data;
+ };
+ this.select=function(f){
+ self._performSort();
+ if(!self._hasData()){ return[]; }
+ self.execute();
+ if($.isFunction(f)){
+ var results=[];
+ $.each(_data,function(i,v){
+ results.push(f(v));
+ });
+ return results;
+ }
+ return _data;
+ };
+ this.hasMatch=function(){
+ if(!self._hasData()) { return false; }
+ self.execute();
+ return _data.length>0;
+ };
+ this.andNot=function(f,v,x){
+ _negate=!_negate;
+ return self.and(f,v,x);
+ };
+ this.orNot=function(f,v,x){
+ _negate=!_negate;
+ return self.or(f,v,x);
+ };
+ this.not=function(f,v,x){
+ return self.andNot(f,v,x);
+ };
+ this.and=function(f,v,x){
+ _queuedOperator=" && ";
+ if(f===undefined){
+ return self;
+ }
+ return self._repeatCommand(f,v,x);
+ };
+ this.or=function(f,v,x){
+ _queuedOperator=" || ";
+ if(f===undefined) { return self; }
+ return self._repeatCommand(f,v,x);
+ };
+ this.orBegin=function(){
+ _orDepth++;
+ return self;
+ };
+ this.orEnd=function(){
+ if (_query !== null){
+ _query+=")";
+ }
+ return self;
+ };
+ this.isNot=function(f){
+ _negate=!_negate;
+ return self.is(f);
+ };
+ this.is=function(f){
+ self._append('this.'+f);
+ self._resetNegate();
+ return self;
+ };
+ this._compareValues=function(func,f,v,how,t){
+ var fld;
+ if(_useProperties){
+ fld='jQuery.jgrid.getAccessor(this,\''+f+'\')';
+ }else{
+ fld='this';
+ }
+ if(v===undefined) { v = null; }
+ //var val=v===null?f:v,
+ var val =v,
+ swst = t.stype === undefined ? "text" : t.stype;
+ if(v !== null) {
+ switch(swst) {
+ case 'int':
+ case 'integer':
+ val = (isNaN(Number(val)) || val==="") ? '0' : val; // To be fixed with more inteligent code
+ fld = 'parseInt('+fld+',10)';
+ val = 'parseInt('+val+',10)';
+ break;
+ case 'float':
+ case 'number':
+ case 'numeric':
+ val = String(val).replace(_stripNum, '');
+ val = (isNaN(Number(val)) || val==="") ? '0' : val; // To be fixed with more inteligent code
+ fld = 'parseFloat('+fld+')';
+ val = 'parseFloat('+val+')';
+ break;
+ case 'date':
+ case 'datetime':
+ val = String($.jgrid.parseDate(t.newfmt || 'Y-m-d',val).getTime());
+ fld = 'jQuery.jgrid.parseDate("'+t.srcfmt+'",'+fld+').getTime()';
+ break;
+ default :
+ fld=self._getStr(fld);
+ val=self._getStr('"'+self._toStr(val)+'"');
+ }
+ }
+ self._append(fld+' '+how+' '+val);
+ self._setCommand(func,f);
+ self._resetNegate();
+ return self;
+ };
+ this.equals=function(f,v,t){
+ return self._compareValues(self.equals,f,v,"==",t);
+ };
+ this.notEquals=function(f,v,t){
+ return self._compareValues(self.equals,f,v,"!==",t);
+ };
+ this.isNull = function(f,v,t){
+ return self._compareValues(self.equals,f,null,"===",t);
+ };
+ this.greater=function(f,v,t){
+ return self._compareValues(self.greater,f,v,">",t);
+ };
+ this.less=function(f,v,t){
+ return self._compareValues(self.less,f,v,"<",t);
+ };
+ this.greaterOrEquals=function(f,v,t){
+ return self._compareValues(self.greaterOrEquals,f,v,">=",t);
+ };
+ this.lessOrEquals=function(f,v,t){
+ return self._compareValues(self.lessOrEquals,f,v,"<=",t);
+ };
+ this.startsWith=function(f,v){
+ var val = (v===undefined || 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)+'"'));
+ }else{
+ length=_trim?$.trim(v.toString()).length:v.toString().length;
+ self._append(self._getStr('this')+'.substr(0,'+length+') == '+self._getStr('"'+self._toStr(f)+'"'));
+ }
+ self._setCommand(self.startsWith,f);
+ self._resetNegate();
+ return self;
+ };
+ this.endsWith=function(f,v){
+ var val = (v===undefined || 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)+'"');
+ } else {
+ self._append(self._getStr('this')+'.substr('+self._getStr('this')+'.length-"'+self._toStr(f)+'".length,"'+self._toStr(f)+'".length) == "'+self._toStr(f)+'"');
+ }
+ self._setCommand(self.endsWith,f);self._resetNegate();
+ return self;
+ };
+ this.contains=function(f,v){
+ if(_useProperties){
+ self._append(self._getStr('jQuery.jgrid.getAccessor(this,\''+f+'\')')+'.indexOf("'+self._toStr(v)+'",0) > -1');
+ }else{
+ self._append(self._getStr('this')+'.indexOf("'+self._toStr(f)+'",0) > -1');
+ }
+ self._setCommand(self.contains,f);
+ self._resetNegate();
+ return self;
+ };
+ this.groupBy=function(by,dir,type, datefmt){
+ if(!self._hasData()){
+ return null;
+ }
+ 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";}
+ _sorting.push({by:by,dir:dir,type:stype, datefmt: dfmt});
+ return self;
+ };
+ return self;
+ };
+ return new QueryObject(source,null);
+ },
+ extend : function(methods) {
+ $.extend($.fn.jqGrid,methods);
+ if (!this.no_legacy_api) {
+ $.fn.extend(methods);
+ }
+ }
+});
+
+$.fn.jqGrid = function( pin ) {
+ if (typeof pin == 'string') {
+ //var fn = $.fn.jqGrid[pin];
+ var fn = $.jgrid.getAccessor($.fn.jqGrid,pin);
+ if (!fn) {
+ throw ("jqGrid - No such method: " + pin);
+ }
+ var args = $.makeArray(arguments).slice(1);
+ return fn.apply(this,args);
+ }
+ return this.each( function() {
+ if(this.grid) {return;}
+
+ var p = $.extend(true,{
+ url: "",
+ height: 150,
+ page: 1,
+ rowNum: 20,
+ rowTotal : null,
+ records: 0,
+ pager: "",
+ pgbuttons: true,
+ pginput: true,
+ colModel: [],
+ rowList: [],
+ colNames: [],
+ sortorder: "asc",
+ sortname: "",
+ datatype: "xml",
+ mtype: "GET",
+ altRows: false,
+ selarrrow: [],
+ savedRow: [],
+ shrinkToFit: true,
+ xmlReader: {},
+ jsonReader: {},
+ subGrid: false,
+ subGridModel :[],
+ reccount: 0,
+ lastpage: 0,
+ lastsort: 0,
+ selrow: null,
+ beforeSelectRow: null,
+ onSelectRow: null,
+ onSortCol: null,
+ ondblClickRow: null,
+ onRightClickRow: null,
+ onPaging: null,
+ onSelectAll: null,
+ loadComplete: null,
+ gridComplete: null,
+ loadError: null,
+ loadBeforeSend: null,
+ afterInsertRow: null,
+ beforeRequest: null,
+ beforeProcessing : null,
+ onHeaderClick: null,
+ viewrecords: false,
+ loadonce: false,
+ multiselect: false,
+ multikey: false,
+ editurl: null,
+ search: false,
+ caption: "",
+ hidegrid: true,
+ hiddengrid: false,
+ postData: {},
+ userData: {},
+ treeGrid : false,
+ treeGridModel : 'nested',
+ treeReader : {},
+ treeANode : -1,
+ ExpandColumn: null,
+ tree_root_level : 0,
+ prmNames: {page:"page",rows:"rows", sort: "sidx",order: "sord", search:"_search", nd:"nd", id:"id",oper:"oper",editoper:"edit",addoper:"add",deloper:"del", subgridid:"id", npage: null, totalrows:"totalrows"},
+ forceFit : false,
+ gridstate : "visible",
+ cellEdit: false,
+ cellsubmit: "remote",
+ nv:0,
+ loadui: "enable",
+ toolbar: [false,""],
+ scroll: false,
+ multiboxonly : false,
+ deselectAfterSort : true,
+ scrollrows : false,
+ autowidth: false,
+ scrollOffset :18,
+ cellLayout: 5,
+ subGridWidth: 20,
+ multiselectWidth: 20,
+ gridview: false,
+ rownumWidth: 25,
+ rownumbers : false,
+ pagerpos: 'center',
+ recordpos: 'right',
+ footerrow : false,
+ userDataOnFooter : false,
+ hoverrows : true,
+ altclass : 'ui-priority-secondary',
+ viewsortcols : [false,'vertical',true],
+ resizeclass : '',
+ autoencode : false,
+ remapColumns : [],
+ ajaxGridOptions :{},
+ direction : "ltr",
+ toppager: false,
+ headertitles: false,
+ scrollTimeout: 40,
+ 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'},
+ ignoreCase : false,
+ cmTemplate : {},
+ idPrefix : ""
+ }, $.jgrid.defaults, pin || {});
+ var ts= this, grid={
+ headers:[],
+ cols:[],
+ footers: [],
+ dragStart: function(i,x,y) {
+ this.resizing = { idx: i, startX: x.clientX, sOL : y[0]};
+ this.hDiv.style.cursor = "col-resize";
+ 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); }
+ document.onselectstart=function(){return false;};
+ },
+ dragMove: function(x) {
+ if(this.resizing) {
+ var diff = x.clientX-this.resizing.startX,
+ h = this.headers[this.resizing.idx],
+ newWidth = p.direction === "ltr" ? h.width + diff : h.width - diff, hn, nWn;
+ if(newWidth > 33) {
+ this.curGbox.css({left:this.resizing.sOL+diff});
+ if(p.forceFit===true ){
+ hn = this.headers[this.resizing.idx+p.nv];
+ nWn = p.direction === "ltr" ? hn.width - diff : hn.width + diff;
+ if(nWn >33) {
+ h.newWidth = newWidth;
+ hn.newWidth = nWn;
+ }
+ } else {
+ this.newWidth = p.direction === "ltr" ? p.tblwidth+diff : p.tblwidth-diff;
+ h.newWidth = newWidth;
+ }
+ }
+ }
+ },
+ dragEnd: function() {
+ this.hDiv.style.cursor = "default";
+ if(this.resizing) {
+ var idx = this.resizing.idx,
+ nw = this.headers[idx].newWidth || this.headers[idx].width;
+ nw = parseInt(nw,10);
+ this.resizing = false;
+ $("#rs_m"+$.jgrid.jqID(p.id)).css("display","none");
+ p.colModel[idx].width = nw;
+ this.headers[idx].width = nw;
+ this.headers[idx].el.style.width = nw + "px";
+ this.cols[idx].style.width = nw+"px";
+ if(this.footers.length>0) {this.footers[idx].style.width = nw+"px";}
+ if(p.forceFit===true){
+ nw = this.headers[idx+p.nv].newWidth || this.headers[idx+p.nv].width;
+ this.headers[idx+p.nv].width = nw;
+ this.headers[idx+p.nv].el.style.width = nw + "px";
+ this.cols[idx+p.nv].style.width = nw+"px";
+ if(this.footers.length>0) {this.footers[idx+p.nv].style.width = nw+"px";}
+ p.colModel[idx+p.nv].width = nw;
+ } else {
+ p.tblwidth = this.newWidth || p.tblwidth;
+ $('table:first',this.bDiv).css("width",p.tblwidth+"px");
+ $('table:first',this.hDiv).css("width",p.tblwidth+"px");
+ this.hDiv.scrollLeft = this.bDiv.scrollLeft;
+ if(p.footerrow) {
+ $('table:first',this.sDiv).css("width",p.tblwidth+"px");
+ this.sDiv.scrollLeft = this.bDiv.scrollLeft;
+ }
+ }
+ $(ts).triggerHandler("jqGridResizeStop", [nw, idx]);
+ if($.isFunction(p.resizeStop)) { p.resizeStop.call(this,nw,idx); }
+ }
+ this.curGbox = null;
+ document.onselectstart=function(){return true;};
+ },
+ populateVisible: function() {
+ if (grid.timer) { clearTimeout(grid.timer); }
+ grid.timer = null;
+ var dh = $(grid.bDiv).height();
+ if (!dh) { return; }
+ var table = $("table:first", grid.bDiv);
+ var rows, rh;
+ if(table[0].rows.length) {
+ try {
+ rows = table[0].rows[1];
+ rh = rows ? $(rows).outerHeight() || grid.prevRowHeight : grid.prevRowHeight;
+ } catch (pv) {
+ rh = grid.prevRowHeight;
+ }
+ }
+ if (!rh) { return; }
+ grid.prevRowHeight = rh;
+ var rn = p.rowNum;
+ var scrollTop = grid.scrollTop = grid.bDiv.scrollTop;
+ var ttop = Math.round(table.position().top) - scrollTop;
+ var tbot = ttop + table.height();
+ var div = rh * rn;
+ var page, npage, empty;
+ if ( tbot < dh && ttop <= 0 &&
+ (p.lastpage===undefined||parseInt((tbot + scrollTop + div - 1) / div,10) <= p.lastpage))
+ {
+ npage = parseInt((dh - tbot + div - 1) / div,10);
+ if (tbot >= 0 || npage < 2 || p.scroll === true) {
+ page = Math.round((tbot + scrollTop) / div) + 1;
+ ttop = -1;
+ } else {
+ ttop = 1;
+ }
+ }
+ if (ttop > 0) {
+ page = parseInt(scrollTop / div,10) + 1;
+ npage = parseInt((scrollTop + dh) / div,10) + 2 - page;
+ empty = true;
+ }
+ if (npage) {
+ if (p.lastpage && page > p.lastpage || p.lastpage==1 || (page === p.page && page===p.lastpage) ) {
+ return;
+ }
+ if (grid.hDiv.loading) {
+ grid.timer = setTimeout(grid.populateVisible, p.scrollTimeout);
+ } else {
+ p.page = page;
+ if (empty) {
+ grid.selectionPreserver(table[0]);
+ grid.emptyRows.call(table[0], false, false);
+ }
+ grid.populate(npage);
+ }
+ }
+ },
+ scrollGrid: function( e ) {
+ if(p.scroll) {
+ var scrollTop = grid.bDiv.scrollTop;
+ if(grid.scrollTop === undefined) { grid.scrollTop = 0; }
+ if (scrollTop != grid.scrollTop) {
+ grid.scrollTop = scrollTop;
+ if (grid.timer) { clearTimeout(grid.timer); }
+ grid.timer = setTimeout(grid.populateVisible, p.scrollTimeout);
+ }
+ }
+ grid.hDiv.scrollLeft = grid.bDiv.scrollLeft;
+ if(p.footerrow) {
+ grid.sDiv.scrollLeft = grid.bDiv.scrollLeft;
+ }
+ if( e ) { e.stopPropagation(); }
+ },
+ selectionPreserver : function(ts) {
+ var p = ts.p,
+ sr = p.selrow, sra = p.selarrrow ? $.makeArray(p.selarrrow) : null,
+ left = ts.grid.bDiv.scrollLeft,
+ restoreSelection = function() {
+ var i;
+ p.selrow = null;
+ p.selarrrow = [];
+ if(p.multiselect && sra && sra.length>0) {
+ for(i=0;i<sra.length;i++){
+ if (sra[i] != sr) {
+ $(ts).jqGrid("setSelection",sra[i],false, null);
+ }
+ }
+ }
+ if (sr) {
+ $(ts).jqGrid("setSelection",sr,false,null);
+ }
+ ts.grid.bDiv.scrollLeft = left;
+ $(ts).unbind('.selectionPreserver', restoreSelection);
+ };
+ $(ts).bind('jqGridGridComplete.selectionPreserver', restoreSelection);
+ }
+ };
+ if(this.tagName.toUpperCase()!='TABLE') {
+ alert("Element is not a table");
+ return;
+ }
+ if(document.documentMode !== undefined ) { // IE only
+ if(document.documentMode <= 5) {
+ alert("Grid can not be used in this ('quirks') mode!");
+ return;
+ }
+ }
+ $(this).empty().attr("tabindex","1");
+ this.p = p ;
+ this.p.useProp = !!$.fn.prop;
+ var i, dir;
+ if(this.p.colNames.length === 0) {
+ for (i=0;i<this.p.colModel.length;i++){
+ this.p.colNames[i] = this.p.colModel[i].label || this.p.colModel[i].name;
+ }
+ }
+ if( this.p.colNames.length !== this.p.colModel.length ) {
+ alert($.jgrid.errors.model);
+ return;
+ }
+ var gv = $("<div class='ui-jqgrid-view'></div>"), ii,
+ isMSIE = $.browser.msie ? true:false;
+ ts.p.direction = $.trim(ts.p.direction.toLowerCase());
+ if($.inArray(ts.p.direction,["ltr","rtl"]) == -1) { ts.p.direction = "ltr"; }
+ dir = ts.p.direction;
+
+ $(gv).insertBefore(this);
+ $(this).appendTo(gv).removeClass("scroll");
+ 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);
+ $("<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;}
+ },
+ formatCol = function (pos, rowInd, tv, rawObject, rowId, rdata){
+ var cm = ts.p.colModel[pos],
+ ral = cm.align, result="style=\"", clas = cm.classes, nm = cm.name, celp, acp=[];
+ if(ral) { result += "text-align:"+ral+";"; }
+ if(cm.hidden===true) { result += "display:none;"; }
+ if(rowInd===0) {
+ result += "width: "+grid.headers[pos].width+"px;";
+ } else if (cm.cellattr && $.isFunction(cm.cellattr))
+ {
+ celp = cm.cellattr.call(ts, rowId, tv, rawObject, cm, rdata);
+ 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");
+ if(acp.length === 2 ) {
+ acp[1] = $.trim(acp[1].replace("=",""));
+ if(acp[1].indexOf("'") === 0 || acp[1].indexOf('"') === 0) {
+ acp[1] = acp[1].substring(1);
+ }
+ result += acp[1].replace(/'/gi,'"');
+ } else {
+ result += "\"";
+ }
+ }
+ }
+ if(!acp.length) { acp[0] = ""; result += "\"";}
+ result += (clas !== undefined ? (" class=\""+clas+"\"") :"") + ((cm.title && tv) ? (" title=\""+$.jgrid.stripHtml(tv)+"\"") :"");
+ result += " aria-describedby=\""+ts.p.id+"_"+nm+"\"";
+ return result + acp[0];
+ },
+ cellVal = function (val) {
+ return val === undefined || val === null || val === "" ? " " : (ts.p.autoencode ? $.jgrid.htmlEncode(val) : val+"");
+ },
+ formatter = function (rowId, cellval , colpos, rwdat, _act){
+ var cm = ts.p.colModel[colpos],v;
+ if(typeof cm.formatter !== 'undefined') {
+ 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);
+ } else if($.fmatter){
+ v = $.fn.fmatter.call(ts,cm.formatter,cellval,opts,rwdat,_act);
+ } else {
+ v = cellVal(cellval);
+ }
+ } else {
+ v = cellVal(cellval);
+ }
+ return v;
+ },
+ addCell = function(rowId,cell,pos,irow, srvr) {
+ var v,prp;
+ v = formatter(rowId,cell,pos,srvr,'add');
+ prp = formatCol( pos,irow, v, srvr, rowId, true);
+ 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\"" : "")+"/>",
+ prp = formatCol( pos,irow,'',null, rowid, true);
+ return "<td role=\"gridcell\" "+prp+">"+v+"</td>";
+ },
+ addRowNum = function (pos,irow,pG,rN) {
+ var v = (parseInt(pG,10)-1)*parseInt(rN,10)+1+irow,
+ prp = formatCol( pos,irow,v, null, irow, true);
+ return "<td role=\"gridcell\" class=\"ui-state-default jqgrid-rownum\" "+prp+">"+v+"</td>";
+ },
+ reader = function (datatype) {
+ var field, f=[], j=0, i;
+ 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" ?
+ field.name :
+ ( (datatype=="xml" || datatype === "xmlstring") ? field.xmlmap || field.name : field.jsonmap || field.name );
+ j++;
+ }
+ }
+ return f;
+ },
+ orderedCols = function (offset) {
+ var order = ts.p.remapColumns;
+ if (!order || !order.length) {
+ order = $.map(ts.p.colModel, function(v,i) { return i; });
+ }
+ if (offset) {
+ order = $.map(order, function(v) { return v<offset?null:v-offset; });
+ }
+ return order;
+ },
+ emptyRows = function (scroll, locdata) {
+ var firstrow;
+ if (this.p.deepempty) {
+ $(this.rows).slice(1).remove();
+ } else {
+ firstrow = this.rows.length > 0 ? this.rows[0] : null;
+ $(this.firstChild).empty().append(firstrow);
+ }
+ if (scroll && this.p.scroll) {
+ $(this.grid.bDiv.firstChild).css({height: "auto"});
+ $(this.grid.bDiv.firstChild.firstChild).css({height: 0, display: "none"});
+ if (this.grid.bDiv.scrollTop !== 0) {
+ this.grid.bDiv.scrollTop = 0;
+ }
+ }
+ if(locdata === true && this.p.treeGrid) {
+ this.p.data = []; this.p._index = {};
+ }
+ },
+ refreshIndex = function() {
+ var datalen = ts.p.data.length, idname, i, val,
+ ni = ts.p.rownumbers===true ? 1 :0,
+ gi = ts.p.multiselect ===true ? 1 :0,
+ si = ts.p.subGrid===true ? 1 :0;
+
+ if(ts.p.keyIndex === false || ts.p.loadonce === true) {
+ idname = ts.p.localReader.id;
+ } else {
+ idname = ts.p.colModel[ts.p.keyIndex+gi+si+ni].name;
+ }
+ for(i =0;i < datalen; i++) {
+ val = $.jgrid.getAccessor(ts.p.data[i],idname);
+ 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) : {};
+ if(!$.isEmptyObject( rowAttrObj )) {
+ if (rowAttrObj.hasOwnProperty("id")) {
+ id = rowAttrObj.id;
+ delete rowAttrObj.id;
+ }
+ if (rowAttrObj.hasOwnProperty("tabindex")) {
+ tabindex = rowAttrObj.tabindex;
+ delete rowAttrObj.tabindex;
+ }
+ if (rowAttrObj.hasOwnProperty("style")) {
+ style += rowAttrObj.style;
+ delete rowAttrObj.style;
+ }
+ if (rowAttrObj.hasOwnProperty("class")) {
+ classes += ' ' + rowAttrObj['class'];
+ delete rowAttrObj['class'];
+ }
+ // dot't allow to change role attribute
+ try { delete rowAttrObj.role; } catch(ra){}
+ for (attrName in rowAttrObj) {
+ if (rowAttrObj.hasOwnProperty(attrName)) {
+ restAttr += ' ' + attrName + '=' + rowAttrObj[attrName];
+ }
+ }
+ }
+ return '<tr role="row" id="' + id + '" tabindex="' + tabindex + '" class="' + classes + '"' +
+ (style === '' ? '' : ' style="' + style + '"') + restAttr + '>';
+ },
+ addXmlData = function (xml,t, rcnt, more, adjust) {
+ var startReq = new Date(),
+ 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";
+ if(locdata) {
+ ts.p.data = [];
+ ts.p._index = {};
+ ts.p.localReader.id = xmlid;
+ }
+ ts.p.reccount = 0;
+ if($.isXMLDoc(xml)) {
+ if(ts.p.treeANode===-1 && !ts.p.scroll) {
+ emptyRows.call(ts, false, true);
+ 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;
+ if(!xmlRd.repeatitems) {f = reader(frd);}
+ if( ts.p.keyIndex===false) {
+ idn = $.isFunction( xmlRd.id ) ? xmlRd.id.call(ts, xml) : xmlRd.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);
+ }
+ idn=f[idn];
+ }
+ if( (idn+"").indexOf("[") === -1 ) {
+ if (f.length) {
+ getId = function( trow, k) {return $(idn,trow).text() || k;};
+ } else {
+ getId = function( trow, k) {return $(xmlRd.cell,trow).eq(idn).text() || k;};
+ }
+ }
+ else {
+ getId = function( trow, k) {return trow.getAttribute(idn.replace(/[\[\]]/g,"")) || k;};
+ }
+ ts.p.userData = {};
+ ts.p.page = $.jgrid.getXmlData( xml,xmlRd.page ) || ts.p.page || 0;
+ ts.p.lastpage = $.jgrid.getXmlData( xml,xmlRd.total );
+ if(ts.p.lastpage===undefined) { ts.p.lastpage=1; }
+ ts.p.records = $.jgrid.getXmlData( xml,xmlRd.records ) || 0;
+ if($.isFunction(xmlRd.userdata)) {
+ ts.p.userData = xmlRd.userdata.call(ts, xml) || {};
+ } else {
+ $.jgrid.getXmlData(xml, xmlRd.userdata, true).each(function() {ts.p.userData[this.getAttribute("name")]= $(this).text();});
+ }
+ 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);
+ 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;
+ 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 : '';
+ var iStartTrTag = rowData.length;
+ rowData.push("");
+ if( ni ) {
+ rowData.push( addRowNum(0,j,ts.p.page,ts.p.rowNum) );
+ }
+ if( gi ) {
+ rowData.push( addMulti(rid,ni,j, false) );
+ }
+ if( si ) {
+ rowData.push( $(ts).jqGrid("addSubGridCell",gi+ni,j+rcnt) );
+ }
+ if(xmlRd.repeatitems){
+ if (!F) { F=orderedCols(gi+si+ni); }
+ var cells = $.jgrid.getXmlData( xmlr, xmlRd.cell, true);
+ $.each(F, function (k) {
+ var cell = cells[this];
+ 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) );
+ });
+ } 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[iStartTrTag] = constructTr(rid, hiderow, cn1, rd, xmlr, false);
+ rowData.push("</tr>");
+ if(ts.p.grouping) {
+ grpdata = $(ts).jqGrid('groupingPrepare',rowData, grpdata, rd, j);
+ rowData = [];
+ }
+ if(locdata || ts.p.treeGrid === true) {
+ rd[xmlid] = rid;
+ ts.p.data.push(rd);
+ ts.p._index[rid] = ts.p.data.length-1;
+ }
+ if(ts.p.gridview === false ) {
+ $("tbody:first",t).append(rowData.join(''));
+ $(ts).triggerHandler("jqGridAfterInsertRow", [rid, rd, xmlr]);
+ if(afterInsRow) {ts.p.afterInsertRow.call(ts,rid,rd,xmlr);}
+ rowData=[];
+ }
+ rd={};
+ ir++;
+ j++;
+ 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);
+ grpdata = null;
+ } else if(ts.p.treeGrid === true && fpos > 0) {
+ $(ts.rows[fpos]).after(rowData.join(''));
+ } else {
+ $("tbody:first",t).append(rowData.join(''));
+ }
+ }
+ if(ts.p.subGrid === true ) {
+ try {$(ts).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) {}
+ }
+ 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(locdata) {
+ ts.p.records = gl;
+ ts.p.lastpage = Math.ceil(gl/ rn);
+ }
+ if (!more) { ts.updatepager(false,true); }
+ if(locdata) {
+ while (ir<gl) {
+ xmlr = gxml[ir];
+ rid = getId(xmlr,ir+br);
+ rid = ts.p.idPrefix + rid;
+ if(xmlRd.repeatitems){
+ if (!F) { F=orderedCols(gi+si+ni); }
+ var cells2 = $.jgrid.getXmlData( xmlr, xmlRd.cell, true);
+ $.each(F, function (k) {
+ var cell = cells2[this];
+ if (!cell) { return false; }
+ v = cell.textContent || cell.text;
+ rd[ts.p.colModel[k+gi+si+ni].name] = v;
+ });
+ } else {
+ for(i = 0; i < f.length;i++) {
+ v = $.jgrid.getXmlData( xmlr, f[i]);
+ rd[ts.p.colModel[i+gi+si+ni].name] = v;
+ }
+ }
+ rd[xmlid] = rid;
+ ts.p.data.push(rd);
+ ts.p._index[rid] = ts.p.data.length-1;
+ rd = {};
+ ir++;
+ }
+ }
+ },
+ addJSONData = function(data,t, rcnt, more, adjust) {
+ var startReq = new Date();
+ if(data) {
+ if(ts.p.treeANode === -1 && !ts.p.scroll) {
+ emptyRows.call(ts, false, true);
+ rcnt=1;
+ } else { rcnt = rcnt > 1 ? rcnt :1; }
+ } else { return; }
+
+ var dReader, locid = "_id_", frd,
+ 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") {
+ 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;
+ ts.p.page = $.jgrid.getAccessor(data,dReader.page) || ts.p.page || 0;
+ lp = $.jgrid.getAccessor(data,dReader.total);
+ 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);
+ }
+ idn=f[idn];
+ }
+ drows = $.jgrid.getAccessor(data,dReader.root);
+ if (!drows) { drows = []; }
+ len = drows.length; i=0;
+ if (len > 0 && ts.p.page <= 0) { ts.p.page = 1; }
+ var rn = parseInt(ts.p.rowNum,10),br=ts.p.scroll?$.jgrid.randId():1, altr, selected=false, selr;
+ if (adjust) { rn *= adjust+1; }
+ 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;
+ 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;
+ }
+ }
+ }
+ idr = ts.p.idPrefix + idr;
+ altr = rcnt === 1 ? 0 : rcnt;
+ cn1 = (altr+i)%2 == 1 ? cn : '';
+ if( selected) {
+ if( ts.p.multiselect) {
+ selr = ($.inArray(idr, ts.p.selarrrow) !== -1);
+ } else {
+ selr = (idr === ts.p.selrow);
+ }
+ }
+ var iStartTrTag = rowData.length;
+ rowData.push("");
+ if( ni ) {
+ rowData.push( addRowNum(0,i,ts.p.page,ts.p.rowNum) );
+ }
+ if( gi ){
+ rowData.push( addMulti(idr,ni,i,selr) );
+ }
+ if( si ) {
+ rowData.push( $(ts).jqGrid("addSubGridCell",gi+ni,i+rcnt) );
+ }
+ if (dReader.repeatitems) {
+ if(dReader.cell) {cur = $.jgrid.getAccessor(cur,dReader.cell);}
+ if (!F) { F=orderedCols(gi+si+ni); }
+ }
+ 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) );
+ rd[ts.p.colModel[j+gi+si+ni].name] = v;
+ }
+ rowData[iStartTrTag] = constructTr(idr, hiderow, cn1, rd, cur, selr);
+ rowData.push( "</tr>" );
+ if(ts.p.grouping) {
+ grpdata = $(ts).jqGrid('groupingPrepare',rowData, grpdata, rd, i);
+ rowData = [];
+ }
+ if(locdata || ts.p.treeGrid===true) {
+ rd[locid] = idr;
+ ts.p.data.push(rd);
+ ts.p._index[idr] = 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]);
+ if(afterInsRow) {ts.p.afterInsertRow.call(ts,idr,rd,cur);}
+ rowData=[];//ari=0;
+ }
+ rd={};
+ ir++;
+ i++;
+ 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);
+ grpdata = null;
+ } else if(ts.p.treeGrid === true && fpos > 0) {
+ $(ts.rows[fpos]).after(rowData.join(''));
+ } else {
+ $("#"+$.jgrid.jqID(ts.p.id)+" tbody:first").append(rowData.join(''));
+ }
+ }
+ if(ts.p.subGrid === true ) {
+ try { $(ts).jqGrid("addSubGrid",gi+ni);} catch (_){}
+ }
+ ts.p.totaltime = new Date() - startReq;
+ if(ir>0) {
+ if(ts.p.records===0) { ts.p.records=len; }
+ }
+ rowData = null;
+ if( ts.p.treeGrid === true) {
+ try {$(ts).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(locdata) {
+ ts.p.records = len;
+ ts.p.lastpage = Math.ceil(len/ rn);
+ }
+ if (!more) { ts.updatepager(false,true); }
+ if(locdata) {
+ while (ir<len && drows[ir]) {
+ 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(cur) {
+ idr = ts.p.idPrefix + idr;
+ if (dReader.repeatitems) {
+ if(dReader.cell) {cur = $.jgrid.getAccessor(cur,dReader.cell);}
+ if (!F) { F=orderedCols(gi+si+ni); }
+ }
+
+ for (j=0;j<F.length;j++) {
+ v = $.jgrid.getAccessor(cur,F[j]);
+ rd[ts.p.colModel[j+gi+si+ni].name] = v;
+ }
+ rd[locid] = idr;
+ ts.p.data.push(rd);
+ ts.p._index[idr] = ts.p.data.length-1;
+ rd = {};
+ }
+ ir++;
+ }
+ }
+ },
+ addLocalData = function() {
+ var st, 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(this.formatoptions && this.formatoptions.srcformat) {
+ srcformat = this.formatoptions.srcformat;
+ } else {
+ srcformat = $.jgrid.formatter.date.srcformat;
+ }
+ if(this.formatoptions && this.formatoptions.newformat) {
+ newformat = this.formatoptions.newformat;
+ } else {
+ newformat = $.jgrid.formatter.date.newformat;
+ }
+ } else {
+ srcformat = newformat = this.datefmt || "Y-m-d";
+ }
+ cmtypes[this.name] = {"stype": sorttype, "srcfmt": srcformat,"newfmt":newformat};
+ } else {
+ cmtypes[this.name] = {"stype": sorttype, "srcfmt":'',"newfmt":''};
+ }
+ if(ts.p.grouping ) {
+ for(gin =0, lengrp = grpview.groupField.length; gin< lengrp; gin++) {
+ if( this.name == grpview.groupField[gin]) {
+ var grindex = this.name;
+ if (typeof this.index != 'undefined') {
+ grindex = this.index;
+ }
+ grtypes[gin] = cmtypes[grindex];
+ grindexes[gin]= grindex;
+ }
+ }
+ }
+ if(!fndsort && (this.index == ts.p.sortname || this.name == ts.p.sortname)){
+ st = this.name; // ???
+ fndsort = true;
+ }
+ });
+ if(ts.p.treeGrid) {
+ $(ts).jqGrid("SortTree", st, ts.p.sortorder, cmtypes[st].stype, cmtypes[st].srcfmt);
+ return;
+ }
+ var compareFnMap = {
+ 'eq':function(queryObj) {return queryObj.equals;},
+ 'ne':function(queryObj) {return queryObj.notEquals;},
+ 'lt':function(queryObj) {return queryObj.less;},
+ 'le':function(queryObj) {return queryObj.lessOrEquals;},
+ 'gt':function(queryObj) {return queryObj.greater;},
+ 'ge':function(queryObj) {return queryObj.greaterOrEquals;},
+ 'cn':function(queryObj) {return queryObj.contains;},
+ 'nc':function(queryObj,op) {return op === "OR" ? queryObj.orNot().contains : queryObj.andNot().contains;},
+ 'bw':function(queryObj) {return queryObj.startsWith;},
+ 'bn':function(queryObj,op) {return op === "OR" ? queryObj.orNot().startsWith : queryObj.andNot().startsWith;},
+ 'en':function(queryObj,op) {return op === "OR" ? queryObj.orNot().endsWith : queryObj.andNot().endsWith;},
+ 'ew':function(queryObj) {return queryObj.endsWith;},
+ 'ni':function(queryObj,op) {return op === "OR" ? queryObj.orNot().equals : queryObj.andNot().equals;},
+ 'in':function(queryObj) {return queryObj.equals;},
+ 'nu':function(queryObj) {return queryObj.isNull;},
+ 'nn':function(queryObj,op) {return op === "OR" ? queryObj.orNot().isNull : queryObj.andNot().isNull;}
+
+ },
+ query = $.jgrid.from(ts.p.data);
+ if (ts.p.ignoreCase) { query = query.ignoreCase(); }
+ function tojLinq ( group ) {
+ var s = 0, index, gor, ror, opr, rule;
+ if (group.groups !== undefined) {
+ gor = group.groups.length && group.groupOp.toString().toUpperCase() === "OR";
+ if (gor) {
+ query.orBegin();
+ }
+ for (index = 0; index < group.groups.length; index++) {
+ if (s > 0 && gor) {
+ query.or();
+ }
+ try {
+ tojLinq(group.groups[index]);
+ } catch (e) {alert(e);}
+ s++;
+ }
+ if (gor) {
+ query.orEnd();
+ }
+ }
+ if (group.rules !== undefined) {
+ 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) {
+ query.orBegin();
+ }
+ for (index = 0; index < group.rules.length; index++) {
+ rule = group.rules[index];
+ opr = group.groupOp.toString().toUpperCase();
+ if (compareFnMap[rule.op] && rule.field ) {
+ if(s > 0 && opr && opr === "OR") {
+ query = query.or();
+ }
+ query = compareFnMap[rule.op](query, opr)(rule.field, rule.data, cmtypes[rule.field]);
+ }
+ s++;
+ }
+ if (ror) {
+ query.orEnd();
+ }
+ } catch (g) {alert(g);}
+ }
+ }
+
+ if (ts.p.search === true) {
+ var srules = ts.p.postData.filters;
+ if(srules) {
+ if(typeof srules == "string") { srules = $.jgrid.parse(srules);}
+ tojLinq( srules );
+ } else {
+ try {
+ query = compareFnMap[ts.p.postData.searchOper](query)(ts.p.postData.searchField, ts.p.postData.searchString,cmtypes[ts.p.postData.searchField]);
+ } catch (se){}
+ }
+ }
+ if(ts.p.grouping) {
+ for(gin=0; gin<lengrp;gin++) {
+ 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);
+ }
+ }
+ var queryResults = query.select(),
+ recordsperpage = parseInt(ts.p.rowNum,10),
+ total = queryResults.length,
+ page = parseInt(ts.p.page,10),
+ totalpages = Math.ceil(total / recordsperpage),
+ retresult = {};
+ queryResults = queryResults.slice( (page-1)*recordsperpage , page*recordsperpage );
+ query = null;
+ cmtypes = null;
+ retresult[ts.p.localReader.total] = totalpages;
+ retresult[ts.p.localReader.page] = page;
+ retresult[ts.p.localReader.records] = total;
+ retresult[ts.p.localReader.root] = queryResults;
+ retresult[ts.p.localReader.userdata] = ts.p.userData;
+ queryResults = null;
+ return retresult;
+ },
+ updatepager = function(rn, dnd) {
+ var cp, last, base, from,to,tot,fmt, pgboxes = "", sppg,
+ tspg = ts.p.pager ? "_"+$.jgrid.jqID(ts.p.pager.substr(1)) : "",
+ tspg_t = ts.p.toppager ? "_"+ts.p.toppager.substr(1) : "";
+ base = parseInt(ts.p.page,10)-1;
+ if(base < 0) { base = 0; }
+ base = base*parseInt(ts.p.rowNum,10);
+ to = base + ts.p.reccount;
+ if (ts.p.scroll) {
+ var rows = $("tbody:first > tr:gt(0)", ts.grid.bDiv);
+ base = to - rows.length;
+ ts.p.reccount = rows.length;
+ var rh = rows.outerHeight() || ts.grid.prevRowHeight;
+ if (rh) {
+ 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"});
+ }
+ ts.grid.bDiv.scrollLeft = ts.grid.hDiv.scrollLeft;
+ }
+ pgboxes = ts.p.pager ? ts.p.pager : "";
+ pgboxes += ts.p.toppager ? (pgboxes ? "," + ts.p.toppager : ts.p.toppager) : "";
+ if(pgboxes) {
+ fmt = $.jgrid.formatter.integer || {};
+ cp = intNum(ts.p.page);
+ last = intNum(ts.p.lastpage);
+ $(".selbox",pgboxes)[ this.p.useProp ? 'prop' : 'attr' ]("disabled",false);
+ if(ts.p.pginput===true) {
+ $('.ui-pg-input',pgboxes).val(ts.p.page);
+ sppg = ts.p.toppager ? '#sp_1'+tspg+",#sp_1"+tspg_t : '#sp_1'+tspg;
+ $(sppg).html($.fmatter ? $.fmatter.util.NumberFormat(ts.p.lastpage,fmt):ts.p.lastpage);
+
+ }
+ if (ts.p.viewrecords){
+ if(ts.p.reccount === 0) {
+ $(".ui-paging-info",pgboxes).html(ts.p.emptyrecords);
+ } else {
+ from = base+1;
+ tot=ts.p.records;
+ if($.fmatter) {
+ from = $.fmatter.util.NumberFormat(from,fmt);
+ to = $.fmatter.util.NumberFormat(to,fmt);
+ tot = $.fmatter.util.NumberFormat(tot,fmt);
+ }
+ $(".ui-paging-info",pgboxes).html($.jgrid.format(ts.p.recordtext,from,to,tot));
+ }
+ }
+ if(ts.p.pgbuttons===true) {
+ if(cp<=0) {cp = last = 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) {
+ $("#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 {
+ $("#next"+tspg+", #last"+tspg).removeClass('ui-state-disabled');
+ if(ts.p.toppager) { $("#next_t"+tspg_t+", #last_t"+tspg_t).removeClass('ui-state-disabled'); }
+ }
+ }
+ }
+ if(rn===true && ts.p.rownumbers === true) {
+ $("td.jqgrid-rownum",ts.rows).each(function(i){
+ $(this).html(base+1+i);
+ });
+ }
+ if(dnd && ts.p.jqgdnd) { $(ts).jqGrid('gridDnD','updateDnD');}
+ $(ts).triggerHandler("jqGridGridComplete");
+ if($.isFunction(ts.p.gridComplete)) {ts.p.gridComplete.call(ts);}
+ $(ts).triggerHandler("jqGridAfterGridComplete");
+ },
+ beginReq = function() {
+ ts.grid.hDiv.loading = true;
+ if(ts.p.hiddengrid) { return;}
+ switch(ts.p.loadui) {
+ case "disable":
+ break;
+ case "enable":
+ $("#load_"+$.jgrid.jqID(ts.p.id)).show();
+ break;
+ case "block":
+ $("#lui_"+$.jgrid.jqID(ts.p.id)).show();
+ $("#load_"+$.jgrid.jqID(ts.p.id)).show();
+ break;
+ }
+ },
+ endReq = function() {
+ ts.grid.hDiv.loading = false;
+ switch(ts.p.loadui) {
+ case "disable":
+ break;
+ case "enable":
+ $("#load_"+$.jgrid.jqID(ts.p.id)).hide();
+ break;
+ case "block":
+ $("#lui_"+$.jgrid.jqID(ts.p.id)).hide();
+ $("#load_"+$.jgrid.jqID(ts.p.id)).hide();
+ break;
+ }
+ },
+ populate = function (npage) {
+ if(!ts.grid.hDiv.loading) {
+ var pvis = ts.p.scroll && npage === false,
+ prm = {}, dt, dstr, pN=ts.p.prmNames;
+ if(ts.p.page <=0) { ts.p.page = 1; }
+ if(pN.search !== null) {prm[pN.search] = ts.p.search;} if(pN.nd !== null) {prm[pN.nd] = new Date().getTime();}
+ if(pN.rows !== null) {prm[pN.rows]= ts.p.rowNum;} if(pN.page !== null) {prm[pN.page]= ts.p.page;}
+ if(pN.sort !== null) {prm[pN.sort]= ts.p.sortname;} if(pN.order !== null) {prm[pN.order]= ts.p.sortorder;}
+ if(ts.p.rowTotal !== null && pN.totalrows !== null) { prm[pN.totalrows]= ts.p.rowTotal; }
+ var lcf = $.isFunction(ts.p.loadComplete), lc = lcf ? ts.p.loadComplete : null;
+ var adjust = 0;
+ npage = npage || 1;
+ if (npage > 1) {
+ if(pN.npage !== null) {
+ prm[pN.npage] = npage;
+ adjust = npage - 1;
+ npage = 1;
+ } else {
+ lc = function(req) {
+ ts.p.page++;
+ ts.grid.hDiv.loading = false;
+ if (lcf) {
+ ts.p.loadComplete.call(ts,req);
+ }
+ populate(npage-1);
+ };
+ }
+ } else if (pN.npage !== null) {
+ delete ts.p.postData[pN.npage];
+ }
+ if(ts.p.grouping) {
+ $(ts).jqGrid('groupingSetup');
+ var grp = ts.p.groupingView, gi, gs="";
+ 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){
+ index = cmValue.index;
+ }
+ } );
+ gs += index +" "+grp.groupOrder[gi]+", ";
+ }
+ prm[pN.sort] = gs + prm[pN.sort];
+ }
+ $.extend(ts.p.postData,prm);
+ var rcnt = !ts.p.scroll ? 1 : ts.rows.length-1;
+ 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)) {
+ bfr = ts.p.beforeRequest.call(ts);
+ if(bfr === undefined) { bfr = true; }
+ if ( bfr === false ) { return; }
+ }
+ dt = ts.p.datatype.toLowerCase();
+ switch(dt)
+ {
+ case "json":
+ case "jsonp":
+ case "xml":
+ case "script":
+ $.ajax($.extend({
+ url:ts.p.url,
+ type:ts.p.mtype,
+ dataType: dt ,
+ data: $.isFunction(ts.p.serializeGridData)? ts.p.serializeGridData.call(ts,ts.p.postData) : ts.p.postData,
+ success:function(data,st, xhr) {
+ if ($.isFunction(ts.p.beforeProcessing)) {
+ if (ts.p.beforeProcessing.call(ts, data, st, xhr) === false) {
+ endReq();
+ return;
+ }
+ }
+ if(dt === "xml") { addXmlData(data,ts.grid.bDiv,rcnt,npage>1,adjust); }
+ else { addJSONData(data,ts.grid.bDiv,rcnt,npage>1,adjust); }
+ $(ts).triggerHandler("jqGridLoadComplete", [data]);
+ if(lc) { lc.call(ts,data); }
+ $(ts).triggerHandler("jqGridAfterLoadComplete", [data]);
+ if (pvis) { ts.grid.populateVisible(); }
+ if( ts.p.loadonce || ts.p.treeGrid) {ts.p.datatype = "local";}
+ data=null;
+ if (npage === 1) { endReq(); }
+ },
+ error:function(xhr,st,err){
+ if($.isFunction(ts.p.loadError)) { ts.p.loadError.call(ts,xhr,st,err); }
+ if (npage === 1) { endReq(); }
+ xhr=null;
+ },
+ beforeSend: function(xhr, settings ){
+ var gotoreq = true;
+ if($.isFunction(ts.p.loadBeforeSend)) {
+ gotoreq = ts.p.loadBeforeSend.call(ts,xhr, settings);
+ }
+ 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);
+ addXmlData(dstr,ts.grid.bDiv);
+ $(ts).triggerHandler("jqGridLoadComplete", [dstr]);
+ if(lcf) {ts.p.loadComplete.call(ts,dstr);}
+ $(ts).triggerHandler("jqGridAfterLoadComplete", [dstr]);
+ ts.p.datatype = "local";
+ ts.p.datastr = null;
+ endReq();
+ break;
+ case "jsonstring":
+ beginReq();
+ 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]);
+ if(lcf) {ts.p.loadComplete.call(ts,dstr);}
+ $(ts).triggerHandler("jqGridAfterLoadComplete", [dstr]);
+ ts.p.datatype = "local";
+ ts.p.datastr = null;
+ endReq();
+ break;
+ case "local":
+ case "clientside":
+ beginReq();
+ ts.p.datatype = "local";
+ var req = addLocalData();
+ addJSONData(req,ts.grid.bDiv,rcnt,npage>1,adjust);
+ $(ts).triggerHandler("jqGridLoadComplete", [req]);
+ if(lc) { lc.call(ts,req); }
+ $(ts).triggerHandler("jqGridAfterLoadComplete", [req]);
+ if (pvis) { ts.grid.populateVisible(); }
+ endReq();
+ break;
+ }
+ }
+ },
+ setHeadCheckBox = function ( checked ) {
+ $('#cb_'+$.jgrid.jqID(ts.p.id),ts.grid.hDiv)[ts.p.useProp ? 'prop': 'attr']("checked", checked);
+ var fid = ts.p.frozenColumns ? ts.p.id+"_frozen" : "";
+ if(fid) {
+ $('#cb_'+$.jgrid.jqID(ts.p.id),ts.grid.fhDiv)[ts.p.useProp ? 'prop': 'attr']("checked", checked);
+ }
+ },
+ setPager = function (pgid, tp){
+ // TBD - consider escaping pgid with pgid = $.jgrid.jqID(pgid);
+ var sep = "<td class='ui-pg-button ui-state-disabled' style='width:4px;'><span class='ui-separator'></span></td>",
+ pginp = "",
+ pgl="<table cellspacing='0' cellpadding='0' border='0' style='table-layout:auto;' class='ui-pg-table'><tbody><tr>",
+ str="", pgcnt, lft, cent, rgt, twd, tdw, i,
+ clearVals = function(onpaging){
+ var ret;
+ if ($.isFunction(ts.p.onPaging) ) { ret = ts.p.onPaging.call(ts,onpaging); }
+ ts.p.selrow = null;
+ if(ts.p.multiselect) {ts.p.selarrrow =[]; setHeadCheckBox( false );}
+ ts.p.savedRow = [];
+ if(ret=='stop') {return false;}
+ return true;
+ };
+ pgid = pgid.substr(1);
+ tp += "_" + pgid;
+ pgcnt = "pg_"+pgid;
+ lft = pgid+"_left"; cent = pgid+"_center"; rgt = pgid+"_right";
+ $("#"+$.jgrid.jqID(pgid) )
+ .append("<div id='"+pgcnt+"' class='ui-pager-control' role='group'><table cellspacing='0' cellpadding='0' border='0' class='ui-pg-table' style='width:100%;table-layout:fixed;height:100%;' role='row'><tbody><tr><td id='"+lft+"' align='left'></td><td id='"+cent+"' align='center' style='white-space:pre;'></td><td id='"+rgt+"' align='right'></td></tr></tbody></table></div>")
+ .attr("dir","ltr"); //explicit setting
+ if(ts.p.rowList.length >0){
+ 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 +="</select></td>";
+ }
+ 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(); }
+ 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; }
+ 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);
+ tdw = $(".ui-jqgrid").css("font-size") || "11px";
+ $(document.body).append("<div id='testpg' class='ui-jqgrid ui-widget ui-widget-content' style='font-size:"+tdw+";visibility:hidden;' ></div>");
+ twd = $(pgl).clone().appendTo("#testpg").width();
+ $("#testpg").remove();
+ if(twd > 0) {
+ if(pginp !== "") { twd += 50; } //should be param
+ $("td#"+pgid+"_"+ts.p.pagerpos,"#"+pgcnt).width(twd);
+ }
+ ts.p._nvtd = [];
+ ts.p._nvtd[0] = twd ? Math.floor((ts.p.width - twd)/2) : Math.floor(ts.p.width/3);
+ ts.p._nvtd[1] = 0;
+ pgl=null;
+ $('.ui-pg-selbox',"#"+pgcnt).bind('change',function() {
+ 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;
+ });
+ if(ts.p.pgbuttons===true) {
+ $(".ui-pg-button","#"+pgcnt).hover(function(){
+ if($(this).hasClass('ui-state-disabled')) {
+ this.style.cursor='default';
+ } else {
+ $(this).addClass('ui-state-hover');
+ this.style.cursor='pointer';
+ }
+ },function() {
+ if(!$(this).hasClass('ui-state-disabled')) {
+ $(this).removeClass('ui-state-hover');
+ this.style.cursor= "default";
+ }
+ });
+ $("#first"+$.jgrid.jqID(tp)+", #prev"+$.jgrid.jqID(tp)+", #next"+$.jgrid.jqID(tp)+", #last"+$.jgrid.jqID(tp)).click( function() {
+ var cp = intNum(ts.p.page,1),
+ last = intNum(ts.p.lastpage,1), selclick = false,
+ fp=true, pp=true, np=true,lp=true;
+ if(last ===0 || last===1) {fp=false;pp=false;np=false;lp=false; }
+ else if( last>1 && cp >=1) {
+ if( cp === 1) { fp=false; pp=false; }
+ //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( 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;
+ });
+ }
+ 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) {
+ ts.p.page = ($(this).val()>0) ? $(this).val():ts.p.page;
+ if(!clearVals('user')) { return false; }
+ populate();
+ return false;
+ }
+ return this;
+ });
+ }
+ },
+ sortData = function (index, idxcol,reload,sor){
+ 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') {
+ ts.p.sortorder = 'desc';
+ } 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;
+
+ $("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();
+ }
+ }
+ 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(ts.p.deselectAfterSort) {$(ts).jqGrid("resetSelection");}
+ } else {
+ ts.p.selrow = null;
+ if(ts.p.multiselect){setHeadCheckBox( false );}
+ ts.p.selarrrow =[];
+ ts.p.savedRow =[];
+ }
+ if(ts.p.scroll) {
+ var sscroll = ts.grid.bDiv.scrollLeft;
+ emptyRows.call(ts, true, false);
+ ts.grid.hDiv.scrollLeft = sscroll;
+ }
+ 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;}
+ },
+ 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;
+ $.each(ts.p.colModel, function() {
+ if(typeof this.hidden === 'undefined') {this.hidden=false;}
+ this.widthOrg = cw = intNum(this.width,0);
+ if(this.hidden===false){
+ initwidth += cw+brd;
+ if(this.fixed) {
+ gw += cw+brd;
+ } else {
+ vc++;
+ }
+ cl++;
+ }
+ });
+ if(isNaN(ts.p.width)) {
+ ts.p.width = initwidth + ((ts.p.shrinkToFit ===false && !isNaN(ts.p.height)) ? scw : 0);
+ }
+ grid.width = ts.p.width;
+ ts.p.tblwidth = initwidth;
+ if(ts.p.shrinkToFit ===false && ts.p.forceFit === true) {ts.p.forceFit=false;}
+ if(ts.p.shrinkToFit===true && vc > 0) {
+ aw = grid.width-brd*vc-gw;
+ if(!isNaN(ts.p.height)) {
+ aw -= scw;
+ hs = true;
+ }
+ initwidth =0;
+ $.each(ts.p.colModel, function(i) {
+ if(this.hidden === false && !this.fixed){
+ cw = Math.round(aw*this.width/(ts.p.tblwidth-brd*vc-gw));
+ this.width =cw;
+ initwidth += cw;
+ lvc = i;
+ }
+ });
+ cr =0;
+ if (hs) {
+ if(grid.width-gw-(initwidth+brd*vc) !== scw){
+ cr = grid.width-gw-(initwidth+brd*vc)-scw;
+ }
+ } else if(!hs && Math.abs(grid.width-gw-(initwidth+brd*vc)) !== 1) {
+ cr = grid.width-gw-(initwidth+brd*vc);
+ }
+ ts.p.colModel[lvc].width += cr;
+ ts.p.tblwidth = initwidth+cr+brd*vc+gw;
+ if(ts.p.tblwidth > ts.p.width) {
+ ts.p.colModel[lvc].width -= (ts.p.tblwidth - parseInt(ts.p.width,10));
+ ts.p.tblwidth = ts.p.width;
+ }
+ }
+ },
+ nextVisible= function(iCol) {
+ var ret = iCol, j=iCol, i;
+ for (i = iCol+1;i<ts.p.colModel.length;i++){
+ if(ts.p.colModel[i].hidden !== true ) {
+ j=i; break;
+ }
+ }
+ 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();
+ return ret;
+ },
+ getColumnHeaderIndex = function (th) {
+ var i, headers = ts.grid.headers, ci = $.jgrid.getCellIndex(th);
+ for (i = 0; i < headers.length; i++) {
+ if (th === headers[i].el) {
+ ci = i;
+ break;
+ }
+ }
+ return ci;
+ };
+ this.p.id = this.id;
+ 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]);
+ if (ts.p.keyIndex === false && ts.p.colModel[i].key===true) {
+ ts.p.keyIndex = i;
+ }
+ }
+ ts.p.sortorder = ts.p.sortorder.toLowerCase();
+ if(ts.p.grouping===true) {
+ ts.p.scroll = false;
+ ts.p.rownumbers = false;
+ //ts.p.subGrid = false; expiremental
+ ts.p.treeGrid = false;
+ ts.p.gridview = true;
+ }
+ if(this.p.treeGrid === true) {
+ try { $(this).jqGrid("setTreeGrid");} catch (_) {}
+ 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});
+ }
+ if(this.p.rownumbers) {
+ this.p.colNames.unshift("");
+ this.p.colModel.unshift({name:'rn',width:ts.p.rownumWidth,sortable:false,resizable:false,hidedlg:true,search:false,align:'center',fixed:true});
+ }
+ ts.p.xmlReader = $.extend(true,{
+ root: "rows",
+ row: "row",
+ page: "rows>page",
+ total: "rows>total",
+ records : "rows>records",
+ repeatitems: true,
+ cell: "cell",
+ id: "[id]",
+ userdata: "userdata",
+ subgrid: {root:"rows", row: "row", repeatitems: true, cell:"cell"}
+ }, ts.p.xmlReader);
+ ts.p.jsonReader = $.extend(true,{
+ root: "rows",
+ page: "page",
+ total: "total",
+ records: "records",
+ repeatitems: true,
+ cell: "cell",
+ id: "id",
+ userdata: "userdata",
+ subgrid: {root:"rows", repeatitems: true, cell:"cell"}
+ },ts.p.jsonReader);
+ ts.p.localReader = $.extend(true,{
+ root: "rows",
+ page: "page",
+ total: "total",
+ records: "records",
+ repeatitems: false,
+ cell: "cell",
+ id: "id",
+ userdata: "userdata",
+ subgrid: {root:"rows", repeatitems: true, cell:"cell"}
+ },ts.p.localReader);
+ if(ts.p.scroll){
+ ts.p.pgbuttons = false; ts.p.pginput=false; ts.p.rowList=[];
+ }
+ 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="";
+ 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) {
+ ts.p.colModel[i].resizable=false;
+ break;
+ }
+ }
+ }
+ 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>";
+ 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+">";
+ idn = ts.p.colModel[i].index || ts.p.colModel[i].name;
+ 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) {
+ ts.p.lastsort = i;
+ }
+ thead += imgs+"</div></th>";
+ }
+ thead += "</tr></thead>";
+ imgs = null;
+ $(this).append(thead);
+ $("thead tr:first th",this).hover(function(){$(this).addClass('ui-state-hover');},function(){$(this).removeClass('ui-state-hover');});
+ if(this.p.multiselect) {
+ var emp=[], chk;
+ $('#cb_'+$.jgrid.jqID(ts.p.id),this).bind('click',function(){
+ ts.p.selarrrow = [];
+ var froz = ts.p.frozenColumns === true ? ts.p.id + "_frozen" : "";
+ if (this.checked) {
+ $(ts.rows).each(function(i) {
+ if (i>0) {
+ if(!$(this).hasClass("ui-subgrid") && !$(this).hasClass("jqgroup") && !$(this).hasClass('ui-state-disabled')){
+ $("#jqg_"+$.jgrid.jqID(ts.p.id)+"_"+$.jgrid.jqID(this.id) )[ts.p.useProp ? 'prop': 'attr']("checked",true);
+ $(this).addClass("ui-state-highlight").attr("aria-selected","true");
+ ts.p.selarrrow.push(this.id);
+ ts.p.selrow = this.id;
+ if(froz) {
+ $("#jqg_"+$.jgrid.jqID(ts.p.id)+"_"+$.jgrid.jqID(this.id), ts.grid.fbDiv )[ts.p.useProp ? 'prop': 'attr']("checked",true);
+ $("#"+$.jgrid.jqID(this.id), ts.grid.fbDiv).addClass("ui-state-highlight");
+ }
+ }
+ }
+ });
+ chk=true;
+ emp=[];
+ }
+ else {
+ $(ts.rows).each(function(i) {
+ if(i>0) {
+ if(!$(this).hasClass("ui-subgrid") && !$(this).hasClass('ui-state-disabled')){
+ $("#jqg_"+$.jgrid.jqID(ts.p.id)+"_"+$.jgrid.jqID(this.id) )[ts.p.useProp ? 'prop': 'attr']("checked", false);
+ $(this).removeClass("ui-state-highlight").attr("aria-selected","false");
+ emp.push(this.id);
+ if(froz) {
+ $("#jqg_"+$.jgrid.jqID(ts.p.id)+"_"+$.jgrid.jqID(this.id), ts.grid.fbDiv )[ts.p.useProp ? 'prop': 'attr']("checked",false);
+ $("#"+$.jgrid.jqID(this.id), ts.grid.fbDiv).removeClass("ui-state-highlight");
+ }
+ }
+ }
+ });
+ ts.p.selrow = null;
+ chk=false;
+ }
+ $(ts).triggerHandler("jqGridSelectAll", [chk ? ts.p.selarrrow : emp, chk]);
+ if($.isFunction(ts.p.onSelectAll)) {ts.p.onSelectAll.call(ts, chk ? ts.p.selarrrow : emp,chk);}
+ });
+ }
+
+ if(ts.p.autowidth===true) {
+ var pw = $(eg).innerWidth();
+ ts.p.width = pw > 0? pw: 'nw';
+ }
+ setColWidth();
+ $(eg).css("width",grid.width+"px").append("<div class='ui-jqgrid-resize-mark' id='rs_m"+ts.p.id+"'> </div>");
+ $(gv).css("width",grid.width+"px");
+ thead = $("thead:first",ts).get(0);
+ var tfoot = "";
+ if(ts.p.footerrow) { tfoot += "<table role='grid' style='width:"+ts.p.tblwidth+"px' class='ui-jqgrid-ftable' cellspacing='0' cellpadding='0' border='0'><tbody><tr role='row' class='ui-widget-content footrow footrow-"+dir+"'>"; }
+ var thr = $("tr:first",thead),
+ firstr = "<tr class='jqgfirstrow' role='row' style='height:auto'>";
+ 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){
+ res = document.createElement("span");
+ $(res).html(" ").addClass('ui-jqgrid-resize ui-jqgrid-resize-'+dir);
+ if(!$.browser.opera) { $(res).css("cursor","col-resize"); }
+ $(this).addClass(ts.p.resizeclass);
+ } else {
+ res = "";
+ }
+ $(this).css("width",w+"px").prepend(res);
+ var hdcol = "";
+ if( ts.p.colModel[j].hidden ) {
+ $(this).css("display","none");
+ hdcol = "display:none;";
+ }
+ firstr += "<td role='gridcell' style='height:0px;width:"+w+"px;"+hdcol+"'></td>";
+ grid.headers[j] = { width: w, el: this };
+ 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(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.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; }
+ var ci = getColumnHeaderIndex(this);
+ if(ts.p.forceFit===true) {ts.p.nv= nextVisible(ci);}
+ grid.dragStart(ci, e, getOffset(ci));
+ return false;
+ }).click(function(e) {
+ if (ts.p.disableClick) {
+ ts.p.disableClick = false;
+ return false;
+ }
+ 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 (!ts.p.viewsortcols[2]) { r=true;d=t.attr("sort"); }
+ sortData( $('div',this)[0].id, ci, r, d);
+ return false;
+ });
+ if (ts.p.sortable && $.fn.sortable) {
+ try {
+ $(ts).jqGrid("sortableColumns", thr);
+ } catch (e){}
+ }
+ if(ts.p.footerrow) { tfoot += "</tr></tbody></table>"; }
+ firstr += "</tr>";
+ tbody = document.createElement("tbody");
+ this.appendChild(tbody);
+ $(this).addClass('ui-jqgrid-btable').append(firstr);
+ 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>");
+ thead = null;
+ grid.hDiv = document.createElement("div");
+ $(grid.hDiv)
+ .css({ width: grid.width+"px"})
+ .addClass("ui-state-default ui-jqgrid-hdiv")
+ .append(hb);
+ $(hb).append(hTable);
+ hTable = null;
+ 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;} }
+ 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');
+ if(hg) {$(ts.p.pager).hide();}
+ setPager(ts.p.pager,'');
+ }
+ if( ts.p.cellEdit === false && ts.p.hoverrows === true) {
+ $(ts).bind('mouseover',function(e) {
+ ptr = $(e.target).closest("tr.jqgrow");
+ if($(ptr).attr("class") !== "ui-subgrid") {
+ $(ptr).addClass("ui-state-hover");
+ }
+ }).bind('mouseout',function(e) {
+ ptr = $(e.target).closest("tr.jqgrow");
+ $(ptr).removeClass("ui-state-hover");
+ });
+ }
+ var ri,ci, tdHtml;
+ $(ts).before(grid.hDiv).click(function(e) {
+ td = e.target;
+ ptr = $(td,ts.rows).closest("tr.jqgrow");
+ if($(ptr).length === 0 || ptr[0].className.indexOf( 'ui-state-disabled' ) > -1 || ($(td,ts).closest("table.ui-jqgrid-btable").attr('id') || '').replace("_frozen","") !== ts.id ) {
+ return this;
+ }
+ var scb = $(td).hasClass("cbox"),
+ 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(cSel === true) {
+ ri = ptr[0].id;
+ ci = $.jgrid.getCellIndex(td);
+ tdHtml = $(td).closest("td,th").html();
+ $(ts).triggerHandler("jqGridCellSelect", [ri,ci,tdHtml,e]);
+ if($.isFunction(ts.p.onCellSelect)) {
+ ts.p.onCellSelect.call(ts,ri,ci,tdHtml,e);
+ }
+ if(ts.p.cellEdit === true) {
+ if(ts.p.multiselect && scb){
+ $(ts).jqGrid("setSelection", ri ,true,e);
+ } else {
+ ri = ptr[0].rowIndex;
+ try {$(ts).jqGrid("editCell",ri,ci,true);} catch (_) {}
+ }
+ } else if ( !ts.p.multikey ) {
+ if(ts.p.multiselect && ts.p.multiboxonly) {
+ if(scb){$(ts).jqGrid("setSelection",ri,true,e);}
+ else {
+ var frz = ts.p.frozenColumns ? ts.p.id+"_frozen" : "";
+ $(ts.p.selarrrow).each(function(i,n){
+ var ind = ts.rows.namedItem(n);
+ $(ind).removeClass("ui-state-highlight");
+ $("#jqg_"+$.jgrid.jqID(ts.p.id)+"_"+$.jgrid.jqID(n))[ts.p.useProp ? 'prop': 'attr']("checked", false);
+ if(frz) {
+ $("#"+$.jgrid.jqID(n), "#"+$.jgrid.jqID(frz)).removeClass("ui-state-highlight");
+ $("#jqg_"+$.jgrid.jqID(ts.p.id)+"_"+$.jgrid.jqID(n), "#"+$.jgrid.jqID(frz))[ts.p.useProp ? 'prop': 'attr']("checked", false);
+ }
+ });
+ ts.p.selarrrow = [];
+ $(ts).jqGrid("setSelection",ri,true,e);
+ }
+ } else {
+ $(ts).jqGrid("setSelection",ri,true,e);
+ }
+ } else {
+ if(e[ts.p.multikey]) {
+ $(ts).jqGrid("setSelection",ri,true,e);
+ } else if(ts.p.multiselect && scb) {
+ scb = $("#jqg_"+$.jgrid.jqID(ts.p.id)+"_"+ri).is(":checked");
+ $("#jqg_"+$.jgrid.jqID(ts.p.id)+"_"+ri)[ts.p.useProp ? 'prop' : 'attr']("checked", scb);
+ }
+ }
+ }
+ }).bind('reloadGrid', function(e,opts) {
+ if(ts.p.treeGrid ===true) { ts.p.datatype = ts.p.treedatatype;}
+ if (opts && opts.current) {
+ ts.grid.selectionPreserver(ts);
+ }
+ 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);}
+ ts.p.savedRow = [];
+ }
+ if(ts.p.scroll) {emptyRows.call(ts, true, false);}
+ if (opts && opts.page) {
+ var page = opts.page;
+ if (page > ts.p.lastpage) { page = ts.p.lastpage; }
+ if (page < 1) { page = 1; }
+ ts.p.page = page;
+ if (ts.grid.prevRowHeight) {
+ ts.grid.bDiv.scrollTop = (page - 1) * ts.grid.prevRowHeight * ts.p.rowNum;
+ } else {
+ ts.grid.bDiv.scrollTop = 0;
+ }
+ }
+ if (ts.grid.prevRowHeight && ts.p.scroll) {
+ delete ts.p.lastpage;
+ ts.grid.populateVisible();
+ } else {
+ ts.grid.populate();
+ }
+ if(ts.p._inlinenav===true) {$(ts).jqGrid('showAddEditButtons');}
+ return false;
+ })
+ .dblclick(function(e) {
+ td = e.target;
+ ptr = $(td,ts.rows).closest("tr.jqgrow");
+ if($(ptr).length === 0 ){return;}
+ 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); }
+ })
+ .bind('contextmenu', function(e) {
+ td = e.target;
+ ptr = $(td,ts.rows).closest("tr.jqgrow");
+ if($(ptr).length === 0 ){return;}
+ if(!ts.p.multiselect) { $(ts).jqGrid("setSelection",ptr[0].id,true,e); }
+ 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); }
+ });
+ 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))
+ .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(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>")
+ .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") {
+ 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);
+ if(hg) {$(grid.ubDiv).hide();}
+ } else {
+ $(grid.uDiv).width(grid.width).addClass("ui-userdata ui-state-default").attr("id","t_"+this.id);
+ }
+ if(hg) {$(grid.uDiv).hide();}
+ }
+ if(ts.p.toppager) {
+ 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);
+ 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).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'; }
+ if(hg) {$(grid.sDiv).hide();}
+ }
+ hb = null;
+ if(ts.p.caption) {
+ var tdt = ts.p.datatype;
+ if(ts.p.hidegrid===true) {
+ $(".ui-jqgrid-titlebar-close",grid.cDiv).click( function(e){
+ var onHdCl = $.isFunction(ts.p.onHeaderClick),
+ 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') {
+ elems += ', #' + $(grid.ubDiv).attr('id');
+ }
+ elems += ', #' + $(grid.uDiv).attr('id');
+ }
+ counter = $(elems,"#gview_"+$.jgrid.jqID(ts.p.id)).length;
+
+ if(ts.p.gridstate == 'visible') {
+ $(elems,"#gbox_"+$.jgrid.jqID(ts.p.id)).slideUp("fast", function() {
+ counter--;
+ if (counter === 0) {
+ $("span",self).removeClass("ui-icon-circle-triangle-n").addClass("ui-icon-circle-triangle-s");
+ ts.p.gridstate = 'hidden';
+ if($("#gbox_"+$.jgrid.jqID(ts.p.id)).hasClass("ui-resizable")) { $(".ui-resizable-handle","#gbox_"+$.jgrid.jqID(ts.p.id)).hide(); }
+ $(ts).triggerHandler("jqGridHeaderClick", [ts.p.gridstate,e]);
+ if(onHdCl) {if(!hg) {ts.p.onHeaderClick.call(ts,ts.p.gridstate,e);}}
+ }
+ });
+ } else if(ts.p.gridstate == 'hidden'){
+ $(elems,"#gbox_"+$.jgrid.jqID(ts.p.id)).slideDown("fast", function() {
+ counter--;
+ if (counter === 0) {
+ $("span",self).removeClass("ui-icon-circle-triangle-s").addClass("ui-icon-circle-triangle-n");
+ if(hg) {ts.p.datatype = tdt;populate();hg=false;}
+ ts.p.gridstate = 'visible';
+ if($("#gbox_"+$.jgrid.jqID(ts.p.id)).hasClass("ui-resizable")) { $(".ui-resizable-handle","#gbox_"+$.jgrid.jqID(ts.p.id)).show(); }
+ $(ts).triggerHandler("jqGridHeaderClick", [ts.p.gridstate,e]);
+ if(onHdCl) {if(!hg) {ts.p.onHeaderClick.call(ts,ts.p.gridstate,e);}}
+ }
+ });
+ }
+ return false;
+ });
+ if(hg) {ts.p.datatype="local"; $(".ui-jqgrid-titlebar-close",grid.cDiv).trigger("click");}
+ }
+ } else {$(grid.cDiv).hide();}
+ $(grid.hDiv).after(grid.bDiv)
+ .mousemove(function (e) {
+ if(grid.resizing){grid.dragMove(e);return false;}
+ });
+ $(".ui-jqgrid-labels",grid.hDiv).bind("selectstart", function () { return false; });
+ $(document).mouseup(function () {
+ if(grid.resizing) { grid.dragEnd(); return false;}
+ return true;
+ });
+ ts.formatCol = formatCol;
+ ts.sortData = sortData;
+ ts.updatepager = updatepager;
+ ts.refreshIndex = refreshIndex;
+ ts.setHeadCheckBox = setHeadCheckBox;
+ ts.constructTr = constructTr;
+ ts.formatter = function ( rowId, cellval , colpos, rwdat, act){return formatter(rowId, cellval , colpos, rwdat, act);};
+ $.extend(grid,{populate : populate, emptyRows: emptyRows});
+ this.grid = grid;
+ 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;
+
+ populate();ts.p.hiddengrid=false;
+ });
+};
+$.jgrid.extend({
+ getGridParam : function(pName) {
+ 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;}
+ },
+ setGridParam : function (newParams){
+ return this.each(function(){
+ if (this.grid && typeof(newParams) === 'object') {$.extend(true,this.p,newParams);}
+ });
+ },
+ getDataIDs : function () {
+ var ids=[], i=0, len, j=0;
+ this.each(function(){
+ len = this.rows.length;
+ if(len && len>0){
+ while(i<len) {
+ if($(this.rows[i]).hasClass('jqgrow')) {
+ ids[j] = this.rows[i].id;
+ j++;
+ }
+ i++;
+ }
+ }
+ });
+ return ids;
+ },
+ setSelection : function(selection,onsr, e) {
+ return this.each(function(){
+ var $t = this, stat,pt, ner, ia, tpsr, fid;
+ if(selection === undefined) { return; }
+ onsr = onsr === false ? false : true;
+ pt=$t.rows.namedItem(selection+"");
+ if(!pt || !pt.className || pt.className.indexOf( 'ui-state-disabled' ) > -1 ) { return; }
+ function scrGrid(iR){
+ var ch = $($t.grid.bDiv)[0].clientHeight,
+ st = $($t.grid.bDiv)[0].scrollTop,
+ rpos = $($t.rows[iR]).position().top,
+ rh = $t.rows[iR].clientHeight;
+ if(rpos+rh >= ch+st) { $($t.grid.bDiv)[0].scrollTop = rpos-(ch+st)+rh+st; }
+ else if(rpos < ch+st) {
+ if(rpos < st) {
+ $($t.grid.bDiv)[0].scrollTop = rpos;
+ }
+ }
+ }
+ if($t.p.scrollrows===true) {
+ ner = $t.rows.namedItem(selection).rowIndex;
+ if(ner >=0 ){
+ scrGrid(ner);
+ }
+ }
+ if($t.p.frozenColumns === true ) {
+ fid = $t.p.id+"_frozen";
+ }
+ if(!$t.p.multiselect) {
+ if(pt.className !== "ui-subgrid") {
+ 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) {
+ $("#"+$.jgrid.jqID($t.p.selrow), "#"+$.jgrid.jqID(fid)).removeClass("ui-state-highlight");
+ $("#"+$.jgrid.jqID(selection), "#"+$.jgrid.jqID(fid)).addClass("ui-state-highlight");
+ }
+ stat = true;
+ } else {
+ 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); }
+ }
+ } else {
+ //unselect selectall checkbox when deselecting a specific row
+ $t.setHeadCheckBox( false );
+ $t.p.selrow = pt.id;
+ ia = $.inArray($t.p.selrow,$t.p.selarrrow);
+ if ( ia === -1 ){
+ if(pt.className !== "ui-subgrid") { $(pt).addClass("ui-state-highlight").attr("aria-selected","true");}
+ stat = true;
+ $t.p.selarrrow.push($t.p.selrow);
+ } else {
+ if(pt.className !== "ui-subgrid") { $(pt).removeClass("ui-state-highlight").attr("aria-selected","false");}
+ stat = false;
+ $t.p.selarrrow.splice(ia,1);
+ tpsr = $t.p.selarrrow[0];
+ $t.p.selrow = (tpsr === undefined) ? null : tpsr;
+ }
+ $("#jqg_"+$.jgrid.jqID($t.p.id)+"_"+$.jgrid.jqID(pt.id))[$t.p.useProp ? 'prop': 'attr']("checked",stat);
+ if(fid) {
+ if(ia === -1) {
+ $("#"+$.jgrid.jqID(selection), "#"+$.jgrid.jqID(fid)).addClass("ui-state-highlight");
+ } else {
+ $("#"+$.jgrid.jqID(selection), "#"+$.jgrid.jqID(fid)).removeClass("ui-state-highlight");
+ }
+ $("#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); }
+ }
+ });
+ },
+ resetSelection : function( rowid ){
+ return this.each(function(){
+ var t = this, ind, sr, fid;
+ if( t.p.frozenColumns === true ) {
+ fid = t.p.id+"_frozen";
+ }
+ if(typeof(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"); }
+ if(t.p.multiselect) {
+ $("#jqg_"+$.jgrid.jqID(t.p.id)+"_"+$.jgrid.jqID(sr), "#"+$.jgrid.jqID(t.p.id))[t.p.useProp ? 'prop': 'attr']("checked",false);
+ if(fid) { $("#jqg_"+$.jgrid.jqID(t.p.id)+"_"+$.jgrid.jqID(sr), "#"+$.jgrid.jqID(fid))[t.p.useProp ? 'prop': 'attr']("checked",false); }
+ t.setHeadCheckBox( false);
+ }
+ sr = null;
+ } else if(!t.p.multiselect) {
+ if(t.p.selrow) {
+ $("#"+$.jgrid.jqID(t.p.id)+" tbody:first tr#"+$.jgrid.jqID(t.p.selrow)).removeClass("ui-state-highlight").attr("aria-selected","false");
+ if(fid) { $("#"+$.jgrid.jqID(t.p.selrow), "#"+$.jgrid.jqID(fid)).removeClass("ui-state-highlight"); }
+ t.p.selrow = null;
+ }
+ } else {
+ $(t.p.selarrrow).each(function(i,n){
+ ind = t.rows.namedItem(n);
+ $(ind).removeClass("ui-state-highlight").attr("aria-selected","false");
+ $("#jqg_"+$.jgrid.jqID(t.p.id)+"_"+$.jgrid.jqID(n))[t.p.useProp ? 'prop': 'attr']("checked",false);
+ if(fid) {
+ $("#"+$.jgrid.jqID(n), "#"+$.jgrid.jqID(fid)).removeClass("ui-state-highlight");
+ $("#jqg_"+$.jgrid.jqID(t.p.id)+"_"+$.jgrid.jqID(n), "#"+$.jgrid.jqID(fid))[t.p.useProp ? 'prop': 'attr']("checked",false);
+ }
+ });
+ t.setHeadCheckBox( false );
+ t.p.selarrrow = [];
+ }
+ if(t.p.cellEdit === true) {
+ if(parseInt(t.p.iCol,10)>=0 && parseInt(t.p.iRow,10)>=0) {
+ $("td:eq("+t.p.iCol+")",t.rows[t.p.iRow]).removeClass("edit-cell ui-state-highlight");
+ $(t.rows[t.p.iRow]).removeClass("selected-row ui-state-hover");
+ }
+ }
+ t.p.savedRow = [];
+ });
+ },
+ getRowData : function( rowid ) {
+ var res = {}, resall, getall=false, len, j=0;
+ this.each(function(){
+ var $t = this,nm,ind;
+ if(typeof(rowid) == 'undefined') {
+ getall = true;
+ resall = [];
+ len = $t.rows.length;
+ } else {
+ ind = $t.rows.namedItem(rowid);
+ if(!ind) { return res; }
+ len = 2;
+ }
+ while(j<len){
+ if(getall) { ind = $t.rows[j]; }
+ if( $(ind).hasClass('jqgrow') ) {
+ $('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) {
+ res[nm] = $.jgrid.htmlDecode($("span:first",this).html());
+ } else {
+ try {
+ res[nm] = $.unformat.call($t,this,{rowId:ind.id, colModel:$t.p.colModel[i]},i);
+ } catch (e){
+ res[nm] = $.jgrid.htmlDecode($(this).html());
+ }
+ }
+ }
+ });
+ if(getall) { resall.push(res); res={}; }
+ }
+ j++;
+ }
+ });
+ return resall ? resall: res;
+ },
+ delRowData : function(rowid) {
+ var success = false, rowInd, ia, ri;
+ 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--;
+ $t.updatepager(true,false);
+ success=true;
+ if($t.p.multiselect) {
+ ia = $.inArray(rowid,$t.p.selarrrow);
+ if(ia != -1) { $t.p.selarrrow.splice(ia,1);}
+ }
+ if(rowid == $t.p.selrow) {$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') {
+ $t.p.data.splice(pos,1);
+ $t.refreshIndex();
+ }
+ }
+ if( $t.p.altRows === true && success ) {
+ var cn = $t.p.altclass;
+ $($t.rows).each(function(i){
+ if(i % 2 ==1) { $(this).addClass(cn); }
+ else { $(this).removeClass(cn); }
+ });
+ }
+ });
+ return success;
+ },
+ setRowData : function(rowid, data, cssp) {
+ var nm, success=true, title;
+ this.each(function(){
+ if(!this.grid) {return false;}
+ var t = this, vl, ind, cp = typeof cssp, lcdata={};
+ ind = t.rows.namedItem(rowid);
+ if(!ind) { return false; }
+ if( data ) {
+ 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');
+ 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);
+ } else {
+ $("td:eq("+i+")",ind).html(vl).attr(title);
+ }
+ }
+ });
+ if(t.p.datatype == 'local') {
+ var id = $.jgrid.stripPref(t.p.idPrefix, rowid),
+ pos = t.p._index[id];
+ if(t.p.treeGrid) {
+ for(var key in t.p.treeReader ){
+ if(lcdata.hasOwnProperty(t.p.treeReader[key])) {
+ delete lcdata[t.p.treeReader[key]];
+ }
+ }
+ }
+ if(typeof(pos) != 'undefined') {
+ t.p.data[pos] = $.extend(true, t.p.data[pos], lcdata);
+ }
+ lcdata = null;
+ }
+ } catch (e) {
+ success = false;
+ }
+ }
+ if(success) {
+ if(cp === 'string') {$(ind).addClass(cssp);} else if(cp === 'object') {$(ind).css(cssp);}
+ $(t).triggerHandler("jqGridAfterGridComplete");
+ }
+ });
+ return success;
+ },
+ addRowData : function(rowid,rdata,pos,src) {
+ if(!pos) {pos = "last";}
+ var success = false, nm, row, gi, si, ni,sind, i, v, prp="", aradd, cnm, cn, data, cm, id;
+ if(rdata) {
+ if($.isArray(rdata)) {
+ aradd=true;
+ pos = "last";
+ cnm = rowid;
+ } else {
+ rdata = [rdata];
+ aradd = false;
+ }
+ this.each(function() {
+ var t = this, datalen = rdata.length;
+ ni = t.p.rownumbers===true ? 1 :0;
+ gi = t.p.multiselect ===true ? 1 :0;
+ si = t.p.subGrid===true ? 1 :0;
+ if(!aradd) {
+ if(typeof(rowid) != 'undefined') { rowid = 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]; }
+ }
+ }
+ }
+ cn = t.p.altclass;
+ var k = 0, cna ="", lcdata = {},
+ air = $.isFunction(t.p.afterInsertRow) ? true : false;
+ while(k < datalen) {
+ data = rdata[k];
+ row=[];
+ if(aradd) {
+ try {rowid = data[cnm];}
+ catch (e) {rowid = $.jgrid.randId();}
+ cna = t.p.altRows === true ? (t.rows.length-1)%2 === 0 ? cn : "" : "";
+ }
+ id = rowid;
+ rowid = t.p.idPrefix + rowid;
+ if(ni){
+ prp = t.formatCol(0,1,'',null,rowid, true);
+ row[row.length] = "<td role=\"gridcell\" class=\"ui-state-default jqgrid-rownum\" "+prp+">0</td>";
+ }
+ if(gi) {
+ v = "<input role=\"checkbox\" type=\"checkbox\""+" id=\"jqg_"+t.p.id+"_"+rowid+"\" class=\"cbox\"/>";
+ prp = t.formatCol(ni,1,'', null, rowid, true);
+ row[row.length] = "<td role=\"gridcell\" "+prp+">"+v+"</td>";
+ }
+ if(si) {
+ row[row.length] = $(t).jqGrid("addSubGridCell",gi+ni,1);
+ }
+ for(i = gi+si+ni; i < t.p.colModel.length;i++){
+ cm = t.p.colModel[i];
+ 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);
+ row[row.length] = "<td role=\"gridcell\" "+prp+">"+v+"</td>";
+ }
+ row.unshift( t.constructTr(rowid, false, cna, lcdata, data, false ) );
+ row[row.length] = "</tr>";
+ if(t.rows.length === 0){
+ $("table:first",t.grid.bDiv).append(row.join(''));
+ } else {
+ switch (pos) {
+ case 'last':
+ $(t.rows[t.rows.length-1]).after(row.join(''));
+ sind = t.rows.length-1;
+ break;
+ case 'first':
+ $(t.rows[0]).after(row.join(''));
+ sind = 1;
+ break;
+ case 'after':
+ sind = t.rows.namedItem(src);
+ if (sind) {
+ if($(t.rows[sind.rowIndex+1]).hasClass("ui-subgrid")) { $(t.rows[sind.rowIndex+1]).after(row); }
+ else { $(sind).after(row.join('')); }
+ }
+ sind++;
+ break;
+ case 'before':
+ sind = t.rows.namedItem(src);
+ if(sind) {$(sind).before(row.join(''));sind=sind.rowIndex;}
+ sind--;
+ break;
+ }
+ }
+ if(t.p.subGrid===true) {
+ $(t).jqGrid("addSubGrid",gi+ni, sind);
+ }
+ t.p.records++;
+ t.p.reccount++;
+ $(t).triggerHandler("jqGridAfterInsertRow", [rowid,data,data]);
+ if(air) { t.p.afterInsertRow.call(t,rowid,data,data); }
+ k++;
+ if(t.p.datatype == 'local') {
+ lcdata[t.p.localReader.id] = id;
+ t.p._index[id] = t.p.data.length;
+ t.p.data.push(lcdata);
+ lcdata = {};
+ }
+ }
+ if( t.p.altRows === true && !aradd) {
+ 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); }
+ else { $(this).removeClass(cn); }
+ });
+ }
+ }
+ t.updatepager(true,true);
+ success = true;
+ });
+ }
+ return success;
+ },
+ footerData : function(action,data, format) {
+ var nm, success=false, res={}, title;
+ function isEmpty(obj) {
+ for(var i in obj) {
+ if (obj.hasOwnProperty(i)) { return false; }
+ }
+ return true;
+ }
+ if(typeof(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; } }
+ success=true;
+ $(this.p.colModel).each(function(i){
+ nm = this.name;
+ 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") {
+ res[nm] = $("tr.footrow td:eq("+i+")",t.grid.sDiv).html();
+ }
+ });
+ });
+ 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;
+ if (!$t.grid ) {return;}
+ if( typeof colname === 'string') {colname=[colname];}
+ 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); }
+ $(this.p.colModel).each(function(i) {
+ if ($.inArray(this.name,colname) !== -1 && this.hidden === sw) {
+ if($t.p.frozenColumns === true && this.frozen === true) {
+ return true;
+ }
+ $("tr",$t.grid.hDiv).each(function(){
+ $(this.cells[i]).css("display", show);
+ });
+ $($t.rows).each(function(){
+ if (!$(this).hasClass("jqgroup")) {
+ $(this.cells[i]).css("display", show);
+ }
+ });
+ if($t.p.footerrow) { $("tr.footrow td:eq("+i+")", $t.grid.sDiv).css("display", show); }
+ cw = parseInt(this.width,10);
+ if(show === "none") {
+ $t.p.tblwidth -= cw+brd;
+ } else {
+ $t.p.tblwidth += cw+brd;
+ }
+ this.hidden = !sw;
+ fndh=true;
+ $($t).triggerHandler("jqGridShowHideCol", [sw,this.name,i]);
+ }
+ });
+ if(fndh===true) {
+ if($t.p.shrinkToFit === true && !isNaN($t.p.height)) { $t.p.tblwidth += parseInt($t.p.scrollOffset,10);}
+ $($t).jqGrid("setGridWidth",$t.p.shrinkToFit === true ? $t.p.tblwidth : $t.p.width );
+ }
+ if( gh ) {
+ $($t).jqGrid('setGroupHeaders',$t.p.groupHeader);
+ }
+ });
+ },
+ hideCol : function (colname) {
+ return this.each(function(){$(this).jqGrid("showHideCol",colname,"none");});
+ },
+ showCol : function(colname) {
+ return this.each(function(){$(this).jqGrid("showHideCol",colname,"");});
+ },
+ remapColumns : function(permutation, updateCells, keepHeader)
+ {
+ function resortArray(a) {
+ var ac;
+ if (a.length) {
+ ac = $.makeArray(a);
+ } else {
+ ac = $.extend({}, a);
+ }
+ $.each(permutation, function(i) {
+ a[i] = ac[this];
+ });
+ }
+ var ts = this.get(0);
+ function resortRows(parent, clobj) {
+ $(">tr"+(clobj||""), parent).each(function() {
+ var row = this;
+ var elems = $.makeArray(row.cells);
+ $.each(permutation, function() {
+ var e = elems[this];
+ if (e) {
+ row.appendChild(e);
+ }
+ });
+ });
+ }
+ resortArray(ts.p.colModel);
+ resortArray(ts.p.colNames);
+ resortArray(ts.grid.headers);
+ resortRows($("thead:first", ts.grid.hDiv), keepHeader && ":not(.ui-jqgrid-labels)");
+ if (updateCells) {
+ resortRows($("#"+$.jgrid.jqID(ts.p.id)+" tbody:first"), ".jqgfirstrow, tr.jqgrow, tr.jqfoot");
+ }
+ if (ts.p.footerrow) {
+ resortRows($("tbody:first", ts.grid.sDiv));
+ }
+ if (ts.p.remapColumns) {
+ if (!ts.p.remapColumns.length){
+ ts.p.remapColumns = $.makeArray(permutation);
+ } else {
+ resortArray(ts.p.remapColumns);
+ }
+ }
+ ts.p.lastsort = $.inArray(ts.p.lastsort, permutation);
+ if(ts.p.treeGrid) { ts.p.expColInd = $.inArray(ts.p.expColInd, permutation); }
+ $(ts).triggerHandler("jqGridRemapColumns", [permutation, updateCells, keepHeader]);
+ },
+ setGridWidth : function(nwidth, shrink) {
+ 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') {
+ shrink=$t.p.shrinkToFit;
+ }
+ if(isNaN(nwidth)) {return;}
+ nwidth = parseInt(nwidth,10);
+ $t.grid.width = $t.p.width = nwidth;
+ $("#gbox_"+$.jgrid.jqID($t.p.id)).css("width",nwidth+"px");
+ $("#gview_"+$.jgrid.jqID($t.p.id)).css("width",nwidth+"px");
+ $($t.grid.bDiv).css("width",nwidth+"px");
+ $($t.grid.hDiv).css("width",nwidth+"px");
+ if($t.p.pager ) {$($t.p.pager).css("width",nwidth+"px");}
+ 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.footerrow) { $($t.grid.sDiv).css("width",nwidth+"px"); }
+ if(shrink ===false && $t.p.forceFit === true) {$t.p.forceFit=false;}
+ if(shrink===true) {
+ $.each($t.p.colModel, function() {
+ if(this.hidden===false){
+ cw = this.widthOrg;
+ initwidth += cw+brd;
+ if(this.fixed) {
+ gw += cw+brd;
+ } else {
+ vc++;
+ }
+ cl++;
+ }
+ });
+ if(vc === 0) { return; }
+ $t.p.tblwidth = initwidth;
+ aw = nwidth-brd*vc-gw;
+ if(!isNaN($t.p.height)) {
+ if($($t.grid.bDiv)[0].clientHeight < $($t.grid.bDiv)[0].scrollHeight || $t.rows.length === 1){
+ hs = true;
+ aw -= scw;
+ }
+ }
+ initwidth =0;
+ var cle = $t.grid.cols.length >0;
+ $.each($t.p.colModel, function(i) {
+ if(this.hidden === false && !this.fixed){
+ cw = this.widthOrg;
+ cw = Math.round(aw*cw/($t.p.tblwidth-brd*vc-gw));
+ if (cw < 0) { return; }
+ this.width =cw;
+ initwidth += cw;
+ $t.grid.headers[i].width=cw;
+ $t.grid.headers[i].el.style.width=cw+"px";
+ if($t.p.footerrow) { $t.grid.footers[i].style.width = cw+"px"; }
+ if(cle) { $t.grid.cols[i].style.width = cw+"px"; }
+ lvc = i;
+ }
+ });
+
+ if (!lvc) { return; }
+
+ cr =0;
+ if (hs) {
+ if(nwidth-gw-(initwidth+brd*vc) !== scw){
+ cr = nwidth-gw-(initwidth+brd*vc)-scw;
+ }
+ } else if( Math.abs(nwidth-gw-(initwidth+brd*vc)) !== 1) {
+ cr = nwidth-gw-(initwidth+brd*vc);
+ }
+ $t.p.colModel[lvc].width += cr;
+ $t.p.tblwidth = initwidth+cr+brd*vc+gw;
+ if($t.p.tblwidth > nwidth) {
+ var delta = $t.p.tblwidth - parseInt(nwidth,10);
+ $t.p.tblwidth = nwidth;
+ cw = $t.p.colModel[lvc].width = $t.p.colModel[lvc].width-delta;
+ } else {
+ cw= $t.p.colModel[lvc].width;
+ }
+ $t.grid.headers[lvc].width = cw;
+ $t.grid.headers[lvc].el.style.width=cw+"px";
+ if(cle) { $t.grid.cols[lvc].style.width = cw+"px"; }
+ if($t.p.footerrow) {
+ $t.grid.footers[lvc].style.width = cw+"px";
+ }
+ }
+ if($t.p.tblwidth) {
+ $('table:first',$t.grid.bDiv).css("width",$t.p.tblwidth+"px");
+ $('table:first',$t.grid.hDiv).css("width",$t.p.tblwidth+"px");
+ $t.grid.hDiv.scrollLeft = $t.grid.bDiv.scrollLeft;
+ if($t.p.footerrow) {
+ $('table:first',$t.grid.sDiv).css("width",$t.p.tblwidth+"px");
+ }
+ }
+ });
+ },
+ setGridHeight : function (nh) {
+ return this.each(function (){
+ var $t = this;
+ if(!$t.grid) {return;}
+ var bDiv = $($t.grid.bDiv);
+ bDiv.css({height: nh+(isNaN(nh)?"":"px")});
+ if($t.p.frozenColumns === true){
+ //follow the original set height to use 16, better scrollbar width detection
+ $('#'+$.jgrid.jqID($t.p.id)+"_frozen").parent().height(bDiv.height() - 16);
+ }
+ $t.p.height = nh;
+ if ($t.p.scroll) { $t.grid.populateVisible(); }
+ });
+ },
+ setCaption : function (newcap){
+ return this.each(function(){
+ this.p.caption=newcap;
+ $("span.ui-jqgrid-title, span.ui-jqgrid-title-rtl",this.grid.cDiv).html(newcap);
+ $(this.grid.cDiv).show();
+ });
+ },
+ setLabel : function(colname, nData, prop, attrp ){
+ return this.each(function(){
+ var $t = this, pos=-1;
+ if(!$t.grid) {return;}
+ if(typeof(colname) != "undefined") {
+ $($t.p.colModel).each(function(i){
+ if (this.name == colname) {
+ pos = i;return false;
+ }
+ });
+ } else { return; }
+ if(pos>=0) {
+ var thecol = $("tr.ui-jqgrid-labels th:eq("+pos+")",$t.grid.hDiv);
+ if (nData){
+ var ico = $(".s-ico",thecol);
+ $("[id^=jqgh_]",thecol).empty().html(nData).append(ico);
+ $t.p.colNames[pos] = nData;
+ }
+ if (prop) {
+ if(typeof prop === 'string') {$(thecol).addClass(prop);} else {$(thecol).css(prop);}
+ }
+ if(typeof attrp === 'object') {$(thecol).attr(attrp);}
+ }
+ });
+ },
+ setCell : function(rowid,colname,nData,cssp,attrp, forceupd) {
+ return this.each(function(){
+ var $t = this, pos =-1,v, title;
+ if(!$t.grid) {return;}
+ if(isNaN(colname)) {
+ $($t.p.colModel).each(function(i){
+ if (this.name == colname) {
+ pos = i;return false;
+ }
+ });
+ } else {pos = parseInt(colname,10);}
+ if(pos>=0) {
+ var ind = $t.rows.namedItem(rowid);
+ if (ind){
+ var tcell = $("td:eq("+pos+")",ind);
+ if(nData !== "" || forceupd === true) {
+ v = $t.formatter(rowid, nData, pos,ind,'edit');
+ title = $t.p.colModel[pos].title ? {"title":$.jgrid.stripHtml(v)} : {};
+ if($t.p.treeGrid && $(".tree-wrap",$(tcell)).length>0) {
+ $("span",$(tcell)).html(v).attr(title);
+ } else {
+ $(tcell).html(v).attr(title);
+ }
+ 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") {
+ $t.p.data[index][cm.name] = nData;
+ }
+ }
+ }
+ if(typeof cssp === 'string'){
+ $(tcell).addClass(cssp);
+ } else if(cssp) {
+ $(tcell).css(cssp);
+ }
+ if(typeof attrp === 'object') {$(tcell).attr(attrp);}
+ }
+ }
+ });
+ },
+ getCell : function(rowid,col) {
+ var ret = false;
+ this.each(function(){
+ var $t=this, pos=-1;
+ if(!$t.grid) {return;}
+ if(isNaN(col)) {
+ $($t.p.colModel).each(function(i){
+ if (this.name === col) {
+ pos = i;return false;
+ }
+ });
+ } else {pos = parseInt(col,10);}
+ if(pos>=0) {
+ var ind = $t.rows.namedItem(rowid);
+ if(ind) {
+ try {
+ ret = $.unformat.call($t,$("td:eq("+pos+")",ind),{rowId:ind.id, colModel:$t.p.colModel[pos]},pos);
+ } catch (e){
+ ret = $.jgrid.htmlDecode($("td:eq("+pos+")",ind).html());
+ }
+ }
+ }
+ });
+ return ret;
+ },
+ 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; }
+ this.each(function(){
+ var $t=this, pos=-1;
+ if(!$t.grid) {return;}
+ if(isNaN(col)) {
+ $($t.p.colModel).each(function(i){
+ if (this.name === col) {
+ pos = i;return false;
+ }
+ });
+ } else {pos = parseInt(col,10);}
+ if(pos>=0) {
+ var ln = $t.rows.length, i =0;
+ if (ln && ln>0){
+ while(i<ln){
+ if($($t.rows[i]).hasClass('jqgrow')) {
+ try {
+ val = $.unformat.call($t,$($t.rows[i].cells[pos]),{rowId:$t.rows[i].id, colModel:$t.p.colModel[pos]},pos);
+ } catch (e) {
+ val = $.jgrid.htmlDecode($t.rows[i].cells[pos].innerHTML);
+ }
+ if(mathopr) {
+ v = parseFloat(val);
+ sum += v;
+ if (max === undefined) {max = min = v}
+ min = Math.min(min, v);
+ max = Math.max(max, v);
+ }
+ else if(obj) { ret.push( {id:$t.rows[i].id,value:val} ); }
+ else { ret.push( val ); }
+ }
+ i++;
+ }
+ if(mathopr) {
+ switch(mathopr.toLowerCase()){
+ case 'sum': ret =sum; break;
+ case 'avg': ret = sum/ln; break;
+ case 'count': ret = ln; break;
+ case 'min': ret = min; break;
+ case 'max': ret = max; break;
+ }
+ }
+ }
+ }
+ });
+ return ret;
+ },
+ clearGridData : function(clearfooter) {
+ return this.each(function(){
+ var $t = this;
+ if(!$t.grid) {return;}
+ 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];
+ $("#"+$.jgrid.jqID($t.p.id)+" tbody:first").empty().append(trf);
+ }
+ if($t.p.footerrow && clearfooter) { $(".ui-jqgrid-ftable td",$t.grid.sDiv).html(" "); }
+ $t.p.selrow = null; $t.p.selarrrow= []; $t.p.savedRow = [];
+ $t.p.records = 0;$t.p.page=1;$t.p.lastpage=0;$t.p.reccount=0;
+ $t.p.data = []; $t.p._index = {};
+ $t.updatepager(true,false);
+ });
+ },
+ getInd : function(rowid,rc){
+ var ret =false,rw;
+ this.each(function(){
+ rw = this.rows.namedItem(rowid);
+ if(rw) {
+ ret = rc===true ? rw: rw.rowIndex;
+ }
+ });
+ return ret;
+ },
+ bindKeys : function( settings ){
+ var o = $.extend({
+ onEnter: null,
+ onSpace: null,
+ onLeftKey: null,
+ onRightKey: null,
+ scrollingRows : true
+ },settings || {});
+ return this.each(function(){
+ var $t = this;
+ if( !$('body').is('[role]') ){$('body').attr('role','application');}
+ $t.p.scrollrows = o.scrollingRows;
+ $($t).keydown(function(event){
+ var target = $($t).find('tr[tabindex=0]')[0], id, r, mind,
+ expanded = $t.p.treeReader.expanded_field;
+ //check for arrow keys
+ if(target) {
+ mind = $t.p._index[target.id];
+ if(event.keyCode === 37 || event.keyCode === 38 || event.keyCode === 39 || event.keyCode === 40){
+ // up key
+ if(event.keyCode === 38 ){
+ r = target.previousSibling;
+ id = "";
+ if(r) {
+ if($(r).is(":hidden")) {
+ while(r) {
+ r = r.previousSibling;
+ if(!$(r).is(":hidden") && $(r).hasClass('jqgrow')) {id = r.id;break;}
+ }
+ } else {
+ id = r.id;
+ }
+ }
+ $($t).jqGrid('setSelection', id, true, event);
+ event.preventDefault();
+ }
+ //if key is down arrow
+ if(event.keyCode === 40){
+ r = target.nextSibling;
+ id ="";
+ if(r) {
+ if($(r).is(":hidden")) {
+ while(r) {
+ r = r.nextSibling;
+ if(!$(r).is(":hidden") && $(r).hasClass('jqgrow') ) {id = r.id;break;}
+ }
+ } else {
+ id = r.id;
+ }
+ }
+ $($t).jqGrid('setSelection', id, true, event);
+ event.preventDefault();
+ }
+ // left
+ if(event.keyCode === 37 ){
+ if($t.p.treeGrid && $t.p.data[mind][expanded]) {
+ $(target).find("div.treeclick").trigger('click');
+ }
+ $($t).triggerHandler("jqGridKeyLeft", [$t.p.selrow]);
+ if($.isFunction(o.onLeftKey)) {
+ o.onLeftKey.call($t, $t.p.selrow);
+ }
+ }
+ // right
+ if(event.keyCode === 39 ){
+ if($t.p.treeGrid && !$t.p.data[mind][expanded]) {
+ $(target).find("div.treeclick").trigger('click');
+ }
+ $($t).triggerHandler("jqGridKeyRight", [$t.p.selrow]);
+ if($.isFunction(o.onRightKey)) {
+ o.onRightKey.call($t, $t.p.selrow);
+ }
+ }
+ }
+ //check if enter was pressed on a grid or treegrid node
+ else if( event.keyCode === 13 ){
+ $($t).triggerHandler("jqGridKeyEnter", [$t.p.selrow]);
+ if($.isFunction(o.onEnter)) {
+ o.onEnter.call($t, $t.p.selrow);
+ }
+ } else if(event.keyCode === 32) {
+ $($t).triggerHandler("jqGridKeySpace", [$t.p.selrow]);
+ if($.isFunction(o.onSpace)) {
+ o.onSpace.call($t, $t.p.selrow);
+ }
+ }
+ }
+ });
+ });
+ },
+ unbindKeys : function(){
+ return this.each(function(){
+ $(this).unbind('keydown');
+ });
+ },
+ getLocalRow : function (rowid) {
+ var ret = false, ind;
+ this.each(function(){
+ if(typeof(rowid) !== "undefined") {
+ ind = this.p._index[rowid];
+ if(ind >= 0 ) {
+ ret = this.p.data[ind];
+ }
+ }
+ });
+ return ret;
+ }
+});
+})(jQuery);
+(function($){
+/**
+ * jqGrid extension for custom methods
+ * Tony Tomov tony(a)trirand.com
+ * http://trirand.com/blog/
+ *
+ * Wildraid wildraid(a)mail.ru
+ * Oleg Kiriljuk oleg.kiriljuk(a)ok-soft-gmbh.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
+**/
+/*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 ) {
+ ret = cM[i];
+ break;
+ }
+ }
+ return ret;
+ },
+ setColProp : function(colname, obj){
+ //do not set width will not work
+ 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);
+ break;
+ }
+ }
+ }
+ }
+ });
+ },
+ sortGrid : function(colname,reload, sor){
+ return this.each(function(){
+ var $t=this,idx=-1;
+ 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 ) {
+ idx = i;
+ break;
+ }
+ }
+ if ( idx!=-1 ){
+ var sort = $t.p.colModel[idx].sortable;
+ if ( typeof sort !== 'boolean' ) { sort = true; }
+ if ( typeof reload !=='boolean' ) { reload = false; }
+ if ( sort ) { $t.sortData("jqgh_"+$t.p.id+"_" + colname, idx, reload, sor); }
+ }
+ });
+ },
+ clearBeforeUnload : function () {
+ return this.each(function(){
+ var grid = this.grid;
+ grid.emptyRows.call(this, true, true); // this work quick enough and reduce the size of memory leaks if we have someone
+
+ //$(document).unbind("mouseup"); // TODO add namespace
+ $(grid.hDiv).unbind("mousemove"); // TODO add namespace
+ $(this).unbind();
+
+ grid.dragEnd = null;
+ grid.dragMove = null;
+ grid.dragStart = null;
+ grid.emptyRows = null;
+ grid.populate = null;
+ grid.populateVisible = null;
+ grid.scrollGrid = null;
+ grid.selectionPreserver = null;
+
+ grid.bDiv = null;
+ grid.cDiv = null;
+ grid.hDiv = null;
+ grid.cols = null;
+ var i, l = grid.headers.length;
+ for (i = 0; i < l; i++) {
+ grid.headers[i].el = null;
+ }
+
+ this.formatCol = null;
+ this.sortData = null;
+ this.updatepager = null;
+ this.refreshIndex = null;
+ this.setHeadCheckBox = null;
+ this.constructTr = null;
+ this.formatter = null;
+ this.addXmlData = null;
+ this.addJSONData = null;
+ });
+ },
+ GridDestroy : function () {
+ return this.each(function(){
+ if ( this.grid ) {
+ if ( this.p.pager ) { // if not part of grid
+ $(this.p.pager).remove();
+ }
+ try {
+ $(this).jqGrid('clearBeforeUnload');
+ $("#gbox_"+$.jgrid.jqID(this.id)).remove();
+ } catch (_) {}
+ }
+ });
+ },
+ GridUnload : function(){
+ return this.each(function(){
+ if ( !this.grid ) {return;}
+ var defgrid = {id: $(this).attr('id'),cl: $(this).attr('class')};
+ if (this.p.pager) {
+ $(this.p.pager).empty().removeClass("ui-state-default ui-jqgrid-pager corner-bottom");
+ }
+ var newtable = document.createElement('table');
+ $(newtable).attr({id:defgrid.id});
+ newtable.className = defgrid.cl;
+ var gid = $.jgrid.jqID(this.id);
+ $(newtable).removeClass("ui-jqgrid-btable");
+ if( $(this.p.pager).parents("#gbox_"+gid).length === 1 ) {
+ $(newtable).insertBefore("#gbox_"+gid).show();
+ $(this.p.pager).insertBefore("#gbox_"+gid);
+ } else {
+ $(newtable).insertBefore("#gbox_"+gid).show();
+ }
+ $(this).jqGrid('clearBeforeUnload');
+ $("#gbox_"+gid).remove();
+ });
+ },
+ setGridState : function(state) {
+ return this.each(function(){
+ if ( !this.grid ) {return;}
+ var $t = this;
+ 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') {
+ $($t.grid.ubDiv).slideUp("fast");
+ }
+ $($t.grid.uDiv).slideUp("fast");
+ }
+ 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') {
+ $(".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') {
+ $($t.grid.ubDiv).slideDown("fast");
+ }
+ $($t.grid.uDiv).slideDown("fast");
+ }
+ if($t.p.footerrow) { $(".ui-jqgrid-sdiv","#gbox_"+$.jgrid.jqID($t.p.id)).slideDown("fast"); }
+ $(".ui-jqgrid-titlebar-close span",$t.grid.cDiv).removeClass("ui-icon-circle-triangle-s").addClass("ui-icon-circle-triangle-n");
+ $t.p.gridstate = 'visible';
+ }
+
+ });
+ },
+ filterToolbar : function(p){
+ p = $.extend({
+ autosearch: true,
+ searchOnEnter : true,
+ beforeSearch: null,
+ afterSearch: null,
+ beforeClear: null,
+ afterClear: null,
+ searchurl : '',
+ stringResult: false,
+ groupOp: 'AND',
+ defaultSearch : "bw"
+ },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(){
+ 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) {
+ sdata[nm] = v;
+ sopt[nm] = so;
+ j++;
+ } else {
+ try {
+ delete $t.p.postData[nm];
+ } catch (z) {}
+ }
+ });
+ var sd = j>0 ? true : false;
+ if(p.stringResult === true || $t.p.datatype == "local") {
+ var ruleGroup = "{\"groupOp\":\"" + p.groupOp + "\",\"rules\":[";
+ var gi=0;
+ $.each(sdata,function(i,n){
+ if (gi > 0) {ruleGroup += ",";}
+ ruleGroup += "{\"field\":\"" + i + "\",";
+ ruleGroup += "\"op\":\"" + sopt[i] + "\",";
+ n+="";
+ ruleGroup += "\"data\":\"" + n.replace(/\\/g,'\\\\').replace(/\"/g,'\\"') + "\"}";
+ gi++;
+ });
+ ruleGroup += "]}";
+ $.extend($t.p.postData,{filters:ruleGroup});
+ $.each(['searchField', 'searchString', 'searchOper'], function(i, n){
+ if($t.p.postData.hasOwnProperty(n)) { delete $t.p.postData[n];}
+ });
+ } else {
+ $.extend($t.p.postData,sdata);
+ }
+ var saveurl;
+ if($t.p.searchurl) {
+ saveurl = $t.p.url;
+ $($t).jqGrid("setGridParam",{url:$t.p.searchurl});
+ }
+ var bsr = $($t).triggerHandler("jqGridToolbarBeforeSearch") === 'stop' ? true : false;
+ if(!bsr && $.isFunction(p.beforeSearch)){bsr = p.beforeSearch.call($t);}
+ if(!bsr) { $($t).jqGrid("setGridParam",{search:sd}).trigger("reloadGrid",[{page:1}]); }
+ if(saveurl) {$($t).jqGrid("setGridParam",{url:saveurl});}
+ $($t).triggerHandler("jqGridToolbarAfterSearch");
+ if($.isFunction(p.afterSearch)){p.afterSearch.call($t);}
+ };
+ var clearToolbar = function(trigger){
+ var sdata={}, j=0, nm;
+ trigger = (typeof trigger != 'boolean') ? true : trigger;
+ $.each($t.p.colModel,function(){
+ var v;
+ 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){
+ if(i===0) { this.selected = true; }
+ if ($(this).val() == v) {
+ this.selected = true;
+ return false;
+ }
+ });
+ if ( v !== undefined ) {
+ // post the key and not the text
+ sdata[nm] = v;
+ j++;
+ } else {
+ try {
+ delete $t.p.postData[nm];
+ } catch(e) {}
+ }
+ break;
+ case 'text':
+ $("#gs_"+$.jgrid.jqID(this.name),(this.frozen===true && $t.p.frozenColumns === true) ? $t.grid.fhDiv : $t.grid.hDiv).val(v);
+ if(v !== undefined) {
+ sdata[nm] = v;
+ j++;
+ } else {
+ try {
+ delete $t.p.postData[nm];
+ } catch (y){}
+ }
+ break;
+ }
+ });
+ var sd = j>0 ? true : false;
+ if(p.stringResult === true || $t.p.datatype == "local") {
+ var ruleGroup = "{\"groupOp\":\"" + p.groupOp + "\",\"rules\":[";
+ var gi=0;
+ $.each(sdata,function(i,n){
+ if (gi > 0) {ruleGroup += ",";}
+ ruleGroup += "{\"field\":\"" + i + "\",";
+ ruleGroup += "\"op\":\"" + "eq" + "\",";
+ n+="";
+ ruleGroup += "\"data\":\"" + n.replace(/\\/g,'\\\\').replace(/\"/g,'\\"') + "\"}";
+ gi++;
+ });
+ ruleGroup += "]}";
+ $.extend($t.p.postData,{filters:ruleGroup});
+ $.each(['searchField', 'searchString', 'searchOper'], function(i, n){
+ if($t.p.postData.hasOwnProperty(n)) { delete $t.p.postData[n];}
+ });
+ } else {
+ $.extend($t.p.postData,sdata);
+ }
+ var saveurl;
+ if($t.p.searchurl) {
+ saveurl = $t.p.url;
+ $($t).jqGrid("setGridParam",{url:$t.p.searchurl});
+ }
+ var bcv = $($t).triggerHandler("jqGridToolbarBeforeClear") === 'stop' ? true : false;
+ if(!bcv && $.isFunction(p.beforeClear)){bcv = p.beforeClear.call($t);}
+ if(!bcv) {
+ if(trigger) {
+ $($t).jqGrid("setGridParam",{search:sd}).trigger("reloadGrid",[{page:1}]);
+ }
+ }
+ if(saveurl) {$($t).jqGrid("setGridParam",{url:saveurl});}
+ $($t).triggerHandler("jqGridToolbarAfterClear");
+ if($.isFunction(p.afterClear)){p.afterClear();}
+ };
+ var 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') {
+ trow.show();
+ if(trow2) {
+ trow2.show();
+ }
+ } else {
+ trow.hide();
+ if(trow2) {
+ trow2.hide();
+ }
+ }
+ };
+ // 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>");
+ if(this.hidden===true) { $(th).css("display","none");}
+ this.search = this.search === false ? false : true;
+ if(typeof this.stype == 'undefined' ) {this.stype='text';}
+ soptions = $.extend({},this.searchoptions || {});
+ if(this.search){
+ switch (this.stype)
+ {
+ case "select":
+ surl = this.surl || soptions.dataUrl;
+ if(surl) {
+ // data returned should have already constructed html select
+ // primitive jQuery load
+ self = thd;
+ $.ajax($.extend({
+ url: surl,
+ dataType: "html",
+ success: function(res) {
+ if(soptions.buildSelect !== undefined) {
+ var d = soptions.buildSelect(res);
+ if (d) { $(self).append(d); }
+ } else {
+ $(self).append(res);
+ }
+ 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); }
+ if(p.autosearch===true){
+ $("select",self).change(function(){
+ triggerToolbar();
+ return false;
+ });
+ }
+ res=null;
+ }
+ }, $.jgrid.ajaxOptions, $t.p.ajaxSelectOptions || {} ));
+ } else {
+ var oSv, sep, delim;
+ if(cm.searchoptions) {
+ oSv = cm.searchoptions.value === undefined ? "" : cm.searchoptions.value;
+ sep = cm.searchoptions.separator === undefined ? ":" : cm.searchoptions.separator;
+ delim = cm.searchoptions.delimiter === undefined ? ";" : cm.searchoptions.delimiter;
+ } else if(cm.editoptions) {
+ oSv = cm.editoptions.value === undefined ? "" : cm.editoptions.value;
+ sep = cm.editoptions.separator === undefined ? ":" : cm.editoptions.separator;
+ delim = cm.editoptions.delimiter === undefined ? ";" : cm.editoptions.delimiter;
+ }
+ if (oSv) {
+ var elem = document.createElement("select");
+ elem.style.width = "100%";
+ $(elem).attr({name:cm.index || cm.name, id: "gs_"+cm.name});
+ var so, sv, ov;
+ if(typeof oSv === "string") {
+ so = oSv.split(delim);
+ for(var 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) {
+ if(oSv.hasOwnProperty(key)) {
+ ov = document.createElement("option");
+ ov.value = key; ov.innerHTML = oSv[key];
+ elem.appendChild(ov);
+ }
+ }
+ }
+ 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);
+ if(p.autosearch===true){
+ $(elem).change(function(){
+ triggerToolbar();
+ return false;
+ });
+ }
+ }
+ }
+ break;
+ 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+"'/>");
+ 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); }
+ 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){
+ triggerToolbar();
+ return false;
+ }
+ return this;
+ });
+ } else {
+ $("input",thd).keydown(function(e){
+ var key = e.which;
+ switch (key) {
+ case 13:
+ return false;
+ case 9 :
+ case 16:
+ case 37:
+ case 38:
+ case 39:
+ case 40:
+ case 27:
+ break;
+ default :
+ if(timeoutHnd) { clearTimeout(timeoutHnd); }
+ timeoutHnd = setTimeout(function(){triggerToolbar();},500);
+ }
+ });
+ }
+ }
+ break;
+ }
+ }
+ $(th).append(thd);
+ $(tr).append(th);
+ });
+ $("table thead",$t.grid.hDiv).append(tr);
+ this.ftoolbar = true;
+ this.triggerToolbar = triggerToolbar;
+ this.clearToolbar = clearToolbar;
+ this.toggleToolbar = toggleToolbar;
+ });
+ },
+
+ destroyGroupHeader : function(nullHeader)
+ {
+ if(typeof(nullHeader) == 'undefined') {
+ nullHeader = true;
+ }
+ return this.each(function()
+ {
+ var $t = this, $tr, i, l, headers, $th, $resizing, grid = $t.grid,
+ thead = $("table.ui-jqgrid-htable thead", grid.hDiv), cm = $t.p.colModel, hc;
+ if(!grid) { return; }
+
+ $(this).unbind('.setGroupHeaders');
+ $tr = $("<tr>", {role: "rowheader"}).addClass("ui-jqgrid-labels");
+ headers = grid.headers;
+ for (i = 0, l = headers.length; i < l; i++) {
+ hc = cm[i].hidden ? "none" : "";
+ $th = $(headers[i].el)
+ .width(headers[i].width)
+ .css('display',hc);
+ try {
+ $th.removeAttr("rowSpan");
+ } catch (rs) {
+ //IE 6/7
+ $th.attr("rowSpan",1);
+ }
+ $tr.append($th);
+ $resizing = $th.children("span.ui-jqgrid-resize");
+ if ($resizing.length>0) {// resizable column
+ $resizing[0].style.height = "";
+ }
+ $th.children("div")[0].style.top = "";
+ }
+ $(thead).children('tr.ui-jqgrid-labels').remove();
+ $(thead).prepend($tr);
+
+ if(nullHeader === true) {
+ $($t).jqGrid('setGridParam',{ 'groupHeader': null});
+ }
+ });
+ },
+
+ setGroupHeaders : function ( o ) {
+ o = $.extend({
+ useColSpanStyle : false,
+ groupHeaders: []
+ },o || {});
+ return this.each(function(){
+ this.p.groupHeader = o;
+ var ts = this,
+ i, cmi, skip = 0, $tr, $colHeader, th, $th, thStyle,
+ iCol,
+ cghi,
+ //startColumnName,
+ numberOfColumns,
+ titleText,
+ cVisibleColumns,
+ colModel = ts.p.colModel,
+ cml = colModel.length,
+ ths = ts.grid.headers,
+ $htable = $("table.ui-jqgrid-htable", ts.grid.hDiv),
+ $trLabels = $htable.children("thead").children("tr.ui-jqgrid-labels:last").addClass("jqg-second-row-header"),
+ $thead = $htable.children("thead"),
+ $theadInTable,
+ $firstHeaderRow = $htable.find(".jqg-first-row-header");
+ if($firstHeaderRow[0] === undefined) {
+ $firstHeaderRow = $('<tr>', {role: "row", "aria-hidden": "true"}).addClass("jqg-first-row-header").css("height", "auto");
+ } else {
+ $firstHeaderRow.empty();
+ }
+ var $firstRow,
+ inColumnHeader = function (text, columnHeaders) {
+ var i = 0, length = columnHeaders.length;
+ for (; i < length; i++) {
+ if (columnHeaders[i].startColumnName === text) {
+ return i;
+ }
+ }
+ return -1;
+ };
+
+ $(ts).prepend($thead);
+ $tr = $('<tr>', {role: "rowheader"}).addClass("ui-jqgrid-labels jqg-third-row-header");
+ for (i = 0; i < cml; i++) {
+ th = ths[i].el;
+ $th = $(th);
+ cmi = colModel[i];
+ // build the next cell for the first header row
+ thStyle = { height: '0px', width: ths[i].width + 'px', display: (cmi.hidden ? 'none' : '')};
+ $("<th>", {role: 'gridcell'}).css(thStyle).addClass("ui-first-th-"+ts.p.direction).appendTo($firstHeaderRow);
+
+ th.style.width = ""; // remove unneeded style
+ iCol = inColumnHeader(cmi.name, o.groupHeaders);
+ if (iCol >= 0) {
+ cghi = o.groupHeaders[iCol];
+ numberOfColumns = cghi.numberOfColumns;
+ titleText = cghi.titleText;
+
+ // caclulate the number of visible columns from the next numberOfColumns columns
+ for (cVisibleColumns = 0, iCol = 0; iCol < numberOfColumns && (i + iCol < cml); iCol++) {
+ if (!colModel[i + iCol].hidden) {
+ cVisibleColumns++;
+ }
+ }
+
+ // The next numberOfColumns headers will be moved in the next row
+ // in the current row will be placed the new column header with the titleText.
+ // The text will be over the cVisibleColumns columns
+ $colHeader = $('<th>').attr({role: "columnheader"})
+ .addClass("ui-state-default ui-th-column-header ui-th-"+ts.p.direction)
+ .css({'height':'22px', 'border-top': '0px none'})
+ .html(titleText);
+ if(cVisibleColumns > 0) {
+ $colHeader.attr("colspan", String(cVisibleColumns));
+ }
+ if (ts.p.headertitles) {
+ $colHeader.attr("title", $colHeader.text());
+ }
+ // hide if not a visible cols
+ if( cVisibleColumns === 0) {
+ $colHeader.hide();
+ }
+
+ $th.before($colHeader); // insert new column header before the current
+ $tr.append(th); // move the current header in the next row
+
+ // set the coumter of headers which will be moved in the next row
+ skip = numberOfColumns - 1;
+ } else {
+ if (skip === 0) {
+ if (o.useColSpanStyle) {
+ // expand the header height to two rows
+ $th.attr("rowspan", "2");
+ } else {
+ $('<th>', {role: "columnheader"})
+ .addClass("ui-state-default ui-th-column-header ui-th-"+ts.p.direction)
+ .css({"display": cmi.hidden ? 'none' : '', 'border-top': '0px none'})
+ .insertBefore($th);
+ $tr.append(th);
+ }
+ } else {
+ // move the header to the next row
+ //$th.css({"padding-top": "2px", height: "19px"});
+ $tr.append(th);
+ skip--;
+ }
+ }
+ }
+ $theadInTable = $(ts).children("thead");
+ $theadInTable.prepend($firstHeaderRow);
+ $tr.insertAfter($trLabels);
+ $htable.append($theadInTable);
+
+ if (o.useColSpanStyle) {
+ // Increase the height of resizing span of visible headers
+ $htable.find("span.ui-jqgrid-resize").each(function () {
+ var $parent = $(this).parent();
+ if ($parent.is(":visible")) {
+ this.style.cssText = 'height: ' + $parent.height() + 'px !important; cursor: col-resize;';
+ }
+ });
+
+ // Set position of the sortable div (the main lable)
+ // with the column header text to the middle of the cell.
+ // One should not do this for hidden headers.
+ $htable.find("div.ui-jqgrid-sortable").each(function () {
+ var $ts = $(this), $parent = $ts.parent();
+ if ($parent.is(":visible") && $parent.is(":has(span.ui-jqgrid-resize)")) {
+ $ts.css('top', ($parent.height() - $ts.outerHeight()) / 2 + 'px');
+ }
+ });
+ }
+
+ $firstRow = $theadInTable.find("tr.jqg-first-row-header");
+ $(ts).bind('jqGridResizeStop.setGroupHeaders', function (e, nw, idx) {
+ $firstRow.find('th').eq(idx).width(nw);
+ });
+ });
+ },
+ setFrozenColumns : function () {
+ return this.each(function() {
+ if ( !this.grid ) {return;}
+ var $t = this, cm = $t.p.colModel,i=0, len = cm.length, maxfrozen = -1, frozen= false;
+ // TODO treeGrid and grouping Support
+ if($t.p.subGrid === true || $t.p.treeGrid === true || $t.p.cellEdit === true || $t.p.sortable || $t.p.scroll || $t.p.grouping )
+ {
+ return;
+ }
+ if($t.p.rownumbers) { i++; }
+ if($t.p.multiselect) { i++; }
+
+ // get the max index of frozen col
+ while(i<len)
+ {
+ // from left, no breaking frozen
+ if(cm[i].frozen === true)
+ {
+ frozen = true;
+ maxfrozen = i;
+ } else {
+ break;
+ }
+ i++;
+ }
+ if( maxfrozen>=0 && frozen) {
+ var top = $t.p.caption ? $($t.grid.cDiv).outerHeight() : 0,
+ hth = $(".ui-jqgrid-htable","#gview_"+$.jgrid.jqID($t.p.id)).height();
+ //headers
+ if($t.p.toppager) {
+ top = top + $($t.grid.topDiv).outerHeight();
+ }
+ if($t.p.toolbar[0] === true) {
+ if($t.p.toolbar[1] != "bottom") {
+ top = top + $($t.grid.uDiv).outerHeight();
+ }
+ }
+ $t.grid.fhDiv = $('<div style="position:absolute;left:0px;top:'+top+'px;height:'+hth+'px;" class="frozen-div ui-state-default ui-jqgrid-hdiv"></div>');
+ $t.grid.fbDiv = $('<div style="position:absolute;left:0px;top:'+(parseInt(top,10)+parseInt(hth,10) + 1)+'px;overflow-y:hidden" class="frozen-bdiv ui-jqgrid-bdiv"></div>');
+ $("#gview_"+$.jgrid.jqID($t.p.id)).append($t.grid.fhDiv);
+ var htbl = $(".ui-jqgrid-htable","#gview_"+$.jgrid.jqID($t.p.id)).clone(true);
+ // groupheader support - only if useColSpanstyle is false
+ if($t.p.groupHeader) {
+ $("tr.jqg-first-row-header, tr.jqg-third-row-header", htbl).each(function(){
+ $("th:gt("+maxfrozen+")",this).remove();
+ });
+ var swapfroz = -1, fdel = -1;
+ $("tr.jqg-second-row-header th", htbl).each(function(){
+ var cs= parseInt($(this).attr("colspan"),10);
+ if(cs) {
+ swapfroz = swapfroz+cs;
+ fdel++;
+ }
+ if(swapfroz === maxfrozen) {
+ return false;
+ }
+ });
+ if(swapfroz !== maxfrozen) {
+ fdel = maxfrozen;
+ }
+ $("tr.jqg-second-row-header", htbl).each(function(){
+ $("th:gt("+fdel+")",this).remove();
+ });
+ } else {
+ $("tr",htbl).each(function(){
+ $("th:gt("+maxfrozen+")",this).remove();
+ });
+ }
+ $(htbl).width(1);
+ // resizing stuff
+ $($t.grid.fhDiv).append(htbl)
+ .mousemove(function (e) {
+ if($t.grid.resizing){ $t.grid.dragMove(e);return false; }
+ });
+ $($t).bind('jqGridResizeStop.setFrozenColumns', function (e, w, index) {
+ var rhth = $(".ui-jqgrid-htable",$t.grid.fhDiv);
+ $("th:eq("+index+")",rhth).width( w );
+ var btd = $(".ui-jqgrid-btable",$t.grid.fbDiv);
+ $("tr:first td:eq("+index+")",btd).width( w );
+ });
+ // sorting stuff
+ $($t).bind('jqGridOnSortCol.setFrozenColumns', function (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);
+
+ $("span.ui-grid-ico-sort",previousSelectedTh).addClass('ui-state-disabled');
+ $(previousSelectedTh).attr("aria-selected","false");
+ $("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) {
+ $("span.s-ico",previousSelectedTh).hide();
+ $("span.s-ico",newSelectedTh).show();
+ }
+ }
+ });
+
+ // 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());
+ });
+ 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);
+ var btbl = $("#"+$.jgrid.jqID($t.p.id)).clone(true);
+ $("tr",btbl).each(function(){
+ $("td:gt("+maxfrozen+")",this).remove();
+ });
+
+ $(btbl).width(1).attr("id",$t.p.id+"_frozen");
+ $($t.grid.fbDiv).append(btbl);
+ if($t.p.hoverrows === true) {
+ $("tr.jqgrow", btbl).hover(
+ function(){ $(this).addClass("ui-state-hover"); $("#"+$.jgrid.jqID(this.id), "#"+$.jgrid.jqID($t.p.id)).addClass("ui-state-hover"); },
+ function(){ $(this).removeClass("ui-state-hover"); $("#"+$.jgrid.jqID(this.id), "#"+$.jgrid.jqID($t.p.id)).removeClass("ui-state-hover"); }
+ );
+ $("tr.jqgrow", "#"+$.jgrid.jqID($t.p.id)).hover(
+ function(){ $(this).addClass("ui-state-hover"); $("#"+$.jgrid.jqID(this.id), "#"+$.jgrid.jqID($t.p.id)+"_frozen").addClass("ui-state-hover");},
+ function(){ $(this).removeClass("ui-state-hover"); $("#"+$.jgrid.jqID(this.id), "#"+$.jgrid.jqID($t.p.id)+"_frozen").removeClass("ui-state-hover"); }
+ );
+ }
+ btbl=null;
+ });
+ $t.p.frozenColumns = true;
+ }
+ });
+ },
+ destroyFrozenColumns : function() {
+ return this.each(function() {
+ if ( !this.grid ) {return;}
+ if(this.p.frozenColumns === true) {
+ var $t = this;
+ $($t.grid.fhDiv).remove();
+ $($t.grid.fbDiv).remove();
+ $t.grid.fhDiv = null; $t.grid.fbDiv=null;
+ $(this).unbind('.setFrozenColumns');
+ if($t.p.hoverrows === true) {
+ var ptr;
+ $("#"+$.jgrid.jqID($t.p.id)).bind('mouseover',function(e) {
+ ptr = $(e.target).closest("tr.jqgrow");
+ if($(ptr).attr("class") !== "ui-subgrid") {
+ $(ptr).addClass("ui-state-hover");
+ }
+ }).bind('mouseout',function(e) {
+ ptr = $(e.target).closest("tr.jqgrow");
+ $(ptr).removeClass("ui-state-hover");
+ });
+ }
+ this.p.frozenColumns = false;
+ }
+ });
+ }
+});
+})(jQuery);/*
+ * jqModal - Minimalist Modaling with jQuery
+ * (http://dev.iceburg.net/jquery/jqmodal/)
+ *
+ * Copyright (c) 2007,2008 Brice Burgess <bhb(a)iceburg.net>
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * $Version: 07/06/2008 +r13
+ */
+(function($) {
+$.fn.jqm=function(o){
+var p={
+overlay: 50,
+closeoverlay : true,
+overlayClass: 'jqmOverlay',
+closeClass: 'jqmClose',
+trigger: '.jqModal',
+ajax: F,
+ajaxText: '',
+target: F,
+modal: F,
+toTop: F,
+onShow: F,
+onHide: F,
+onLoad: F
+};
+return this.each(function(){if(this._jqm)return H[this._jqm].c=$.extend({},H[this._jqm].c,o);s++;this._jqm=s;
+H[s]={c:$.extend(p,$.jqm.params,o),a:F,w:$(this).addClass('jqmID'+s),s:s};
+if(p.trigger)$(this).jqmAddTrigger(p.trigger);
+});};
+
+$.fn.jqmAddClose=function(e){return hs(this,e,'jqmHide');};
+$.fn.jqmAddTrigger=function(e){return hs(this,e,'jqmShow');};
+$.fn.jqmShow=function(t){return this.each(function(){$.jqm.open(this._jqm,t);});};
+$.fn.jqmHide=function(t){return this.each(function(){$.jqm.close(this._jqm,t)});};
+
+$.jqm = {
+hash:{},
+open:function(s,t){var h=H[s],c=h.c,cc='.'+c.closeClass,z=(parseInt(h.w.css('z-index')));z=(z>0)?z:3000;var o=$('<div></div>').css({height:'100%',width:'100%',position:'fixed',left:0,top:0,'z-index':z-1,opacity:c.overlay/100});if(h.a)return F;h.t=t;h.a=true;h.w.css('z-index',z);
+ if(c.modal) {if(!A[0])setTimeout(function(){L('bind');},1);A.push(s);}
+ else if(c.overlay > 0) {if(c.closeoverlay) h.w.jqmAddClose(o);}
+ 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);});}
+ else if(cc)h.w.jqmAddClose($(cc,h.w));
+
+ if(c.toTop&&h.o)h.w.before('<span id="jqmP'+h.w[0]._jqm+'"></span>').insertAfter(h.o);
+ (c.onShow)?c.onShow(h):h.w.show();e(h);return F;
+},
+close:function(s){var h=H[s];if(!h.a)return F;h.a=F;
+ if(A[0]){A.pop();if(!A[0])L('unbind');}
+ if(h.c.toTop&&h.o)$('#jqmP'+h.w[0]._jqm).after(h.w).remove();
+ 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);},
+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;},
+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);/*
+ * jqDnR - Minimalistic Drag'n'Resize for jQuery.
+ *
+ * Copyright (c) 2007 Brice Burgess <bhb(a)iceburg.net>, http://www.iceburg.net
+ * Licensed under the MIT License:
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * $Version: 2007.08.19 +r2
+ */
+
+(function($){
+$.fn.jqDrag=function(h){return i(this,h,'d');};
+$.fn.jqResize=function(h,ar){return i(this,h,'r',ar);};
+$.jqDnR={
+ dnr:{},
+ e:0,
+ drag:function(v){
+ if(M.k == 'd'){E.css({left:M.X+v.pageX-M.pX,top:M.Y+v.pageY-M.pY});}
+ else {
+ E.css({width:Math.max(v.pageX-M.pX+M.W,0),height:Math.max(v.pageY-M.pY+M.H,0)});
+ if(M1){E1.css({width:Math.max(v.pageX-M1.pX+M1.W,0),height:Math.max(v.pageY-M1.pY+M1.H,0)});}
+ }
+ return false;
+ },
+ stop:function(){
+ //E.css('opacity',M.o);
+ $(document).unbind('mousemove',J.drag).unbind('mouseup',J.stop);
+ }
+};
+var J=$.jqDnR,M=J.dnr,E=J.e,E1,M1,
+i=function(e,h,k,aR){
+ return e.each(function(){
+ h=(h)?$(h,e):e;
+ h.bind('mousedown',{e:e,k:k},function(v){
+ var d=v.data,p={};E=d.e;E1 = aR ? $(aR) : false;
+ // attempt utilization of dimensions plugin to fix IE issues
+ if(E.css('position') != 'relative'){try{E.position(p);}catch(e){}}
+ M={
+ X:p.left||f('left')||0,
+ Y:p.top||f('top')||0,
+ W:f('width')||E[0].scrollWidth||0,
+ H:f('height')||E[0].scrollHeight||0,
+ pX:v.pageX,
+ pY:v.pageY,
+ k:d.k
+ //o:E.css('opacity')
+ };
+ // also resize
+ if(E1 && d.k != 'd'){
+ M1={
+ X:p.left||f1('left')||0,
+ Y:p.top||f1('top')||0,
+ W:E1[0].offsetWidth||f1('width')||0,
+ H:E1[0].offsetHeight||f1('height')||0,
+ pX:v.pageX,
+ pY:v.pageY,
+ k:d.k
+ };
+ } else {M1 = false;}
+ //E.css({opacity:0.8});
+ if($("input.hasDatepicker",E[0])[0]) {
+ try {$("input.hasDatepicker",E[0]).datepicker('hide');}catch (dpe){}
+ }
+ $(document).mousemove($.jqDnR.drag).mouseup($.jqDnR.stop);
+ return false;
+ });
+ });
+},
+f=function(k){return parseInt(E.css(k),10)||false;},
+f1=function(k){return parseInt(E1.css(k),10)||false;};
+})(jQuery);/*
+ The below work is licensed under Creative Commons GNU LGPL License.
+
+ Original work:
+
+ License: http://creativecommons.org/licenses/LGPL/2.1/
+ Author: Stefan Goessner/2006
+ Web: http://goessner.net/
+
+ Modifications made:
+
+ Version: 0.9-p5
+ Description: Restructured code, JSLint validated (no strict whitespaces),
+ added handling of empty arrays, empty strings, and int/floats values.
+ Author: Michael Schøler/2008-01-29
+ Web: http://michael.hinnerup.net/blog/2008/01/26/converting-json-to-xml-and-xml-…
+
+ Description: json2xml added support to convert functions as CDATA
+ so it will be easy to write characters that cause some problems when convert
+ Author: Tony Tomov
+*/
+
+/*global alert */
+var xmlJsonClass = {
+ // Param "xml": Element or document DOM node.
+ // Param "tab": Tab or indent string for pretty output formatting omit or use empty string "" to supress.
+ // Returns: JSON string
+ xml2json: function(xml, tab) {
+ if (xml.nodeType === 9) {
+ // document node
+ xml = xml.documentElement;
+ }
+ var nws = this.removeWhite(xml);
+ var obj = this.toObj(nws);
+ var json = this.toJson(obj, xml.nodeName, "\t");
+ return "{\n" + tab + (tab ? json.replace(/\t/g, tab) : json.replace(/\t|\n/g, "")) + "\n}";
+ },
+
+ // Param "o": JavaScript object
+ // Param "tab": tab or indent string for pretty output formatting omit or use empty string "" to supress.
+ // Returns: XML string
+ json2xml: function(o, tab) {
+ var toXml = function(v, name, ind) {
+ var xml = "";
+ var i, n;
+ if (v instanceof Array) {
+ if (v.length === 0) {
+ xml += ind + "<"+name+">__EMPTY_ARRAY_</"+name+">\n";
+ }
+ else {
+ for (i = 0, n = v.length; i < n; i += 1) {
+ var sXml = ind + toXml(v[i], name, ind+"\t") + "\n";
+ xml += sXml;
+ }
+ }
+ }
+ else if (typeof(v) === "object") {
+ var hasChild = false;
+ xml += ind + "<" + name;
+ var m;
+ for (m in v) if (v.hasOwnProperty(m)) {
+ if (m.charAt(0) === "@") {
+ xml += " " + m.substr(1) + "=\"" + v[m].toString() + "\"";
+ }
+ else {
+ hasChild = true;
+ }
+ }
+ xml += hasChild ? ">" : "/>";
+ if (hasChild) {
+ for (m in v) if (v.hasOwnProperty(m)) {
+ if (m === "#text") {
+ xml += v[m];
+ }
+ else if (m === "#cdata") {
+ xml += "<![CDATA[" + v[m] + "]]>";
+ }
+ else if (m.charAt(0) !== "@") {
+ xml += toXml(v[m], m, ind+"\t");
+ }
+ }
+ xml += (xml.charAt(xml.length - 1) === "\n" ? ind : "") + "</" + name + ">";
+ }
+ }
+ else if (typeof(v) === "function") {
+ xml += ind + "<" + name + ">" + "<![CDATA[" + v + "]]>" + "</" + name + ">";
+ }
+ else {
+ if (v === undefined ) { v = ""; }
+ if (v.toString() === "\"\"" || v.toString().length === 0) {
+ xml += ind + "<" + name + ">__EMPTY_STRING_</" + name + ">";
+ }
+ else {
+ xml += ind + "<" + name + ">" + v.toString() + "</" + name + ">";
+ }
+ }
+ return xml;
+ };
+ var xml = "";
+ var m;
+ for (m in o) if (o.hasOwnProperty(m)) {
+ xml += toXml(o[m], m, "");
+ }
+ return tab ? xml.replace(/\t/g, tab) : xml.replace(/\t|\n/g, "");
+ },
+ // Internal methods
+ toObj: function(xml) {
+ var o = {};
+ var FuncTest = /function/i;
+ if (xml.nodeType === 1) {
+ // element node ..
+ if (xml.attributes.length) {
+ // element with attributes ..
+ var i;
+ for (i = 0; i < xml.attributes.length; i += 1) {
+ o["@" + xml.attributes[i].nodeName] = (xml.attributes[i].nodeValue || "").toString();
+ }
+ }
+ if (xml.firstChild) {
+ // element has child nodes ..
+ var textChild = 0, cdataChild = 0, hasElementChild = false;
+ var n;
+ for (n = xml.firstChild; n; n = n.nextSibling) {
+ if (n.nodeType === 1) {
+ hasElementChild = true;
+ }
+ else if (n.nodeType === 3 && n.nodeValue.match(/[^ \f\n\r\t\v]/)) {
+ // non-whitespace text
+ textChild += 1;
+ }
+ else if (n.nodeType === 4) {
+ // cdata section node
+ cdataChild += 1;
+ }
+ }
+ if (hasElementChild) {
+ if (textChild < 2 && cdataChild < 2) {
+ // structured element with evtl. a single text or/and cdata node ..
+ this.removeWhite(xml);
+ for (n = xml.firstChild; n; n = n.nextSibling) {
+ if (n.nodeType === 3) {
+ // text node
+ o["#text"] = this.escape(n.nodeValue);
+ }
+ else if (n.nodeType === 4) {
+ // cdata node
+ if (FuncTest.test(n.nodeValue)) {
+ o[n.nodeName] = [o[n.nodeName], n.nodeValue];
+ } else {
+ o["#cdata"] = this.escape(n.nodeValue);
+ }
+ }
+ else if (o[n.nodeName]) {
+ // multiple occurence of element ..
+ if (o[n.nodeName] instanceof Array) {
+ o[n.nodeName][o[n.nodeName].length] = this.toObj(n);
+ }
+ else {
+ o[n.nodeName] = [o[n.nodeName], this.toObj(n)];
+ }
+ }
+ else {
+ // first occurence of element ..
+ o[n.nodeName] = this.toObj(n);
+ }
+ }
+ }
+ else {
+ // mixed content
+ if (!xml.attributes.length) {
+ o = this.escape(this.innerXml(xml));
+ }
+ else {
+ o["#text"] = this.escape(this.innerXml(xml));
+ }
+ }
+ }
+ else if (textChild) {
+ // pure text
+ if (!xml.attributes.length) {
+ o = this.escape(this.innerXml(xml));
+ if (o === "__EMPTY_ARRAY_") {
+ o = "[]";
+ } else if (o === "__EMPTY_STRING_") {
+ o = "";
+ }
+ }
+ else {
+ o["#text"] = this.escape(this.innerXml(xml));
+ }
+ }
+ else if (cdataChild) {
+ // cdata
+ if (cdataChild > 1) {
+ o = this.escape(this.innerXml(xml));
+ }
+ else {
+ for (n = xml.firstChild; n; n = n.nextSibling) {
+ if(FuncTest.test(xml.firstChild.nodeValue)) {
+ o = xml.firstChild.nodeValue;
+ break;
+ } else {
+ o["#cdata"] = this.escape(n.nodeValue);
+ }
+ }
+ }
+ }
+ }
+ if (!xml.attributes.length && !xml.firstChild) {
+ o = null;
+ }
+ }
+ else if (xml.nodeType === 9) {
+ // document.node
+ o = this.toObj(xml.documentElement);
+ }
+ else {
+ alert("unhandled node type: " + xml.nodeType);
+ }
+ return o;
+ },
+ toJson: function(o, name, ind, wellform) {
+ if(wellform === undefined) wellform = true;
+ var json = name ? ("\"" + name + "\"") : "", tab = "\t", newline = "\n";
+ if(!wellform) {
+ tab= ""; newline= "";
+ }
+
+ if (o === "[]") {
+ json += (name ? ":[]" : "[]");
+ }
+ else if (o instanceof Array) {
+ var n, i, ar=[];
+ for (i = 0, n = o.length; i < n; i += 1) {
+ ar[i] = this.toJson(o[i], "", ind + tab, wellform);
+ }
+ json += (name ? ":[" : "[") + (ar.length > 1 ? (newline + ind + tab + ar.join(","+newline + ind + tab) + newline + ind) : ar.join("")) + "]";
+ }
+ else if (o === null) {
+ json += (name && ":") + "null";
+ }
+ else if (typeof(o) === "object") {
+ var arr = [], m;
+ for (m in o) {
+ if (o.hasOwnProperty(m)) {
+ arr[arr.length] = this.toJson(o[m], m, ind + tab, wellform);
+ }
+ }
+ json += (name ? ":{" : "{") + (arr.length > 1 ? (newline + ind + tab + arr.join(","+newline + ind + tab) + newline + ind) : arr.join("")) + "}";
+ }
+ else if (typeof(o) === "string") {
+ /*
+ var objRegExp = /(^-?\d+\.?\d*$)/;
+ var FuncTest = /function/i;
+ var os = o.toString();
+ if (objRegExp.test(os) || FuncTest.test(os) || os==="false" || os==="true") {
+ // int or float
+ json += (name && ":") + "\"" +os + "\"";
+ }
+ else {
+ */
+ json += (name && ":") + "\"" + o.replace(/\\/g,'\\\\').replace(/\"/g,'\\"') + "\"";
+ //}
+ }
+ else {
+ json += (name && ":") + o.toString();
+ }
+ return json;
+ },
+ innerXml: function(node) {
+ var s = "";
+ if ("innerHTML" in node) {
+ s = node.innerHTML;
+ }
+ else {
+ var asXml = function(n) {
+ var s = "", i;
+ if (n.nodeType === 1) {
+ s += "<" + n.nodeName;
+ for (i = 0; i < n.attributes.length; i += 1) {
+ s += " " + n.attributes[i].nodeName + "=\"" + (n.attributes[i].nodeValue || "").toString() + "\"";
+ }
+ if (n.firstChild) {
+ s += ">";
+ for (var c = n.firstChild; c; c = c.nextSibling) {
+ s += asXml(c);
+ }
+ s += "</" + n.nodeName + ">";
+ }
+ else {
+ s += "/>";
+ }
+ }
+ else if (n.nodeType === 3) {
+ s += n.nodeValue;
+ }
+ else if (n.nodeType === 4) {
+ s += "<![CDATA[" + n.nodeValue + "]]>";
+ }
+ return s;
+ };
+ for (var c = node.firstChild; c; c = c.nextSibling) {
+ s += asXml(c);
+ }
+ }
+ return s;
+ },
+ escape: function(txt) {
+ return txt.replace(/[\\]/g, "\\\\").replace(/[\"]/g, '\\"').replace(/[\n]/g, '\\n').replace(/[\r]/g, '\\r');
+ },
+ removeWhite: function(e) {
+ e.normalize();
+ var n;
+ for (n = e.firstChild; n; ) {
+ if (n.nodeType === 3) {
+ // text node
+ if (!n.nodeValue.match(/[^ \f\n\r\t\v]/)) {
+ // pure whitespace text node
+ var nxt = n.nextSibling;
+ e.removeChild(n);
+ n = nxt;
+ }
+ else {
+ n = n.nextSibling;
+ }
+ }
+ else if (n.nodeType === 1) {
+ // element node
+ this.removeWhite(n);
+ n = n.nextSibling;
+ }
+ else {
+ // any other node
+ n = n.nextSibling;
+ }
+ }
+ return e;
+ }
+};/*
+**
+ * formatter for values but most of the values if for jqGrid
+ * Some of this was inspired and based on how YUI does the table datagrid but in jQuery fashion
+ * we are trying to keep it as light as possible
+ * Joshua Burnett josh(a)9ci.com
+ * http://www.greenbill.com
+ *
+ * Changes from 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
+ *
+**/
+
+;(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
+ //example {id:1234,}
+ $.extend($.fmatter,{
+ isBoolean : function(o) {
+ return typeof o === 'boolean';
+ },
+ isObject : function(o) {
+ return (o && (typeof o === 'object' || $.isFunction(o))) || false;
+ },
+ isString : function(o) {
+ return typeof o === 'string';
+ },
+ 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)){
+ return true;
+ }
+ o = $.trim(o).replace(/\ \;/ig,'').replace(/\ \;/ig,'');
+ return o==="";
+ }
+ });
+ $.fn.fmatter = function(formatType, cellval, opts, rwd, act) {
+ // build main options before element iteration
+ var v=cellval;
+ opts = $.extend({}, $.jgrid.formatter, opts);
+
+ try {
+ v = $.fn.fmatter[formatType].call(this, cellval, opts, rwd, act);
+ } catch(fe){}
+ return v;
+ };
+ $.fmatter.util = {
+ // Taken from YAHOO utils
+ NumberFormat : function(nData,opts) {
+ if(!$.fmatter.isNumber(nData)) {
+ nData *= 1;
+ }
+ if($.fmatter.isNumber(nData)) {
+ var bNegative = (nData < 0);
+ var sOutput = nData + "";
+ var sDecimalSeparator = (opts.decimalSeparator) ? 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 + "";
+ nDotIndex = sOutput.lastIndexOf(".");
+ if(nDecimalPlaces > 0) {
+ // Add the decimal separator
+ if(nDotIndex < 0) {
+ sOutput += sDecimalSeparator;
+ nDotIndex = sOutput.length-1;
+ }
+ // Replace the "."
+ else if(sDecimalSeparator !== "."){
+ sOutput = sOutput.replace(".",sDecimalSeparator);
+ }
+ // Add missing zeros
+ while((sOutput.length - 1 - nDotIndex) < nDecimalPlaces) {
+ sOutput += "0";
+ }
+ }
+ }
+ if(opts.thousandsSeparator) {
+ var sThousandsSeparator = opts.thousandsSeparator;
+ 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--) {
+ nCount++;
+ if ((nCount%3 === 0) && (i !== nDotIndex) && (!bNegative || (i > 1))) {
+ sNewOutput = sThousandsSeparator + sNewOutput;
+ }
+ sNewOutput = sOutput.charAt(i-1) + sNewOutput;
+ }
+ sOutput = sNewOutput;
+ }
+ // Prepend prefix
+ sOutput = (opts.prefix) ? opts.prefix + sOutput : sOutput;
+ // Append suffix
+ 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);
+ });
+ }
+ };
+ $.fn.fmatter.defaultFormat = function(cellval, opts) {
+ return ($.fmatter.isValue(cellval) && cellval!=="" ) ? cellval : opts.defaultValue ? 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 );
+ }
+ };
+ $.fn.fmatter.checkbox =function(cval, opts) {
+ var op = $.extend({},opts.checkbox), ds;
+ if(opts.colModel !== undefined && !$.fmatter.isUndefined(opts.colModel.formatoptions)) {
+ 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' " : "";
+ 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)) {
+ 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);
+ }
+ };
+ $.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)) {
+ 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);
+ }
+ };
+ $.fn.fmatter.integer = function(cellval, opts) {
+ var op = $.extend({},opts.integer);
+ if(opts.colModel !== undefined && !$.fmatter.isUndefined(opts.colModel.formatoptions)) {
+ op = $.extend({},op,opts.colModel.formatoptions);
+ }
+ if($.fmatter.isEmpty(cellval)) {
+ return op.defaultValue;
+ }
+ return $.fmatter.util.NumberFormat(cellval,op);
+ };
+ $.fn.fmatter.number = function (cellval, opts) {
+ var op = $.extend({},opts.number);
+ if(opts.colModel !== undefined && !$.fmatter.isUndefined(opts.colModel.formatoptions)) {
+ op = $.extend({},op,opts.colModel.formatoptions);
+ }
+ if($.fmatter.isEmpty(cellval)) {
+ return op.defaultValue;
+ }
+ return $.fmatter.util.NumberFormat(cellval,op);
+ };
+ $.fn.fmatter.currency = function (cellval, opts) {
+ var op = $.extend({},opts.currency);
+ if(opts.colModel !== undefined && !$.fmatter.isUndefined(opts.colModel.formatoptions)) {
+ op = $.extend({},op,opts.colModel.formatoptions);
+ }
+ if($.fmatter.isEmpty(cellval)) {
+ return op.defaultValue;
+ }
+ return $.fmatter.util.NumberFormat(cellval,op);
+ };
+ $.fn.fmatter.date = function (cellval, opts, rwd, act) {
+ var op = $.extend({},opts.date);
+ if(opts.colModel !== undefined && !$.fmatter.isUndefined(opts.colModel.formatoptions)) {
+ op = $.extend({},op,opts.colModel.formatoptions);
+ }
+ 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);
+ }
+ };
+ $.fn.fmatter.select = function (cellval,opts) {
+ // jqGrid specific
+ cellval = cellval + "";
+ var oSelect = false, ret=[], sep, delim;
+ if(!$.fmatter.isUndefined(opts.colModel.formatoptions)){
+ 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)){
+ 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;
+ }
+ if (oSelect) {
+ var msl = opts.colModel.editoptions.multiple === true ? true : false,
+ scell = [], sv;
+ 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++){
+ sv = so[i].split(sep);
+ if(sv.length > 2 ) {
+ sv[1] = $.map(sv,function(n,i){if(i>0) {return n;}}).join(sep);
+ }
+ if(msl) {
+ if($.inArray(sv[0],scell)>-1) {
+ ret[j] = sv[1];
+ j++;
+ }
+ } else if($.trim(sv[0])==$.trim(cellval)) {
+ ret[0] = sv[1];
+ break;
+ }
+ }
+ } else if($.fmatter.isObject(oSelect)) {
+ // this is quicker
+ if(msl) {
+ ret = $.map(scell, function(n){
+ return oSelect[n];
+ });
+ } else {
+ ret[0] = oSelect[cellval] || "";
+ }
+ }
+ }
+ 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)) {
+ op = $.extend(op,cm.formatoptions);
+ }
+ if( !$.fmatter.isUndefined($('#'+gid)[0].p.editOptions) ) {
+ op.editOptions = $('#'+gid)[0].p.editOptions;
+ }
+ if( !$.fmatter.isUndefined($('#'+gid)[0].p.delOptions) ) {
+ op.delOptions = $('#'+gid)[0].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;
+ }
+ var actop = {
+ keys : op.keys,
+ oneditfunc: op.onEdit,
+ successfunc: op.onSuccess,
+ url: op.url,
+ extraparam: op.extraparam,
+ aftersavefunc: saverow,
+ errorfunc: op.onError,
+ afterrestorefunc: restorerow,
+ restoreAfterError: op.restoreAfterError,
+ mtype: op.mtype
+ };
+ 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");
+ 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");
+ }
+ 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");
+ break;
+ case 'del':
+ $('#'+gid).jqGrid('delGridRow',rid, op.delOptions);
+ break;
+ case 'formedit':
+ $('#'+gid).jqGrid('setSelection',rid);
+ $('#'+gid).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)) {
+ op = $.extend(op,opts.colModel.formatoptions);
+ }
+ var rowid = opts.rowId, str="",ocl;
+ if(typeof(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>";
+ } 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>";
+ }
+ 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 = "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>";
+ return "<div style='margin-left:8px;'>" + str + "</div>";
+ };
+ $.unformat = function (cellval,options,pos,cnt) {
+ // specific for jqGrid only
+ var ret, formatType = options.colModel.formatter,
+ op =options.colModel.formatoptions || {}, sep,
+ re = /([\.\*\_\'\(\)\{\}\+\?\\])/g,
+ unformatFunc = options.colModel.unformat||($.fn.fmatter[formatType] && $.fn.fmatter[formatType].unformat);
+ if(typeof unformatFunc !== 'undefined' && $.isFunction(unformatFunc) ) {
+ ret = unformatFunc.call(this, $(cellval).text(), options, cellval);
+ } else if(!$.fmatter.isUndefined(formatType) && $.fmatter.isString(formatType) ) {
+ var opts = $.jgrid.formatter || {}, stripTag;
+ switch(formatType) {
+ case 'integer' :
+ op = $.extend({},opts.integer,op);
+ sep = op.thousandsSeparator.replace(re,"\\$1");
+ stripTag = new RegExp(sep, "g");
+ ret = $(cellval).text().replace(stripTag,'');
+ break;
+ case 'number' :
+ op = $.extend({},opts.number,op);
+ sep = op.thousandsSeparator.replace(re,"\\$1");
+ stripTag = new RegExp(sep, "g");
+ ret = $(cellval).text().replace(stripTag,"").replace(op.decimalSeparator,'.');
+ break;
+ case 'currency':
+ op = $.extend({},opts.currency,op);
+ sep = op.thousandsSeparator.replace(re,"\\$1");
+ stripTag = new RegExp(sep, "g");
+ ret = $(cellval).text();
+ if (op.prefix && op.prefix.length) {
+ ret = ret.substr(op.prefix.length);
+ }
+ if (op.suffix && op.suffix.length) {
+ ret = ret.substr(0, ret.length - op.suffix.length);
+ }
+ ret = ret.replace(stripTag,'').replace(op.decimalSeparator,'.');
+ break;
+ case 'checkbox':
+ var cbv = (options.colModel.editoptions) ? options.colModel.editoptions.value.split(":") : ["Yes","No"];
+ ret = $('input',cellval).is(":checked") ? cbv[0] : cbv[1];
+ break;
+ case 'select' :
+ ret = $.unformat.select(cellval,options,pos,cnt);
+ break;
+ case 'actions':
+ return "";
+ default:
+ ret= $(cellval).text();
+ }
+ }
+ return ret !== undefined ? ret : cnt===true ? $(cellval).text() : $.jgrid.htmlDecode($(cellval).html());
+ };
+ $.unformat.select = function (cellval,options,pos,cnt) {
+ // Spacial case when we have local data and perform a sort
+ // cnt is set to true only in sortDataArray
+ 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),
+ sep = op.separator === undefined ? ":" : op.separator,
+ delim = op.delimiter === undefined ? ";" : op.delimiter;
+
+ if(op.value){
+ var oSelect = op.value,
+ msl = op.multiple === true ? true : false,
+ 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++){
+ sv = so[i].split(sep);
+ if(sv.length > 2 ) {
+ sv[1] = $.map(sv,function(n,i){if(i>0) {return n;}}).join(sep);
+ }
+ if(msl) {
+ if($.inArray(sv[1],scell)>-1) {
+ ret[j] = sv[0];
+ j++;
+ }
+ } else if($.trim(sv[1])==$.trim(cell)) {
+ ret[0] = sv[0];
+ break;
+ }
+ }
+ } else if($.fmatter.isObject(oSelect) || $.isArray(oSelect) ){
+ if(!msl) {scell[0] = cell;}
+ ret = $.map(scell, function(n){
+ var rv;
+ $.each(oSelect, function(i,val){
+ if (val == n) {
+ rv = i;
+ return false;
+ }
+ });
+ if( typeof(rv) != 'undefined' ) {return rv;}
+ });
+ }
+ return ret.join(", ");
+ } else {
+ return cell || "";
+ }
+ };
+ $.unformat.date = function (cellval, opts) {
+ var op = $.jgrid.formatter.date || {};
+ if(!$.fmatter.isUndefined(opts.formatoptions)) {
+ 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);
+ }
+ };
+})(jQuery);
+;(function($){
+/*
+ * jqGrid common function
+ * 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-2.0.html
+*/
+/*global jQuery, $ */
+
+$.extend($.jgrid,{
+// Modal functions
+ showModal : function(h) {
+ h.w.show();
+ },
+ closeModal : function(h) {
+ h.w.hide().attr("aria-hidden","true");
+ if(h.o) {h.o.remove();}
+ },
+ hideModal : function (selector,o) {
+ o = $.extend({jqm : true, gb :''}, o || {});
+ if(o.onClose) {
+ var oncret = o.onClose(selector);
+ if (typeof oncret == 'boolean' && !oncret ) { return; }
+ }
+ if ($.fn.jqm && o.jqm === true) {
+ $(selector).attr("aria-hidden","true").jqmHide();
+ } else {
+ if(o.gb !== '') {
+ try {$(".jqgrid-overlay:first",o.gb).hide();} catch (e){}
+ }
+ $(selector).hide().attr("aria-hidden","true");
+ }
+ },
+//Helper functions
+ findPos : function(obj) {
+ var curleft = 0, curtop = 0;
+ if (obj.offsetParent) {
+ do {
+ curleft += obj.offsetLeft;
+ curtop += obj.offsetTop;
+ } while (obj = obj.offsetParent);
+ //do not change obj == obj.offsetParent
+ }
+ return [curleft,curtop];
+ },
+ createModal : function(aIDs, content, p, insertSelector, posSelector, appendsel, css) {
+ 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;
+ mw.className= "ui-widget ui-widget-content ui-corner-all ui-jqdialog";
+ mw.id = aIDs.themodal;
+ var mh = document.createElement('div');
+ mh.className = "ui-jqdialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix";
+ mh.id = aIDs.modalhead;
+ $(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');})
+ .append("<span class='ui-icon ui-icon-closethick'></span>");
+ $(mh).append(ahr);
+ if(rtlsup) {
+ mw.dir = "rtl";
+ $(".ui-jqdialog-title",mh).css("float","right");
+ $(".ui-jqdialog-titlebar-close",mh).css("left",0.3+"em");
+ } else {
+ mw.dir = "ltr";
+ $(".ui-jqdialog-title",mh).css("float","left");
+ $(".ui-jqdialog-titlebar-close",mh).css("right",0.3+"em");
+ }
+ var mc = document.createElement('div');
+ $(mc).addClass("ui-jqdialog-content ui-widget-content").attr("id",aIDs.modalcontent);
+ $(mc).append(content);
+ 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")
+ $(appendsel).append(mw);
+ else {$(mw).insertBefore(insertSelector);}
+ $(mw).css(css);
+ if(typeof 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) {
+ var pos = [];
+ pos = $.jgrid.findPos(posSelector);
+ p.left = pos[0] + 4;
+ p.top = pos[1] + 4;
+ }
+ coord.top = p.top+"px";
+ coord.left = p.left;
+ } else if(p.left !==0 || p.top!==0) {
+ coord.left = p.left;
+ coord.top = p.top+"px";
+ }
+ $("a.ui-jqdialog-titlebar-close",mh).click(function(){
+ var oncm = $("#"+$.jgrid.jqID(aIDs.themodal)).data("onClose") || p.onClose;
+ var gboxclose = $("#"+$.jgrid.jqID(aIDs.themodal)).data("gbox") || p.gbox;
+ self.hideModal("#"+$.jgrid.jqID(aIDs.themodal),{gb:gboxclose,jqm:p.jqModal,onClose:oncm});
+ return false;
+ });
+ if (p.width === 0 || !p.width) {p.width = 300;}
+ if(p.height === 0 || !p.height) {p.height =200;}
+ if(!p.zIndex) {
+ var parentZ = $(insertSelector).parents("*[role=dialog]").filter(':first').css("z-index");
+ if(parentZ) {
+ p.zIndex = parseInt(parentZ,10)+2;
+ } else {
+ p.zIndex = 950;
+ }
+ }
+ var rtlt = 0;
+ if( rtlsup && coord.left && !appendsel) {
+ rtlt = $(p.gbox).width()- (!isNaN(p.width) ? parseInt(p.width,10) :0) - 8; // to do
+ // just in case
+ coord.left = parseInt(coord.left,10) + parseInt(rtlt,10);
+ }
+ if(coord.left) { coord.left += "px"; }
+ $(mw).css($.extend({
+ width: isNaN(p.width) ? "auto": p.width+"px",
+ height:isNaN(p.height) ? "auto" : p.height + "px",
+ zIndex:p.zIndex,
+ 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) {
+ $(mh).css('cursor','move');
+ if($.fn.jqDrag) {
+ $(mw).jqDrag(mh);
+ } else {
+ try {
+ $(mw).draggable({handle: $("#"+$.jgrid.jqID(mh.id))});
+ } catch (e) {}
+ }
+ }
+ 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>");
+ $("#"+$.jgrid.jqID(aIDs.themodal)).jqResize(".jqResize",aIDs.scrollelm ? "#"+$.jgrid.jqID(aIDs.scrollelm) : false);
+ } else {
+ try {
+ $(mw).resizable({handles: 'se, sw',alsoResize: aIDs.scrollelm ? "#"+$.jgrid.jqID(aIDs.scrollelm) : false});
+ } catch (r) {}
+ }
+ }
+ if(p.closeOnEscape === true){
+ $(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});
+ }
+ });
+ }
+ },
+ viewModal : function (selector,o){
+ o = $.extend({
+ toTop: true,
+ overlay: 10,
+ modal: false,
+ overlayClass : 'ui-widget-overlay',
+ onShow: $.jgrid.showModal,
+ onHide: $.jgrid.closeModal,
+ gbox: '',
+ jqm : true,
+ jqM : true
+ }, o || {});
+ if ($.fn.jqm && o.jqm === true) {
+ if(o.jqM) { $(selector).attr("aria-hidden","false").jqm(o).jqmShow(); }
+ else {$(selector).attr("aria-hidden","false").jqmShow();}
+ } else {
+ if(o.gbox !== '') {
+ $(".jqgrid-overlay:first",o.gbox).show();
+ $(selector).data("gbox",o.gbox);
+ }
+ $(selector).show().attr("aria-hidden","false");
+ try{$(':input:visible',selector)[0].focus();}catch(_){}
+ }
+ },
+
+ info_dialog : function(caption, content,c_b, modalopt) {
+ var mopt = {
+ width:290,
+ height:'auto',
+ dataheight: 'auto',
+ drag: true,
+ resize: false,
+ caption:"<b>"+caption+"</b>",
+ left:250,
+ top:170,
+ zIndex : 1000,
+ jqModal : true,
+ modal : false,
+ closeOnEscape : true,
+ align: 'center',
+ buttonalign : 'center',
+ buttons : []
+ // {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 || {});
+ var jm = mopt.jqModal, self = this;
+ if($.fn.jqm && !jm) { jm = false; }
+ // in case there is no jqModal
+ var buttstr ="";
+ 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; }
+ 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>";
+ }
+ }
+ var dh = isNaN(mopt.dataheight) ? mopt.dataheight : mopt.dataheight+"px",
+ cn = "text-align:"+mopt.align+";";
+ var cnt = "<div id='info_id'>";
+ cnt += "<div id='infocnt' style='margin:0px;padding-bottom:1em;width:100%;overflow:auto;position:relative;height:"+dh+";"+cn+"'>"+content+"</div>";
+ cnt += c_b ? "<div class='ui-widget-content ui-helper-clearfix' style='text-align:"+mopt.buttonalign+";padding-bottom:0.8em;padding-top:0.5em;background-image: none;border-width: 1px 0 0 0;'><a href='javascript:void(0)' id='closedialog' class='fm-button ui-state-default ui-corner-all'>"+c_b+"</a>"+buttstr+"</div>" :
+ buttstr !== "" ? "<div class='ui-widget-content ui-helper-clearfix' style='text-align:"+mopt.buttonalign+";padding-bottom:0.8em;padding-top:0.5em;background-image: none;border-width: 1px 0 0 0;'>"+buttstr+"</div>" : "";
+ cnt += "</div>";
+
+ try {
+ if($("#info_dialog").attr("aria-hidden") == "false") {
+ $.jgrid.hideModal("#info_dialog",{jqm:jm});
+ }
+ $("#info_dialog").remove();
+ } catch (e){}
+ $.jgrid.createModal({
+ themodal:'info_dialog',
+ modalhead:'info_head',
+ modalcontent:'info_content',
+ scrollelm: 'infocnt'},
+ cnt,
+ mopt,
+ '','',true
+ );
+ // attach onclick after inserting into the dom
+ if(buttstr) {
+ $.each(mopt.buttons,function(i){
+ $("#"+$.jgrid.jqID(this.id),"#info_id").bind('click',function(){mopt.buttons[i].onClick.call($("#info_dialog")); return false;});
+ });
+ }
+ $("#closedialog", "#info_id").click(function(){
+ self.hideModal("#info_dialog",{jqm:jm});
+ return false;
+ });
+ $(".fm-button","#info_dialog").hover(
+ function(){$(this).addClass('ui-state-hover');},
+ function(){$(this).removeClass('ui-state-hover');}
+ );
+ if($.isFunction(mopt.beforeOpen) ) { mopt.beforeOpen(); }
+ $.jgrid.viewModal("#info_dialog",{
+ onHide: function(h) {
+ h.w.hide().remove();
+ if(h.o) { h.o.remove(); }
+ },
+ modal :mopt.modal,
+ jqm:jm
+ });
+ if($.isFunction(mopt.afterOpen) ) { mopt.afterOpen(); }
+ try{ $("#info_dialog").focus();} catch (m){}
+ },
+// 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)) {
+ $.merge(exclude, exl);
+ }
+ $.each(atr, function(key, value){
+ if($.inArray(key, exclude) === -1) {
+ $(elm).attr(key,value);
+ }
+ });
+ if(!atr.hasOwnProperty('id')) {
+ $(elm).attr('id', $.jgrid.randId());
+ }
+ }
+ switch (eltype)
+ {
+ case "textarea" :
+ elem = document.createElement("textarea");
+ if(autowidth) {
+ 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="";}
+ elem.value = vl;
+ setAttributes(elem, options);
+ options = bindEv(elem,options);
+ $(elem).attr({"role":"textbox","multiline":"true"});
+ break;
+ case "checkbox" : //what code for simple checkbox
+ elem = document.createElement("input");
+ elem.type = "checkbox";
+ if( !options.value ) {
+ var vl1 = vl.toLowerCase();
+ if(vl1.search(/(false|0|no|off|undefined)/i)<0 && vl1!=="") {
+ elem.checked=true;
+ elem.defaultChecked=true;
+ elem.value = vl;
+ } else {
+ elem.value = "on";
+ }
+ $(elem).attr("offval","off");
+ } else {
+ var cbval = options.value.split(":");
+ if(vl === cbval[0]) {
+ elem.checked=true;
+ elem.defaultChecked=true;
+ }
+ elem.value = cbval[0];
+ $(elem).attr("offval",cbval[1]);
+ }
+ setAttributes(elem, options, ['value']);
+ options = bindEv(elem,options);
+ $(elem).attr("role","checkbox");
+ break;
+ case "select" :
+ elem = document.createElement("select");
+ elem.setAttribute("role","select");
+ var msl, ovm = [];
+ if(options.multiple===true) {
+ msl = true;
+ elem.multiple="multiple";
+ $(elem).attr("aria-multiselectable","true");
+ } else { msl = false; }
+ if(typeof(options.dataUrl) != "undefined") {
+ $.ajax($.extend({
+ url: options.dataUrl,
+ type : "GET",
+ dataType: "html",
+ context: {elem:elem, options:options, vl:vl},
+ success: function(data){
+ var a, 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();
+ }
+ if(a) {
+ $(elem).append(a);
+ setAttributes(elem, options);
+ options = bindEv(elem,options);
+ if(typeof options.size === 'undefined') { options.size = msl ? 3 : 1;}
+ if(msl) {
+ ovm = vl.split(",");
+ ovm = $.map(ovm,function(n){return $.trim(n);});
+ } else {
+ ovm[0] = $.trim(vl);
+ }
+ //$(elem).attr(options);
+ setTimeout(function(){
+ $("option",elem).each(function(i){
+ //if(i===0) { this.selected = ""; }
+ // fix IE8/IE7 problem with selecting of the first item on multiple=true
+ if (i === 0 && elem.multiple) { this.selected = false; }
+ $(this).attr("role","option");
+ if($.inArray($.trim($(this).text()),ovm) > -1 || $.inArray($.trim($(this).val()),ovm) > -1 ) {
+ this.selected= "selected";
+ }
+ });
+ },0);
+ }
+ }
+ },ajaxso || {}));
+ } else if(options.value) {
+ var i;
+ if(typeof options.size === 'undefined') {
+ options.size = msl ? 3 : 1;
+ }
+ if(msl) {
+ ovm = vl.split(",");
+ ovm = $.map(ovm,function(n){return $.trim(n);});
+ }
+ if(typeof options.value === 'function') { options.value = options.value(); }
+ var so,sv, ov,
+ sep = options.separator === undefined ? ":" : options.separator,
+ delim = options.delimiter === undefined ? ";" : options.delimiter;
+ if(typeof options.value === 'string') {
+ so = options.value.split(delim);
+ for(i=0; i<so.length;i++){
+ sv = so[i].split(sep);
+ if(sv.length > 2 ) {
+ sv[1] = $.map(sv,function(n,ii){if(ii>0) { return n;} }).join(sep);
+ }
+ ov = document.createElement("option");
+ 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 && ($.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) {
+ 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 && ($.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"; }
+ else { role = "textbox"; }
+ elem = document.createElement("input");
+ elem.type = eltype;
+ elem.value = vl;
+ setAttributes(elem, options);
+ options = bindEv(elem,options);
+ if(eltype != "button"){
+ if(autowidth) {
+ if(!options.size) { $(elem).css({width:"98%"}); }
+ } else if (!options.size) { options.size = 20; }
+ }
+ $(elem).attr("role",role);
+ break;
+ case "image" :
+ case "file" :
+ elem = document.createElement("input");
+ elem.type = eltype;
+ setAttributes(elem, options);
+ options = bindEv(elem,options);
+ break;
+ case "custom" :
+ elem = document.createElement("span");
+ try {
+ if($.isFunction(options.custom_element)) {
+ var celm = options.custom_element.call($t,vl,options);
+ if(celm) {
+ celm = $(celm).addClass("customelement").attr({id:options.id,name:options.name});
+ $(elem).empty().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;
+ }
+ return elem;
+ },
+// Date Validation Javascript
+ checkDate : function (format, date) {
+ var daysInFebruary = function(year){
+ // February has 29 days in any year evenly divisible by four,
+ // 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;
+ format = format.toLowerCase();
+ //we search for /,-,. for the date separator
+ if(format.indexOf("/") != -1) {
+ sep = "/";
+ } else if(format.indexOf("-") != -1) {
+ sep = "-";
+ } 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++){
+ 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 (format[j] == "y" || format[j] == "yyyy") {
+ yln=4;
+ } else if(format[j] =="yy"){
+ yln = 2;
+ } else {
+ yln = -1;
+ }
+ var daysInMonth = DaysArray(12),
+ 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")){
+ 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]]]){
+ 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;
+ if(!$.jgrid.isEmpty(time))
+ {
+ regs = time.match(re);
+ if(regs) {
+ if(regs[3]) {
+ if(regs[1] < 1 || regs[1] > 12) { return false; }
+ } else {
+ if(regs[1] > 23) { return false; }
+ }
+ if(regs[2] > 59) {
+ return false;
+ }
+ } else {
+ return false;
+ }
+ }
+ 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;
+ valref = i;
+ try { nm = g.p.colModel[i].formoptions.label; } catch (e) {}
+ break;
+ }
+ }
+ } else if(valref >=0) {
+ edtrul = g.p.colModel[valref].editrules;
+ }
+ } else {
+ edtrul = customobject;
+ nm = nam===undefined ? "_" : nam;
+ }
+ if(edtrul) {
+ if(!nm) { nm = g.p.colNames[valref]; }
+ if(edtrul.required === true) {
+ if( $.jgrid.isEmpty(val) ) { return [false,nm+": "+$.jgrid.edit.msg.required,""]; }
+ }
+ // force required
+ var rqfield = edtrul.required === false ? false : true;
+ if(edtrul.number === true) {
+ if( !(rqfield === false && $.jgrid.isEmpty(val)) ) {
+ if(isNaN(val)) { return [false,nm+": "+$.jgrid.edit.msg.number,""]; }
+ }
+ }
+ if(typeof 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 (parseFloat(val) > parseFloat(edtrul.maxValue) ) { return [false,nm+": "+$.jgrid.edit.msg.maxValue+" "+edtrul.maxValue,""];}
+ }
+ var filter;
+ if(edtrul.email === true) {
+ if( !(rqfield === false && $.jgrid.isEmpty(val)) ) {
+ // taken from $ Validate plugin
+ filter = /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i;
+ if(!filter.test(val)) {return [false,nm+": "+$.jgrid.edit.msg.email,""];}
+ }
+ }
+ 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(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;
+ } else {
+ dft = g.p.colModel[valref].datefmt || "Y-m-d";
+ }
+ if(!$.jgrid.checkDate (dft, val)) { return [false,nm+": "+$.jgrid.edit.msg.date+" - "+dft,""]; }
+ }
+ }
+ if(edtrul.time === true) {
+ if( !(rqfield === false && $.jgrid.isEmpty(val)) ) {
+ if(!$.jgrid.checkTime (val)) { return [false,nm+": "+$.jgrid.edit.msg.date+" - hh:mm (am/pm)",""]; }
+ }
+ }
+ if(edtrul.url === true) {
+ if( !(rqfield === false && $.jgrid.isEmpty(val)) ) {
+ filter = /^(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;
+ if(!filter.test(val)) {return [false,nm+": "+$.jgrid.edit.msg.url,""];}
+ }
+ }
+ 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,""];
+ }
+ }
+ }
+ }
+ return [true,"",""];
+ }
+});
+})(jQuery);/*
+ * jqFilter jQuery jqGrid filter addon.
+ * Copyright (c) 2011, 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
+ *
+ * The work is inspired from this Stefan Pirvu
+ * http://www.codeproject.com/KB/scripting/json-filtering.aspx
+ *
+ * The filter uses JSON entities to hold filter rules and groups. Here is an example of a filter:
+
+{ "groupOp": "AND",
+ "groups" : [
+ { "groupOp": "OR",
+ "rules": [
+ { "field": "name", "op": "eq", "data": "England" },
+ { "field": "id", "op": "le", "data": "5"}
+ ]
+ }
+ ],
+ "rules": [
+ { "field": "name", "op": "eq", "data": "Romania" },
+ { "field": "id", "op": "le", "data": "1"}
+ ]
+}
+*/
+/*global jQuery, $, window, navigator */
+
+(function ($) {
+
+$.fn.jqFilter = function( arg ) {
+ if (typeof arg === 'string') {
+
+ var fn = $.fn.jqFilter[arg];
+ if (!fn) {
+ throw ("jqFilter - No such method: " + arg);
+ }
+ var args = $.makeArray(arguments).slice(1);
+ return fn.apply(this,args);
+ }
+
+ var p = $.extend(true,{
+ filter: null,
+ columns: [],
+ onChange : null,
+ afterRedraw : null,
+ checkValues : null,
+ error: false,
+ errmsg : "",
+ 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"}
+ ],
+ 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
+ groupOps : [{ op: "AND", text: "AND" }, { op: "OR", text: "OR" }],
+ groupButton : true,
+ ruleButtons : true,
+ direction : "ltr"
+ }, $.jgrid.filter, arg || {});
+ return this.each( function() {
+ if (this.filter) {return;}
+ this.p = p;
+ // setup filter in case if they is not defined
+ if (this.p.filter === null || this.p.filter === undefined) {
+ this.p.filter = {
+ groupOp: this.p.groupOps[0].op,
+ rules: [],
+ groups: []
+ };
+ }
+ var i, len = this.p.columns.length, cl,
+ 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
+ if( !len ) {return;}
+ for(i=0; i < len; i++) {
+ cl = this.p.columns[i];
+ if( cl.stype ) {
+ // grid compatibility
+ cl.inputtype = cl.stype;
+ } else if(!cl.inputtype) {
+ cl.inputtype = 'text';
+ }
+ if( cl.sorttype ) {
+ // grid compatibility
+ cl.searchtype = cl.sorttype;
+ } else if (!cl.searchtype) {
+ cl.searchtype = 'string';
+ }
+ if(cl.hidden === undefined) {
+ // jqGrid compatibility
+ cl.hidden = false;
+ }
+ if(!cl.label) {
+ cl.label = cl.name;
+ }
+ if(cl.index) {
+ cl.name = cl.index;
+ }
+ if(!cl.hasOwnProperty('searchoptions')) {
+ cl.searchoptions = {};
+ }
+ if(!cl.hasOwnProperty('searchrules')) {
+ cl.searchrules = {};
+ }
+
+ }
+ 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>");
+ }
+ /*
+ *Perform checking.
+ *
+ */
+ var checkData = function(val, colModelItem) {
+ var ret = [true,""];
+ if($.isFunction(colModelItem.searchrules)) {
+ ret = colModelItem.searchrules(val, colModelItem);
+ } else if($.jgrid && $.jgrid.checkValues) {
+ try {
+ ret = $.jgrid.checkValues(val, -1, null, colModelItem.searchrules, colModelItem.label);
+ } catch (e) {}
+ }
+ if(ret && ret.length && ret[0] === false) {
+ p.error = !ret[0];
+ p.errmsg = ret[1];
+ }
+ };
+ /* moving to common
+ randId = function() {
+ return Math.floor(Math.random()*10000).toString();
+ };
+ */
+
+ this.onchange = function ( ){
+ // clear any error
+ this.p.error = false;
+ this.p.errmsg="";
+ return $.isFunction(this.p.onChange) ? this.p.onChange.call( this, this.p ) : false;
+ };
+ /*
+ * Redraw the filter every time when new field is added/deleted
+ * and field is changed
+ */
+ this.reDraw = function() {
+ $("table.group:first",this).remove();
+ var t = this.createTableForGroup(p.filter, null);
+ $(this).append(t);
+ if($.isFunction(this.p.afterRedraw) ) {
+ this.p.afterRedraw.call(this, this.p);
+ }
+ };
+ /*
+ * Creates a grouping data for the filter
+ * @param group - object
+ * @param parentgroup - object
+ */
+ this.createTableForGroup = function(group, parentgroup) {
+ var that = this, i;
+ // this table will hold all the group (tables) and rules (rows)
+ 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") {
+ align = "right";
+ table.attr("dir","rtl");
+ }
+ if(parentgroup === null) {
+ table.append("<tr class='error' style='display:none;'><th colspan='5' class='ui-state-error' align='"+align+"'></th></tr>");
+ }
+
+ var tr = $("<tr></tr>");
+ table.append(tr);
+ // this header will hold the group operator type and group action buttons for
+ // creating subgroup "+ {}", creating rule "+" or deleting the group "-"
+ var th = $("<th colspan='5' align='"+align+"'></th>");
+ tr.append(th);
+
+ if(this.p.ruleButtons === true) {
+ // dropdown for: choosing group operator type
+ var groupOpSelect = $("<select class='opsel'></select>");
+ th.append(groupOpSelect);
+ // populate dropdown with all posible group operators: or, and
+ var str= "", selected;
+ for (i = 0; i < p.groupOps.length; i++) {
+ selected = group.groupOp === that.p.groupOps[i].op ? " selected='selected'" :"";
+ str += "<option value='"+that.p.groupOps[i].op+"'" + selected+">"+that.p.groupOps[i].text+"</option>";
+ }
+
+ groupOpSelect
+ .append(str)
+ .bind('change',function() {
+ group.groupOp = $(groupOpSelect).val();
+ that.onchange(); // signals that the filter has changed
+ });
+ }
+ // button for adding a new subgroup
+ var inputAddSubgroup ="<span></span>";
+ if(this.p.groupButton) {
+ inputAddSubgroup = $("<input type='button' value='+ {}' title='Add subgroup' class='add-group'/>");
+ inputAddSubgroup.bind('click',function() {
+ if (group.groups === undefined ) {
+ group.groups = [];
+ }
+
+ group.groups.push({
+ groupOp: p.groupOps[0].op,
+ rules: [],
+ groups: []
+ }); // adding a new group
+
+ that.reDraw(); // the html has changed, force reDraw
+
+ that.onchange(); // signals that the filter has changed
+ return false;
+ });
+ }
+ th.append(inputAddSubgroup);
+ if(this.p.ruleButtons === true) {
+ // button for adding a new rule
+ var inputAddRule = $("<input type='button' value='+' title='Add rule' class='add-rule ui-add'/>"), cm;
+ inputAddRule.bind('click',function() {
+ //if(!group) { group = {};}
+ if (group.rules === undefined) {
+ group.rules = [];
+ }
+ 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),
+ ignoreHiding = (that.p.columns[i].searchoptions.searchhidden === true);
+ if ((ignoreHiding && searchable) || (searchable && !hidden)) {
+ cm = that.p.columns[i];
+ break;
+ }
+ }
+
+ 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 {opr = that.p.numopts;}
+
+ group.rules.push({
+ field: cm.name,
+ op: opr[0],
+ data: ""
+ }); // adding a new rule
+
+ that.reDraw(); // the html has changed, force reDraw
+ // for the moment no change have been made to the rule, so
+ // this will not trigger onchange event
+ return false;
+ });
+ th.append(inputAddRule);
+ }
+
+ // button for delete the group
+ if (parentgroup !== null) { // ignore the first group
+ var inputDeleteGroup = $("<input type='button' value='-' title='Delete group' class='delete-group'/>");
+ th.append(inputDeleteGroup);
+ inputDeleteGroup.bind('click',function() {
+ // remove group from parent
+ for (i = 0; i < parentgroup.groups.length; i++) {
+ if (parentgroup.groups[i] === group) {
+ parentgroup.groups.splice(i, 1);
+ break;
+ }
+ }
+
+ that.reDraw(); // the html has changed, force reDraw
+
+ that.onchange(); // signals that the filter has changed
+ return false;
+ });
+ }
+
+ // append subgroup rows
+ if (group.groups !== undefined) {
+ for (i = 0; i < group.groups.length; i++) {
+ var trHolderForSubgroup = $("<tr></tr>");
+ table.append(trHolderForSubgroup);
+
+ var tdFirstHolderForSubgroup = $("<td class='first'></td>");
+ trHolderForSubgroup.append(tdFirstHolderForSubgroup);
+
+ var tdMainHolderForSubgroup = $("<td colspan='4'></td>");
+ tdMainHolderForSubgroup.append(this.createTableForGroup(group.groups[i], group));
+ trHolderForSubgroup.append(tdMainHolderForSubgroup);
+ }
+ }
+ if(group.groupOp === undefined) {
+ group.groupOp = that.p.groupOps[0].op;
+ }
+
+ // append rules rows
+ if (group.rules !== undefined) {
+ for (i = 0; i < group.rules.length; i++) {
+ table.append(
+ this.createTableRowForRule(group.rules[i], group)
+ );
+ }
+ }
+
+ return table;
+ };
+ /*
+ * Create the rule data for the filter
+ */
+ this.createTableRowForRule = function(rule, group ) {
+ // save current entity in a variable so that it could
+ // be referenced in anonimous method calls
+
+ var that=this, tr = $("<tr></tr>"),
+ //document.createElement("tr"),
+
+ // first column used for padding
+ //tdFirstHolderForRule = document.createElement("td"),
+ i, op, trpar, cm, str="", selected;
+ //tdFirstHolderForRule.setAttribute("class", "first");
+ tr.append("<td class='first'></td>");
+
+
+ // create field container
+ var ruleFieldTd = $("<td class='columns'></td>");
+ tr.append(ruleFieldTd);
+
+
+ // dropdown for: choosing field
+ var ruleFieldSelect = $("<select></select>"), ina, aoprs = [];
+ ruleFieldTd.append(ruleFieldSelect);
+ ruleFieldSelect.bind('change',function() {
+ rule.field = $(ruleFieldSelect).val();
+
+ trpar = $(this).parents("tr:first");
+ for (i=0;i<that.p.columns.length;i++) {
+ if(that.p.columns[i].name === rule.field) {
+ cm = that.p.columns[i];
+ break;
+ }
+ }
+ if(!cm) {return;}
+ cm.searchoptions.id = $.jgrid.randId();
+ if(isIE && cm.inputtype === "text") {
+ if(!cm.searchoptions.size) {
+ cm.searchoptions.size = 10;
+ }
+ }
+ var elm = $.jgrid.createEl(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 {op = that.p.numopts;}
+ // operators
+ var s ="", so = 0;
+ aoprs = [];
+ $.each(that.p.ops, function() { aoprs.push(this.name) });
+ 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;
+ }
+ s += "<option value='"+that.p.ops[ina].name+"'>"+that.p.ops[ina].description+"</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;
+ $(".selectopts",trpar).width( sw );
+ $(".selectopts",trpar).css("width","auto");
+ }
+ // data
+ $(".data",trpar).empty().append( elm );
+ $(".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;
+ that.onchange(); // signals that the filter has changed
+ }, tmo);
+ });
+ setTimeout(function(){ //IE, Opera, Chrome
+ rule.data = $(elm).val();
+ that.onchange(); // signals that the filter has changed
+ }, 0);
+ });
+
+ // populate drop down with user provided column definitions
+ 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),
+ ignoreHiding = (that.p.columns[i].searchoptions.searchhidden === true);
+ if ((ignoreHiding && searchable) || (searchable && !hidden)) {
+ selected = "";
+ if(rule.field === that.p.columns[i].name) {
+ selected = " selected='selected'";
+ j=i;
+ }
+ str += "<option value='"+that.p.columns[i].name+"'" +selected+">"+that.p.columns[i].label+"</option>";
+ }
+ }
+ ruleFieldSelect.append( str );
+
+
+ // create operator container
+ var ruleOperatorTd = $("<td class='operators'></td>");
+ tr.append(ruleOperatorTd);
+ cm = p.columns[j];
+ // create it here so it can be referentiated in the onchange event
+ //var RD = that.createElement(rule, rule.data);
+ cm.searchoptions.id = $.jgrid.randId();
+ if(isIE && cm.inputtype === "text") {
+ if(!cm.searchoptions.size) {
+ cm.searchoptions.size = 10;
+ }
+ }
+ var ruleDataInput = $.jgrid.createEl(cm.inputtype,cm.searchoptions, rule.data, true, that.p.ajaxSelectOptions, true);
+
+ // dropdown for: choosing operator
+ var ruleOperatorSelect = $("<select class='selectopts'></select>");
+ ruleOperatorTd.append(ruleOperatorSelect);
+ ruleOperatorSelect.bind('change',function() {
+ rule.op = $(ruleOperatorSelect).val();
+ trpar = $(this).parents("tr:first");
+ var rd = $(".input-elm",trpar)[0];
+ if (rule.op === "nu" || rule.op === "nn") { // disable for operator "is null" and "is not null"
+ rule.data = "";
+ rd.value = "";
+ rd.setAttribute("readonly", "true");
+ rd.setAttribute("disabled", "true");
+ } else {
+ rd.removeAttribute("readonly");
+ rd.removeAttribute("disabled");
+ }
+
+ that.onchange(); // signals that the filter has changed
+ });
+
+ // 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 {op = that.p.numopts;}
+ str="";
+ $.each(that.p.ops, function() { aoprs.push(this.name) });
+ 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>";
+ }
+ }
+ ruleOperatorSelect.append( str );
+ // create data container
+ var ruleDataTd = $("<td class='data'></td>");
+ tr.append(ruleDataTd);
+
+ // textbox for: data
+ // is created previously
+ //ruleDataInput.setAttribute("type", "text");
+ ruleDataTd.append(ruleDataInput);
+
+ $(ruleDataInput)
+ .addClass("input-elm")
+ .bind('change', function() {
+ rule.data = cm.inputtype === 'custom' ? cm.searchoptions.custom_value($(this).children(".customelement:first"),'get') : $(this).val();
+ that.onchange(); // signals that the filter has changed
+ });
+
+ // create action container
+ var ruleDeleteTd = $("<td></td>");
+ tr.append(ruleDeleteTd);
+
+ // create button for: delete rule
+ if(this.p.ruleButtons === true) {
+ var ruleDeleteInput = $("<input type='button' value='-' title='Delete rule' class='delete-rule ui-del'/>");
+ ruleDeleteTd.append(ruleDeleteInput);
+ //$(ruleDeleteInput).html("").height(20).width(30).button({icons: { primary: "ui-icon-minus", text:false}});
+ ruleDeleteInput.bind('click',function() {
+ // remove rule from group
+ for (i = 0; i < group.rules.length; i++) {
+ if (group.rules[i] === rule) {
+ group.rules.splice(i, 1);
+ break;
+ }
+ }
+
+ that.reDraw(); // the html has changed, force reDraw
+
+ that.onchange(); // signals that the filter has changed
+ return false;
+ });
+ }
+ return tr;
+ };
+
+ this.getStringForGroup = function(group) {
+ var s = "(", index;
+ if (group.groups !== undefined) {
+ for (index = 0; index < group.groups.length; index++) {
+ if (s.length > 1) {
+ s += " " + group.groupOp + " ";
+ }
+ try {
+ s += this.getStringForGroup(group.groups[index]);
+ } catch (eg) {alert(eg);}
+ }
+ }
+
+ if (group.rules !== undefined) {
+ try{
+ for (index = 0; index < group.rules.length; index++) {
+ if (s.length > 1) {
+ s += " " + group.groupOp + " ";
+ }
+ s += this.getStringForRule(group.rules[index]);
+ }
+ } catch (e) {alert(e);}
+ }
+
+ s += ")";
+
+ if (s === "()") {
+ return ""; // ignore groups that don't have rules
+ } else {
+ 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;
+ break;
+ }
+ }
+ for (i=0; i<this.p.columns.length; i++) {
+ if(this.p.columns[i].name === rule.field) {
+ cm = this.p.columns[i];
+ break;
+ }
+ }
+ val = rule.data;
+ if(opC === 'bw' || opC === 'bn') { val = val+"%"; }
+ if(opC === 'ew' || opC === 'en') { val = "%"+val; }
+ if(opC === 'cn' || opC === 'nc') { val = "%"+val+"%"; }
+ if(opC === 'in' || opC === 'ni') { val = " ("+val+")"; }
+ if(p.errorcheck) { checkData(rule.data, cm); }
+ if($.inArray(cm.searchtype, numtypes) !== -1 || opC === 'nn' || opC === 'nu') { ret = rule.field + " " + opUF + " " + val; }
+ else { ret = rule.field + " " + opUF + " \"" + val + "\""; }
+ return ret;
+ };
+ this.resetFilter = function () {
+ this.p.filter = $.extend(true,{},this.p.initFilter);
+ this.reDraw();
+ this.onchange();
+ };
+ this.hideError = function() {
+ $("th.ui-state-error", this).html("");
+ $("tr.error", this).hide();
+ };
+ this.showError = function() {
+ $("th.ui-state-error", this).html(this.p.errmsg);
+ $("tr.error", this).show();
+ };
+ this.toUserFriendlyString = function() {
+ return this.getStringForGroup(p.filter);
+ };
+ this.toString = function() {
+ // this will obtain a string that can be used to match an item.
+ var that = this;
+ function getStringRule(rule) {
+ if(that.p.errorcheck) {
+ var i, cm;
+ for (i=0; i<that.p.columns.length; i++) {
+ if(that.p.columns[i].name === rule.field) {
+ cm = that.p.columns[i];
+ break;
+ }
+ }
+ if(cm) {checkData(rule.data, cm);}
+ }
+ return rule.op + "(item." + rule.field + ",'" + rule.data + "')";
+ }
+
+ function getStringForGroup(group) {
+ var s = "(", index;
+
+ if (group.groups !== undefined) {
+ for (index = 0; index < group.groups.length; index++) {
+ if (s.length > 1) {
+ if (group.groupOp === "OR") {
+ s += " || ";
+ }
+ else {
+ s += " && ";
+ }
+ }
+ s += getStringForGroup(group.groups[index]);
+ }
+ }
+
+ if (group.rules !== undefined) {
+ for (index = 0; index < group.rules.length; index++) {
+ if (s.length > 1) {
+ if (group.groupOp === "OR") {
+ s += " || ";
+ }
+ else {
+ s += " && ";
+ }
+ }
+ s += getStringRule(group.rules[index]);
+ }
+ }
+
+ s += ")";
+
+ if (s === "()") {
+ return ""; // ignore groups that don't have rules
+ } else {
+ return s;
+ }
+ }
+
+ return getStringForGroup(this.p.filter);
+ };
+
+ // Here we init the filter
+ this.reDraw();
+
+ if(this.p.showQuery) {
+ this.onchange();
+ }
+ // mark is as created so that it will not be created twice on this element
+ this.filter = true;
+ });
+};
+$.extend($.fn.jqFilter,{
+ /*
+ * Return SQL like string. Can be used directly
+ */
+ toSQLString : function()
+ {
+ var s ="";
+ this.each(function(){
+ s = this.toUserFriendlyString();
+ });
+ return s;
+ },
+ /*
+ * Return filter data as object.
+ */
+ filterData : function()
+ {
+ var s;
+ this.each(function(){
+ s = this.p.filter;
+ });
+ return s;
+
+ },
+ getParameter : function (param) {
+ if(param !== undefined) {
+ if (this.p.hasOwnProperty(param) ) {
+ return this.p[param];
+ }
+ }
+ return this.p;
+ },
+ resetFilter: function() {
+ return this.each(function(){
+ this.resetFilter();
+ });
+ },
+ addFilter: function (pfilter) {
+ if (typeof pfilter === "string") {
+ pfilter = jQuery.jgrid.parse( pfilter );
+ }
+ this.each(function(){
+ this.p.filter = pfilter;
+ this.reDraw();
+ this.onchange();
+ });
+ }
+
+});
+})(jQuery);
+
+(function($){
+/**
+ * jqGrid extension for form editing Grid Data
+ * 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-2.0.html
+**/
+"use strict";
+/*global xmlJsonClass, jQuery, $ */
+var rp_ge = {};
+$.jgrid.extend({
+ searchGrid : function (p) {
+ p = $.extend({
+ recreateFilter: false,
+ drag: true,
+ sField:'searchField',
+ sValue:'searchString',
+ sOper: 'searchOper',
+ sFilter: 'filters',
+ loadDefaults: true, // this options activates loading of default filters from grid's postData for Multipe Search only.
+ beforeShowSearch: null,
+ afterShowSearch : null,
+ onInitializeSearch: null,
+ afterRedraw : null,
+ afterChange: null,
+ closeAfterSearch : false,
+ closeAfterReset: false,
+ closeOnEscape : false,
+ searchOnEnter : false,
+ multipleSearch : false,
+ multipleGroup : false,
+ //cloneSearchRowOnAdd: true,
+ top : 0,
+ left: 0,
+ jqModal : true,
+ modal: false,
+ resize : true,
+ width: 450,
+ height: 'auto',
+ 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,
+ onSearch : null,
+ onReset : null,
+ toTop : true,
+ overlay : 30,
+ columns : [],
+ tmplNames : null,
+ tmplFilters : null,
+ // translations - later in lang file
+ tmplLabel : ' Template: ',
+ showOnLoad: false,
+ layer: null
+ }, $.jgrid.search, p || {});
+ return this.each(function() {
+ var $t = this;
+ if(!$t.grid) {return;}
+ var fid = "fbox_"+$t.p.id,
+ showFrm = true,
+ IDs = {themodal:'searchmod'+fid,modalhead:'searchhd'+fid,modalcontent:'searchcnt'+fid, scrollelm : fid},
+ defaultFilters = $t.p.postData[p.sFilter];
+ if(typeof(defaultFilters) === "string") {
+ defaultFilters = $.jgrid.parse( defaultFilters );
+ }
+ if(p.recreateFilter === true) {
+ $("#"+$.jgrid.jqID(IDs.themodal)).remove();
+ }
+ function showFilter(_filter) {
+ showFrm = $($t).triggerHandler("jqGridFilterBeforeShow", [_filter]);
+ if(typeof(showFrm) === "undefined") {
+ showFrm = true;
+ }
+ if(showFrm && $.isFunction(p.beforeShowSearch)) {
+ showFrm = p.beforeShowSearch.call($t,_filter);
+ }
+ if(showFrm) {
+ $.jgrid.viewModal("#"+$.jgrid.jqID(IDs.themodal),{gbox:"#gbox_"+$.jgrid.jqID(fid),jqm:p.jqModal, modal:p.modal, overlay: p.overlay, toTop: p.toTop});
+ $($t).triggerHandler("jqGridFilterAfterShow", [_filter]);
+ if($.isFunction(p.afterShowSearch)) {
+ p.afterShowSearch.call($t, _filter);
+ }
+ }
+ }
+ if ( $("#"+$.jgrid.jqID(IDs.themodal))[0] !== undefined ) {
+ showFilter($("#fbox_"+$.jgrid.jqID(+$t.p.id)));
+ } 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") {
+ align = "right";
+ butleft = " style='text-align:left'";
+ fil.attr("dir","rtl");
+ }
+ var columns = $.extend([],$t.p.colModel),
+ bS ="<a href='javascript:void(0)' id='"+fid+"_search' class='fm-button ui-state-default ui-corner-all fm-button-icon-right ui-reset'><span class='ui-icon ui-icon-search'></span>"+p.Find+"</a>",
+ bC ="<a href='javascript:void(0)' id='"+fid+"_reset' class='fm-button ui-state-default ui-corner-all fm-button-icon-left ui-search'><span class='ui-icon ui-icon-arrowreturnthick-1-w'></span>"+p.Reset+"</a>",
+ bQ = "", tmpl="", colnm, found = false, bt, cmi=-1;
+ if(p.showQuery) {
+ bQ ="<a href='javascript:void(0)' id='"+fid+"_query' class='fm-button ui-state-default ui-corner-all fm-button-icon-left'><span class='ui-icon ui-icon-comment'></span>Query</a>";
+ }
+ if(!p.columns.length) {
+ $.each(columns, function(i,n){
+ if(!n.label) {
+ n.label = $t.p.colNames[i];
+ }
+ // find first searchable column and set it if no default filter
+ if(!found) {
+ var searchable = (typeof n.search === 'undefined') ? true: n.search ,
+ hidden = (n.hidden === true),
+ ignoreHiding = (n.searchoptions && n.searchoptions.searchhidden === true);
+ if ((ignoreHiding && searchable) || (searchable && !hidden)) {
+ found = true;
+ colnm = n.index || n.name;
+ cmi =i;
+ }
+ }
+ });
+ } else {
+ columns = p.columns;
+ }
+ // old behaviour
+ if( (!defaultFilters && colnm) || p.multipleSearch === false ) {
+ var cmop = "eq";
+ if(cmi >=0 && columns[cmi].searchoptions && columns[cmi].searchoptions.sopt) {
+ cmop = columns[cmi].searchoptions.sopt[0];
+ } else if(p.sopt && p.sopt.length) {
+ cmop = p.sopt[0];
+ }
+ defaultFilters = {"groupOp": "AND",rules:[{"field":colnm,"op":cmop,"data":""}]};
+ }
+ found = false;
+ if(p.tmplNames && p.tmplNames.length) {
+ found = true;
+ tmpl = p.tmplLabel;
+ tmpl += "<select class='ui-template'>";
+ tmpl += "<option value='default'>Default</option>";
+ $.each(p.tmplNames, function(i,n){
+ tmpl += "<option value='"+i+"'>"+n+"</option>";
+ });
+ tmpl += "</select>";
+ }
+
+ bt = "<table class='EditTable' style='border:0px none;margin-top:5px' id='"+fid+"_2'><tbody><tr><td colspan='2'><hr class='ui-widget-content' style='margin:1px'/></td></tr><tr><td class='EditButton' style='text-align:"+align+"'>"+bC+tmpl+"</td><td class='EditButton' "+butleft+">"+bQ+bS+"</td></tr></tbody></table>";
+ fid = $.jgrid.jqID( fid);
+ $("#"+fid).jqFilter({
+ columns : columns,
+ filter: p.loadDefaults ? defaultFilters : null,
+ showQuery: p.showQuery,
+ errorcheck : p.errorcheck,
+ sopt: p.sopt,
+ groupButton : p.multipleGroup,
+ ruleButtons : p.multipleSearch,
+ afterRedraw : p.afterRedraw,
+ _gridsopt : $.jgrid.search.odata,
+ ajaxSelectOptions: $t.p.ajaxSelectOptions,
+ groupOps: p.groupOps,
+ onChange : function() {
+ if(this.p.showQuery) {
+ $('.query',this).html(this.toUserFriendlyString());
+ }
+ if ($.isFunction(p.afterChange)) {
+ p.afterChange.call($t, $("#"+fid), p);
+ }
+ },
+ direction : $t.p.direction
+ });
+ fil.append( bt );
+ if(found && p.tmplFilters && p.tmplFilters.length) {
+ $(".ui-template", fil).bind('change', function(){
+ var curtempl = $(this).val();
+ if(curtempl=="default") {
+ $("#"+fid).jqFilter('addFilter', defaultFilters);
+ } else {
+ $("#"+fid).jqFilter('addFilter', p.tmplFilters[parseInt(curtempl,10)]);
+ }
+ return false;
+ });
+ }
+ if(p.multipleGroup === true) {p.multipleSearch = true;}
+ $($t).triggerHandler("jqGridFilterInitialize", [$("#"+fid)]);
+ if($.isFunction(p.onInitializeSearch) ) {
+ p.onInitializeSearch.call($t, $("#"+fid));
+ }
+ p.gbox = "#gbox_"+fid;
+ if (p.layer) {
+ $.jgrid.createModal(IDs ,fil,p,"#gview_"+$.jgrid.jqID($t.p.id),$("#gbox_"+$.jgrid.jqID($t.p.id))[0], "#"+$.jgrid.jqID(p.layer), {position: "relative"});
+ } else {
+ $.jgrid.createModal(IDs ,fil,p,"#gview_"+$.jgrid.jqID($t.p.id),$("#gbox_"+$.jgrid.jqID($t.p.id))[0]);
+ }
+ if (p.searchOnEnter || p.closeOnEscape) {
+ $("#"+$.jgrid.jqID(IDs.themodal)).keydown(function (e) {
+ var $target = $(e.target);
+ if (p.searchOnEnter && e.which === 13 && // 13 === $.ui.keyCode.ENTER
+ !$target.hasClass('add-group') && !$target.hasClass('add-rule') &&
+ !$target.hasClass('delete-group') && !$target.hasClass('delete-rule') &&
+ (!$target.hasClass("fm-button") || !$target.is("[id$=_query]"))) {
+ $("#"+fid+"_search").focus().click();
+ return false;
+ }
+ if (p.closeOnEscape && e.which === 27) { // 27 === $.ui.keyCode.ESCAPE
+ $("#"+$.jgrid.jqID(IDs.modalhead)).find(".ui-jqdialog-titlebar-close").focus().click();
+ return false;
+ }
+ });
+ }
+ if(bQ) {
+ $("#"+fid+"_query").bind('click', function(){
+ $(".queryresult", fil).toggle();
+ return false;
+ });
+ }
+ if (p.stringResult===undefined) {
+ // to provide backward compatibility, inferring stringResult value from multipleSearch
+ p.stringResult = p.multipleSearch;
+ }
+ $("#"+fid+"_search").bind('click', function(){
+ var fl = $("#"+fid),
+ sdata={}, res ,
+ filters = fl.jqFilter('filterData');
+ if(p.errorcheck) {
+ fl[0].hideError();
+ if(!p.showQuery) {fl.jqFilter('toSQLString');}
+ if(fl[0].p.error) {
+ fl[0].showError();
+ return false;
+ }
+ }
+
+ if(p.stringResult) {
+ try {
+ // xmlJsonClass or JSON.stringify
+ res = xmlJsonClass.toJson(filters, '', '', false);
+ } catch (e) {
+ try {
+ res = JSON.stringify(filters);
+ } catch (e2) { }
+ }
+ if(typeof(res)==="string") {
+ sdata[p.sFilter] = res;
+ $.each([p.sField,p.sValue, p.sOper], function() {sdata[this] = "";});
+ }
+ } else {
+ if(p.multipleSearch) {
+ sdata[p.sFilter] = filters;
+ $.each([p.sField,p.sValue, p.sOper], function() {sdata[this] = "";});
+ } else {
+ sdata[p.sField] = filters.rules[0].field;
+ sdata[p.sValue] = filters.rules[0].data;
+ sdata[p.sOper] = filters.rules[0].op;
+ sdata[p.sFilter] = "";
+ }
+ }
+ $t.p.search = true;
+ $.extend($t.p.postData,sdata);
+ $($t).triggerHandler("jqGridFilterSearch");
+ if($.isFunction(p.onSearch) ) {
+ p.onSearch.call($t);
+ }
+ $($t).trigger("reloadGrid",[{page:1}]);
+ if(p.closeAfterSearch) {
+ $.jgrid.hideModal("#"+$.jgrid.jqID(IDs.themodal),{gb:"#gbox_"+$.jgrid.jqID($t.p.id),jqm:p.jqModal,onClose: p.onClose});
+ }
+ return false;
+ });
+ $("#"+fid+"_reset").bind('click', function(){
+ var sdata={},
+ fl = $("#"+fid);
+ $t.p.search = false;
+ if(p.multipleSearch===false) {
+ sdata[p.sField] = sdata[p.sValue] = sdata[p.sOper] = "";
+ } else {
+ sdata[p.sFilter] = "";
+ }
+ fl[0].resetFilter();
+ if(found) {
+ $(".ui-template", fil).val("default");
+ }
+ $.extend($t.p.postData,sdata);
+ $($t).triggerHandler("jqGridFilterReset");
+ if($.isFunction(p.onReset) ) {
+ p.onReset.call($t);
+ }
+ $($t).trigger("reloadGrid",[{page:1}]);
+ return false;
+ });
+ showFilter($("#"+fid));
+ $(".fm-button:not(.ui-state-disabled)",fil).hover(
+ function(){$(this).addClass('ui-state-hover');},
+ function(){$(this).removeClass('ui-state-hover');}
+ );
+ }
+ });
+ },
+ editGridRow : function(rowid, p){
+ p = $.extend({
+ top : 0,
+ left: 0,
+ width: 300,
+ height: 'auto',
+ dataheight: 'auto',
+ modal: false,
+ overlay : 30,
+ drag: true,
+ resize: true,
+ url: null,
+ mtype : "POST",
+ clearAfterAdd :true,
+ closeAfterEdit : false,
+ reloadAfterSubmit : true,
+ onInitializeForm: null,
+ beforeInitData: null,
+ beforeShowForm: null,
+ afterShowForm: null,
+ beforeSubmit: null,
+ afterSubmit: null,
+ onclickSubmit: null,
+ afterComplete: null,
+ onclickPgButtons : null,
+ afterclickPgButtons: null,
+ editData : {},
+ recreateForm : false,
+ jqModal : true,
+ closeOnEscape : false,
+ addedrow : "first",
+ topinfo : '',
+ bottominfo: '',
+ saveicon : [],
+ closeicon : [],
+ savekey: [false,13],
+ navkeys: [false,38,40],
+ checkOnSubmit : false,
+ checkOnUpdate : false,
+ _savedData : {},
+ processing : false,
+ onClose : null,
+ ajaxEditOptions : {},
+ serializeEditData : null,
+ viewPagerButtons : true
+ }, $.jgrid.edit, p || {});
+ rp_ge[$(this)[0].p.id] = p;
+ return this.each(function(){
+ var $t = this;
+ if (!$t.grid || !rowid) {return;}
+ var gID = $t.p.id,
+ frmgr = "FrmGrid_"+gID, frmtborg = "TblGrid_"+gID, frmtb = "#"+$.jgrid.jqID(frmtborg),
+ IDs = {themodal:'editmod'+gID,modalhead:'edithd'+gID,modalcontent:'editcnt'+gID, scrollelm : frmgr},
+ onBeforeShow = $.isFunction(rp_ge[$t.p.id].beforeShowForm) ? rp_ge[$t.p.id].beforeShowForm : false,
+ onAfterShow = $.isFunction(rp_ge[$t.p.id].afterShowForm) ? rp_ge[$t.p.id].afterShowForm : false,
+ 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;
+ frmgr = $.jgrid.jqID(frmgr);
+ if (rowid === "new") {
+ rowid = "_empty";
+ frmoper = "add";
+ p.caption=rp_ge[$t.p.id].addCaption;
+ } else {
+ p.caption=rp_ge[$t.p.id].editCaption;
+ frmoper = "edit";
+ }
+ if(p.recreateForm===true && $("#"+$.jgrid.jqID(IDs.themodal))[0] !== undefined) {
+ $("#"+$.jgrid.jqID(IDs.themodal)).remove();
+ }
+ var closeovrl = true;
+ if(p.checkOnUpdate && p.jqModal && !p.modal) {
+ closeovrl = false;
+ }
+ function getFormData(){
+ $(frmtb+" > tbody > tr > td > .FormElement").each(function() {
+ var celm = $(".customelement", this);
+ if (celm.length) {
+ var elem = celm[0], nm = $(elem).attr('name');
+ $.each($t.p.colModel, function(){
+ if(this.name === nm && this.editoptions && $.isFunction(this.editoptions.custom_value)) {
+ try {
+ 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);}
+ }
+ return true;
+ }
+ });
+ } else {
+ switch ($(this).get(0).type) {
+ case "checkbox":
+ if($(this).is(":checked")) {
+ postdata[this.name]= $(this).val();
+ }else {
+ var ofv = $(this).attr("offval");
+ postdata[this.name]= ofv;
+ }
+ 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();
+ if(postdata[this.name]) {postdata[this.name] = postdata[this.name].join(",");}
+ else {postdata[this.name] ="";}
+ var selectedText = [];
+ $("option:selected",this).each(
+ function(i,selected){
+ selectedText[i] = $(selected).text();
+ }
+ );
+ extpost[this.name]= selectedText.join(",");
+ break;
+ case "password":
+ case "text":
+ case "textarea":
+ case "button":
+ postdata[this.name] = $(this).val();
+
+ break;
+ }
+ if($t.p.autoencode) {postdata[this.name] = $.jgrid.htmlEncode(postdata[this.name]);}
+ }
+ });
+ return true;
+ }
+ function createData(rowid,obj,tb,maxcols){
+ var nm, hc,trdata, cnt=0,tmp, dc,elc, retpos=[], ind=false,
+ tdtmpl = "<td class='CaptionTD'> </td><td class='DataTD'> </td>", tmpl="", i; //*2
+ for (i =1; i<=maxcols;i++) {
+ tmpl += tdtmpl;
+ }
+ if(rowid != '_empty') {
+ ind = $(obj).jqGrid("getInd",rowid);
+ }
+ $(obj.p.colModel).each( function(i) {
+ nm = this.name;
+ // hidden fields are included in the form
+ if(this.editrules && this.editrules.edithidden === true) {
+ hc = false;
+ } else {
+ hc = this.hidden === true ? true : false;
+ }
+ dc = hc ? "style='display:none'" : "";
+ if ( nm !== 'cb' && nm !== 'subgrid' && this.editable===true && nm !== 'rn') {
+ if(ind === false) {
+ tmp = "";
+ } else {
+ if(nm == obj.p.ExpandColumn && obj.p.treeGrid === true) {
+ tmp = $("td:eq("+i+")",obj.rows[ind]).text();
+ } else {
+ try {
+ tmp = $.unformat.call(obj, $("td: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();
+ }
+ 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 ) {
+ 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(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') {
+ $(elc).addClass("ui-widget-content ui-corner-all");
+ }
+ trdata = $(tb).find("tr[rowpos="+rp+"]");
+ if(frmopt.rowabove) {
+ var newdata = $("<tr><td class='contentinfo' colspan='"+(maxcols*2)+"'>"+frmopt.rowcontent+"</td></tr>");
+ $(tb).append(newdata);
+ newdata[0].rp = rp;
+ }
+ if ( trdata.length===0 ) {
+ trdata = $("<tr "+dc+" rowpos='"+rp+"'></tr>").addClass("FormData").attr("id","tr_"+nm);
+ $(trdata).append(tmpl);
+ $(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-1)+")",trdata[0]).append(frmopt.elmprefix).append(elc).append(frmopt.elmsuffix);
+ retpos[cnt] = i;
+ cnt++;
+ }
+ });
+ if( cnt > 0) {
+ var idrow = $("<tr class='FormData' style='display:none'><td class='CaptionTD'></td><td colspan='"+ (maxcols*2-1)+"' class='DataTD'><input class='FormElement' id='id_g' type='text' name='"+obj.p.id+"_id' value='"+rowid+"'/></td></tr>");
+ idrow[0].rp = cnt+999;
+ $(tb).append(idrow);
+ if(rp_ge[$t.p.id].checkOnSubmit || rp_ge[$t.p.id].checkOnUpdate) {rp_ge[$t.p.id]._savedData[obj.p.id+"_id"] = rowid;}
+ }
+ return retpos;
+ }
+ function fillData(rowid,obj,fmid){
+ 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') {
+ $(cm).each(function(){
+ nm = this.name;
+ opt = $.extend({}, this.editoptions || {} );
+ fld = $("#"+$.jgrid.jqID(nm),"#"+fmid);
+ if(fld && fld.length && fld[0] !== null) {
+ vl = "";
+ if(opt.defaultValue ) {
+ vl = $.isFunction(opt.defaultValue) ? opt.defaultValue.call($t) : opt.defaultValue;
+ if(fld[0].type=='checkbox') {
+ vlc = vl.toLowerCase();
+ if(vlc.search(/(false|0|no|off|undefined)/i)<0 && vlc!=="") {
+ fld[0].checked = true;
+ fld[0].defaultChecked = true;
+ fld[0].value = vl;
+ } else {
+ fld[0].checked = false;
+ fld[0].defaultChecked = false;
+ }
+ } else {fld.val(vl);}
+ } else {
+ 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') {
+ fld[0].selectedIndex = 0;
+ } else {
+ fld.val(vl);
+ }
+ }
+ if(rp_ge[$t.p.id].checkOnSubmit===true || rp_ge[$t.p.id].checkOnUpdate) {rp_ge[$t.p.id]._savedData[nm] = vl;}
+ }
+ });
+ $("#id_g","#"+fmid).val(rowid);
+ return;
+ }
+ var tre = $(obj).jqGrid("getInd",rowid,true);
+ if(!tre) {return;}
+ $('td[role="gridcell"]',tre).each( function(i) {
+ 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) {
+ 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();
+ }
+ }
+ if($t.p.autoencode) {tmp = $.jgrid.htmlDecode(tmp);}
+ if(rp_ge[$t.p.id].checkOnSubmit===true || rp_ge[$t.p.id].checkOnUpdate) {rp_ge[$t.p.id]._savedData[nm] = tmp;}
+ nm = $.jgrid.jqID(nm);
+ switch (cm[i].edittype) {
+ case "password":
+ case "text":
+ case "button" :
+ case "image":
+ case "textarea":
+ 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())) ){
+ this.selected= true;
+ } else if (cm[i].editoptions.multiple){
+ if( $.inArray($.trim($(this).text()), opv ) > -1 || $.inArray($.trim($(this).val()), opv ) > -1 ){
+ this.selected = true;
+ }else{
+ this.selected = false;
+ }
+ } else {
+ this.selected = false;
+ }
+ });
+ break;
+ case "checkbox":
+ tmp = 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
+ } else {
+ $("#"+nm,"#"+fmid)[$t.p.useProp ? 'prop': 'attr']("checked", false);
+ $("#"+nm,"#"+fmid)[$t.p.useProp ? 'prop': 'attr']("defaultChecked", false); //ie
+ }
+ } else {
+ tmp = tmp.toLowerCase();
+ if(tmp.search(/(false|0|no|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 {
+ $("#"+nm,"#"+fmid)[$t.p.useProp ? 'prop': 'attr']("checked", false);
+ $("#"+nm,"#"+fmid)[$t.p.useProp ? 'prop': 'attr']("defaultChecked", false); //ie
+ }
+ }
+ break;
+ case 'custom' :
+ try {
+ if(cm[i].editoptions && $.isFunction(cm[i].editoptions.custom_value)) {
+ 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);}
+ }
+ break;
+ }
+ cnt++;
+ }
+ });
+ if(cnt>0) {$("#id_g",frmtb).val(rowid);}
+ }
+ function setNulls() {
+ $.each($t.p.colModel, function(i,n){
+ if(n.editoptions && n.editoptions.NullIfEmpty === true) {
+ if(postdata.hasOwnProperty(n.name) && postdata[n.name] === "") {
+ postdata[n.name] = 'null';
+ }
+ }
+ });
+ }
+ function postIt() {
+ 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($.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;}
+ }
+ for( key in postdata ){
+ if(postdata.hasOwnProperty(key)) {
+ ret = $.jgrid.checkValues.call($t,postdata[key],key,$t);
+ if(ret[0] === false) {break;}
+ }
+ }
+ setNulls();
+ 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) || {};
+ }
+ 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));
+ }
+ }
+
+ if(ret[0] && !rp_ge[$t.p.id].processing) {
+ rp_ge[$t.p.id].processing = true;
+ $("#sData", frmtb+"_2").addClass('ui-state-active');
+ 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[idname] = postdata[$t.p.id+"_id"];
+ } else {
+ // check to see if we have allredy this field in the form and if yes lieve it
+ if( postdata[idname] === undefined ) {postdata[idname] = postdata[$t.p.id+"_id"];}
+ }
+ 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) {
+ selr = $($t).jqGrid("getGridParam", 'selrow');
+ 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;}
+ delete postdata[itm];
+ }
+ }
+ }
+ }
+
+ 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'),
+ 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){
+ postdata[idname] = $t.p.idPrefix + postdata[idname];
+ if(Status != "success") {
+ 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);
+ } else {
+ ret[1] = Status + " Status: '" + data.statusText + "'. Error code: " + data.status;
+ }
+ } else {
+ // data is posted successful
+ // execute aftersubmit with the returned data from server
+ ret = $($t).triggerHandler("jqGridAddEditAfterSubmit", [data, postdata, frmoper]);
+ if(ret === undefined) {
+ ret = [true,"",""];
+ }
+ if( ret[0] && $.isFunction(rp_ge[$t.p.id].afterSubmit) ) {
+ ret = rp_ge[$t.p.id].afterSubmit.call($t, data,postdata);
+ }
+ }
+ 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);
+ });
+ }
+ //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 ) {
+ //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].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);
+ $($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) {
+ $($t).trigger("reloadGrid");
+ if( !rp_ge[$t.p.id].closeAfterEdit ) {setTimeout(function(){$($t).jqGrid("setSelection",postdata[idname]);},1000);}
+ } else {
+ if($t.p.treeGrid === true) {
+ $($t).jqGrid("setTreeRow", postdata[idname],postdata);
+ } else {
+ $($t).jqGrid("setRowData", postdata[idname],postdata);
+ }
+ }
+ if(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});}
+ }
+ if($.isFunction(rp_ge[$t.p.id].afterComplete)) {
+ copydata = data;
+ setTimeout(function(){
+ $($t).triggerHandler("jqGridAddEditAfterComplete", [copydata, postdata, $("#"+frmgr), frmoper]);
+ rp_ge[$t.p.id].afterComplete.call($t, copydata, postdata, $("#"+frmgr));
+ 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];
+ }
+ }
+ }
+ }
+ }
+ rp_ge[$t.p.id].processing=false;
+ $("#sData", frmtb+"_2").removeClass('ui-state-active');
+ try{$(':input:visible',"#"+frmgr)[0].focus();} catch (e){}
+ }
+ }, $.jgrid.ajaxOptions, rp_ge[$t.p.id].ajaxEditOptions );
+
+ if (!ajaxOptions.url && !rp_ge[$t.p.id].useDataProxy) {
+ if ($.isFunction($t.p.dataProxy)) {
+ rp_ge[$t.p.id].useDataProxy = true;
+ } else {
+ ret[0]=false;ret[1] += " "+$.jgrid.errors.nourl;
+ }
+ }
+ 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") {
+ 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 ) {
+ $.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 ) {
+ $.jgrid.hideModal("#"+$.jgrid.jqID(IDs.themodal),{gb:"#gbox_"+$.jgrid.jqID(gID),jqm:p.jqModal, onClose: rp_ge[$t.p.id].onClose});
+ }
+ }
+ } else {
+ $.ajax(ajaxOptions);
+ }
+ }
+ }
+ if(ret[0] === false) {
+ $("#FormError>td",frmtb).html(ret[1]);
+ $("#FormError",frmtb).show();
+ // return;
+ }
+ }
+ function compareData(nObj, oObj ) {
+ var ret = false,key;
+ for (key in nObj) {
+ if(nObj[key] != oObj[key]) {
+ ret = true;
+ break;
+ }
+ }
+ return ret;
+ }
+ function checkUpdates () {
+ var stat = true;
+ $("#FormError",frmtb).hide();
+ if(rp_ge[$t.p.id].checkOnUpdate) {
+ postdata = {};extpost={};
+ getFormData();
+ newData = $.extend({},postdata,extpost);
+ diff = compareData(newData,rp_ge[$t.p.id]._savedData);
+ if(diff) {
+ $("#"+frmgr).data("disabled",true);
+ $(".confirm","#"+IDs.themodal).show();
+ stat = false;
+ }
+ }
+ return stat;
+ }
+ 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++) {
+ if ($t.p.savedRow[i].id == rowid) {
+ $($t).jqGrid('restoreRow',rowid);
+ break;
+ }
+ }
+ }
+ }
+ 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 getCurrPos() {
+ var rowsInGrid = $($t).jqGrid("getDataIDs"),
+ selrow = $("#id_g",frmtb).val(),
+ pos = $.inArray(selrow,rowsInGrid);
+ return [pos,rowsInGrid];
+ }
+
+ if ( $("#"+$.jgrid.jqID(IDs.themodal))[0] !== undefined ) {
+ showFrm = $($t).triggerHandler("jqGridAddEditBeforeInitData", [$("#"+$.jgrid.jqID(frmgr)), frmoper]);
+ if(typeof(showFrm) == "undefined") {
+ showFrm = true;
+ }
+ if(showFrm && onBeforeInit) {
+ showFrm = onBeforeInit.call($t,$("#"+frmgr));
+ }
+ if(showFrm === false) {return;}
+ restoreInline();
+ $(".ui-jqdialog-title","#"+$.jgrid.jqID(IDs.modalhead)).html(p.caption);
+ $("#FormError",frmtb).hide();
+ if(rp_ge[$t.p.id].topinfo) {
+ $(".topinfo",frmtb).html(rp_ge[$t.p.id].topinfo);
+ $(".tinfo",frmtb).show();
+ } else {
+ $(".tinfo",frmtb).hide();
+ }
+ if(rp_ge[$t.p.id].bottominfo) {
+ $(".bottominfo",frmtb+"_2").html(rp_ge[$t.p.id].bottominfo);
+ $(".binfo",frmtb+"_2").show();
+ } else {
+ $(".binfo",frmtb+"_2").hide();
+ }
+ // filldata
+ fillData(rowid,$t,frmgr);
+ ///
+ if(rowid=="_empty" || !rp_ge[$t.p.id].viewPagerButtons) {
+ $("#pData, #nData",frmtb+"_2").hide();
+ } else {
+ $("#pData, #nData",frmtb+"_2").show();
+ }
+ if(rp_ge[$t.p.id].processing===true) {
+ rp_ge[$t.p.id].processing=false;
+ $("#sData", frmtb+"_2").removeClass('ui-state-active');
+ }
+ if($("#"+frmgr).data("disabled")===true) {
+ $(".confirm","#"+$.jgrid.jqID(IDs.themodal)).hide();
+ $("#"+frmgr).data("disabled",false);
+ }
+ $($t).triggerHandler("jqGridAddEditBeforeShowForm", [$("#"+frmgr), frmoper]);
+ if(onBeforeShow) { onBeforeShow.call($t, $("#"+frmgr)); }
+ $("#"+$.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});
+ if(!closeovrl) {
+ $(".jqmOverlay").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)); }
+ } 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),
+ 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") {
+ showFrm = true;
+ }
+ if(showFrm && onBeforeInit) {
+ showFrm = onBeforeInit.call($t,$("#"+frmgr));
+ }
+ if(showFrm === false) {return;}
+ restoreInline();
+ $($t.p.colModel).each( function() {
+ var fmto = this.formoptions;
+ maxCols = Math.max(maxCols, fmto ? fmto.colpos || 0 : 0 );
+ maxRows = Math.max(maxRows, fmto ? fmto.rowpos || 0 : 0 );
+ });
+ $(frm).append(tbl);
+ var flr = $("<tr id='FormError' style='display:none'><td class='ui-state-error' colspan='"+(maxCols*2)+"'></td></tr>");
+ flr[0].rp = 0;
+ $(tbl).append(flr);
+ //topinfo
+ flr = $("<tr style='display:none' class='tinfo'><td class='topinfo' colspan='"+(maxCols*2)+"'>"+rp_ge[$t.p.id].topinfo+"</td></tr>");
+ flr[0].rp = 0;
+ $(tbl).append(flr);
+ // set the id.
+ // use carefull only to change here colproperties.
+ // create data
+ var rtlb = $t.p.direction == "rtl" ? true :false,
+ bp = rtlb ? "nData" : "pData",
+ bn = rtlb ? "pData" : "nData";
+ createData(rowid,$t,tbl,maxCols);
+ // buttons at footer
+ var bP = "<a href='javascript:void(0)' id='"+bp+"' class='fm-button ui-state-default ui-corner-left'><span class='ui-icon ui-icon-triangle-1-w'></span></a>",
+ bN = "<a href='javascript:void(0)' id='"+bn+"' class='fm-button ui-state-default ui-corner-right'><span class='ui-icon ui-icon-triangle-1-e'></span></a>",
+ bS ="<a href='javascript:void(0)' id='sData' class='fm-button ui-state-default ui-corner-all'>"+p.bSubmit+"</a>",
+ bC ="<a href='javascript:void(0)' id='cData' class='fm-button ui-state-default ui-corner-all'>"+p.bCancel+"</a>";
+ var bt = "<table border='0' cellspacing='0' cellpadding='0' class='EditTable' id='"+frmtborg+"_2'><tbody><tr><td colspan='2'><hr class='ui-widget-content' style='margin:1px'/></td></tr><tr id='Act_Buttons'><td class='navButton'>"+(rtlb ? bN+bP : bP+bN)+"</td><td class='EditButton'>"+bS+bC+"</td></tr>";
+ bt += "<tr style='display:none' class='binfo'><td class='bottominfo' colspan='2'>"+rp_ge[$t.p.id].bottominfo+"</td></tr>";
+ bt += "</tbody></table>";
+ if(maxRows > 0) {
+ var sd=[];
+ $.each($(tbl)[0].rows,function(i,r){
+ sd[i] = r;
+ });
+ sd.sort(function(a,b){
+ if(a.rp > b.rp) {return 1;}
+ if(a.rp < b.rp) {return -1;}
+ return 0;
+ });
+ $.each(sd, function(index, row) {
+ $('tbody',tbl).append(row);
+ });
+ }
+ p.gbox = "#gbox_"+$.jgrid.jqID(gID);
+ var cle = false;
+ if(p.closeOnEscape===true){
+ p.closeOnEscape = false;
+ cle = true;
+ }
+ var tms = $("<span></span>").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");
+ $(".EditButton",frmtb+"_2").css("text-align","left");
+ }
+ if(rp_ge[$t.p.id].topinfo) {$(".tinfo",frmtb).show();}
+ if(rp_ge[$t.p.id].bottominfo) {$(".binfo",frmtb+"_2").show();}
+ tms = null;bt=null;
+ $("#"+$.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") {
+ $("#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});}
+ 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
+ $("#pData", frmtb+"_2").trigger("click");
+ return false;
+ }
+ if(e.which == rp_ge[$t.p.id].navkeys[2]){ //down
+ $("#nData", frmtb+"_2").trigger("click");
+ return false;
+ }
+ }
+ });
+ if(p.checkOnUpdate) {
+ $("a.ui-jqdialog-titlebar-close span","#"+$.jgrid.jqID(IDs.themodal)).removeClass("jqmClose");
+ $("a.ui-jqdialog-titlebar-close","#"+$.jgrid.jqID(IDs.themodal)).unbind("click")
+ .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;
+ });
+ }
+ p.saveicon = $.extend([true,"left","ui-icon-disk"],p.saveicon);
+ 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')
+ .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')
+ .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);
+ $("#sNew","#"+$.jgrid.jqID(IDs.themodal)).click(function(){
+ postIt();
+ $("#"+frmgr).data("disabled",false);
+ $(".confirm","#"+$.jgrid.jqID(IDs.themodal)).hide();
+ return false;
+ });
+ $("#nNew","#"+$.jgrid.jqID(IDs.themodal)).click(function(){
+ $(".confirm","#"+$.jgrid.jqID(IDs.themodal)).hide();
+ $("#"+frmgr).data("disabled",false);
+ setTimeout(function(){$(":input","#"+frmgr)[0].focus();},0);
+ return false;
+ });
+ $("#cNew","#"+$.jgrid.jqID(IDs.themodal)).click(function(){
+ $(".confirm","#"+$.jgrid.jqID(IDs.themodal)).hide();
+ $("#"+frmgr).data("disabled",false);
+ $.jgrid.hideModal("#"+$.jgrid.jqID(IDs.themodal),{gb:"#gbox_"+$.jgrid.jqID(gID),jqm:p.jqModal,onClose: rp_ge[$t.p.id].onClose});
+ return false;
+ });
+ }
+ // 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();}
+ $($t).triggerHandler("jqGridAddEditBeforeShowForm", [$("#"+frmgr), frmoper]);
+ if(onBeforeShow) { onBeforeShow.call($t, $("#"+frmgr));}
+ $("#"+$.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});
+ if(!closeovrl) {
+ $(".jqmOverlay").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)); }
+ $(".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={};
+ $("#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();}
+ else if(p.checkOnSubmit===true ) {
+ newData = $.extend({},postdata,extpost);
+ diff = compareData(newData,rp_ge[$t.p.id]._savedData);
+ if(diff) {
+ $("#"+frmgr).data("disabled",true);
+ $(".confirm","#"+$.jgrid.jqID(IDs.themodal)).show();
+ } else {
+ postIt();
+ }
+ } else {
+ postIt();
+ }
+ return false;
+ });
+ $("#cData", frmtb+"_2").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;
+ });
+ $("#nData", frmtb+"_2").click(function(){
+ if(!checkUpdates()) {return false;}
+ $("#FormError",frmtb).hide();
+ var npos = getCurrPos();
+ npos[0] = parseInt(npos[0],10);
+ if(npos[0] != -1 && npos[1][npos[0]+1]) {
+ $($t).triggerHandler("jqGridAddEditClickPgButtons", ['next',$("#"+frmgr),npos[1][npos[0]]]);
+ var nposret = true;
+ if($.isFunction(p.onclickPgButtons)) {
+ nposret = p.onclickPgButtons.call($t, 'next',$("#"+frmgr),npos[1][npos[0]]);
+ if( nposret !== undefined && nposret === false ) {return false;}
+ }
+ if( $("#"+$.jgrid.jqID(npos[1][npos[0]+1])).hasClass('ui-state-disabled')) {return false;}
+ fillData(npos[1][npos[0]+1],$t,frmgr);
+ $($t).jqGrid("setSelection",npos[1][npos[0]+1]);
+ $($t).triggerHandler("jqGridAddEditAfterClickPgButtons", ['next',$("#"+frmgr),npos[1][npos[0]]]);
+ if($.isFunction(p.afterclickPgButtons)) {
+ p.afterclickPgButtons.call($t, 'next',$("#"+frmgr),npos[1][npos[0]+1]);
+ }
+ updateNav(npos[0]+1,npos[1].length-1);
+ }
+ return false;
+ });
+ $("#pData", frmtb+"_2").click(function(){
+ if(!checkUpdates()) {return false;}
+ $("#FormError",frmtb).hide();
+ var ppos = getCurrPos();
+ if(ppos[0] != -1 && ppos[1][ppos[0]-1]) {
+ $($t).triggerHandler("jqGridAddEditClickPgButtons", ['prev',$("#"+frmgr),ppos[1][ppos[0]]]);
+ var pposret = true;
+ if($.isFunction(p.onclickPgButtons)) {
+ pposret = p.onclickPgButtons.call($t, 'prev',$("#"+frmgr),ppos[1][ppos[0]]);
+ if( pposret !== undefined && pposret === false ) {return false;}
+ }
+ if( $("#"+$.jgrid.jqID(ppos[1][ppos[0]-1])).hasClass('ui-state-disabled')) {return false;}
+ fillData(ppos[1][ppos[0]-1],$t,frmgr);
+ $($t).jqGrid("setSelection",ppos[1][ppos[0]-1]);
+ $($t).triggerHandler("jqGridAddEditAfterClickPgButtons", ['prev',$("#"+frmgr),ppos[1][ppos[0]]]);
+ if($.isFunction(p.afterclickPgButtons)) {
+ p.afterclickPgButtons.call($t, 'prev',$("#"+frmgr),ppos[1][ppos[0]-1]);
+ }
+ updateNav(ppos[0]-1,ppos[1].length-1);
+ }
+ return false;
+ });
+ }
+ var posInit =getCurrPos();
+ updateNav(posInit[0],posInit[1].length-1);
+
+ });
+ },
+ viewGridRow : function(rowid, p){
+ p = $.extend({
+ top : 0,
+ left: 0,
+ width: 0,
+ height: 'auto',
+ dataheight: 'auto',
+ modal: false,
+ overlay: 30,
+ drag: true,
+ resize: true,
+ jqModal: true,
+ closeOnEscape : false,
+ labelswidth: '30%',
+ closeicon: [],
+ navkeys: [false,38,40],
+ onClose: null,
+ beforeShowForm : null,
+ beforeInitData : null,
+ viewPagerButtons : true
+ }, $.jgrid.view, p || {});
+ rp_ge[$(this)[0].p.id] = p;
+ return this.each(function(){
+ var $t = this;
+ if (!$t.grid || !rowid) {return;}
+ var gID = $t.p.id,
+ frmgr = "ViewGrid_"+$.jgrid.jqID( gID ), frmtb = "ViewTbl_" + $.jgrid.jqID( gID ),
+ frmgr_id = "ViewGrid_"+gID, frmtb_id = "ViewTbl_"+gID,
+ IDs = {themodal:'viewmod'+gID,modalhead:'viewhd'+gID,modalcontent:'viewcnt'+gID, scrollelm : frmgr},
+ onBeforeInit = $.isFunction(rp_ge[$t.p.id].beforeInitData) ? rp_ge[$t.p.id].beforeInitData : false,
+ showFrm = true,
+ maxCols = 1, maxRows=0;
+ 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,
+ 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;
+ }
+ // find max number align rigth with property formatter
+ $(obj.p.colModel).each( function() {
+ if(this.editrules && this.editrules.edithidden === true) {
+ hc = false;
+ } else {
+ hc = this.hidden === true ? true : false;
+ }
+ if(!hc && this.align==='right') {
+ if(this.formatter && $.inArray(this.formatter,fmtnum) !== -1 ) {
+ max1 = Math.max(max1,parseInt(this.width,10));
+ } else {
+ max2 = Math.max(max2,parseInt(this.width,10));
+ }
+ }
+ });
+ maxw = max1 !==0 ? max1 : max2 !==0 ? max2 : 0;
+ ind = $(obj).jqGrid("getInd",rowid);
+ $(obj.p.colModel).each( function(i) {
+ nm = this.name;
+ setme = false;
+ // hidden fields are included in the form
+ if(this.editrules && this.editrules.edithidden === true) {
+ hc = false;
+ } else {
+ hc = this.hidden === true ? true : false;
+ }
+ dc = hc ? "style='display:none'" : "";
+ 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) {
+ tmp = $("td:eq("+i+")",obj.rows[ind]).text();
+ } else {
+ tmp = $("td:eq("+i+")",obj.rows[ind]).html();
+ }
+ }
+ setme = this.align === 'right' && maxw !==0 ? true : false;
+ var frmopt = $.extend({},{rowabove:false,rowcontent:''}, this.formoptions || {}),
+ rp = parseInt(frmopt.rowpos,10) || cnt+1,
+ cp = parseInt((parseInt(frmopt.colpos,10) || 1)*2,10);
+ if(frmopt.rowabove) {
+ var newdata = $("<tr><td class='contentinfo' colspan='"+(maxcols*2)+"'>"+frmopt.rowcontent+"</td></tr>");
+ $(tb).append(newdata);
+ newdata[0].rp = rp;
+ }
+ trdata = $(tb).find("tr[rowpos="+rp+"]");
+ if ( trdata.length===0 ) {
+ trdata = $("<tr "+dc+" rowpos='"+rp+"'></tr>").addClass("FormData").attr("id","trv_"+nm);
+ $(trdata).append(tmpl);
+ $(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-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"});
+ }
+ retpos[cnt] = i;
+ cnt++;
+ }
+ });
+ if( cnt > 0) {
+ var idrow = $("<tr class='FormData' style='display:none'><td class='CaptionTD'></td><td colspan='"+ (maxcols*2-1)+"' class='DataTD'><input class='FormElement' id='id_g' type='text' name='id' value='"+rowid+"'/></td></tr>");
+ idrow[0].rp = cnt+99;
+ $(tb).append(idrow);
+ }
+ return retpos;
+ }
+ function fillData(rowid,obj){
+ var nm, hc,cnt=0,tmp, opt,trv;
+ trv = $(obj).jqGrid("getInd",rowid,true);
+ if(!trv) {return;}
+ $('td',trv).each( function(i) {
+ nm = obj.p.colModel[i].name;
+ // hidden fields are included in the form
+ if(obj.p.colModel[i].editrules && obj.p.colModel[i].editrules.edithidden === true) {
+ hc = false;
+ } else {
+ 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) {
+ 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();}
+ cnt++;
+ }
+ });
+ 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 getCurrPos() {
+ var rowsInGrid = $($t).jqGrid("getDataIDs"),
+ selrow = $("#id_g","#"+frmtb).val(),
+ pos = $.inArray(selrow,rowsInGrid);
+ return [pos,rowsInGrid];
+ }
+
+ if ( $("#"+$.jgrid.jqID(IDs.themodal))[0] !== undefined ) {
+ if(onBeforeInit) {
+ showFrm = onBeforeInit.call($t,$("#"+frmgr));
+ if(typeof(showFrm) == "undefined") {
+ showFrm = true;
+ }
+ }
+ if(showFrm === false) {return;}
+ $(".ui-jqdialog-title","#"+$.jgrid.jqID(IDs.modalhead)).html(p.caption);
+ $("#FormError","#"+frmtb).hide();
+ fillData(rowid,$t);
+ if($.isFunction(rp_ge[$t.p.id].beforeShowForm)) {rp_ge[$t.p.id].beforeShowForm.call($t,$("#"+frmgr));}
+ $.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>"),
+ 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") {
+ showFrm = true;
+ }
+ }
+ if(showFrm === false) {return;}
+ $($t.p.colModel).each( function() {
+ var fmto = this.formoptions;
+ maxCols = Math.max(maxCols, fmto ? fmto.colpos || 0 : 0 );
+ maxRows = Math.max(maxRows, fmto ? fmto.rowpos || 0 : 0 );
+ });
+ // set the id.
+ $(frm).append(tbl);
+ createData(rowid, $t, tbl, maxCols);
+ var rtlb = $t.p.direction == "rtl" ? true :false,
+ bp = rtlb ? "nData" : "pData",
+ bn = rtlb ? "pData" : "nData",
+
+ // buttons at footer
+ bP = "<a href='javascript:void(0)' id='"+bp+"' class='fm-button ui-state-default ui-corner-left'><span class='ui-icon ui-icon-triangle-1-w'></span></a>",
+ bN = "<a href='javascript:void(0)' id='"+bn+"' class='fm-button ui-state-default ui-corner-right'><span class='ui-icon ui-icon-triangle-1-e'></span></a>",
+ bC ="<a href='javascript:void(0)' id='cData' class='fm-button ui-state-default ui-corner-all'>"+p.bClose+"</a>";
+ if(maxRows > 0) {
+ var sd=[];
+ $.each($(tbl)[0].rows,function(i,r){
+ sd[i] = r;
+ });
+ sd.sort(function(a,b){
+ if(a.rp > b.rp) {return 1;}
+ if(a.rp < b.rp) {return -1;}
+ return 0;
+ });
+ $.each(sd, function(index, row) {
+ $('tbody',tbl).append(row);
+ });
+ }
+ 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>");
+ $.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");
+ $(".EditButton","#"+frmtb+"_2").css("text-align","left");
+ }
+ if(!p.viewPagerButtons) {$("#pData, #nData","#"+frmtb+"_2").hide();}
+ 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});}
+ return false;
+ }
+ if(p.navkeys[0]===true) {
+ if(e.which === p.navkeys[1]){ //up
+ $("#pData", "#"+frmtb+"_2").trigger("click");
+ return false;
+ }
+ if(e.which === p.navkeys[2]){ //down
+ $("#nData", "#"+frmtb+"_2").trigger("click");
+ return false;
+ }
+ }
+ });
+ 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')
+ .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});
+ $(".fm-button:not(.ui-state-disabled)","#"+frmtb+"_2").hover(
+ function(){$(this).addClass('ui-state-hover');},
+ function(){$(this).removeClass('ui-state-hover');}
+ );
+ focusaref();
+ $("#cData", "#"+frmtb+"_2").click(function(){
+ $.jgrid.hideModal("#"+$.jgrid.jqID(IDs.themodal),{gb:"#gbox_"+$.jgrid.jqID(gID),jqm:p.jqModal, onClose: p.onClose});
+ return false;
+ });
+ $("#nData", "#"+frmtb+"_2").click(function(){
+ $("#FormError","#"+frmtb).hide();
+ var npos = getCurrPos();
+ npos[0] = parseInt(npos[0],10);
+ if(npos[0] != -1 && npos[1][npos[0]+1]) {
+ if($.isFunction(p.onclickPgButtons)) {
+ p.onclickPgButtons.call($t,'next',$("#"+frmgr),npos[1][npos[0]]);
+ }
+ fillData(npos[1][npos[0]+1],$t);
+ $($t).jqGrid("setSelection",npos[1][npos[0]+1]);
+ if($.isFunction(p.afterclickPgButtons)) {
+ p.afterclickPgButtons.call($t,'next',$("#"+frmgr),npos[1][npos[0]+1]);
+ }
+ updateNav(npos[0]+1,npos[1].length-1);
+ }
+ focusaref();
+ return false;
+ });
+ $("#pData", "#"+frmtb+"_2").click(function(){
+ $("#FormError","#"+frmtb).hide();
+ var ppos = getCurrPos();
+ if(ppos[0] != -1 && ppos[1][ppos[0]-1]) {
+ if($.isFunction(p.onclickPgButtons)) {
+ p.onclickPgButtons.call($t,'prev',$("#"+frmgr),ppos[1][ppos[0]]);
+ }
+ fillData(ppos[1][ppos[0]-1],$t);
+ $($t).jqGrid("setSelection",ppos[1][ppos[0]-1]);
+ if($.isFunction(p.afterclickPgButtons)) {
+ p.afterclickPgButtons.call($t,'prev',$("#"+frmgr),ppos[1][ppos[0]-1]);
+ }
+ updateNav(ppos[0]-1,ppos[1].length-1);
+ }
+ focusaref();
+ return false;
+ });
+ }
+ var posInit =getCurrPos();
+ updateNav(posInit[0],posInit[1].length-1);
+ });
+ },
+ delGridRow : function(rowids,p) {
+ p = $.extend({
+ top : 0,
+ left: 0,
+ width: 240,
+ height: 'auto',
+ dataheight : 'auto',
+ modal: false,
+ overlay: 30,
+ drag: true,
+ resize: true,
+ url : '',
+ mtype : "POST",
+ reloadAfterSubmit: true,
+ beforeShowForm: null,
+ beforeInitData : null,
+ afterShowForm: null,
+ beforeSubmit: null,
+ onclickSubmit: null,
+ afterSubmit: null,
+ jqModal : true,
+ closeOnEscape : false,
+ delData: {},
+ delicon : [],
+ cancelicon : [],
+ onClose : null,
+ ajaxDelOptions : {},
+ processing : false,
+ serializeDelData : null,
+ useDataProxy : false
+ }, $.jgrid.del, p ||{});
+ rp_ge[$(this)[0].p.id] = p;
+ return this.each(function(){
+ var $t = this;
+ if (!$t.grid ) {return;}
+ if(!rowids) {return;}
+ var onBeforeShow = $.isFunction( rp_ge[$t.p.id].beforeShowForm ),
+ onAfterShow = $.isFunction( rp_ge[$t.p.id].afterShowForm ),
+ onBeforeInit = $.isFunction(rp_ge[$t.p.id].beforeInitData) ? rp_ge[$t.p.id].beforeInitData : false,
+ gID = $t.p.id, onCS = {},
+ showFrm = true,
+ 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 ( $("#"+$.jgrid.jqID(IDs.themodal))[0] !== undefined ) {
+ if(onBeforeInit) {
+ showFrm = onBeforeInit.call($t,$("#"+dtbl));
+ if(typeof(showFrm) == "undefined") {
+ showFrm = true;
+ }
+ }
+ if(showFrm === false) {return;}
+ $("#DelData>td","#"+dtbl).text(rowids);
+ $("#DelError","#"+dtbl).hide();
+ if( rp_ge[$t.p.id].processing === true) {
+ rp_ge[$t.p.id].processing=false;
+ $("#dData", "#"+dtbl).removeClass('ui-state-active');
+ }
+ if(onBeforeShow) {rp_ge[$t.p.id].beforeShowForm.call($t,$("#"+dtbl));}
+ $.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+";'>";
+ tbl += "<table class='DelTable'><tbody>";
+ // error data
+ tbl += "<tr id='DelError' style='display:none'><td class='ui-state-error'></td></tr>";
+ tbl += "<tr id='DelData' style='display:none'><td >"+rowids+"</td></tr>";
+ tbl += "<tr><td class=\"delmsg\" style=\"white-space:pre;\">"+rp_ge[$t.p.id].msg+"</td></tr><tr><td > </td></tr>";
+ // buttons at footer
+ tbl += "</tbody></table></div>";
+ var bS = "<a href='javascript:void(0)' id='dData' class='fm-button ui-state-default ui-corner-all'>"+p.bSubmit+"</a>",
+ bC = "<a href='javascript:void(0)' id='eData' class='fm-button ui-state-default ui-corner-all'>"+p.bCancel+"</a>";
+ tbl += "<table cellspacing='0' cellpadding='0' border='0' class='EditTable' id='"+dtbl+"_2'><tbody><tr><td><hr class='ui-widget-content' style='margin:1px'/></td></tr><tr><td class='DelButton EditButton'>"+bS+" "+bC+"</td></tr></tbody></table>";
+ p.gbox = "#gbox_"+$.jgrid.jqID(gID);
+ $.jgrid.createModal(IDs,tbl,p,"#gview_"+$.jgrid.jqID($t.p.id),$("#gview_"+$.jgrid.jqID($t.p.id))[0]);
+
+ if(onBeforeInit) {
+ showFrm = onBeforeInit.call($t,$("#"+dtbl));
+ if(typeof(showFrm) == "undefined") {
+ showFrm = true;
+ }
+ }
+ if(showFrm === false) {return;}
+
+ $(".fm-button","#"+dtbl+"_2").hover(
+ function(){$(this).addClass('ui-state-hover');},
+ function(){$(this).removeClass('ui-state-hover');}
+ );
+ 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')
+ .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')
+ .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,...
+ 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) {
+ rp_ge[$t.p.id].processing = true;
+ opers = $t.p.prmNames;
+ postd = $.extend({},rp_ge[$t.p.id].delData, onCS);
+ oper = opers.oper;
+ postd[oper] = opers.deloper;
+ idname = opers.id;
+ postdata = String(postdata).split(",");
+ if(!postdata.length) { return false; }
+ for( var pk in postdata) {
+ if(postdata.hasOwnProperty(pk)) {
+ postdata[pk] = $.jgrid.stripPref($t.p.idPrefix, postdata[pk]);
+ }
+ }
+ 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'),
+ 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") {
+ 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;
+ }
+ } else {
+ // data is posted successful
+ // execute aftersubmit with the returned data from server
+ if( $.isFunction( rp_ge[$t.p.id].afterSubmit ) ) {
+ ret = rp_ge[$t.p.id].afterSubmit.call($t,data,postd);
+ }
+ }
+ if(ret[0] === false) {
+ $("#DelError>td","#"+dtbl).html(ret[1]);
+ $("#DelError","#"+dtbl).show();
+ } else {
+ 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++) {
+ $($t).jqGrid("delRowData",$t.p.idPrefix+ postdata[i]);
+ }
+ }
+ $t.p.selrow = null;
+ $t.p.selarrrow = [];
+ }
+ if($.isFunction(rp_ge[$t.p.id].afterComplete)) {
+ setTimeout(function(){rp_ge[$t.p.id].afterComplete.call($t,data,postdata);},500);
+ }
+ }
+ rp_ge[$t.p.id].processing=false;
+ $("#dData", "#"+dtbl+"_2").removeClass('ui-state-active');
+ if(ret[0]) {$.jgrid.hideModal("#"+$.jgrid.jqID(IDs.themodal),{gb:"#gbox_"+$.jgrid.jqID(gID),jqm:p.jqModal, onClose: rp_ge[$t.p.id].onClose});}
+ }
+ }, $.jgrid.ajaxOptions, rp_ge[$t.p.id].ajaxDelOptions);
+
+
+ if (!ajaxOptions.url && !rp_ge[$t.p.id].useDataProxy) {
+ if ($.isFunction($t.p.dataProxy)) {
+ rp_ge[$t.p.id].useDataProxy = true;
+ } else {
+ ret[0]=false;ret[1] += " "+$.jgrid.errors.nourl;
+ }
+ }
+ 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") {
+ dpret = [true, ""];
+ }
+ if(dpret[0] === false ) {
+ ret[0] = false;
+ ret[1] = dpret[1] || "Error deleting the selected row!" ;
+ } else {
+ $.jgrid.hideModal("#"+$.jgrid.jqID(IDs.themodal),{gb:"#gbox_"+$.jgrid.jqID(gID),jqm:p.jqModal, onClose: rp_ge[$t.p.id].onClose});
+ }
+ }
+ else {$.ajax(ajaxOptions);}
+ }
+ }
+
+ if(ret[0] === false) {
+ $("#DelError>td","#"+dtbl).html(ret[1]);
+ $("#DelError","#"+dtbl).show();
+ }
+ return false;
+ });
+ $("#eData", "#"+dtbl+"_2").click(function(){
+ $.jgrid.hideModal("#"+$.jgrid.jqID(IDs.themodal),{gb:"#gbox_"+$.jgrid.jqID(gID),jqm:rp_ge[$t.p.id].jqModal, onClose: rp_ge[$t.p.id].onClose});
+ return false;
+ });
+ if(onBeforeShow) {rp_ge[$t.p.id].beforeShowForm.call($t,$("#"+dtbl));}
+ $.jgrid.viewModal("#"+$.jgrid.jqID(IDs.themodal),{gbox:"#gbox_"+$.jgrid.jqID(gID),jqm:rp_ge[$t.p.id].jqModal, 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));}
+ }
+ if(rp_ge[$t.p.id].closeOnEscape===true) {
+ setTimeout(function(){$(".ui-jqdialog-titlebar-close","#"+$.jgrid.jqID(IDs.modalhead)).focus();},0);
+ }
+ });
+ },
+ navGrid : function (elem, o, pEdit,pAdd,pDel,pSearch, pView) {
+ o = $.extend({
+ edit: true,
+ editicon: "ui-icon-pencil",
+ add: true,
+ addicon:"ui-icon-plus",
+ del: true,
+ delicon:"ui-icon-trash",
+ search: true,
+ searchicon:"ui-icon-search",
+ refresh: true,
+ refreshicon:"ui-icon-refresh",
+ refreshstate: 'firstpage',
+ view: false,
+ viewicon : "ui-icon-document",
+ position : "left",
+ closeOnEscape : true,
+ beforeRefresh : null,
+ afterRefresh : null,
+ cloneToTop : false,
+ alertwidth : 200,
+ alertheight : 'auto',
+ alerttop: null,
+ alertleft: null,
+ alertzIndex : null
+ }, $.jgrid.nav, o ||{});
+ return this.each(function() {
+ if(this.nav) {return;}
+ var alertIDs = {themodal:'alertmod',modalhead:'alerthd',modalcontent:'alertcnt'},
+ $t = this, twd, tdw;
+ if(!$t.grid || typeof elem != 'string') {return;}
+ if ($("#"+alertIDs.themodal)[0] === undefined) {
+ if(!o.alerttop && !o.alertleft) {
+ if (typeof 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) {
+ o.alertleft = document.documentElement.clientWidth;
+ o.alerttop = document.documentElement.clientHeight;
+ } else {
+ o.alertleft=1024;
+ o.alerttop=768;
+ }
+ 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);
+ }
+ var clone = 1;
+ if(o.cloneToTop && $t.p.toppager) {clone = 2;}
+ for(var 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>",
+ pgid, elemids;
+ if(i===0) {
+ pgid = elem;
+ elemids = $t.p.id;
+ if(pgid == $t.p.toppager) {
+ elemids += "_top";
+ clone = 1;
+ }
+ } else {
+ pgid = $t.p.toppager;
+ elemids = $t.p.id+"_top";
+ }
+ 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>");
+ $(tbd).append("<div class='ui-pg-div'><span class='ui-icon "+o.addicon+"'></span>"+o.addtext+"</div>");
+ $("tr",navtbl).append(tbd);
+ $(tbd,navtbl)
+ .attr({"title":o.addtitle || "",id : pAdd.id || "add_"+elemids})
+ .click(function(){
+ if (!$(this).hasClass('ui-state-disabled')) {
+ if ($.isFunction( o.addfunc )) {
+ o.addfunc.call($t);
+ } else {
+ $($t).jqGrid("editGridRow","new",pAdd);
+ }
+ }
+ return false;
+ }).hover(
+ function () {
+ if (!$(this).hasClass('ui-state-disabled')) {
+ $(this).addClass("ui-state-hover");
+ }
+ },
+ function () {$(this).removeClass("ui-state-hover");}
+ );
+ tbd = null;
+ }
+ if (o.edit) {
+ tbd = $("<td class='ui-pg-button ui-corner-all'></td>");
+ pEdit = pEdit || {};
+ $(tbd).append("<div class='ui-pg-div'><span class='ui-icon "+o.editicon+"'></span>"+o.edittext+"</div>");
+ $("tr",navtbl).append(tbd);
+ $(tbd,navtbl)
+ .attr({"title":o.edittitle || "",id: pEdit.id || "edit_"+elemids})
+ .click(function(){
+ if (!$(this).hasClass('ui-state-disabled')) {
+ var sr = $t.p.selrow;
+ if (sr) {
+ if($.isFunction( o.editfunc ) ) {
+ o.editfunc.call($t, sr);
+ } else {
+ $($t).jqGrid("editGridRow",sr,pEdit);
+ }
+ } else {
+ $.jgrid.viewModal("#"+alertIDs.themodal,{gbox:"#gbox_"+$.jgrid.jqID($t.p.id),jqm:true});
+ $("#jqg_alrt").focus();
+ }
+ }
+ return false;
+ }).hover(
+ function () {
+ if (!$(this).hasClass('ui-state-disabled')) {
+ $(this).addClass("ui-state-hover");
+ }
+ },
+ function () {$(this).removeClass("ui-state-hover");}
+ );
+ tbd = null;
+ }
+ if (o.view) {
+ tbd = $("<td class='ui-pg-button ui-corner-all'></td>");
+ pView = pView || {};
+ $(tbd).append("<div class='ui-pg-div'><span class='ui-icon "+o.viewicon+"'></span>"+o.viewtext+"</div>");
+ $("tr",navtbl).append(tbd);
+ $(tbd,navtbl)
+ .attr({"title":o.viewtitle || "",id: pView.id || "view_"+elemids})
+ .click(function(){
+ if (!$(this).hasClass('ui-state-disabled')) {
+ var sr = $t.p.selrow;
+ if (sr) {
+ if($.isFunction( o.viewfunc ) ) {
+ o.viewfunc.call($t, sr);
+ } else {
+ $($t).jqGrid("viewGridRow",sr,pView);
+ }
+ } else {
+ $.jgrid.viewModal("#"+alertIDs.themodal,{gbox:"#gbox_"+$.jgrid.jqID($t.p.id),jqm:true});
+ $("#jqg_alrt").focus();
+ }
+ }
+ return false;
+ }).hover(
+ function () {
+ if (!$(this).hasClass('ui-state-disabled')) {
+ $(this).addClass("ui-state-hover");
+ }
+ },
+ function () {$(this).removeClass("ui-state-hover");}
+ );
+ tbd = null;
+ }
+ if (o.del) {
+ tbd = $("<td class='ui-pg-button ui-corner-all'></td>");
+ pDel = pDel || {};
+ $(tbd).append("<div class='ui-pg-div'><span class='ui-icon "+o.delicon+"'></span>"+o.deltext+"</div>");
+ $("tr",navtbl).append(tbd);
+ $(tbd,navtbl)
+ .attr({"title":o.deltitle || "",id: pDel.id || "del_"+elemids})
+ .click(function(){
+ if (!$(this).hasClass('ui-state-disabled')) {
+ var dr;
+ if($t.p.multiselect) {
+ dr = $t.p.selarrrow;
+ if(dr.length===0) {dr = null;}
+ } else {
+ dr = $t.p.selrow;
+ }
+ if(dr){
+ if($.isFunction( o.delfunc )){
+ o.delfunc.call($t, dr);
+ }else{
+ $($t).jqGrid("delGridRow",dr,pDel);
+ }
+ } else {
+ $.jgrid.viewModal("#"+alertIDs.themodal,{gbox:"#gbox_"+$.jgrid.jqID($t.p.id),jqm:true});$("#jqg_alrt").focus();
+ }
+ }
+ return false;
+ }).hover(
+ function () {
+ if (!$(this).hasClass('ui-state-disabled')) {
+ $(this).addClass("ui-state-hover");
+ }
+ },
+ function () {$(this).removeClass("ui-state-hover");}
+ );
+ tbd = null;
+ }
+ if(o.add || o.edit || o.del || o.view) {$("tr",navtbl).append(sep);}
+ if (o.search) {
+ tbd = $("<td class='ui-pg-button ui-corner-all'></td>");
+ pSearch = pSearch || {};
+ $(tbd).append("<div class='ui-pg-div'><span class='ui-icon "+o.searchicon+"'></span>"+o.searchtext+"</div>");
+ $("tr",navtbl).append(tbd);
+ $(tbd,navtbl)
+ .attr({"title":o.searchtitle || "",id:pSearch.id || "search_"+elemids})
+ .click(function(){
+ if (!$(this).hasClass('ui-state-disabled')) {
+ if($.isFunction( o.searchfunc )) {
+ o.searchfunc.call($t, pSearch);
+ } else {
+ $($t).jqGrid("searchGrid",pSearch);
+ }
+ }
+ return false;
+ }).hover(
+ function () {
+ if (!$(this).hasClass('ui-state-disabled')) {
+ $(this).addClass("ui-state-hover");
+ }
+ },
+ function () {$(this).removeClass("ui-state-hover");}
+ );
+ if (pSearch.showOnLoad && pSearch.showOnLoad === true) {
+ $(tbd,navtbl).click();
+ }
+ tbd = null;
+ }
+ if (o.refresh) {
+ tbd = $("<td class='ui-pg-button ui-corner-all'></td>");
+ $(tbd).append("<div class='ui-pg-div'><span class='ui-icon "+o.refreshicon+"'></span>"+o.refreshtext+"</div>");
+ $("tr",navtbl).append(tbd);
+ $(tbd,navtbl)
+ .attr({"title":o.refreshtitle || "",id: "refresh_"+elemids})
+ .click(function(){
+ if (!$(this).hasClass('ui-state-disabled')) {
+ if($.isFunction(o.beforeRefresh)) {o.beforeRefresh.call($t);}
+ $t.p.search = false;
+ try {
+ var gID = $t.p.id;
+ $t.p.postData.filters ="";
+ $("#fbox_"+$.jgrid.jqID(gID)).jqFilter('resetFilter');
+ if($.isFunction($t.clearToolbar)) {$t.clearToolbar.call($t,false);}
+ } catch (e) {}
+ switch (o.refreshstate) {
+ case 'firstpage':
+ $($t).trigger("reloadGrid", [{page:1}]);
+ break;
+ case 'current':
+ $($t).trigger("reloadGrid", [{current:true}]);
+ break;
+ }
+ 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");}
+ );
+ tbd = null;
+ }
+ tdw = $(".ui-jqgrid").css("font-size") || "11px";
+ $('body').append("<div id='testpg2' class='ui-jqgrid ui-widget ui-widget-content' style='font-size:"+tdw+";visibility:hidden;' ></div>");
+ twd = $(navtbl).clone().appendTo("#testpg2").width();
+ $("#testpg2").remove();
+ $(pgid+"_"+o.position,pgid).append(navtbl);
+ if($t.p._nvtd) {
+ if(twd > $t.p._nvtd[0] ) {
+ $(pgid+"_"+o.position,pgid).width(twd);
+ $t.p._nvtd[0] = twd;
+ }
+ $t.p._nvtd[1] = twd;
+ }
+ tdw =null;twd=null;navtbl =null;
+ this.nav = true;
+ }
+ });
+ },
+ navButtonAdd : function (elem, p) {
+ p = $.extend({
+ caption : "newButton",
+ title: '',
+ buttonicon : 'ui-icon-newwin',
+ onClickButton: null,
+ position : "last",
+ cursor : 'pointer'
+ }, p ||{});
+ return this.each(function() {
+ if( !this.grid) {return;}
+ if( typeof elem === "string" && elem.indexOf("#") !== 0) {elem = "#"+$.jgrid.jqID(elem);}
+ var findnav = $(".navtable",elem)[0], $t = this;
+ if (findnav) {
+ if( p.id && $("#"+$.jgrid.jqID(p.id), findnav)[0] !== undefined ) {return;}
+ var tbd = $("<td></td>");
+ 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(findnav.rows[0].cells.length ===0 ) {
+ $("tr",findnav).append(tbd);
+ } else {
+ $("tr td:eq(0)",findnav).before(tbd);
+ }
+ } else {
+ $("tr",findnav).append(tbd);
+ }
+ $(tbd,findnav)
+ .attr("title",p.title || "")
+ .click(function(e){
+ if (!$(this).hasClass('ui-state-disabled')) {
+ if ($.isFunction(p.onClickButton) ) {p.onClickButton.call($t,e);}
+ }
+ return false;
+ })
+ .hover(
+ function () {
+ if (!$(this).hasClass('ui-state-disabled')) {
+ $(this).addClass('ui-state-hover');
+ }
+ },
+ function () {$(this).removeClass("ui-state-hover");}
+ );
+ }
+ });
+ },
+ navSeparatorAdd:function (elem,p) {
+ p = $.extend({
+ sepclass : "ui-separator",
+ sepcontent: ''
+ }, p ||{});
+ return this.each(function() {
+ if( !this.grid) {return;}
+ if( typeof elem === "string" && elem.indexOf("#") !== 0) {elem = "#"+$.jgrid.jqID(elem);}
+ 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);
+ }
+ });
+ },
+ GridToForm : function( rowid, formid ) {
+ return this.each(function(){
+ var $t = this;
+ if (!$t.grid) {return;}
+ var rowdata = $($t).jqGrid("getRowData",rowid);
+ if (rowdata) {
+ for(var i in rowdata) {
+ 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] ) {
+ $(this)[$t.p.useProp ? 'prop': 'attr']("checked",true);
+ } else {
+ $(this)[$t.p.useProp ? 'prop': 'attr']("checked", false);
+ }
+ });
+ } else {
+ // this is very slow on big table and form.
+ $("[name="+$.jgrid.jqID(i)+"]",formid).val(rowdata[i]);
+ }
+ }
+ }
+ });
+ },
+ FormToGrid : function(rowid, formid, mode, position){
+ return this.each(function() {
+ var $t = this;
+ if(!$t.grid) {return;}
+ if(!mode) {mode = 'set';}
+ if(!position) {position = 'first';}
+ var fields = $(formid).serializeArray();
+ var griddata = {};
+ $.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);}
+ });
+ }
+});
+})(jQuery);
+;(function($){
+/**
+ * jqGrid extension for manipulating Grid Data
+ * 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-2.0.html
+**/
+//jsHint options
+/*global alert, $, jQuery */
+"use strict";
+$.jgrid.inlineEdit = $.jgrid.inlineEdit || {};
+$.jgrid.extend({
+//Editing
+ editRow : function(rowid,keys,oneditfunc,successfunc, url, extraparam, aftersavefunc,errorfunc, afterrestorefunc) {
+ // Compatible mode old versions
+ var o={}, args = $.makeArray(arguments).slice(1);
+
+ if( $.type(args[0]) === "object" ) {
+ o = args[0];
+ } else {
+ if (typeof 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 ($.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"; }
+ }
+ o = $.extend(true, {
+ keys : false,
+ oneditfunc: null,
+ successfunc: null,
+ url: null,
+ extraparam: {},
+ aftersavefunc: null,
+ errorfunc: null,
+ afterrestorefunc: null,
+ restoreAfterError: true,
+ mtype: "POST"
+ }, $.jgrid.inlineEdit, o );
+
+ // End compatible
+ return this.each(function(){
+ var $t = this, nm, tmp, editable, cnt=0, focus=null, svr={}, ind,cm;
+ if (!$t.grid ) { return; }
+ ind = $($t).jqGrid("getInd",rowid,true);
+ if( ind === false ) {return;}
+ editable = $(ind).attr("editable") || "0";
+ 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;
+ 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();
+ }
+ }
+ if ( nm != 'cb' && nm != 'subgrid' && nm != 'rn') {
+ if($t.p.autoencode) { tmp = $.jgrid.htmlDecode(tmp); }
+ svr[nm]=tmp;
+ if(cm[i].editable===true) {
+ if(focus===null) { focus = i; }
+ if (treeg) { $("span:first",this).html(""); }
+ 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='';}
+ 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); }
+ //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) {
+ $(elc).width($(elc).width());
+ }
+ cnt++;
+ }
+ }
+ });
+ if(cnt > 0) {
+ svr.id = rowid; $t.p.savedRow.push(svr);
+ $(ind).attr("editable","1");
+ $("td:eq("+focus+") input",ind).focus();
+ if(o.keys===true) {
+ $(ind).bind("keydown",function(e) {
+ if (e.keyCode === 27) {
+ $($t).jqGrid("restoreRow",rowid, o.afterrestorefunc);
+ if($t.p._inlinenav) {
+ try {
+ $($t).jqGrid('showAddEditButtons');
+ } catch (eer1) {}
+ }
+ return false;
+ }
+ if (e.keyCode === 13) {
+ var ta = e.target;
+ if(ta.tagName == 'TEXTAREA') { return true; }
+ if( $($t).jqGrid("saveRow", rowid, o ) ) {
+ if($t.p._inlinenav) {
+ try {
+ $($t).jqGrid('showAddEditButtons');
+ } catch (eer2) {}
+ }
+ }
+ return false;
+ }
+ });
+ }
+ $($t).triggerHandler("jqGridInlineEditRow", [rowid, o]);
+ if( $.isFunction(o.oneditfunc)) { o.oneditfunc.call($t, rowid); }
+ }
+ }
+ });
+ },
+ saveRow : function(rowid, successfunc, url, extraparam, aftersavefunc,errorfunc, afterrestorefunc) {
+ // Compatible mode old versions
+ var args = $.makeArray(arguments).slice(1), o = {};
+
+ if( $.type(args[0]) === "object" ) {
+ 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 ($.isFunction(aftersavefunc)) { o.aftersavefunc = aftersavefunc; }
+ if ($.isFunction(errorfunc)) { o.errorfunc = errorfunc; }
+ if ($.isFunction(afterrestorefunc)) { o.afterrestorefunc = afterrestorefunc; }
+ }
+ o = $.extend(true, {
+ successfunc: null,
+ url: null,
+ extraparam: {},
+ aftersavefunc: null,
+ errorfunc: null,
+ afterrestorefunc: null,
+ restoreAfterError: true,
+ mtype: "POST"
+ }, $.jgrid.inlineEdit, o );
+ // End compatible
+
+ var success = false;
+ var $t = this[0], nm, tmp={}, tmp2={}, tmp3= {}, editable, fr, cv, ind;
+ if (!$t.grid ) { return success; }
+ ind = $($t).jqGrid("getInd",rowid,true);
+ if(ind === false) {return success;}
+ editable = $(ind).attr("editable");
+ o.url = 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')) {
+ switch (cm.edittype) {
+ case "checkbox":
+ var cbv = ["Yes","No"];
+ if(cm.editoptions ) {
+ cbv = cm.editoptions.value.split(":");
+ }
+ tmp[nm]= $("input",this).is(":checked") ? cbv[0] : cbv[1];
+ break;
+ case 'text':
+ case 'password':
+ case 'textarea':
+ case "button" :
+ tmp[nm]=$("input, textarea",this).val();
+ break;
+ case 'select':
+ if(!cm.editoptions.multiple) {
+ tmp[nm] = $("select option:selected",this).val();
+ tmp2[nm] = $("select option:selected", this).text();
+ } else {
+ var sel = $("select",this), selectedText = [];
+ tmp[nm] = $(sel).val();
+ if(tmp[nm]) { tmp[nm]= tmp[nm].join(","); } else { tmp[nm] =""; }
+ $("select option:selected",this).each(
+ function(i,selected){
+ selectedText[i] = $(selected).text();
+ }
+ );
+ tmp2[nm] = selectedText.join(",");
+ }
+ if(cm.formatter && cm.formatter == 'select') { tmp2={}; }
+ break;
+ case 'custom' :
+ try {
+ if(cm.editoptions && $.isFunction(cm.editoptions.custom_value)) {
+ tmp[nm] = cm.editoptions.custom_value.call($t, $(".customelement",this),'get');
+ 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); }
+ else { $.jgrid.info_dialog($.jgrid.errors.errcap,e.message,$.jgrid.edit.bClose); }
+ }
+ break;
+ }
+ cv = $.jgrid.checkValues(tmp[nm],i,$t);
+ if(cv[0] === false) {
+ cv[1] = tmp[nm] + " " + cv[1];
+ return false;
+ }
+ if($t.p.autoencode) { tmp[nm] = $.jgrid.htmlEncode(tmp[nm]); }
+ if(o.url !== 'clientArray' && cm.editoptions && cm.editoptions.NullIfEmpty === true) {
+ if(tmp[nm] === "") {
+ tmp3[nm] = 'null';
+ }
+ }
+ }
+ });
+ 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]});
+ } catch (e) {
+ alert(cv[1]);
+ }
+ return success;
+ }
+ var idname, opers, oper;
+ opers = $t.p.prmNames;
+ oper = opers.oper;
+ idname = opers.id;
+ if(tmp) {
+ tmp[oper] = opers.editoper;
+ tmp[idname] = rowid;
+ if(typeof($t.p.inlineData) == 'undefined') { $t.p.inlineData ={}; }
+ tmp = $.extend({},tmp,$t.p.inlineData,o.extraparam);
+ }
+ 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);
+ $(ind).attr("editable","0");
+ for( var k=0;k<$t.p.savedRow.length;k++) {
+ if( $t.p.savedRow[k].id == rowid) {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");
+ } else {
+ $("#lui_"+$.jgrid.jqID($t.p.id)).show();
+ tmp3 = $.extend({},tmp,tmp3);
+ tmp3[idname] = $.jgrid.stripPref($t.p.idPrefix, tmp3[idname]);
+ $.ajax($.extend({
+ url:o.url,
+ data: $.isFunction($t.p.serializeRowData) ? $t.p.serializeRowData.call($t, tmp3) : tmp3,
+ type: o.mtype,
+ async : false, //?!?
+ complete: function(res,stat){
+ $("#lui_"+$.jgrid.jqID($t.p.id)).hide();
+ if (stat === "success"){
+ var ret = true, sucret;
+ 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;
+ } else {
+ ret = sucret;
+ }
+ if (ret===true) {
+ if($t.p.autoencode) {
+ $.each(tmp,function(n,v){
+ tmp[n] = $.jgrid.htmlDecode(v);
+ });
+ }
+ 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;}
+ }
+ 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");
+ } else {
+ $($t).triggerHandler("jqGridInlineErrorSaveRow", [rowid, res, stat, null, o]);
+ if($.isFunction(o.errorfunc) ) {
+ o.errorfunc.call($t, rowid, res, stat, null);
+ }
+ if(o.restoreAfterError === true) {
+ $($t).jqGrid("restoreRow",rowid, o.afterrestorefunc);
+ }
+ }
+ }
+ },
+ error:function(res,stat,err){
+ $("#lui_"+$.jgrid.jqID($t.p.id)).hide();
+ $($t).triggerHandler("jqGridInlineErrorSaveRow", [rowid, res, stat, err, o]);
+ if($.isFunction(o.errorfunc) ) {
+ o.errorfunc.call($t, rowid, res, stat, err);
+ } else {
+ var rT = res.responseText || res.statusText;
+ try {
+ $.jgrid.info_dialog($.jgrid.errors.errcap,'<div class="ui-state-error">'+ rT +'</div>', $.jgrid.edit.bClose,{buttonalign:'right'});
+ } catch(e) {
+ alert(rT);
+ }
+ }
+ if(o.restoreAfterError === true) {
+ $($t).jqGrid("restoreRow",rowid, o.afterrestorefunc);
+ }
+ }
+ }, $.jgrid.ajaxOptions, $t.p.ajaxRowOptions || {}));
+ }
+ }
+ return success;
+ },
+ restoreRow : function(rowid, afterrestorefunc) {
+ // Compatible mode old versions
+ var args = $.makeArray(arguments).slice(1), o={};
+
+ if( $.type(args[0]) === "object" ) {
+ o = args[0];
+ } else {
+ if ($.isFunction(afterrestorefunc)) { o.afterrestorefunc = afterrestorefunc; }
+ }
+ o = $.extend(true, $.jgrid.inlineEdit, o );
+
+ // End compatible
+
+ return this.each(function(){
+ var $t= this, fr, ind, ares={};
+ 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;}
+ }
+ if(fr >= 0) {
+ if($.isFunction($.fn.datepicker)) {
+ try {
+ $("input.hasDatepicker","#"+$.jgrid.jqID(ind.id)).datepicker('hide');
+ } catch (e) {}
+ }
+ $.each($t.p.colModel, function(){
+ if(this.editable === true && this.name in $t.p.savedRow[fr] ) {
+ ares[this.name] = $t.p.savedRow[fr][this.name];
+ }
+ });
+ $($t).jqGrid("setRowData",rowid,ares);
+ $(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);
+ }
+ }
+ $($t).triggerHandler("jqGridInlineAfterRestoreRow", [rowid]);
+ if ($.isFunction(o.afterrestorefunc))
+ {
+ o.afterrestorefunc.call($t, rowid);
+ }
+ });
+ },
+ addRow : function ( p ) {
+ p = $.extend(true, {
+ rowID : "new_row",
+ initdata : {},
+ position :"first",
+ useDefValues : true,
+ useFormatter : false,
+ addRowParams : {extraparam:{}}
+ },p || {});
+ return this.each(function(){
+ if (!this.grid ) { return; }
+ var $t = this;
+ if(p.useDefValues === true) {
+ $($t.p.colModel).each(function(){
+ if( this.editoptions && this.editoptions.defaultValue ) {
+ var opt = this.editoptions.defaultValue,
+ tmp = $.isFunction(opt) ? opt.call($t) : opt;
+ p.initdata[this.name] = tmp;
+ }
+ });
+ }
+ $($t).jqGrid('addRowData', p.rowID, p.initdata, p.position);
+ p.rowID = $t.p.idPrefix + p.rowID;
+ $("#"+$.jgrid.jqID(p.rowID), "#"+$.jgrid.jqID($t.p.id)).addClass("jqgrid-new-row");
+ if(p.useFormatter) {
+ $("#"+$.jgrid.jqID(p.rowID)+" .ui-inline-edit", "#"+$.jgrid.jqID($t.p.id)).click();
+ } else {
+ var opers = $t.p.prmNames,
+ oper = opers.oper;
+ p.addRowParams.extraparam[oper] = opers.addoper;
+ $($t).jqGrid('editRow', p.rowID, p.addRowParams);
+ $($t).jqGrid('setSelection', p.rowID);
+ }
+ });
+ },
+ inlineNav : function (elem, o) {
+ o = $.extend({
+ edit: true,
+ editicon: "ui-icon-pencil",
+ add: true,
+ addicon:"ui-icon-plus",
+ save: true,
+ saveicon:"ui-icon-disk",
+ cancel: true,
+ cancelicon:"ui-icon-cancel",
+ addParams : {useFormatter : false,rowID : "new_row"},
+ editParams : {},
+ restoreAfterSelect : true
+ }, $.jgrid.nav, o ||{});
+ return this.each(function(){
+ if (!this.grid ) { return; }
+ var $t = this, onSelect, gID = $.jgrid.jqID($t.p.id);
+ $t.p._inlinenav = true;
+ // detect the formatactions column
+ if(o.addParams.useFormatter === true) {
+ var cm = $t.p.colModel,i;
+ for (i = 0; i<cm.length; i++) {
+ if(cm[i].formatter && cm[i].formatter === "actions" ) {
+ if(cm[i].formatoptions) {
+ var defaults = {
+ keys:false,
+ onEdit : null,
+ onSuccess: null,
+ afterSave:null,
+ onError: null,
+ afterRestore: null,
+ extraparam: {},
+ url: null
+ },
+ ap = $.extend( defaults, cm[i].formatoptions );
+ o.addParams.addRowParams = {
+ "keys" : ap.keys,
+ "oneditfunc" : ap.onEdit,
+ "successfunc" : ap.onSuccess,
+ "url" : ap.url,
+ "extraparam" : ap.extraparam,
+ "aftersavefunc" : ap.afterSavef,
+ "errorfunc": ap.onError,
+ "afterrestorefunc" : ap.afterRestore
+ };
+ }
+ break;
+ }
+ }
+ }
+ if(o.add) {
+ $($t).jqGrid('navButtonAdd', elem,{
+ caption : o.addtext,
+ title : o.addtitle,
+ buttonicon : o.addicon,
+ id : $t.p.id+"_iladd",
+ onClickButton : function () {
+ $($t).jqGrid('addRow', o.addParams);
+ if(!o.addParams.useFormatter) {
+ $("#"+gID+"_ilsave").removeClass('ui-state-disabled');
+ $("#"+gID+"_ilcancel").removeClass('ui-state-disabled');
+ $("#"+gID+"_iladd").addClass('ui-state-disabled');
+ $("#"+gID+"_iledit").addClass('ui-state-disabled');
+ }
+ }
+ });
+ }
+ if(o.edit) {
+ $($t).jqGrid('navButtonAdd', elem,{
+ caption : o.edittext,
+ title : o.edittitle,
+ buttonicon : o.editicon,
+ id : $t.p.id+"_iledit",
+ onClickButton : function () {
+ var sr = $($t).jqGrid('getGridParam','selrow');
+ if(sr) {
+ $($t).jqGrid('editRow', sr, o.editParams);
+ $("#"+gID+"_ilsave").removeClass('ui-state-disabled');
+ $("#"+gID+"_ilcancel").removeClass('ui-state-disabled');
+ $("#"+gID+"_iladd").addClass('ui-state-disabled');
+ $("#"+gID+"_iledit").addClass('ui-state-disabled');
+ } else {
+ $.jgrid.viewModal("#alertmod",{gbox:"#gbox_"+gID,jqm:true});$("#jqg_alrt").focus();
+ }
+ }
+ });
+ }
+ if(o.save) {
+ $($t).jqGrid('navButtonAdd', elem,{
+ caption : o.savetext || '',
+ title : o.savetitle || 'Save row',
+ buttonicon : o.saveicon,
+ id : $t.p.id+"_ilsave",
+ onClickButton : function () {
+ var sr = $t.p.savedRow[0].id;
+ if(sr) {
+ var opers = $t.p.prmNames,
+ oper = opers.oper;
+ if(!o.editParams.extraparam) {
+ o.editParams.extraparam = {};
+ }
+ if($("#"+$.jgrid.jqID(sr), "#"+gID ).hasClass("jqgrid-new-row")) {
+ o.editParams.extraparam[oper] = opers.addoper;
+ } else {
+ o.editParams.extraparam[oper] = opers.editoper;
+ }
+ if( $($t).jqGrid('saveRow', sr, o.editParams) ) {
+ $($t).jqGrid('showAddEditButtons');
+ }
+ } else {
+ $.jgrid.viewModal("#alertmod",{gbox:"#gbox_"+gID,jqm:true});$("#jqg_alrt").focus();
+ }
+ }
+ });
+ $("#"+gID+"_ilsave").addClass('ui-state-disabled');
+ }
+ if(o.cancel) {
+ $($t).jqGrid('navButtonAdd', elem,{
+ caption : o.canceltext || '',
+ title : o.canceltitle || 'Cancel row editing',
+ buttonicon : o.cancelicon,
+ id : $t.p.id+"_ilcancel",
+ onClickButton : function () {
+ var sr = $t.p.savedRow[0].id;
+ if(sr) {
+ $($t).jqGrid('restoreRow', sr, o.editParams);
+ $($t).jqGrid('showAddEditButtons');
+ } else {
+ $.jgrid.viewModal("#alertmod",{gbox:"#gbox_"+gID,jqm:true});$("#jqg_alrt").focus();
+ }
+ }
+ });
+ $("#"+gID+"_ilcancel").addClass('ui-state-disabled');
+ }
+ if(o.restoreAfterSelect === true) {
+ if($.isFunction($t.p.beforeSelectRow)) {
+ onSelect = $t.p.beforeSelectRow;
+ } else {
+ onSelect = false;
+ }
+ $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 ) {
+ $($t).jqGrid('delRowData', $t.p.selrow);
+ } else {
+ $($t).jqGrid('restoreRow', $t.p.selrow, o.editParams);
+ }
+ $($t).jqGrid('showAddEditButtons');
+ }
+ if(onSelect) {
+ ret = onSelect.call($t, id, stat);
+ }
+ return ret;
+ };
+ }
+
+ });
+ },
+ showAddEditButtons : function() {
+ return this.each(function(){
+ if (!this.grid ) { return; }
+ var gID = $.jgrid.jqID(this.p.id);
+ $("#"+gID+"_ilsave").addClass('ui-state-disabled');
+ $("#"+gID+"_ilcancel").addClass('ui-state-disabled');
+ $("#"+gID+"_iladd").removeClass('ui-state-disabled');
+ $("#"+gID+"_iledit").removeClass('ui-state-disabled');
+ });
+ }
+//end inline edit
+});
+})(jQuery);
+;(function($){
+/*
+**
+ * jqGrid extension for cellediting Grid Data
+ * 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-2.0.html
+**/
+/**
+ * all events and options here are aded anonynous and not in the base grid
+ * since the array is to big. Here is the order of execution.
+ * From this point we use jQuery isFunction
+ * formatCell
+ * beforeEditCell,
+ * onSelectCell (used only for noneditable cels)
+ * afterEditCell,
+ * beforeSaveCell, (called before validation of values if any)
+ * beforeSubmitCell (if cellsubmit remote (ajax))
+ * afterSubmitCell(if cellsubmit remote (ajax)),
+ * afterSaveCell,
+ * errorCell,
+ * serializeCellData - new
+ * Options
+ * cellsubmit (remote,clientArray) (added in grid options)
+ * cellurl
+ * ajaxCellOptions
+* */
+"use strict";
+$.jgrid.extend({
+ editCell : function (iRow,iCol, ed){
+ return this.each(function (){
+ var $t = this, nm, tmp,cc, cm;
+ if (!$t.grid || $t.p.cellEdit !== true) {return;}
+ iCol = parseInt(iCol,10);
+ // select the row that can be used for other methods
+ $t.p.selrow = $t.rows[iRow].id;
+ if (!$t.p.knv) {$($t).jqGrid("GridNav");}
+ // check to see if we have already edited cell
+ if ($t.p.savedRow.length>0) {
+ // prevent second click on that field and enable selects
+ if (ed===true ) {
+ if(iRow == $t.p.iRow && iCol == $t.p.iCol){
+ return;
+ }
+ }
+ // save the cell
+ $($t).jqGrid("saveCell",$t.p.savedRow[0].id,$t.p.savedRow[0].ic);
+ } else {
+ window.setTimeout(function () { $("#"+$.jgrid.jqID($t.p.knv)).attr("tabindex","-1").focus();},0);
+ }
+ cm = $t.p.colModel[iCol];
+ nm = cm.name;
+ 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) {
+ $("td:eq("+$t.p.iCol+")",$t.rows[$t.p.iRow]).removeClass("edit-cell ui-state-highlight");
+ $($t.rows[$t.p.iRow]).removeClass("selected-row ui-state-hover");
+ }
+ $(cc).addClass("edit-cell ui-state-highlight");
+ $($t.rows[iRow]).addClass("selected-row ui-state-hover");
+ 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();
+ }
+ if($t.p.autoencode) { tmp = $.jgrid.htmlDecode(tmp); }
+ if (!cm.edittype) {cm.edittype = "text";}
+ $t.p.savedRow.push({id:iRow,ic:iCol,name:nm,v:tmp});
+ if(tmp === " " || tmp === " " || (tmp.length===1 && tmp.charCodeAt(0)===160) ) {tmp='';}
+ if($.isFunction($t.p.formatCell)) {
+ var tmp2 = $t.p.formatCell.call($t, $t.rows[iRow].id,nm,tmp,iRow,iCol);
+ if(tmp2 !== undefined ) {tmp = tmp2;}
+ }
+ var opt = $.extend({}, cm.editoptions || {} ,{id:iRow+"_"+nm,name:nm});
+ var elc = $.jgrid.createEl.call($t,cm.edittype,opt,tmp,true,$.extend({},$.jgrid.ajaxOptions,$t.p.ajaxSelectOptions || {}));
+ $($t).triggerHandler("jqGridBeforeEditCell", [$t.rows[iRow].id, nm, tmp, iRow, iCol]);
+ if ($.isFunction($t.p.beforeEditCell)) {
+ $t.p.beforeEditCell.call($t, $t.rows[iRow].id,nm,tmp,iRow,iCol);
+ }
+ $(cc).html("").append(elc).attr("tabindex","0");
+ window.setTimeout(function () { $(elc).focus();},0);
+ $("input, select, textarea",cc).bind("keydown",function(e) {
+ if (e.keyCode === 27) {
+ if($("input.hasDatepicker",cc).length >0) {
+ if( $(".ui-datepicker").is(":hidden") ) { $($t).jqGrid("restoreCell",iRow,iCol); }
+ else { $("input.hasDatepicker",cc).datepicker('hide'); }
+ } else {
+ $($t).jqGrid("restoreCell",iRow,iCol);
+ }
+ } //ESC
+ if (e.keyCode === 13) {
+ $($t).jqGrid("saveCell",iRow,iCol);
+ // Prevent default action
+ return false;
+ } //Enter
+ if (e.keyCode === 9) {
+ if(!$t.grid.hDiv.loading ) {
+ if (e.shiftKey) {$($t).jqGrid("prevCell",iRow,iCol);} //Shift TAb
+ else {$($t).jqGrid("nextCell",iRow,iCol);} //Tab
+ } else {
+ return false;
+ }
+ }
+ e.stopPropagation();
+ });
+ $($t).triggerHandler("jqGridAfterEditCell", [$t.rows[iRow].id, nm, tmp, iRow, iCol]);
+ if ($.isFunction($t.p.afterEditCell)) {
+ $t.p.afterEditCell.call($t, $t.rows[iRow].id,nm,tmp,iRow,iCol);
+ }
+ } else {
+ if (parseInt($t.p.iCol,10)>=0 && parseInt($t.p.iRow,10)>=0) {
+ $("td:eq("+$t.p.iCol+")",$t.rows[$t.p.iRow]).removeClass("edit-cell ui-state-highlight");
+ $($t.rows[$t.p.iRow]).removeClass("selected-row ui-state-hover");
+ }
+ cc.addClass("edit-cell ui-state-highlight");
+ $($t.rows[iRow]).addClass("selected-row ui-state-hover");
+ tmp = cc.html().replace(/\ \;/ig,'');
+ $($t).triggerHandler("jqGridSelectCell", [$t.rows[iRow].id, nm, tmp, iRow, iCol]);
+ if ($.isFunction($t.p.onSelectCell)) {
+ $t.p.onSelectCell.call($t, $t.rows[iRow].id,nm,tmp,iRow,iCol);
+ }
+ }
+ $t.p.iCol = iCol; $t.p.iRow = iRow;
+ });
+ },
+ saveCell : function (iRow, iCol){
+ return this.each(function(){
+ var $t= this, fr;
+ if (!$t.grid || $t.p.cellEdit !== true) {return;}
+ if ( $t.p.savedRow.length >= 1) {fr = 0;} else {fr=null;}
+ if(fr !== null) {
+ var cc = $("td:eq("+iCol+")",$t.rows[iRow]),v,v2,
+ cm = $t.p.colModel[iCol], nm = cm.name, nmjq = $.jgrid.jqID(nm) ;
+ switch (cm.edittype) {
+ case "select":
+ if(!cm.editoptions.multiple) {
+ v = $("#"+iRow+"_"+nmjq+" option:selected",$t.rows[iRow]).val();
+ v2 = $("#"+iRow+"_"+nmjq+" option:selected",$t.rows[iRow]).text();
+ } else {
+ var sel = $("#"+iRow+"_"+nmjq,$t.rows[iRow]), selectedText = [];
+ v = $(sel).val();
+ if(v) { v.join(",");} else { v=""; }
+ $("option:selected",sel).each(
+ function(i,selected){
+ selectedText[i] = $(selected).text();
+ }
+ );
+ v2 = selectedText.join(",");
+ }
+ if(cm.formatter) { v2 = v; }
+ break;
+ case "checkbox":
+ var cbv = ["Yes","No"];
+ if(cm.editoptions){
+ cbv = cm.editoptions.value.split(":");
+ }
+ v = $("#"+iRow+"_"+nmjq,$t.rows[iRow]).is(":checked") ? cbv[0] : cbv[1];
+ v2=v;
+ break;
+ case "password":
+ case "text":
+ case "textarea":
+ case "button" :
+ v = $("#"+iRow+"_"+nmjq,$t.rows[iRow]).val();
+ v2=v;
+ break;
+ case 'custom' :
+ try {
+ if(cm.editoptions && $.isFunction(cm.editoptions.custom_value)) {
+ v = cm.editoptions.custom_value.call($t, $(".customelement",cc),'get');
+ 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); }
+ }
+ break;
+ }
+ // The common approach is if nothing changed do not do anything
+ if (v2 !== $t.p.savedRow[fr].v){
+ var vvv = $($t).triggerHandler("jqGridBeforeSaveCell", [$t.rows[iRow].id, nm, v, iRow, iCol]);
+ if (vvv) {v = vvv; v2=vvv;}
+ if ($.isFunction($t.p.beforeSaveCell)) {
+ 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);
+ if(cv[0] === true) {
+ var addpost = $($t).triggerHandler("jqGridBeforeSubmitCell", [$t.rows[iRow].id, nm, v, iRow, iCol]) || {};
+ if ($.isFunction($t.p.beforeSubmitCell)) {
+ addpost = $t.p.beforeSubmitCell.call($t, $t.rows[iRow].id,nm, v, iRow,iCol);
+ if (!addpost) {addpost={};}
+ }
+ if( $("input.hasDatepicker",cc).length >0) { $("input.hasDatepicker",cc).datepicker('hide'); }
+ if ($t.p.cellsubmit == 'remote') {
+ if ($t.p.cellurl) {
+ var postdata = {};
+ if($t.p.autoencode) { v = $.jgrid.htmlEncode(v); }
+ postdata[nm] = v;
+ var idname,oper, opers;
+ opers = $t.p.prmNames;
+ idname = opers.id;
+ oper = opers.oper;
+ postdata[idname] = $.jgrid.stripPref($t.p.idPrefix, $t.rows[iRow].id);
+ postdata[oper] = opers.editoper;
+ postdata = $.extend(addpost,postdata);
+ $("#lui_"+$.jgrid.jqID($t.p.id)).show();
+ $t.grid.hDiv.loading = true;
+ $.ajax( $.extend( {
+ url: $t.p.cellurl,
+ data :$.isFunction($t.p.serializeCellData) ? $t.p.serializeCellData.call($t, postdata) : postdata,
+ type: "POST",
+ complete: function (result, stat) {
+ $("#lui_"+$t.p.id).hide();
+ $t.grid.hDiv.loading = false;
+ 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);
+ }
+ if(ret[0] === true){
+ $(cc).empty();
+ $($t).jqGrid("setCell",$t.rows[iRow].id, iCol, v2, false, false, true);
+ $(cc).addClass("dirty-cell");
+ $($t.rows[iRow]).addClass("edited");
+ $($t).triggerHandler("jqGridAfterSaveCell", [$t.rows[iRow].id, nm, v, iRow, iCol]);
+ if ($.isFunction($t.p.afterSaveCell)) {
+ $t.p.afterSaveCell.call($t, $t.rows[iRow].id,nm, v, iRow,iCol);
+ }
+ $t.p.savedRow.splice(0,1);
+ } else {
+ $.jgrid.info_dialog($.jgrid.errors.errcap,ret[1],$.jgrid.edit.bClose);
+ $($t).jqGrid("restoreCell",iRow,iCol);
+ }
+ }
+ },
+ error:function(res,stat,err) {
+ $("#lui_"+$.jgrid.jqID($t.p.id)).hide();
+ $t.grid.hDiv.loading = false;
+ $($t).triggerHandler("jqGridErrorCell", [res, stat, err]);
+ if ($.isFunction($t.p.errorCell)) {
+ $t.p.errorCell.call($t, res,stat,err);
+ $($t).jqGrid("restoreCell",iRow,iCol);
+ } else {
+ $.jgrid.info_dialog($.jgrid.errors.errcap,res.status+" : "+res.statusText+"<br/>"+stat,$.jgrid.edit.bClose);
+ $($t).jqGrid("restoreCell",iRow,iCol);
+ }
+ }
+ }, $.jgrid.ajaxOptions, $t.p.ajaxCellOptions || {}));
+ } else {
+ try {
+ $.jgrid.info_dialog($.jgrid.errors.errcap,$.jgrid.errors.nourl,$.jgrid.edit.bClose);
+ $($t).jqGrid("restoreCell",iRow,iCol);
+ } catch (e) {}
+ }
+ }
+ if ($t.p.cellsubmit == 'clientArray') {
+ $(cc).empty();
+ $($t).jqGrid("setCell",$t.rows[iRow].id,iCol, v2, false, false, true);
+ $(cc).addClass("dirty-cell");
+ $($t.rows[iRow]).addClass("edited");
+ $($t).triggerHandler("jqGridAfterSaveCell", [$t.rows[iRow].id, nm, v, iRow, iCol]);
+ if ($.isFunction($t.p.afterSaveCell)) {
+ $t.p.afterSaveCell.call($t, $t.rows[iRow].id,nm, v, iRow,iCol);
+ }
+ $t.p.savedRow.splice(0,1);
+ }
+ } else {
+ try {
+ window.setTimeout(function(){$.jgrid.info_dialog($.jgrid.errors.errcap,v+" "+cv[1],$.jgrid.edit.bClose);},100);
+ $($t).jqGrid("restoreCell",iRow,iCol);
+ } catch (e) {}
+ }
+ } else {
+ $($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);
+ }
+ });
+ },
+ restoreCell : function(iRow, iCol) {
+ return this.each(function(){
+ var $t= this, fr;
+ if (!$t.grid || $t.p.cellEdit !== true ) {return;}
+ if ( $t.p.savedRow.length >= 1) {fr = 0;} else {fr=null;}
+ if(fr !== null) {
+ var cc = $("td:eq("+iCol+")",$t.rows[iRow]);
+ // datepicker fix
+ if($.isFunction($.fn.datepicker)) {
+ try {
+ $("input.hasDatepicker",cc).datepicker('hide');
+ } catch (e) {}
+ }
+ $(cc).empty().attr("tabindex","-1");
+ $($t).jqGrid("setCell",$t.rows[iRow].id, iCol, $t.p.savedRow[fr].v, false, false, true);
+ $($t).triggerHandler("jqGridAfterRestoreCell", [$t.rows[iRow].id, $t.p.savedRow[fr].v, iRow, iCol]);
+ if ($.isFunction($t.p.afterRestoreCell)) {
+ $t.p.afterRestoreCell.call($t, $t.rows[iRow].id, $t.p.savedRow[fr].v, iRow, iCol);
+ }
+ $t.p.savedRow.splice(0,1);
+ }
+ window.setTimeout(function () { $("#"+$t.p.knv).attr("tabindex","-1").focus();},0);
+ });
+ },
+ nextCell : function (iRow,iCol) {
+ return this.each(function (){
+ var $t = this, nCol=false;
+ 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++) {
+ if ( $t.p.colModel[i].editable ===true) {
+ nCol = i; break;
+ }
+ }
+ if(nCol !== false) {
+ $($t).jqGrid("editCell",iRow,nCol,true);
+ } else {
+ if ($t.p.savedRow.length >0) {
+ $($t).jqGrid("saveCell",iRow,iCol);
+ }
+ }
+ });
+ },
+ prevCell : function (iRow,iCol) {
+ return this.each(function (){
+ var $t = this, nCol=false;
+ if (!$t.grid || $t.p.cellEdit !== true) {return;}
+ // try to find next editable cell
+ for (var i=iCol-1; i>=0; i--) {
+ if ( $t.p.colModel[i].editable ===true) {
+ nCol = i; break;
+ }
+ }
+ if(nCol !== false) {
+ $($t).jqGrid("editCell",iRow,nCol,true);
+ } else {
+ if ($t.p.savedRow.length >0) {
+ $($t).jqGrid("saveCell",iRow,iCol);
+ }
+ }
+ });
+ },
+ GridNav : function() {
+ return this.each(function () {
+ var $t = this;
+ 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>"),
+ i, kdir;
+ function scrollGrid(iR, iC, tp){
+ 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(nROT >= ch) {
+ $($t.grid.bDiv)[0].scrollTop = $($t.grid.bDiv)[0].scrollTop + $t.rows[iR].clientHeight;
+ }
+ }
+ if(tp == 'vu'){
+ if (pROT < st ) {
+ $($t.grid.bDiv)[0].scrollTop = $($t.grid.bDiv)[0].scrollTop - $t.rows[iR].clientHeight;
+ }
+ }
+ }
+ 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,
+ pCOL = $t.rows[iR].cells[iC].offsetLeft;
+ if(nCOL >= cw+parseInt(sl,10)) {
+ $($t.grid.bDiv)[0].scrollLeft = $($t.grid.bDiv)[0].scrollLeft + $t.rows[iR].cells[iC].clientWidth;
+ } else if (pCOL < sl) {
+ $($t.grid.bDiv)[0].scrollLeft = $($t.grid.bDiv)[0].scrollLeft - $t.rows[iR].cells[iC].clientWidth;
+ }
+ }
+ }
+ function findNextVisible(iC,act){
+ var ind, i;
+ if(act == 'lft') {
+ ind = iC+1;
+ for (i=iC;i>=0;i--){
+ if ($t.p.colModel[i].hidden !== true) {
+ ind = i;
+ break;
+ }
+ }
+ }
+ if(act == 'rgt') {
+ ind = iC-1;
+ for (i=iC; i<$t.p.colModel.length;i++){
+ if ($t.p.colModel[i].hidden !== true) {
+ ind = i;
+ break;
+ }
+ }
+ }
+ return ind;
+ }
+
+ $(selection).insertBefore($t.grid.cDiv);
+ $("#"+$t.p.knv)
+ .focus()
+ .keydown(function (e){
+ kdir = e.keyCode;
+ if($t.p.direction == "rtl") {
+ if(kdir===37) { kdir = 39;}
+ else if (kdir===39) { kdir = 37; }
+ }
+ switch (kdir) {
+ case 38:
+ if ($t.p.iRow-1 >0 ) {
+ scrollGrid($t.p.iRow-1,$t.p.iCol,'vu');
+ $($t).jqGrid("editCell",$t.p.iRow-1,$t.p.iCol,false);
+ }
+ break;
+ case 40 :
+ if ($t.p.iRow+1 <= $t.rows.length-1) {
+ scrollGrid($t.p.iRow+1,$t.p.iCol,'vd');
+ $($t).jqGrid("editCell",$t.p.iRow+1,$t.p.iCol,false);
+ }
+ break;
+ case 37 :
+ if ($t.p.iCol -1 >= 0) {
+ i = findNextVisible($t.p.iCol-1,'lft');
+ scrollGrid($t.p.iRow, i,'h');
+ $($t).jqGrid("editCell",$t.p.iRow, i,false);
+ }
+ break;
+ case 39 :
+ if ($t.p.iCol +1 <= $t.p.colModel.length-1) {
+ i = findNextVisible($t.p.iCol+1,'rgt');
+ scrollGrid($t.p.iRow,i,'h');
+ $($t).jqGrid("editCell",$t.p.iRow,i,false);
+ }
+ break;
+ case 13:
+ if (parseInt($t.p.iCol,10)>=0 && parseInt($t.p.iRow,10)>=0) {
+ $($t).jqGrid("editCell",$t.p.iRow,$t.p.iCol,true);
+ }
+ break;
+ default :
+ return true;
+ }
+ return false;
+ });
+ });
+ },
+ getChangedCells : function (mthd) {
+ var ret=[];
+ if (!mthd) {mthd='all';}
+ this.each(function(){
+ var $t= this,nm;
+ if (!$t.grid || $t.p.cellEdit !== true ) {return;}
+ $($t.rows).each(function(j){
+ var res = {};
+ if ($(this).hasClass("edited")) {
+ $('td',this).each( function(i) {
+ nm = $t.p.colModel[i].name;
+ if ( nm !== 'cb' && nm !== 'subgrid') {
+ 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);
+ } catch (e){
+ res[nm] = $.jgrid.htmlDecode($(this).html());
+ }
+ }
+ } else {
+ try {
+ res[nm] = $.unformat.call($t,this,{rowId:$t.rows[j].id,colModel:$t.p.colModel[i]},i);
+ } catch (e) {
+ res[nm] = $.jgrid.htmlDecode($(this).html());
+ }
+ }
+ }
+ });
+ res.id = this.id;
+ ret.push(res);
+ }
+ });
+ });
+ return ret;
+ }
+/// end cell editing
+});
+})(jQuery);
+;(function($){
+/**
+ * jqGrid extension for SubGrid Data
+ * 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-2.0.html
+**/
+"use strict";
+$.jgrid.extend({
+setSubGrid : function () {
+ return this.each(function (){
+ var $t = this, cm,
+ suboptions = {
+ plusicon : "ui-icon-plus",
+ minusicon : "ui-icon-minus",
+ openicon: "ui-icon-carat-1-sw",
+ expandOnLoad: false,
+ delayOnLoad : 50,
+ selectOnExpand : false,
+ reloadOnExpand : true
+ };
+ $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});
+ 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';}
+ }
+ });
+},
+addSubGridCell :function (pos,iRow) {
+ var prp='',ic,sid;
+ this.each(function(){
+ prp = this.formatCol(pos,iRow);
+ sid= this.p.id;
+ ic = this.p.subGridOptions.plusicon;
+ });
+ return "<td role=\"gridcell\" aria-describedby=\""+sid+"_subgrid\" class=\"ui-sgcollapsed sgcollapsed\" "+prp+"><a href='javascript:void(0);'><span class='ui-icon "+ic+"'></span></a></td>";
+},
+addSubGrid : function( pos, sind ) {
+ return this.each(function(){
+ var ts = this;
+ if (!ts.grid ) { return; }
+ //-------------------------
+ var subGridCell = function(trdiv,cell,pos)
+ {
+ var tddiv = $("<td align='"+ts.p.subGridModel[0].align[pos]+"'></td>").html(cell);
+ $(trdiv).append(tddiv);
+ };
+ var subGridXml = function(sjxml, sbid){
+ var tddiv, i, sgmap,
+ dummy = $("<table cellspacing='0' cellpadding='0' border='0'><tbody></tbody></table>"),
+ trdiv = $("<tr></tr>");
+ for (i = 0; i<ts.p.subGridModel[0].name.length; i++) {
+ tddiv = $("<th class='ui-state-default ui-th-subgrid ui-th-column ui-th-"+ts.p.direction+"'></th>");
+ $(tddiv).html(ts.p.subGridModel[0].name[i]);
+ $(tddiv).width( ts.p.subGridModel[0].width[i]);
+ $(trdiv).append(tddiv);
+ }
+ $(dummy).append(trdiv);
+ if (sjxml){
+ sgmap = ts.p.xmlReader.subgrid;
+ $(sgmap.root+" "+sgmap.row, sjxml).each( function(){
+ trdiv = $("<tr class='ui-widget-content ui-subtblcell'></tr>");
+ if(sgmap.repeatitems === true) {
+ $(sgmap.cell,this).each( function(i) {
+ subGridCell(trdiv, $(this).text() || ' ',i);
+ });
+ } else {
+ var f = ts.p.subGridModel[0].mapping || ts.p.subGridModel[0].name;
+ if (f) {
+ for (i=0;i<f.length;i++) {
+ subGridCell(trdiv, $(f[i],this).text() || ' ',i);
+ }
+ }
+ }
+ $(dummy).append(trdiv);
+ });
+ }
+ var pID = $("table:first",ts.grid.bDiv).attr("id")+"_";
+ $("#"+$.jgrid.jqID(pID+sbid)).append(dummy);
+ ts.grid.hDiv.loading = false;
+ $("#load_"+$.jgrid.jqID(ts.p.id)).hide();
+ return false;
+ };
+ var subGridJson = function(sjxml, sbid){
+ var tddiv,result,i,cur, sgmap,j,
+ dummy = $("<table cellspacing='0' cellpadding='0' border='0'><tbody></tbody></table>"),
+ trdiv = $("<tr></tr>");
+ for (i = 0; i<ts.p.subGridModel[0].name.length; i++) {
+ tddiv = $("<th class='ui-state-default ui-th-subgrid ui-th-column ui-th-"+ts.p.direction+"'></th>");
+ $(tddiv).html(ts.p.subGridModel[0].name[i]);
+ $(tddiv).width( ts.p.subGridModel[0].width[i]);
+ $(trdiv).append(tddiv);
+ }
+ $(dummy).append(trdiv);
+ if (sjxml){
+ sgmap = ts.p.jsonReader.subgrid;
+ result = $.jgrid.getAccessor(sjxml, sgmap.root);
+ if ( typeof result !== 'undefined' ) {
+ for (i=0;i<result.length;i++) {
+ cur = result[i];
+ trdiv = $("<tr class='ui-widget-content ui-subtblcell'></tr>");
+ if(sgmap.repeatitems === true) {
+ if(sgmap.cell) { cur=cur[sgmap.cell]; }
+ for (j=0;j<cur.length;j++) {
+ subGridCell(trdiv, cur[j] || ' ',j);
+ }
+ } else {
+ var f = ts.p.subGridModel[0].mapping || ts.p.subGridModel[0].name;
+ if(f.length) {
+ for (j=0;j<f.length;j++) {
+ subGridCell(trdiv, cur[f[j]] || ' ',j);
+ }
+ }
+ }
+ $(dummy).append(trdiv);
+ }
+ }
+ }
+ var pID = $("table:first",ts.grid.bDiv).attr("id")+"_";
+ $("#"+$.jgrid.jqID(pID+sbid)).append(dummy);
+ ts.grid.hDiv.loading = false;
+ $("#load_"+$.jgrid.jqID(ts.p.id)).hide();
+ return false;
+ };
+ var populatesubgrid = function( rd )
+ {
+ var sid,dp, i, j;
+ sid = $(rd).attr("id");
+ dp = {nd_: (new Date().getTime())};
+ dp[ts.p.prmNames.subgridid]=sid;
+ if(!ts.p.subGridModel[0]) { return false; }
+ if(ts.p.subGridModel[0].params) {
+ for(j=0; j < ts.p.subGridModel[0].params.length; j++) {
+ for(i=0; i<ts.p.colModel.length; i++) {
+ if(ts.p.colModel[i].name === ts.p.subGridModel[0].params[j]) {
+ dp[ts.p.colModel[i].name]= $("td:eq("+i+")",rd).text().replace(/\ \;/ig,'');
+ }
+ }
+ }
+ }
+ if(!ts.grid.hDiv.loading) {
+ ts.grid.hDiv.loading = true;
+ $("#load_"+$.jgrid.jqID(ts.p.id)).show();
+ if(!ts.p.subgridtype) { ts.p.subgridtype = ts.p.datatype; }
+ if($.isFunction(ts.p.subgridtype)) {
+ ts.p.subgridtype.call(ts, dp);
+ } else {
+ ts.p.subgridtype = ts.p.subgridtype.toLowerCase();
+ }
+ switch(ts.p.subgridtype) {
+ case "xml":
+ case "json":
+ $.ajax($.extend({
+ type:ts.p.mtype,
+ url: ts.p.subGridUrl,
+ dataType:ts.p.subgridtype,
+ data: $.isFunction(ts.p.serializeSubGridData)? ts.p.serializeSubGridData.call(ts, dp) : dp,
+ complete: function(sxml) {
+ if(ts.p.subgridtype === "xml") {
+ subGridXml(sxml.responseXML, sid);
+ } else {
+ subGridJson($.jgrid.parse(sxml.responseText),sid);
+ }
+ sxml=null;
+ }
+ }, $.jgrid.ajaxOptions, ts.p.ajaxSubgridOptions || {}));
+ break;
+ }
+ }
+ return false;
+ };
+ var _id, pID,atd, nhc=0, bfsc, r;
+ $.each(ts.p.colModel,function(){
+ if(this.hidden === true || this.name === 'rn' || this.name === 'cb') {
+ nhc++;
+ }
+ });
+ var len = ts.rows.length, i=1;
+ if( sind !== undefined && sind > 0) {
+ i = sind;
+ len = sind+1;
+ }
+ while(i < len) {
+ if($(ts.rows[i]).hasClass('jqgrow')) {
+ $(ts.rows[i].cells[pos]).bind('click', function() {
+ var tr = $(this).parent("tr")[0];
+ r = tr.nextSibling;
+ if($(this).hasClass("sgcollapsed")) {
+ pID = ts.p.id;
+ _id = tr.id;
+ if(ts.p.subGridOptions.reloadOnExpand === true || ( ts.p.subGridOptions.reloadOnExpand === false && !$(r).hasClass('ui-subgrid') ) ) {
+ atd = pos >=1 ? "<td colspan='"+pos+"'> </td>":"";
+ bfsc = $(ts).triggerHandler("jqGridSubGridBeforeExpand", [pID + "_" + _id, _id]);
+ bfsc = (bfsc === false || bfsc === 'stop') ? false : true;
+ if(bfsc && $.isFunction(ts.p.subGridBeforeExpand)) {
+ bfsc = ts.p.subGridBeforeExpand.call(ts, pID+"_"+_id,_id);
+ }
+ if(bfsc === false) {return false;}
+ $(tr).after( "<tr role='row' class='ui-subgrid'>"+atd+"<td class='ui-widget-content subgrid-cell'><span class='ui-icon "+ts.p.subGridOptions.openicon+"'></span></td><td colspan='"+parseInt(ts.p.colNames.length-1-nhc,10)+"' class='ui-widget-content subgrid-data'><div id="+pID+"_"+_id+" class='tablediv'></div></td></tr>" );
+ $(ts).triggerHandler("jqGridSubGridRowExpanded", [pID + "_" + _id, _id]);
+ if( $.isFunction(ts.p.subGridRowExpanded)) {
+ ts.p.subGridRowExpanded.call(ts, pID+"_"+ _id,_id);
+ } else {
+ populatesubgrid(tr);
+ }
+ } else {
+ $(r).show();
+ }
+ $(this).html("<a href='javascript:void(0);'><span class='ui-icon "+ts.p.subGridOptions.minusicon+"'></span></a>").removeClass("sgcollapsed").addClass("sgexpanded");
+ if(ts.p.subGridOptions.selectOnExpand) {
+ $(ts).jqGrid('setSelection',_id);
+ }
+ } else if($(this).hasClass("sgexpanded")) {
+ bfsc = $(ts).triggerHandler("jqGridSubGridRowColapsed", [pID + "_" + _id, _id]);
+ bfsc = (bfsc === false || bfsc === 'stop') ? false : true;
+ if( bfsc && $.isFunction(ts.p.subGridRowColapsed)) {
+ _id = tr.id;
+ bfsc = ts.p.subGridRowColapsed.call(ts, pID+"_"+_id,_id );
+ }
+ if(bfsc===false) {return false;}
+ if(ts.p.subGridOptions.reloadOnExpand === true) {
+ $(r).remove(".ui-subgrid");
+ } else if($(r).hasClass('ui-subgrid')) { // incase of dynamic deleting
+ $(r).hide();
+ }
+ $(this).html("<a href='javascript:void(0);'><span class='ui-icon "+ts.p.subGridOptions.plusicon+"'></span></a>").removeClass("sgexpanded").addClass("sgcollapsed");
+ }
+ return false;
+ });
+ }
+ i++;
+ }
+ if(ts.p.subGridOptions.expandOnLoad === true) {
+ $(ts.rows).filter('.jqgrow').each(function(index,row){
+ $(row.cells[0]).click();
+ });
+ }
+ ts.subGridXml = function(xml,sid) {subGridXml(xml,sid);};
+ ts.subGridJson = function(json,sid) {subGridJson(json,sid);};
+ });
+},
+expandSubGridRow : function(rowid) {
+ return this.each(function () {
+ var $t = this;
+ if(!$t.grid && !rowid) {return;}
+ if($t.p.subGrid===true) {
+ var rc = $(this).jqGrid("getInd",rowid,true);
+ if(rc) {
+ var sgc = $("td.sgcollapsed",rc)[0];
+ if(sgc) {
+ $(sgc).trigger("click");
+ }
+ }
+ }
+ });
+},
+collapseSubGridRow : function(rowid) {
+ return this.each(function () {
+ var $t = this;
+ if(!$t.grid && !rowid) {return;}
+ if($t.p.subGrid===true) {
+ var rc = $(this).jqGrid("getInd",rowid,true);
+ if(rc) {
+ var sgc = $("td.sgexpanded",rc)[0];
+ if(sgc) {
+ $(sgc).trigger("click");
+ }
+ }
+ }
+ });
+},
+toggleSubGridRow : function(rowid) {
+ return this.each(function () {
+ var $t = this;
+ if(!$t.grid && !rowid) {return;}
+ if($t.p.subGrid===true) {
+ var rc = $(this).jqGrid("getInd",rowid,true);
+ if(rc) {
+ var sgc = $("td.sgcollapsed",rc)[0];
+ if(sgc) {
+ $(sgc).trigger("click");
+ } else {
+ sgc = $("td.sgexpanded",rc)[0];
+ if(sgc) {
+ $(sgc).trigger("click");
+ }
+ }
+ }
+ }
+ });
+}
+});
+})(jQuery);
+/**
+ * jqGrid extension - Tree Grid
+ * 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
+**/
+
+/*global document, jQuery, $ */
+(function($) {
+"use strict";
+$.jgrid.extend({
+ setTreeNode : function(i, len){
+ return this.each(function(){
+ var $t = this;
+ if( !$t.grid || !$t.p.treeGrid ) {return;}
+ var expCol = $t.p.expColInd,
+ expanded = $t.p.treeReader.expanded_field,
+ isLeaf = $t.p.treeReader.leaf_field,
+ level = $t.p.treeReader.level_field,
+ icon = $t.p.treeReader.icon_field,
+ 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;
+ ldat = $t.p.data[dind];
+ //$t.rows[i].level = ldat[level];
+ 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);
+ // NS Model
+ ldat[isLeaf] = (rgt === lft+1) ? 'true' : 'false';
+ $t.rows[i].cells[$t.p._treeleafpos].innerHTML = ldat[isLeaf];
+ }
+ }
+ //else {
+ //row.parent_id = rd[$t.p.treeReader.parent_id_field];
+ //}
+ curLevel = parseInt(ldat[level],10);
+ if($t.p.tree_root_level === 0) {
+ ident = curLevel+1;
+ lftpos = curLevel;
+ } else {
+ ident = curLevel;
+ 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 ";
+
+
+ if(ldat[loaded] !== undefined) {
+ if(ldat[loaded]=="true" || ldat[loaded]===true) {
+ ldat[loaded] = true;
+ } else {
+ ldat[loaded] = false;
+ }
+ }
+ 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";
+ } else {
+ ldat[isLeaf] = false;
+ lf="";
+ }
+ ldat[expanded] = ((ldat[expanded] == "true" || ldat[expanded] === true) ? true : false) && ldat[loaded];
+ if(ldat[expanded] === false) {
+ twrap += ((ldat[isLeaf] === true) ? "'" : $t.p.treeIcons.plus+" tree-plus treeclick'");
+ } else {
+ twrap += ((ldat[isLeaf] === true) ? "'" : $t.p.treeIcons.minus+" tree-minus treeclick'");
+ }
+
+ twrap += "></div></div>";
+ $($t.rows[i].cells[expCol]).wrapInner("<span class='cell-wrapper"+lf+"'></span>").prepend(twrap);
+
+ if(curLevel !== parseInt($t.p.tree_root_level,10)) {
+ var pn = $($t).jqGrid('getNodeParent',ldat);
+ expan = pn && pn.hasOwnProperty(expanded) ? pn[expanded] : true;
+ if( !expan ){
+ $($t.rows[i]).css("display","none");
+ }
+ }
+ $($t.rows[i].cells[expCol])
+ .find("div.treeclick")
+ .bind("click",function(e){
+ var target = e.target || e.srcElement,
+ ind2 =$(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]){
+ $($t).jqGrid("collapseRow",$t.p.data[pos]);
+ $($t).jqGrid("collapseNode",$t.p.data[pos]);
+ } else {
+ $($t).jqGrid("expandRow",$t.p.data[pos]);
+ $($t).jqGrid("expandNode",$t.p.data[pos]);
+ }
+ }
+ return false;
+ });
+ if($t.p.ExpandColClick === true) {
+ $($t.rows[i].cells[expCol])
+ .find("span.cell-wrapper")
+ .css("cursor","pointer")
+ .bind("click",function(e) {
+ var target = e.target || e.srcElement,
+ ind2 =$(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]){
+ $($t).jqGrid("collapseRow",$t.p.data[pos]);
+ $($t).jqGrid("collapseNode",$t.p.data[pos]);
+ } else {
+ $($t).jqGrid("expandRow",$t.p.data[pos]);
+ $($t).jqGrid("expandNode",$t.p.data[pos]);
+ }
+ }
+ $($t).jqGrid("setSelection",ind2);
+ return false;
+ });
+ }
+ i++;
+ }
+
+ });
+ },
+ setTreeGrid : function() {
+ return this.each(function (){
+ var $t = this, i=0, pico, ecol = false, nm, key, 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;
+ $t.p.pgbuttons = false;$t.p.pginput = false;
+ $t.p.gridview = true;
+ 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');
+ $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') {
+ $t.p.treeReader = $.extend({
+ level_field: "level",
+ left_field:"lft",
+ right_field: "rgt",
+ leaf_field: "isLeaf",
+ expanded_field: "expanded",
+ loaded: "loaded",
+ icon_field: "icon"
+ },$t.p.treeReader);
+ } else if($t.p.treeGridModel == 'adjacency') {
+ $t.p.treeReader = $.extend({
+ level_field: "level",
+ parent_id_field: "parent",
+ leaf_field: "isLeaf",
+ expanded_field: "expanded",
+ loaded: "loaded",
+ icon_field: "icon"
+ },$t.p.treeReader );
+ }
+ for ( key in $t.p.colModel){
+ if($t.p.colModel.hasOwnProperty(key)) {
+ nm = $t.p.colModel[key].name;
+ 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) {
+ dupcols.push(nm);
+ }
+ }
+ }
+ }
+ $.each($t.p.treeReader,function(j,n){
+ if(n && $.inArray(n, dupcols) === -1){
+ if(j==='leaf_field') { $t.p._treeleafpos= i; }
+ i++;
+ $t.p.colNames.push(n);
+ $t.p.colModel.push({name:n,width:1,hidden:true,sortable:false,resizable:false,hidedlg:true,editable:true,search:false});
+ }
+ });
+ });
+ },
+ expandRow: function (record){
+ this.each(function(){
+ var $t = this;
+ if(!$t.grid || !$t.p.treeGrid) {return;}
+ var childern = $($t).jqGrid("getNodeChildren",record),
+ //if ($($t).jqGrid("isVisibleNode",record)) {
+ expanded = $t.p.treeReader.expanded_field,
+ rows = $t.rows;
+ $(childern).each(function(){
+ var id = $.jgrid.getAccessor(this,$t.p.localReader.id);
+ $(rows.namedItem(id)).css("display","");
+ if(this[expanded]) {
+ $($t).jqGrid("expandRow",this);
+ }
+ });
+ //}
+ });
+ },
+ collapseRow : function (record) {
+ this.each(function(){
+ var $t = this;
+ if(!$t.grid || !$t.p.treeGrid) {return;}
+ var childern = $($t).jqGrid("getNodeChildren",record),
+ expanded = $t.p.treeReader.expanded_field,
+ rows = $t.rows;
+ $(childern).each(function(){
+ var id = $.jgrid.getAccessor(this,$t.p.localReader.id);
+ $(rows.namedItem(id)).css("display","none");
+ if(this[expanded]){
+ $($t).jqGrid("collapseRow",this);
+ }
+ });
+ });
+ },
+ // NS ,adjacency models
+ getRootNodes : function() {
+ var result = [];
+ this.each(function(){
+ var $t = this;
+ if(!$t.grid || !$t.p.treeGrid) {return;}
+ switch ($t.p.treeGridModel) {
+ case 'nested' :
+ var level = $t.p.treeReader.level_field;
+ $($t.p.data).each(function(){
+ if(parseInt(this[level],10) === parseInt($t.p.tree_root_level,10)) {
+ result.push(this);
+ }
+ });
+ break;
+ 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") {
+ result.push(this);
+ }
+ });
+ break;
+ }
+ });
+ return result;
+ },
+ getNodeDepth : function(rc) {
+ var ret = null;
+ this.each(function(){
+ if(!this.grid || !this.p.treeGrid) {return;}
+ var $t = this;
+ switch ($t.p.treeGridModel) {
+ case 'nested' :
+ var level = $t.p.treeReader.level_field;
+ ret = parseInt(rc[level],10) - parseInt($t.p.tree_root_level,10);
+ break;
+ case 'adjacency' :
+ ret = $($t).jqGrid("getNodeAncestors",rc).length;
+ break;
+ }
+ });
+ return ret;
+ },
+ getNodeParent : function(rc) {
+ var result = null;
+ this.each(function(){
+ var $t = this;
+ if(!$t.grid || !$t.p.treeGrid) {return;}
+ switch ($t.p.treeGridModel) {
+ case 'nested' :
+ var lftc = $t.p.treeReader.left_field,
+ rgtc = $t.p.treeReader.right_field,
+ levelc = $t.p.treeReader.level_field,
+ lft = parseInt(rc[lftc],10), rgt = parseInt(rc[rgtc],10), level = parseInt(rc[levelc],10);
+ $(this.p.data).each(function(){
+ if(parseInt(this[levelc],10) === level-1 && parseInt(this[lftc],10) < lft && parseInt(this[rgtc],10) > rgt) {
+ result = this;
+ return false;
+ }
+ });
+ break;
+ case 'adjacency' :
+ 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] ) {
+ result = this;
+ return false;
+ }
+ });
+ break;
+ }
+ });
+ return result;
+ },
+ getNodeChildren : function(rc) {
+ var result = [];
+ this.each(function(){
+ var $t = this;
+ if(!$t.grid || !$t.p.treeGrid) {return;}
+ switch ($t.p.treeGridModel) {
+ case 'nested' :
+ var lftc = $t.p.treeReader.left_field,
+ rgtc = $t.p.treeReader.right_field,
+ levelc = $t.p.treeReader.level_field,
+ lft = parseInt(rc[lftc],10), rgt = parseInt(rc[rgtc],10), level = parseInt(rc[levelc],10);
+ $(this.p.data).each(function(){
+ if(parseInt(this[levelc],10) === level+1 && parseInt(this[lftc],10) > lft && parseInt(this[rgtc],10) < rgt) {
+ result.push(this);
+ }
+ });
+ break;
+ case 'adjacency' :
+ 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]) {
+ result.push(this);
+ }
+ });
+ break;
+ }
+ });
+ return result;
+ },
+ getFullTreeNode : function(rc) {
+ var result = [];
+ this.each(function(){
+ var $t = this, len;
+ if(!$t.grid || !$t.p.treeGrid) {return;}
+ switch ($t.p.treeGridModel) {
+ case 'nested' :
+ var lftc = $t.p.treeReader.left_field,
+ rgtc = $t.p.treeReader.right_field,
+ levelc = $t.p.treeReader.level_field,
+ lft = parseInt(rc[lftc],10), rgt = parseInt(rc[rgtc],10), level = parseInt(rc[levelc],10);
+ $(this.p.data).each(function(){
+ if(parseInt(this[levelc],10) >= level && parseInt(this[lftc],10) >= lft && parseInt(this[lftc],10) <= rgt) {
+ result.push(this);
+ }
+ });
+ break;
+ case 'adjacency' :
+ if(rc) {
+ result.push(rc);
+ var parent_id = $t.p.treeReader.parent_id_field,
+ dtid = $t.p.localReader.id;
+ $(this.p.data).each(function(i){
+ len = result.length;
+ for (i = 0; i < len; i++) {
+ if (result[i][dtid] == this[parent_id]) {
+ result.push(this);
+ break;
+ }
+ }
+ });
+ }
+ break;
+ }
+ });
+ return result;
+ },
+ // End NS, adjacency Model
+ getNodeAncestors : function(rc) {
+ var ancestors = [];
+ this.each(function(){
+ if(!this.grid || !this.p.treeGrid) {return;}
+ var parent = $(this).jqGrid("getNodeParent",rc);
+ while (parent) {
+ ancestors.push(parent);
+ parent = $(this).jqGrid("getNodeParent",parent);
+ }
+ });
+ return ancestors;
+ },
+ isVisibleNode : function(rc) {
+ var result = true;
+ this.each(function(){
+ var $t = this;
+ if(!$t.grid || !$t.p.treeGrid) {return;}
+ var ancestors = $($t).jqGrid("getNodeAncestors",rc),
+ expanded = $t.p.treeReader.expanded_field;
+ $(ancestors).each(function(){
+ result = result && this[expanded];
+ if(!result) {return false;}
+ });
+ });
+ return result;
+ },
+ isNodeLoaded : function(rc) {
+ var result;
+ this.each(function(){
+ var $t = this;
+ if(!$t.grid || !$t.p.treeGrid) {return;}
+ var isLeaf = $t.p.treeReader.leaf_field;
+ if(rc !== undefined ) {
+ if(rc.loaded !== undefined) {
+ result = rc.loaded;
+ } else if( rc[isLeaf] || $($t).jqGrid("getNodeChildren",rc).length > 0){
+ result = true;
+ } else {
+ result = false;
+ }
+ } else {
+ result = false;
+ }
+ });
+ return result;
+ },
+ expandNode : function(rc) {
+ return this.each(function(){
+ if(!this.grid || !this.p.treeGrid) {return;}
+ var expanded = this.p.treeReader.expanded_field,
+ parent = this.p.treeReader.parent_id_field,
+ loaded = this.p.treeReader.loaded,
+ level = this.p.treeReader.level_field,
+ lft = this.p.treeReader.left_field,
+ rgt = this.p.treeReader.right_field;
+
+ if(!rc[expanded]) {
+ var id = $.jgrid.getAccessor(rc,this.p.localReader.id);
+ var rc1 = $("#"+$.jgrid.jqID(id),this.grid.bDiv)[0];
+ var position = this.p._index[id];
+ if( $(this).jqGrid("isNodeLoaded",this.p.data[position]) ) {
+ rc[expanded] = true;
+ $("div.treeclick",rc1).removeClass(this.p.treeIcons.plus+" tree-plus").addClass(this.p.treeIcons.minus+" tree-minus");
+ } else if (!this.grid.hDiv.loading) {
+ rc[expanded] = true;
+ $("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') {
+ $(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') {
+ $(this).jqGrid("setGridParam",{postData:{nodeid:'',n_left:'',n_right:'',n_level:''}});
+ } else {
+ $(this).jqGrid("setGridParam",{postData:{nodeid:'',parentid:'',n_level:''}});
+ }
+ }
+ }
+ });
+ },
+ collapseNode : function(rc) {
+ return this.each(function(){
+ if(!this.grid || !this.p.treeGrid) {return;}
+ var expanded = this.p.treeReader.expanded_field;
+ if(rc[expanded]) {
+ rc[expanded] = false;
+ var id = $.jgrid.getAccessor(rc,this.p.localReader.id);
+ var rc1 = $("#"+$.jgrid.jqID(id),this.grid.bDiv)[0];
+ $("div.treeclick",rc1).removeClass(this.p.treeIcons.minus+" tree-minus").addClass(this.p.treeIcons.plus+" tree-plus");
+ }
+ });
+ },
+ SortTree : function( sortname, newDir, st, datefmt) {
+ return this.each(function(){
+ if(!this.grid || !this.p.treeGrid) {return;}
+ var i, len,
+ rec, records = [], $t = this, query, roots,
+ rt = $(this).jqGrid("getRootNodes");
+ // Sorting roots
+ query = $.jgrid.from(rt);
+ query.orderBy(sortname,newDir,st, datefmt);
+ roots = query.select();
+
+ // Sorting children
+ for (i = 0, len = roots.length; i < len; i++) {
+ rec = roots[i];
+ records.push(rec);
+ $(this).jqGrid("collectChildrenSortTree",records, rec, sortname, newDir,st, datefmt);
+ }
+ $.each(records, function(index) {
+ var id = $.jgrid.getAccessor(this,$t.p.localReader.id);
+ $('#'+$.jgrid.jqID($t.p.id)+ ' tbody tr:eq('+index+')').after($('tr#'+$.jgrid.jqID(id),$t.grid.bDiv));
+ });
+ query = null;roots=null;records=null;
+ });
+ },
+ collectChildrenSortTree : function(records, rec, sortname, newDir,st, datefmt) {
+ return this.each(function(){
+ if(!this.grid || !this.p.treeGrid) {return;}
+ var i, len,
+ child, ch, query, children;
+ ch = $(this).jqGrid("getNodeChildren",rec);
+ query = $.jgrid.from(ch);
+ query.orderBy(sortname, newDir, st, datefmt);
+ children = query.select();
+ for (i = 0, len = children.length; i < len; i++) {
+ child = children[i];
+ records.push(child);
+ $(this).jqGrid("collectChildrenSortTree",records, child, sortname, newDir, st, datefmt);
+ }
+ });
+ },
+ // experimental
+ setTreeRow : function(rowid, data) {
+ var success=false;
+ this.each(function(){
+ var t = this;
+ if(!t.grid || !t.p.treeGrid) {return;}
+ success = $(t).jqGrid("setRowData",rowid,data);
+ });
+ return success;
+ },
+ delTreeNode : function (rowid) {
+ return this.each(function () {
+ var $t = this, rid = $t.p.localReader.id,
+ left = $t.p.treeReader.left_field,
+ right = $t.p.treeReader.right_field, myright, width, res, key;
+ if(!$t.grid || !$t.p.treeGrid) {return;}
+ var rc = $t.p._index[rowid];
+ if (rc !== undefined) {
+ // nested
+ myright = parseInt($t.p.data[rc][right],10);
+ 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++){
+ $($t).jqGrid("delRowData",dr[i][rid]);
+ }
+ }
+ if( $t.p.treeGridModel === "nested") {
+ // ToDo - update grid data
+ res = $.jgrid.from($t.p.data)
+ .greater(left,myright,{stype:'integer'})
+ .select();
+ if(res.length) {
+ for( key in res) {
+ if(res.hasOwnProperty(key)) {
+ res[key][left] = parseInt(res[key][left],10) - width ;
+ }
+ }
+ }
+ res = $.jgrid.from($t.p.data)
+ .greater(right,myright,{stype:'integer'})
+ .select();
+ if(res.length) {
+ for( key in res) {
+ if(res.hasOwnProperty(key)) {
+ res[key][right] = parseInt(res[key][right],10) - width ;
+ }
+ }
+ }
+ }
+ }
+ });
+ },
+ addChildNode : function( nodeid, parentid, data ) {
+ //return this.each(function(){
+ var $t = this[0];
+ if(data) {
+ // we suppose tha the id is autoincremet and
+ var expanded = $t.p.treeReader.expanded_field,
+ isLeaf = $t.p.treeReader.leaf_field,
+ level = $t.p.treeReader.level_field,
+ //icon = $t.p.treeReader.icon_field,
+ parent = $t.p.treeReader.parent_id_field,
+ left = $t.p.treeReader.left_field,
+ 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 ) {
+ 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--;}
+ }
+ 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;
+ } 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;
+ }
+ }
+ len = i+1;
+
+ data[expanded] = false;
+ data[loaded] = true;
+ data[level] = parentlevel;
+ data[isLeaf] = true;
+ if( $t.p.treeGridModel === "adjacency") {
+ data[parent] = parentid;
+ }
+ if( $t.p.treeGridModel === "nested") {
+ // this method requiere more attention
+ var query, res, key;
+ //maxright = parseInt(maxright,10);
+ // ToDo - update grid data
+ if(parentid !== null) {
+ maxright = parseInt(parentdata[right],10);
+ query = $.jgrid.from($t.p.data);
+ query = query.greaterOrEquals(right,maxright,{stype:'integer'});
+ res = query.select();
+ if(res.length) {
+ for( key in res) {
+ if(res.hasOwnProperty(key)) {
+ res[key][left] = res[key][left] > maxright ? parseInt(res[key][left],10) +2 : res[key][left];
+ res[key][right] = res[key][right] >= maxright ? parseInt(res[key][right],10) +2 : res[key][right];
+ }
+ }
+ }
+ data[left] = maxright;
+ data[right]= maxright+1;
+ } else {
+ maxright = parseInt( $($t).jqGrid('getCol', right, false, 'max'), 10);
+ res = $.jgrid.from($t.p.data)
+ .greater(left,maxright,{stype:'integer'})
+ .select();
+ if(res.length) {
+ for( key in res) {
+ if(res.hasOwnProperty(key)) {
+ res[key][left] = parseInt(res[key][left],10) +2 ;
+ }
+ }
+ }
+ res = $.jgrid.from($t.p.data)
+ .greater(right,maxright,{stype:'integer'})
+ .select();
+ if(res.length) {
+ for( key in res) {
+ if(res.hasOwnProperty(key)) {
+ res[key][right] = parseInt(res[key][right],10) +2 ;
+ }
+ }
+ }
+ data[left] = maxright+1;
+ data[right] = maxright + 2;
+ }
+ }
+ if( parentid === null || $($t).jqGrid("isNodeLoaded",parentdata) || leaf ) {
+ $($t).jqGrid('addRowData', nodeid, data, method, rowind);
+ $($t).jqGrid('setTreeNode', i, len);
+ }
+ if(parentdata && !parentdata[expanded]) {
+ $($t.rows[prow])
+ .find("div.treeclick")
+ .click();
+ }
+ }
+ //});
+ }
+});
+})(jQuery);
+// Grouping module
+;(function($){
+"use strict";
+$.extend($.jgrid,{
+ template : function(format){ //jqgformat
+ var args = $.makeArray(arguments).slice(1), j = 1;
+ if(format===undefined) { 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;
+ }
+ }
+ j++;
+ }
+ });
+ }
+});
+$.jgrid.extend({
+ groupingSetup : function () {
+ return this.each(function (){
+ var $t = this,
+ 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') {
+ grp.visibiltyOnNextGrouping = [];
+ }
+
+ grp.lastvalues=[];
+ grp.groups =[];
+ grp.counters =[];
+ for(var 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') {
+ grp.groupColumnShow[i] = true;
+ }
+ if( typeof(grp.groupSummary[i]) !== 'boolean') {
+ grp.groupSummary[i] = false;
+ }
+ if(grp.groupColumnShow[i] === true) {
+ grp.visibiltyOnNextGrouping[i] = true;
+ $($t).jqGrid('showCol',grp.groupField[i]);
+ } else {
+ grp.visibiltyOnNextGrouping[i] = $("#"+$.jgrid.jqID($t.p.id+"_"+grp.groupField[i])).is(":visible");
+ $($t).jqGrid('hideCol',grp.groupField[i]);
+ }
+ }
+ grp.summary =[];
+ var cm = $t.p.colModel;
+ for(var 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'});
+ }
+ }
+ }
+ } else {
+ $t.p.grouping = false;
+ }
+ });
+ },
+ groupingPrepare : function (rData, gdata, record, irow) {
+ this.each(function(){
+ var grp = this.p.groupingView, $t= this;
+ var grlen = grp.groupField.length,
+ fieldName,
+ v,
+ changed = 0;
+ for(var i=0;i<grlen;i++) {
+ fieldName = grp.groupField[i];
+ v = record[fieldName];
+ 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.lastvalues[i] = v;
+ grp.counters[i] = {cnt:1, pos:grp.groups.length-1, summary: $.extend(true,[],grp.summary)};
+ $.each(grp.counters[i].summary,function() {
+ if ($.isFunction(this.st)) {
+ this.v = this.st.call($t, this.v, this.nm, record);
+ } else {
+ this.v = $($t).jqGrid('groupingCalculations.handler',this.st, this.v, this.nm, this.sr, this.srt, record);
+ }
+ });
+ grp.groups[grp.counters[i].pos].summary = grp.counters[i].summary;
+ } else {
+ if( (typeof(v) !== "object" && (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.lastvalues[i] = v;
+ changed = 1;
+ grp.counters[i] = {cnt:1, pos:grp.groups.length-1, summary: $.extend(true,[],grp.summary)};
+ $.each(grp.counters[i].summary,function() {
+ if ($.isFunction(this.st)) {
+ this.v = this.st.call($t, this.v, this.nm, record);
+ } else {
+ this.v = $($t).jqGrid('groupingCalculations.handler',this.st, this.v, this.nm, this.sr, this.srt, record);
+ }
+ });
+ grp.groups[grp.counters[i].pos].summary = grp.counters[i].summary;
+ } 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.lastvalues[i] = v;
+ grp.counters[i] = {cnt:1, pos:grp.groups.length-1, summary: $.extend(true,[],grp.summary)};
+ $.each(grp.counters[i].summary,function() {
+ if ($.isFunction(this.st)) {
+ this.v = this.st.call($t, this.v, this.nm, record);
+ } else {
+ this.v = $($t).jqGrid('groupingCalculations.handler',this.st, this.v, this.nm, this.sr, this.srt, record);
+ }
+ });
+ grp.groups[grp.counters[i].pos].summary = grp.counters[i].summary;
+ } else {
+ grp.counters[i].cnt += 1;
+ grp.groups[grp.counters[i].pos].cnt = grp.counters[i].cnt;
+ $.each(grp.counters[i].summary,function() {
+ if ($.isFunction(this.st)) {
+ this.v = this.st.call($t, this.v, this.nm, record);
+ } else {
+ this.v = $($t).jqGrid('groupingCalculations.handler',this.st, this.v, this.nm, this.sr, this.srt, record);
+ }
+ });
+ grp.groups[grp.counters[i].pos].summary = grp.counters[i].summary;
+ }
+ }
+ }
+ }
+ }
+ gdata.push( rData );
+ });
+ return gdata;
+ },
+ groupingToggle : function(hid){
+ this.each(function(){
+ var $t = this,
+ grp = $t.p.groupingView,
+ strpos = hid.split('_'),
+ //uid = hid.substring(0,strpos+1),
+ num = parseInt(strpos[strpos.length-2], 10);
+ strpos.splice(strpos.length-2,2);
+ var uid = strpos.join("_"),
+ minus = grp.minusicon,
+ plus = grp.plusicon,
+ tar = $("#"+$.jgrid.jqID(hid)),
+ r = tar.length ? tar[0].nextSibling : null,
+ tarspan = $("#"+$.jgrid.jqID(hid)+" span."+"tree-wrap-"+$t.p.direction),
+ collapsed = false, tspan;
+ if( tarspan.hasClass(minus) ) {
+ if(grp.showSummaryOnHide) {
+ if(r){
+ while(r) {
+ if($(r).hasClass('jqfoot') ) {
+ var lv = parseInt($(r).attr("jqfootlevel"),10);
+ if( lv <= num) {
+ break;
+ }
+ }
+ $(r).hide();
+ r = r.nextSibling;
+ }
+ }
+ } else {
+ if(r){
+ while(r) {
+ if( $(r).hasClass(uid+"_"+String(num) ) || $(r).hasClass(uid+"_"+String(num-1))) { break; }
+ $(r).hide();
+ r = r.nextSibling;
+ }
+ }
+ }
+ tarspan.removeClass(minus).addClass(plus);
+ collapsed = true;
+ } else {
+ if(r){
+ while(r) {
+ if($(r).hasClass(uid+"_"+String(num)) || $(r).hasClass(uid+"_"+String(num-1)) ) { break; }
+ $(r).show();
+ tspan = $(r).find("span."+"tree-wrap-"+$t.p.direction);
+ if( tspan && $(tspan).hasClass(plus) ) {
+ $(tspan).removeClass(plus).addClass(minus);
+ }
+ r = r.nextSibling;
+ }
+ }
+ tarspan.removeClass(plus).addClass(minus);
+ }
+ $($t).triggerHandler("jqGridGroupingClickGroup", [hid , collapsed]);
+ if( $.isFunction($t.p.onClickGroup)) { $t.p.onClickGroup.call($t, hid , collapsed); }
+
+ });
+ return false;
+ },
+ groupingRender : function (grdata, colspans ) {
+ 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;
+ pmrtl += " tree-wrap-"+$t.p.direction;
+ ii = 0;
+ $.each($t.p.colModel, function (i,n){
+ for(var ii=0;ii<len;ii++) {
+ if(grp.groupField[ii] === n.name ) {
+ cp[ii] = i;
+ break;
+ }
+ }
+ });
+ var toEnd = 0;
+ function findGroupIdx( ind , offset, grp) {
+ if(offset===0) {
+ return 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];
+ }
+ }
+ }
+ }
+ var sumreverse = $.makeArray(grp.groupSummary);
+ sumreverse.reverse();
+ $.each(grp.groups,function(i,n){
+ toEnd++;
+ clid = $t.p.id+"ghead_"+n.idx;
+ 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 );
+ } catch (egv) {
+ gv = n.value;
+ }
+ 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 end = gg !== undefined ? grp.groups[i+1].startRow : grdata.length;
+ for(var kk=n.startRow;kk<end;kk++) {
+ str += grdata[kk].join('');
+ }
+ var jj;
+ if (gg !== undefined) {
+ for (jj = 0; jj < grp.groupField.length; jj++) {
+ if (gg.dataIndex === grp.groupField[jj]) {
+ break;
+ }
+ }
+ toEnd = grp.groupField.length - jj;
+ }
+ for (var ik = 0; ik < toEnd; ik++) {
+ if(!sumreverse[ik]) { continue; }
+ var hhdr = "";
+ if(grp.groupCollapse && !grp.showSummaryOnHide) {
+ hhdr = " style=\"display:none;\"";
+ }
+ str += "<tr"+hhdr+" jqfootlevel=\""+(n.idx-ik)+"\" role=\"row\" class=\"ui-widget-content jqfoot ui-row-"+$t.p.direction+"\">";
+ var fdata = findGroupIdx(i, ik, grp.groups),
+ cm = $t.p.colModel,
+ vv, grlen = fdata.cnt;
+ for(var k=0; k<colspans;k++) {
+ var tmpdata = "<td "+$t.formatCol(k,1,'')+"> </td>",
+ tplfld = "{0}";
+ $.each(fdata.summary,function(){
+ if(this.nm === cm[k].name) {
+ if(cm[k].summaryTpl) {
+ tplfld = cm[k].summaryTpl;
+ }
+ if(typeof(this.st) === 'string' && this.st.toLowerCase() === 'avg') {
+ if(this.v && grlen > 0) {
+ this.v = (this.v/grlen);
+ }
+ }
+ try {
+ vv = $t.formatter('', this.v, k, this);
+ } catch (ef) {
+ vv = this.v;
+ }
+ tmpdata= "<td "+$t.formatCol(k,1,'')+">"+$.jgrid.format(tplfld,vv)+ "</td>";
+ return false;
+ }
+ });
+ str += tmpdata;
+ }
+ str += "</tr>";
+ }
+ toEnd = jj;
+ }
+ });
+ $("#"+$.jgrid.jqID($t.p.id)+" tbody:first").append(str);
+ // free up memory
+ str = null;
+ });
+ },
+ groupingGroupBy : function (name, options ) {
+ return this.each(function(){
+ var $t = this;
+ 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") {
+ grp.visibiltyOnNextGrouping = [];
+ }
+ var i;
+ // show previous hidden groups if they are hidden and weren't removed yet
+ for(i=0;i<grp.groupField.length;i++) {
+ if(!grp.groupColumnShow[i] && grp.visibiltyOnNextGrouping[i]) {
+ $($t).jqGrid('showCol',grp.groupField[i]);
+ }
+ }
+ // set visibility status of current group columns on next grouping
+ for(i=0;i<name.length;i++) {
+ grp.visibiltyOnNextGrouping[i] = $("#"+$.jgrid.jqID($t.p.id)+"_"+$.jgrid.jqID(name[i])).is(":visible");
+ }
+ $t.p.groupingView = $.extend($t.p.groupingView, options || {});
+ grp.groupField = name;
+ $($t).trigger("reloadGrid");
+ });
+ },
+ groupingRemove : function (current) {
+ return this.each(function(){
+ var $t = this;
+ if(typeof(current) === 'undefined') {
+ current = true;
+ }
+ $t.p.grouping = false;
+ if(current===true) {
+ var grp = $t.p.groupingView;
+ // show previous hidden groups if they are hidden and weren't removed yet
+ for(var i=0;i<grp.groupField.length;i++) {
+ if (!grp.groupColumnShow[i] && grp.visibiltyOnNextGrouping[i]) {
+ $($t).jqGrid('showCol', grp.groupField);
+ }
+ }
+ $("tr.jqgroup, tr.jqfoot","#"+$.jgrid.jqID($t.p.id)+" tbody:first").remove();
+ $("tr.jqgrow:hidden","#"+$.jgrid.jqID($t.p.id)+" tbody:first").show();
+ } else {
+ $($t).trigger("reloadGrid");
+ }
+ });
+ },
+ groupingCalculations : {
+ handler: function(fn, v, field, round, roundType, rc) {
+ var funcs = {
+ sum: function() {
+ return parseFloat(v||0) + parseFloat((rc[field]||0));
+ },
+
+ min: function() {
+ if(v==="") {
+ return parseFloat(rc[field]||0);
+ }
+ return Math.min(parseFloat(v),parseFloat(rc[field]||0));
+ },
+
+ max: function() {
+ if(v==="") {
+ return parseFloat(rc[field]||0);
+ }
+ return Math.max(parseFloat(v),parseFloat(rc[field]||0));
+ },
+
+ count: function() {
+ if(v==="") {v=0;}
+ if(rc.hasOwnProperty(field)) {
+ return v+1;
+ } else {
+ return 0;
+ }
+ },
+
+ avg: function() {
+ // the same as sum, but at end we divide it
+ // so use sum instead of duplicating the code (?)
+ return funcs.sum();
+ }
+ }
+
+ if(!funcs[fn]) {
+ throw ("jqGrid Grouping No such method: " + fn);
+ }
+ var res = funcs[fn]();
+
+ if (round != null) {
+ if (roundType == 'fixed')
+ res = res.toFixed(round);
+ else {
+ var mul = Math.pow(10, round);
+
+ res = Math.round(res * mul) / mul;
+ }
+ }
+
+ return res;
+ }
+ }
+});
+})(jQuery);
+;(function($){
+/*
+ * jqGrid extension for constructing Grid Data from external file
+ * 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-2.0.html
+**/
+//jsHint options
+/*global jQuery, $, alert, xmlJsonClass */
+
+"use strict";
+ $.jgrid.extend({
+ jqGridImport : function(o) {
+ o = $.extend({
+ imptype : "xml", // xml, json, xmlstring, jsonstring
+ impstring: "",
+ impurl: "",
+ mtype: "GET",
+ impData : {},
+ xmlGrid :{
+ config : "roots>grid",
+ data: "roots>rows"
+ },
+ jsonGrid :{
+ config : "grid",
+ data: "data"
+ },
+ ajaxOptions :{}
+ }, o || {});
+ return this.each(function(){
+ var $t = this;
+ var xmlConvert = function (xml,o) {
+ var cnfg = $(o.xmlGrid.config,xml)[0];
+ var xmldata = $(o.xmlGrid.data,xml)[0], jstr, jstr1;
+ if(xmlJsonClass.xml2json && $.jgrid.parse) {
+ jstr = xmlJsonClass.xml2json(cnfg," ");
+ jstr = $.jgrid.parse(jstr);
+ for(var key in jstr) {
+ if(jstr.hasOwnProperty(key)) {
+ jstr1=jstr[key];
+ }
+ }
+ if(xmldata) {
+ // save the datatype
+ var svdatatype = jstr.grid.datatype;
+ jstr.grid.datatype = 'xmlstring';
+ jstr.grid.datastr = xml;
+ $($t).jqGrid( jstr1 ).jqGrid("setGridParam",{datatype:svdatatype});
+ } else {
+ $($t).jqGrid( jstr1 );
+ }
+ jstr = null;jstr1=null;
+ } else {
+ alert("xml2json or parse are not present");
+ }
+ };
+ var jsonConvert = function (jsonstr,o){
+ if (jsonstr && typeof jsonstr == 'string') {
+ var _jsonparse = false;
+ if($.jgrid.useJSON) {
+ $.jgrid.useJSON = false;
+ _jsonparse = true;
+ }
+ var json = $.jgrid.parse(jsonstr);
+ if(_jsonparse) { $.jgrid.useJSON = true; }
+ var gprm = json[o.jsonGrid.config];
+ var jdata = json[o.jsonGrid.data];
+ if(jdata) {
+ var svdatatype = gprm.datatype;
+ gprm.datatype = 'jsonstring';
+ gprm.datastr = jdata;
+ $($t).jqGrid( gprm ).jqGrid("setGridParam",{datatype:svdatatype});
+ } else {
+ $($t).jqGrid( gprm );
+ }
+ }
+ };
+ switch (o.imptype){
+ case 'xml':
+ $.ajax($.extend({
+ url:o.impurl,
+ type:o.mtype,
+ data: o.impData,
+ dataType:"xml",
+ complete: function(xml,stat) {
+ if(stat == 'success') {
+ xmlConvert(xml.responseXML,o);
+ $($t).triggerHandler("jqGridImportComplete", [xml, o]);
+ if($.isFunction(o.importComplete)) {
+ o.importComplete(xml);
+ }
+ }
+ xml=null;
+ }
+ }, o.ajaxOptions));
+ 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(xmld) {
+ xmlConvert(xmld,o);
+ $($t).triggerHandler("jqGridImportComplete", [xmld, o]);
+ if($.isFunction(o.importComplete)) {
+ o.importComplete(xmld);
+ }
+ o.impstring = null;
+ }
+ xmld = null;
+ }
+ break;
+ case 'json':
+ $.ajax($.extend({
+ url:o.impurl,
+ type:o.mtype,
+ data: o.impData,
+ dataType:"json",
+ complete: function(json) {
+ try {
+ jsonConvert(json.responseText,o );
+ $($t).triggerHandler("jqGridImportComplete", [json, o]);
+ if($.isFunction(o.importComplete)) {
+ o.importComplete(json);
+ }
+ } catch (ee){}
+ json=null;
+ }
+ }, o.ajaxOptions ));
+ break;
+ case 'jsonstring' :
+ if(o.impstring && typeof o.impstring == 'string') {
+ jsonConvert(o.impstring,o );
+ $($t).triggerHandler("jqGridImportComplete", [o.impstring, o]);
+ if($.isFunction(o.importComplete)) {
+ o.importComplete(o.impstring);
+ }
+ o.impstring = null;
+ }
+ break;
+ }
+ });
+ },
+ jqGridExport : function(o) {
+ o = $.extend({
+ exptype : "xmlstring",
+ root: "grid",
+ ident: "\t"
+ }, o || {});
+ var ret = null;
+ this.each(function () {
+ if(!this.grid) { return;}
+ var 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) {
+ gprm.colNames.splice(0,1);
+ gprm.colModel.splice(0,1);
+ }
+ if(gprm.multiselect) {
+ gprm.colNames.splice(0,1);
+ gprm.colModel.splice(0,1);
+ }
+ if(gprm.subGrid) {
+ gprm.colNames.splice(0,1);
+ gprm.colModel.splice(0,1);
+ }
+ gprm.knv = null;
+ if(gprm.treeGrid) {
+ for (var key in gprm.treeReader) {
+ if(gprm.treeReader.hasOwnProperty(key)) {
+ gprm.colNames.splice(gprm.colNames.length-1);
+ gprm.colModel.splice(gprm.colModel.length-1);
+ }
+ }
+ }
+ switch (o.exptype) {
+ case 'xmlstring' :
+ ret = "<"+o.root+">"+xmlJsonClass.json2xml(gprm,o.ident)+"</"+o.root+">";
+ break;
+ case 'jsonstring' :
+ ret = "{"+ xmlJsonClass.toJson(gprm,o.root,o.ident,false)+"}";
+ if(gprm.postData.filters !== undefined) {
+ ret=ret.replace(/filters":"/,'filters":');
+ ret=ret.replace(/}]}"/,'}]}');
+ }
+ break;
+ }
+ });
+ return ret;
+ },
+ excelExport : function(o) {
+ o = $.extend({
+ exptype : "remote",
+ url : null,
+ oper: "oper",
+ tag: "excel",
+ exportOptions : {}
+ }, o || {});
+ return this.each(function(){
+ if(!this.grid) { return;}
+ var url;
+ 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; }
+ else { url = o.url+"?"+params; }
+ window.location = url;
+ }
+ });
+ }
+ });
+})(jQuery);;(function($){
+/*
+**
+ * jqGrid addons using jQuery UI
+ * Author: Mark Williams
+ * 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
+ * depends on jQuery UI
+**/
+if ($.browser.msie && $.browser.version==8) {
+ $.expr[":"].hidden = function(elem) {
+ return elem.offsetWidth === 0 || elem.offsetHeight === 0 ||
+ elem.style.display == "none";
+ };
+}
+// requiere load multiselect before grid
+$.jgrid._multiselect = false;
+if($.ui) {
+ 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;
+ };
+ }
+ if($.ui.multiselect.prototype.destroy) {
+ $.ui.multiselect.prototype.destroy = function() {
+ this.element.show();
+ this.container.remove();
+ if ($.Widget === undefined) {
+ $.widget.prototype.destroy.apply(this, arguments);
+ } else {
+ $.Widget.prototype.destroy.apply(this, arguments);
+ }
+ };
+ }
+ $.jgrid._multiselect = true;
+ }
+}
+
+$.jgrid.extend({
+ sortableColumns : function (tblrow)
+ {
+ return this.each(function (){
+ var ts = this, tid= $.jgrid.jqID( ts.p.id );
+ function start() {ts.p.disableClick = true;}
+ var sortable_opts = {
+ "tolerance" : "pointer",
+ "axis" : "x",
+ "scrollSensitivity": "1",
+ "items": '>th:not(:has(#jqgh_'+tid+'_cb'+',#jqgh_'+tid+'_rn'+',#jqgh_'+tid+'_subgrid),:hidden)',
+ "placeholder": {
+ element: function(item) {
+ var el = $(document.createElement(item[0].nodeName))
+ .addClass(item[0].className+" ui-sortable-placeholder ui-state-highlight")
+ .removeClass("ui-sortable-helper")[0];
+ return el;
+ },
+ update: function(self, p) {
+ p.height(self.currentItem.innerHeight() - parseInt(self.currentItem.css('paddingTop')||0, 10) - parseInt(self.currentItem.css('paddingBottom')||0, 10));
+ p.width(self.currentItem.innerWidth() - parseInt(self.currentItem.css('paddingLeft')||0, 10) - parseInt(self.currentItem.css('paddingRight')||0, 10));
+ }
+ },
+ "update": function(event, ui) {
+ var p = $(ui.item).parent(),
+ th = $(">th", p),
+ colModel = ts.p.colModel,
+ cmMap = {}, tid= ts.p.id+"_";
+ $.each(colModel, function(i) { cmMap[this.name]=i; });
+ var permutation = [];
+ th.each(function() {
+ var id = $(">div", this).get(0).id.replace(/^jqgh_/, "").replace(tid,"");
+ if (id in cmMap) {
+ permutation.push(cmMap[id]);
+ }
+ });
+
+ $(ts).jqGrid("remapColumns",permutation, true, true);
+ if ($.isFunction(ts.p.sortable.update)) {
+ ts.p.sortable.update(permutation);
+ }
+ setTimeout(function(){ts.p.disableClick=false;}, 50);
+ }
+ };
+ if (ts.p.sortable.options) {
+ $.extend(sortable_opts, ts.p.sortable.options);
+ } else if ($.isFunction(ts.p.sortable)) {
+ ts.p.sortable = { "update" : ts.p.sortable };
+ }
+ if (sortable_opts.start) {
+ var s = sortable_opts.start;
+ sortable_opts.start = function(e,ui) {
+ start();
+ s.call(this,e,ui);
+ };
+ } else {
+ sortable_opts.start = start;
+ }
+ if (ts.p.sortable.exclude) {
+ sortable_opts.items += ":not("+ts.p.sortable.exclude+")";
+ }
+ tblrow.sortable(sortable_opts).data("sortable").floating = true;
+ });
+ },
+ columnChooser : function(opts) {
+ var self = this;
+ if($("#colchooser_"+$.jgrid.jqID(self[0].p.id)).length ) { return; }
+ var selector = $('<div id="colchooser_'+self[0].p.id+'" style="position:relative;overflow:hidden"><div><select multiple="multiple"></select></div></div>');
+ var select = $('select', selector);
+
+ function insert(perm,i,v) {
+ if(i>=0){
+ var a = perm.slice();
+ var b = a.splice(i,Math.max(perm.length-i,i));
+ if(i>perm.length) { i = perm.length; }
+ a[i] = v;
+ return a.concat(b);
+ }
+ }
+ opts = $.extend({
+ "width" : 420,
+ "height" : 240,
+ "classname" : null,
+ "done" : function(perm) { if (perm) { self.jqGrid("remapColumns", perm, true); } },
+ /* msel is either the name of a ui widget class that
+ extends a multiselect, or a function that supports
+ creating a multiselect object (with no argument,
+ or when passed an object), and destroying it (when
+ passed the string "destroy"). */
+ "msel" : "multiselect",
+ /* "msel_opts" : {}, */
+
+ /* dlog is either the name of a ui widget class that
+ behaves in a dialog-like way, or a function, that
+ supports creating a dialog (when passed dlog_opts)
+ or destroying a dialog (when passed the string
+ "destroy")
+ */
+ "dlog" : "dialog",
+ "dialog_opts" : {
+ "minWidth": 470
+ },
+ /* dlog_opts is either an option object to be passed
+ to "dlog", or (more likely) a function that creates
+ the options object.
+ The default produces a suitable options object for
+ ui.dialog */
+ "dlog_opts" : function(opts) {
+ var buttons = {};
+ buttons[opts.bSubmit] = function() {
+ opts.apply_perm();
+ opts.cleanup(false);
+ };
+ buttons[opts.bCancel] = function() {
+ opts.cleanup(true);
+ };
+ return $.extend(true, {
+ "buttons": buttons,
+ "close": function() {
+ opts.cleanup(true);
+ },
+ "modal" : opts.modal ? opts.modal : false,
+ "resizable": opts.resizable ? opts.resizable : true,
+ "width": opts.width+20
+ }, opts.dialog_opts || {});
+ },
+ /* Function to get the permutation array, and pass it to the
+ "done" function */
+ "apply_perm" : function() {
+ $('option',select).each(function() {
+ if (this.selected) {
+ self.jqGrid("showCol", colModel[this.value].name);
+ } else {
+ self.jqGrid("hideCol", colModel[this.value].name);
+ }
+ });
+
+ var perm = [];
+ //fixedCols.slice(0);
+ $('option:selected',select).each(function() { perm.push(parseInt(this.value,10)); });
+ $.each(perm, function() { delete colMap[colModel[parseInt(this,10)].name]; });
+ $.each(colMap, function() {
+ var ti = parseInt(this,10);
+ perm = insert(perm,ti,ti);
+ });
+ if (opts.done) {
+ opts.done.call(self, perm);
+ }
+ },
+ /* Function to cleanup the dialog, and select. Also calls the
+ done function with no permutation (to indicate that the
+ columnChooser was aborted */
+ "cleanup" : function(calldone) {
+ call(opts.dlog, selector, 'destroy');
+ call(opts.msel, select, 'destroy');
+ selector.remove();
+ if (calldone && opts.done) {
+ opts.done.call(self);
+ }
+ },
+ "msel_opts" : {}
+ }, $.jgrid.col, opts || {});
+ if($.ui) {
+ if ($.ui.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!");
+ return;
+ }
+ opts.msel_opts = $.extend($.ui.multiselect.defaults,opts.msel_opts);
+ }
+ }
+ }
+ if (opts.caption) {
+ selector.attr("title", opts.caption);
+ }
+ if (opts.classname) {
+ selector.addClass(opts.classname);
+ select.addClass(opts.classname);
+ }
+ if (opts.width) {
+ $(">div",selector).css({"width": opts.width,"margin":"0 auto"});
+ select.css("width", opts.width);
+ }
+ if (opts.height) {
+ $(">div",selector).css("height", opts.height);
+ select.css("height", opts.height - 10);
+ }
+ var colModel = self.jqGrid("getGridParam", "colModel");
+ var colNames = self.jqGrid("getGridParam", "colNames");
+ var colMap = {}, fixedCols = [];
+
+ select.empty();
+ $.each(colModel, function(i) {
+ colMap[this.name] = i;
+ if (this.hidedlg) {
+ if (!this.hidden) {
+ fixedCols.push(i);
+ }
+ return;
+ }
+
+ select.append("<option value='"+i+"' "+
+ (this.hidden?"":"selected='selected'")+">"+jQuery.jgrid.stripHtml(colNames[i])+"</option>");
+ });
+ function call(fn, obj) {
+ if (!fn) { return; }
+ if (typeof fn == 'string') {
+ if ($.fn[fn]) {
+ $.fn[fn].apply(obj, $.makeArray(arguments).slice(2));
+ }
+ } else if ($.isFunction(fn)) {
+ fn.apply(obj, $.makeArray(arguments).slice(2));
+ }
+ }
+
+ var dopts = $.isFunction(opts.dlog_opts) ? opts.dlog_opts.call(self, opts) : opts.dlog_opts;
+ call(opts.dlog, selector, dopts);
+ var mopts = $.isFunction(opts.msel_opts) ? opts.msel_opts.call(self, opts) : opts.msel_opts;
+ call(opts.msel, select, mopts);
+ },
+ sortableRows : function (opts) {
+ // Can accept all sortable options and events
+ return this.each(function(){
+ var $t = this;
+ if(!$t.grid) { return; }
+ // Currently we disable a treeGrid sortable
+ if($t.p.treeGrid) { return; }
+ if($.fn.sortable) {
+ opts = $.extend({
+ "cursor":"move",
+ "axis" : "y",
+ "items": ".jqgrow"
+ },
+ opts || {});
+ if(opts.start && $.isFunction(opts.start)) {
+ opts._start_ = opts.start;
+ delete opts.start;
+ } else {opts._start_=false;}
+ if(opts.update && $.isFunction(opts.update)) {
+ opts._update_ = opts.update;
+ delete opts.update;
+ } else {opts._update_ = false;}
+ opts.start = function(ev,ui) {
+ $(ui.item).css("border-width","0px");
+ $("td",ui.item).each(function(i){
+ this.style.width = $t.grid.cols[i].style.width;
+ });
+ if($t.p.subGrid) {
+ var subgid = $(ui.item).attr("id");
+ try {
+ $($t).jqGrid('collapseSubGridRow',subgid);
+ } catch (e) {}
+ }
+ if(opts._start_) {
+ opts._start_.apply(this,[ev,ui]);
+ }
+ };
+ opts.update = function (ev,ui) {
+ $(ui.item).css("border-width","");
+ if($t.p.rownumbers === true) {
+ $("td.jqgrid-rownum",$t.rows).each(function( i ){
+ $(this).html( i+1+(parseInt($t.p.page,10)-1)*parseInt($t.p.rowNum,10) );
+ });
+ }
+ if(opts._update_) {
+ opts._update_.apply(this,[ev,ui]);
+ }
+ };
+ $("tbody:first",$t).sortable(opts);
+ $("tbody:first",$t).disableSelection();
+ }
+ });
+ },
+ gridDnD : function(opts) {
+ return this.each(function(){
+ var $t = this;
+ if(!$t.grid) { return; }
+ // Currently we disable a treeGrid drag and drop
+ if($t.p.treeGrid) { return; }
+ if(!$.fn.draggable || !$.fn.droppable) { return; }
+ function updateDnD ()
+ {
+ var datadnd = $.data($t,"dnd");
+ $("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) {
+ updateDnD();
+ return;
+ }
+ opts = $.extend({
+ "drag" : function (opts) {
+ return $.extend({
+ start : function (ev, ui) {
+ // if we are in subgrid mode try to collapse the node
+ if($t.p.subGrid) {
+ var subgid = $(ui.helper).attr("id");
+ try {
+ $($t).jqGrid('collapseSubGridRow',subgid);
+ } catch (e) {}
+ }
+ // 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" ){
+ $($.data($t,"dnd").connectWith[i]).jqGrid('addRowData','jqg_empty_row',{});
+ }
+ }
+ ui.helper.addClass("ui-state-highlight");
+ $("td",ui.helper).each(function(i) {
+ this.style.width = $t.grid.headers[i].width+"px";
+ });
+ if(opts.onstart && $.isFunction(opts.onstart) ) { opts.onstart.call($($t),ev,ui); }
+ },
+ stop :function(ev,ui) {
+ if(ui.helper.dropped && !opts.dragcopy) {
+ var 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++){
+ $($.data($t,"dnd").connectWith[i]).jqGrid('delRowData','jqg_empty_row');
+ }
+ if(opts.onstop && $.isFunction(opts.onstop) ) { opts.onstop.call($($t),ev,ui); }
+ }
+ },opts.drag_opts || {});
+ },
+ "drop" : function (opts) {
+ return $.extend({
+ accept: function(d) {
+ 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;
+ }
+ return false;
+ },
+ drop: function(ev, ui) {
+ if (!$(ui.draggable).hasClass('jqgrow')) { return; }
+ var accept = $(ui.draggable).attr("id");
+ var getdata = ui.draggable.parent().parent().jqGrid('getRowData',accept);
+ if(!opts.dropbyname) {
+ var j =0, tmpdata = {}, nm;
+ var dropmodel = $("#"+$.jgrid.jqID(this.id)).jqGrid('getGridParam','colModel');
+ try {
+ for (var key in getdata) {
+ nm = dropmodel[j].name;
+ if( !(nm == 'cb' || nm =='rn' || nm == 'subgrid' )) {
+ if(getdata.hasOwnProperty(key) && dropmodel[j]) {
+ tmpdata[nm] = getdata[key];
+ }
+ }
+ j++;
+ }
+ getdata = tmpdata;
+ } catch (e) {}
+ }
+ ui.helper.dropped = true;
+ if(opts.beforedrop && $.isFunction(opts.beforedrop) ) {
+ //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(ui.helper.dropped) {
+ var grid;
+ if(opts.autoid) {
+ if($.isFunction(opts.autoid)) {
+ grid = opts.autoid.call(this,getdata);
+ } else {
+ grid = Math.ceil(Math.random()*1000);
+ grid = opts.autoidprefix+grid;
+ }
+ }
+ // NULL is interpreted as undefined while null as object
+ $("#"+$.jgrid.jqID(this.id)).jqGrid('addRowData',grid,getdata,opts.droppos);
+ }
+ if(opts.ondrop && $.isFunction(opts.ondrop) ) { opts.ondrop.call(this,ev,ui, getdata); }
+ }}, opts.drop_opts || {});
+ },
+ "onstart" : null,
+ "onstop" : null,
+ "beforedrop": null,
+ "ondrop" : null,
+ "drop_opts" : {
+ "activeClass": "ui-state-active",
+ "hoverClass": "ui-state-hover"
+ },
+ "drag_opts" : {
+ "revert": "invalid",
+ "helper": "clone",
+ "cursor": "move",
+ "appendTo" : "#jqgrid_dnd",
+ "zIndex": 5000
+ },
+ "dragcopy": false,
+ "dropbyname" : false,
+ "droppos" : "first",
+ "autoid" : true,
+ "autoidprefix" : "dnd_"
+ }, opts || {});
+
+ if(!opts.connectWith) { return; }
+ opts.connectWith = opts.connectWith.split(",");
+ opts.connectWith = $.map(opts.connectWith,function(n){return $.trim(n);});
+ $.data($t,"dnd",opts);
+
+ 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];
+ $(cn).droppable($.isFunction(opts.drop) ? opts.drop.call($($t),opts) : opts.drop);
+ }
+ });
+ },
+ gridResize : function(opts) {
+ return this.each(function(){
+ var $t = this, gID = $.jgrid.jqID($t.p.id);
+ if(!$t.grid || !$.fn.resizable) { return; }
+ opts = $.extend({}, opts || {});
+ if(opts.alsoResize ) {
+ opts._alsoResize_ = opts.alsoResize;
+ delete opts.alsoResize;
+ } else {
+ opts._alsoResize_ = false;
+ }
+ if(opts.stop && $.isFunction(opts.stop)) {
+ opts._stop_ = opts.stop;
+ delete opts.stop;
+ } else {
+ opts._stop_ = false;
+ }
+ opts.stop = function (ev, ui) {
+ $($t).jqGrid('setGridParam',{height:$("#gview_"+gID+" .ui-jqgrid-bdiv").height()});
+ $($t).jqGrid('setGridWidth',ui.size.width,opts.shrinkToFit);
+ if(opts._stop_) { opts._stop_.call($t,ev,ui); }
+ };
+ if(opts._alsoResize_) {
+ var optstest = "{\'#gview_"+gID+" .ui-jqgrid-bdiv\':true,'" +opts._alsoResize_+"':true}";
+ opts.alsoResize = eval('('+optstest+')'); // the only way that I found to do this
+ } else {
+ opts.alsoResize = $(".ui-jqgrid-bdiv","#gview_"+gID);
+ }
+ delete opts._alsoResize_;
+ $("#gbox_"+gID).resizable(opts);
+ });
+ }
+});
+})(jQuery);
+/*
+ Transform a table to a jqGrid.
+ Peter Romianowski <peter.romianowski(a)optivo.de>
+ If the first column of the table contains checkboxes or
+ radiobuttons then the jqGrid is made selectable.
+*/
+// Addition - selector can be a class or id
+function tableToGrid(selector, options) {
+jQuery(selector).each(function() {
+ if(this.grid) {return;} //Adedd from Tony Tomov
+ // This is a small "hack" to make the width of the jqGrid 100%
+ jQuery(this).width("99%");
+ var w = jQuery(this).width();
+
+ // Text whether we have single or multi select
+ var inputCheckbox = jQuery('tr td:first-child input[type=checkbox]:first', jQuery(this));
+ var inputRadio = jQuery('tr td:first-child input[type=radio]:first', jQuery(this));
+ var selectMultiple = inputCheckbox.length > 0;
+ var selectSingle = !selectMultiple && inputRadio.length > 0;
+ var selectable = selectMultiple || selectSingle;
+ //var inputName = inputCheckbox.attr("name") || inputRadio.attr("name");
+
+ // Build up the columnModel and the data
+ var colModel = [];
+ var colNames = [];
+ jQuery('th', jQuery(this)).each(function() {
+ if (colModel.length === 0 && selectable) {
+ colModel.push({
+ name: '__selection__',
+ index: '__selection__',
+ width: 0,
+ hidden: true
+ });
+ colNames.push('__selection__');
+ } else {
+ colModel.push({
+ name: jQuery(this).attr("id") || jQuery.trim(jQuery.jgrid.stripHtml(jQuery(this).html())).split(' ').join('_'),
+ index: jQuery(this).attr("id") || jQuery.trim(jQuery.jgrid.stripHtml(jQuery(this).html())).split(' ').join('_'),
+ width: jQuery(this).width() || 150
+ });
+ colNames.push(jQuery(this).html());
+ }
+ });
+ var data = [];
+ var rowIds = [];
+ var rowChecked = [];
+ jQuery('tbody > tr', jQuery(this)).each(function() {
+ var row = {};
+ var rowPos = 0;
+ jQuery('td', jQuery(this)).each(function() {
+ if (rowPos === 0 && selectable) {
+ var input = jQuery('input', jQuery(this));
+ var rowId = input.attr("value");
+ rowIds.push(rowId || data.length);
+ if (input.is(":checked")) {
+ rowChecked.push(rowId);
+ }
+ row[colModel[rowPos].name] = input.attr("value");
+ } else {
+ row[colModel[rowPos].name] = jQuery(this).html();
+ }
+ rowPos++;
+ });
+ if(rowPos >0) { data.push(row); }
+ });
+
+ // Clear the original HTML table
+ jQuery(this).empty();
+
+ // Mark it as jqGrid
+ jQuery(this).addClass("scroll");
+
+ jQuery(this).jqGrid(jQuery.extend({
+ datatype: "local",
+ width: w,
+ colNames: colNames,
+ colModel: colModel,
+ multiselect: selectMultiple
+ //inputName: inputName,
+ //inputValueCol: imputName != null ? "__selection__" : null
+ }, options || {}));
+
+ // Add data
+ var a;
+ for (a = 0; a < data.length; a++) {
+ var id = null;
+ if (rowIds.length > 0) {
+ id = rowIds[a];
+ if (id && id.replace) {
+ // We have to do this since the value of a checkbox
+ // or radio button can be anything
+ id = encodeURIComponent(id).replace(/[.\-%]/g, "_");
+ }
+ }
+ if (id === null) {
+ id = a + 1;
+ }
+ jQuery(this).jqGrid("addRowData",id, data[a]);
+ }
+
+ // Set the selection
+ for (a = 0; a < rowChecked.length; a++) {
+ jQuery(this).jqGrid("setSelection",rowChecked[a]);
+ }
+});
+};
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/grid.addons.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/grid.addons.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/grid.addons.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,704 @@
+(function($){
+/*
+ * jqGrid methods without support. Use as you wish
+ * 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-2.0.html
+ *
+ * This list of deprecated methods.
+ * If you instead want to use them, please include this file after the grid main file.
+ * Some methods will be then overwritten.
+ *
+ */
+/*global jQuery, $ */
+
+$.jgrid.extend({
+// This is the ols search Filter method used in navigator.
+ searchGrid : function (p) {
+ p = $.extend({
+ recreateFilter: false,
+ drag: true,
+ sField:'searchField',
+ sValue:'searchString',
+ sOper: 'searchOper',
+ sFilter: 'filters',
+ loadDefaults: true, // this options activates loading of default filters from grid's postData for Multipe Search only.
+ beforeShowSearch: null,
+ afterShowSearch : null,
+ onInitializeSearch: null,
+ closeAfterSearch : false,
+ closeAfterReset: false,
+ closeOnEscape : false,
+ multipleSearch : false,
+ cloneSearchRowOnAdd: true,
+ // translation
+ // if you want to change or remove the order change it in sopt
+ // ['bw','eq','ne','lt','le','gt','ge','ew','cn']
+ sopt: null,
+ // Note: stringResult is intentionally declared "undefined by default".
+ // you are velcome to define stringResult expressly in the options you pass to searchGrid()
+ // stringResult is a "safeguard" measure to insure we post sensible data when communicated as form-encoded
+ // see http://github.com/tonytomov/jqGrid/issues/#issue/36
+ //
+ // If this value is not expressly defined in the incoming options,
+ // lower in the code we will infer the value based on value of multipleSearch
+ stringResult: undefined,
+ onClose : null,
+ // useDataProxy allows ADD, EDIT and DEL code to bypass calling $.ajax
+ // directly when grid's 'dataProxy' property (grid.p.dataProxy) is a function.
+ // Used for "editGridRow" and "delGridRow" below and automatically flipped to TRUE
+ // when ajax setting's 'url' (grid's 'editurl') property is undefined.
+ // When 'useDataProxy' is true, instead of calling $.ajax.call(gridDOMobj, o, i) we call
+ // gridDOMobj.p.dataProxy.call(gridDOMobj, o, i)
+ //
+ // Behavior is extremely similar to when 'datatype' is a function, but arguments are slightly different.
+ // Normally the following is fed to datatype.call(a, b, c):
+ // a = Pointer to grid's table DOM element, b = grid.p.postdata, c = "load_"+grid's ID
+ // In cases of "edit" and "del" the following is fed:
+ // a = Pointer to grid's table DOM element (same),
+ // b = extended Ajax Options including postdata in "data" property. (different object type)
+ // c = "set_"+grid's ID in case of "edit" and "del_"+grid's ID in case of "del" (same type, different content)
+ // The major difference is that complete ajax options object, with attached "complete" and "error"
+ // callback functions is fed instead of only post data.
+ // This allows you to emulate a $.ajax call (including calling "complete"/"error"),
+ // while retrieving the data locally in the browser.
+ useDataProxy: false,
+ overlay : true
+ }, $.jgrid.search, p || {});
+ return this.each(function() {
+ var $t = this;
+ if(!$t.grid) {return;}
+ var fid = "fbox_"+$t.p.id,
+ showFrm = true;
+ function applyDefaultFilters(gridDOMobj, filterSettings) {
+ /*
+ gridDOMobj = ointer to grid DOM object ( $(#list)[0] )
+ What we need from gridDOMobj:
+ gridDOMobj.SearchFilter is the pointer to the Search box, once it's created.
+ gridDOMobj.p.postData - dictionary of post settings. These can be overriden at grid creation to
+ contain default filter settings. We will parse these and will populate the search with defaults.
+ filterSettings - same settings object you (would) pass to $().jqGrid('searchGrid', filterSettings);
+ */
+
+ // Pulling default filter settings out of postData property of grid's properties.:
+ var defaultFilters = gridDOMobj.p.postData[filterSettings.sFilter];
+ // example of what we might get: {"groupOp":"and","rules":[{"field":"amount","op":"eq","data":"100"}]}
+ // suppose we have imported this with grid import, the this is a string.
+ if(typeof(defaultFilters) == "string") {
+ defaultFilters = $.jgrid.parse(defaultFilters);
+ }
+ if (defaultFilters) {
+ if (defaultFilters.groupOp) {
+ gridDOMobj.SearchFilter.setGroupOp(defaultFilters.groupOp);
+ }
+ if (defaultFilters.rules) {
+ var f, i = 0, li = defaultFilters.rules.length, success = false;
+ for (; i < li; i++) {
+ f = defaultFilters.rules[i];
+ // we are not trying to counter all issues with filter declaration here. Just the basics to avoid lookup exceptions.
+ if (f.field !== undefined && f.op !== undefined && f.data !== undefined) {
+ success = gridDOMobj.SearchFilter.setFilter({
+ 'sfref':gridDOMobj.SearchFilter.$.find(".sf:last"),
+ 'filter':$.extend({},f)
+ });
+ if (success) { gridDOMobj.SearchFilter.add(); }
+ }
+ }
+ }
+ }
+ } // end of applyDefaultFilters
+ function hideFilter(selector) {
+ if(p.onClose){
+ var fclm = p.onClose(selector);
+ if(typeof fclm == 'boolean' && !fclm) { return; }
+ }
+ selector.hide();
+ if(p.overlay === true) {
+ $(".jqgrid-overlay:first","#gbox_"+$t.p.id).hide();
+ }
+ }
+ function showFilter(){
+ var fl = $(".ui-searchFilter").length;
+ if(fl > 1) {
+ var zI = $("#"+fid).css("zIndex");
+ $("#"+fid).css({zIndex:parseInt(zI,10)+fl});
+ }
+ $("#"+fid).show();
+ if(p.overlay === true) {
+ $(".jqgrid-overlay:first","#gbox_"+$t.p.id).show();
+ }
+ try{$(':input:visible',"#"+fid)[0].focus();}catch(_){}
+ }
+ function searchFilters(filters) {
+ var hasFilters = (filters !== undefined),
+ grid = $("#"+$t.p.id),
+ sdata={};
+ if(p.multipleSearch===false) {
+ sdata[p.sField] = filters.rules[0].field;
+ sdata[p.sValue] = filters.rules[0].data;
+ sdata[p.sOper] = filters.rules[0].op;
+ if(sdata.hasOwnProperty(p.sFilter) ) {
+ delete sdata[p.sFilter];
+ }
+ } else {
+ sdata[p.sFilter] = filters;
+ $.each([p.sField, p.sValue, p.sOper], function(i, n){
+ if(sdata.hasOwnProperty(n)) { delete sdata[n];}
+ });
+ }
+ grid[0].p.search = hasFilters;
+ $.extend(grid[0].p.postData,sdata);
+ grid.trigger("reloadGrid",[{page:1}]);
+ if(p.closeAfterSearch) { hideFilter($("#"+fid)); }
+ }
+ function resetFilters(op) {
+ var reload = op && op.hasOwnProperty("reload") ? op.reload : true,
+ grid = $("#"+$t.p.id),
+ sdata={};
+ grid[0].p.search = false;
+ if(p.multipleSearch===false) {
+ sdata[p.sField] = sdata[p.sValue] = sdata[p.sOper] = "";
+ } else {
+ sdata[p.sFilter] = "";
+ }
+ $.extend(grid[0].p.postData,sdata);
+ if(reload) {
+ grid.trigger("reloadGrid",[{page:1}]);
+ }
+ if(p.closeAfterReset) { hideFilter($("#"+fid)); }
+ }
+ if($.fn.searchFilter) {
+ if(p.recreateFilter===true) {$("#"+fid).remove();}
+ if( $("#"+fid).html() !== null ) {
+ if ( $.isFunction(p.beforeShowSearch) ) {
+ showFrm = p.beforeShowSearch($("#"+fid));
+ if(typeof(showFrm) == "undefined") {
+ showFrm = true;
+ }
+ }
+ if(showFrm === false) { return; }
+ showFilter();
+ if( $.isFunction(p.afterShowSearch) ) { p.afterShowSearch($("#"+fid)); }
+ } else {
+ var fields = [],
+ colNames = $("#"+$t.p.id).jqGrid("getGridParam","colNames"),
+ colModel = $("#"+$t.p.id).jqGrid("getGridParam","colModel"),
+ stempl = ['eq','ne','lt','le','gt','ge','bw','bn','in','ni','ew','en','cn','nc'],
+ j,pos,k,oprtr=[];
+ if (p.sopt !==null) {
+ k=0;
+ for(j=0;j<p.sopt.length;j++) {
+ if( (pos= $.inArray(p.sopt[j],stempl)) != -1 ){
+ oprtr[k] = {op:p.sopt[j],text: p.odata[pos]};
+ k++;
+ }
+ }
+ } else {
+ for(j=0;j<stempl.length;j++) {
+ oprtr[j] = {op:stempl[j],text: p.odata[j]};
+ }
+ }
+ $.each(colModel, function(i, v) {
+ var searchable = (typeof v.search === 'undefined') ? true: v.search ,
+ hidden = (v.hidden === true),
+ soptions = $.extend({}, {text: colNames[i], itemval: v.index || v.name}, this.searchoptions),
+ ignoreHiding = (soptions.searchhidden === true);
+ if(typeof soptions.sopt !== 'undefined') {
+ k=0;
+ soptions.ops =[];
+ if(soptions.sopt.length>0) {
+ for(j=0;j<soptions.sopt.length;j++) {
+ if( (pos= $.inArray(soptions.sopt[j],stempl)) != -1 ){
+ soptions.ops[k] = {op:soptions.sopt[j],text: p.odata[pos]};
+ k++;
+ }
+ }
+ }
+ }
+ if(typeof(this.stype) === 'undefined') { this.stype='text'; }
+ if(this.stype == 'select') {
+ if ( soptions.dataUrl !== undefined) {}
+ else {
+ var eov;
+ if(soptions.value) {
+ eov = soptions.value;
+ } else if(this.editoptions) {
+ eov = this.editoptions.value;
+ }
+ if(eov) {
+ soptions.dataValues =[];
+ if(typeof(eov) === 'string') {
+ var so = eov.split(";"),sv;
+ for(j=0;j<so.length;j++) {
+ sv = so[j].split(":");
+ soptions.dataValues[j] ={value:sv[0],text:sv[1]};
+ }
+ } else if (typeof(eov) === 'object') {
+ j=0;
+ for (var key in eov) {
+ if(eov.hasOwnProperty(key)) {
+ soptions.dataValues[j] ={value:key,text:eov[key]};
+ j++;
+ }
+ }
+ }
+ }
+ }
+ }
+ if ((ignoreHiding && searchable) || (searchable && !hidden)) {
+ fields.push(soptions);
+ }
+ });
+ if(fields.length>0){
+ $("<div id='"+fid+"' role='dialog' tabindex='-1'></div>").insertBefore("#gview_"+$t.p.id);
+ // Before we create searchFilter we need to decide if we want to get back a string or a JS object.
+ // see http://github.com/tonytomov/jqGrid/issues/#issue/36 for background on the issue.
+ // If p.stringResult is defined, it was explisitly passed to us by user. Honor the choice, whatever it is.
+ if (p.stringResult===undefined) {
+ // to provide backward compatibility, inferring stringResult value from multipleSearch
+ p.stringResult = p.multipleSearch;
+ }
+ // we preserve the return value here to retain access to .add() and other good methods of search form.
+ $t.SearchFilter = $("#"+fid).searchFilter(fields, { groupOps: p.groupOps, operators: oprtr, onClose:hideFilter, resetText: p.Reset, searchText: p.Find, windowTitle: p.caption, rulesText:p.rulesText, matchText:p.matchText, onSearch: searchFilters, onReset: resetFilters,stringResult:p.stringResult, ajaxSelectOptions: $.extend({},$.jgrid.ajaxOptions,$t.p.ajaxSelectOptions ||{}), clone: p.cloneSearchRowOnAdd });
+ $(".ui-widget-overlay","#"+fid).remove();
+ if($t.p.direction=="rtl") { $(".ui-closer","#"+fid).css("float","left"); }
+ if (p.drag===true) {
+ $("#"+fid+" table thead tr:first td:first").css('cursor','move');
+ if(jQuery.fn.jqDrag) {
+ $("#"+fid).jqDrag($("#"+fid+" table thead tr:first td:first"));
+ } else {
+ try {
+ $("#"+fid).draggable({handle: $("#"+fid+" table thead tr:first td:first")});
+ } catch (e) {}
+ }
+ }
+ if(p.multipleSearch === false) {
+ $(".ui-del, .ui-add, .ui-del, .ui-add-last, .matchText, .rulesText", "#"+fid).hide();
+ $("select[name='groupOp']","#"+fid).hide();
+ }
+ if (p.multipleSearch === true && p.loadDefaults === true) {
+ applyDefaultFilters($t, p);
+ }
+ if ( $.isFunction(p.onInitializeSearch) ) { p.onInitializeSearch( $("#"+fid) ); }
+ if ( $.isFunction(p.beforeShowSearch) ) {
+ showFrm = p.beforeShowSearch($("#"+fid));
+ if(typeof(showFrm) == "undefined") {
+ showFrm = true;
+ }
+ }
+ if(showFrm === false) { return; }
+ showFilter();
+ if( $.isFunction(p.afterShowSearch) ) { p.afterShowSearch($("#"+fid)); }
+ if(p.closeOnEscape===true){
+ $("#"+fid).keydown( function( e ) {
+ if( e.which == 27 ) {
+ hideFilter($("#"+fid));
+ }
+ if (e.which == 13) {
+ $(".ui-search", this).click();
+ }
+ });
+ }
+ }
+ }
+ }
+ });
+ },
+ // methods taken from grid.custom.
+ updateGridRows : function (data, rowidname, jsonreader) {
+ var nm, success=false, title;
+ this.each(function(){
+ var t = this, vl, ind, srow, sid;
+ if(!t.grid) {return false;}
+ if(!rowidname) { rowidname = "id"; }
+ if( data && data.length >0 ) {
+ $(data).each(function(j){
+ srow = this;
+ ind = t.rows.namedItem(srow[rowidname]);
+ if(ind) {
+ sid = srow[rowidname];
+ if(jsonreader === true){
+ if(t.p.jsonReader.repeatitems === true) {
+ if(t.p.jsonReader.cell) {srow = srow[t.p.jsonReader.cell];}
+ for (var k=0;k<srow.length;k++) {
+ vl = t.formatter( sid, srow[k], k, srow, 'edit');
+ title = t.p.colModel[k].title ? {"title":$.jgrid.stripHtml(vl)} : {};
+ if(t.p.treeGrid===true && nm == t.p.ExpandColumn) {
+ $("td:eq("+k+") > span:first",ind).html(vl).attr(title);
+ } else {
+ $("td:eq("+k+")",ind).html(vl).attr(title);
+ }
+ }
+ success = true;
+ return true;
+ }
+ }
+ $(t.p.colModel).each(function(i){
+ nm = jsonreader===true ? this.jsonmap || this.name :this.name;
+ if( srow[nm] !== undefined) {
+ vl = t.formatter( sid, srow[nm], i, srow, '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);
+ } else {
+ $("td:eq("+i+")",ind).html(vl).attr(title);
+ }
+ success = true;
+ }
+ });
+ }
+ });
+ }
+ });
+ return success;
+ },
+ // Form search - sorry for this method. Instead use ne jqFilter method.
+ filterGrid : function(gridid,p){
+ p = $.extend({
+ gridModel : false,
+ gridNames : false,
+ gridToolbar : false,
+ filterModel: [], // label/name/stype/defval/surl/sopt
+ formtype : "horizontal", // horizontal/vertical
+ autosearch: true, // if set to false a serch button should be enabled.
+ formclass: "filterform",
+ tableclass: "filtertable",
+ buttonclass: "filterbutton",
+ searchButton: "Search",
+ clearButton: "Clear",
+ enableSearch : false,
+ enableClear: false,
+ beforeSearch: null,
+ afterSearch: null,
+ beforeClear: null,
+ afterClear: null,
+ url : '',
+ marksearched: true
+ },p || {});
+ return this.each(function(){
+ var self = this;
+ this.p = p;
+ if(this.p.filterModel.length === 0 && this.p.gridModel===false) { alert("No filter is set"); return;}
+ if( !gridid) {alert("No target grid is set!"); return;}
+ this.p.gridid = gridid.indexOf("#") != -1 ? gridid : "#"+gridid;
+ var gcolMod = $(this.p.gridid).jqGrid("getGridParam",'colModel');
+ if(gcolMod) {
+ if( this.p.gridModel === true) {
+ var thegrid = $(this.p.gridid)[0];
+ var sh;
+ // we should use the options search, edittype, editoptions
+ // additionally surl and defval can be added in grid colModel
+ $.each(gcolMod, function (i,n) {
+ var tmpFil = [];
+ this.search = this.search === false ? false : true;
+ if(this.editrules && this.editrules.searchhidden === true) {
+ sh = true;
+ } else {
+ if(this.hidden === true ) {
+ sh = false;
+ } else {
+ sh = true;
+ }
+ }
+ if( this.search === true && sh === true) {
+ if(self.p.gridNames===true) {
+ tmpFil.label = thegrid.p.colNames[i];
+ } else {
+ tmpFil.label = '';
+ }
+ tmpFil.name = this.name;
+ tmpFil.index = this.index || this.name;
+ // we support only text and selects, so all other to text
+ tmpFil.stype = this.edittype || 'text';
+ if(tmpFil.stype != 'select' ) {
+ tmpFil.stype = 'text';
+ }
+ tmpFil.defval = this.defval || '';
+ tmpFil.surl = this.surl || '';
+ tmpFil.sopt = this.editoptions || {};
+ tmpFil.width = this.width;
+ self.p.filterModel.push(tmpFil);
+ }
+ });
+ } else {
+ $.each(self.p.filterModel,function(i,n) {
+ for(var j=0;j<gcolMod.length;j++) {
+ if(this.name == gcolMod[j].name) {
+ this.index = gcolMod[j].index || this.name;
+ break;
+ }
+ }
+ if(!this.index) {
+ this.index = this.name;
+ }
+ });
+ }
+ } else {
+ alert("Could not get grid colModel"); return;
+ }
+ var triggerSearch = function() {
+ var sdata={}, j=0, v;
+ var gr = $(self.p.gridid)[0], nm;
+ gr.p.searchdata = {};
+ if($.isFunction(self.p.beforeSearch)){self.p.beforeSearch();}
+ $.each(self.p.filterModel,function(i,n){
+ nm = this.index;
+ if(this.stype === 'select') {
+ v = $("select[name="+nm+"]",self).val();
+ if(v) {
+ sdata[nm] = v;
+ if(self.p.marksearched){
+ $("#jqgh_"+this.name,gr.grid.hDiv).addClass("dirty-cell");
+ }
+ j++;
+ } else {
+ if(self.p.marksearched){
+ $("#jqgh_"+this.name,gr.grid.hDiv).removeClass("dirty-cell");
+ }
+ try {
+ delete gr.p.postData[this.index];
+ } catch (e) {}
+ }
+ } else {
+ v = $("input[name="+nm+"]",self).val();
+ if(v) {
+ sdata[nm] = v;
+ if(self.p.marksearched){
+ $("#jqgh_"+this.name,gr.grid.hDiv).addClass("dirty-cell");
+ }
+ j++;
+ } else {
+ if(self.p.marksearched){
+ $("#jqgh_"+this.name,gr.grid.hDiv).removeClass("dirty-cell");
+ }
+ try {
+ delete gr.p.postData[this.index];
+ } catch(x) {}
+ }
+ }
+ });
+ var sd = j>0 ? true : false;
+ $.extend(gr.p.postData,sdata);
+ var saveurl;
+ if(self.p.url) {
+ saveurl = $(gr).jqGrid("getGridParam",'url');
+ $(gr).jqGrid("setGridParam",{url:self.p.url});
+ }
+ $(gr).jqGrid("setGridParam",{search:sd}).trigger("reloadGrid",[{page:1}]);
+ if(saveurl) {$(gr).jqGrid("setGridParam",{url:saveurl});}
+ if($.isFunction(self.p.afterSearch)){self.p.afterSearch();}
+ };
+ var clearSearch = function(){
+ var sdata={}, v, j=0;
+ var gr = $(self.p.gridid)[0], nm;
+ if($.isFunction(self.p.beforeClear)){self.p.beforeClear();}
+ $.each(self.p.filterModel,function(i,n){
+ nm = this.index;
+ v = (this.defval) ? this.defval : "";
+ if(!this.stype){this.stype='text';}
+ switch (this.stype) {
+ case 'select' :
+ var v1;
+ $("select[name="+nm+"] option",self).each(function (i){
+ if(i===0) { this.selected = true; }
+ if ($(this).text() == v) {
+ this.selected = true;
+ v1 = $(this).val();
+ return false;
+ }
+ });
+ if(v1) {
+ // post the key and not the text
+ sdata[nm] = v1;
+ if(self.p.marksearched){
+ $("#jqgh_"+this.name,gr.grid.hDiv).addClass("dirty-cell");
+ }
+ j++;
+ } else {
+ if(self.p.marksearched){
+ $("#jqgh_"+this.name,gr.grid.hDiv).removeClass("dirty-cell");
+ }
+ try {
+ delete gr.p.postData[this.index];
+ } catch (e) {}
+ }
+ break;
+ case 'text':
+ $("input[name="+nm+"]",self).val(v);
+ if(v) {
+ sdata[nm] = v;
+ if(self.p.marksearched){
+ $("#jqgh_"+this.name,gr.grid.hDiv).addClass("dirty-cell");
+ }
+ j++;
+ } else {
+ if(self.p.marksearched){
+ $("#jqgh_"+this.name,gr.grid.hDiv).removeClass("dirty-cell");
+ }
+ try {
+ delete gr.p.postData[this.index];
+ } catch (k) {}
+ }
+ break;
+ }
+ });
+ var sd = j>0 ? true : false;
+ $.extend(gr.p.postData,sdata);
+ var saveurl;
+ if(self.p.url) {
+ saveurl = $(gr).jqGrid("getGridParam",'url');
+ $(gr).jqGrid("setGridParam",{url:self.p.url});
+ }
+ $(gr).jqGrid("setGridParam",{search:sd}).trigger("reloadGrid",[{page:1}]);
+ if(saveurl) {$(gr).jqGrid("setGridParam",{url:saveurl});}
+ if($.isFunction(self.p.afterClear)){self.p.afterClear();}
+ };
+ var tbl;
+ var formFill = function(){
+ var tr = document.createElement("tr");
+ var tr1, sb, cb,tl,td;
+ if(self.p.formtype=='horizontal'){
+ $(tbl).append(tr);
+ }
+ $.each(self.p.filterModel,function(i,n){
+ tl = document.createElement("td");
+ $(tl).append("<label for='"+this.name+"'>"+this.label+"</label>");
+ td = document.createElement("td");
+ var $t=this;
+ if(!this.stype) { this.stype='text';}
+ switch (this.stype)
+ {
+ case "select":
+ if(this.surl) {
+ // data returned should have already constructed html select
+ $(td).load(this.surl,function(){
+ if($t.defval) { $("select",this).val($t.defval); }
+ $("select",this).attr({name:$t.index || $t.name, id: "sg_"+$t.name});
+ if($t.sopt) { $("select",this).attr($t.sopt); }
+ if(self.p.gridToolbar===true && $t.width) {
+ $("select",this).width($t.width);
+ }
+ if(self.p.autosearch===true){
+ $("select",this).change(function(e){
+ triggerSearch();
+ return false;
+ });
+ }
+ });
+ } else {
+ // sopt to construct the values
+ if($t.sopt.value) {
+ var oSv = $t.sopt.value;
+ var elem = document.createElement("select");
+ $(elem).attr({name:$t.index || $t.name, id: "sg_"+$t.name}).attr($t.sopt);
+ var so, sv, ov;
+ if(typeof oSv === "string") {
+ so = oSv.split(";");
+ for(var k=0; k<so.length;k++){
+ sv = so[k].split(":");
+ ov = document.createElement("option");
+ ov.value = sv[0]; ov.innerHTML = sv[1];
+ if (sv[1]==$t.defval) { ov.selected ="selected"; }
+ elem.appendChild(ov);
+ }
+ } else if(typeof oSv === "object" ) {
+ for ( var key in oSv) {
+ if(oSv.hasOwnProperty(key)) {
+ i++;
+ ov = document.createElement("option");
+ ov.value = key; ov.innerHTML = oSv[key];
+ if (oSv[key]==$t.defval) { ov.selected ="selected"; }
+ elem.appendChild(ov);
+ }
+ }
+ }
+ if(self.p.gridToolbar===true && $t.width) {
+ $(elem).width($t.width);
+ }
+ $(td).append(elem);
+ if(self.p.autosearch===true){
+ $(elem).change(function(e){
+ triggerSearch();
+ return false;
+ });
+ }
+ }
+ }
+ break;
+ case 'text':
+ var df = this.defval ? this.defval: "";
+ $(td).append("<input type='text' name='"+(this.index || this.name)+"' id='sg_"+this.name+"' value='"+df+"'/>");
+ if($t.sopt) { $("input",td).attr($t.sopt); }
+ if(self.p.gridToolbar===true && $t.width) {
+ if($.browser.msie) {
+ $("input",td).width($t.width-4);
+ } else {
+ $("input",td).width($t.width-2);
+ }
+ }
+ if(self.p.autosearch===true){
+ $("input",td).keypress(function(e){
+ var key = e.charCode ? e.charCode : e.keyCode ? e.keyCode : 0;
+ if(key == 13){
+ triggerSearch();
+ return false;
+ }
+ return this;
+ });
+ }
+ break;
+ }
+ if(self.p.formtype=='horizontal'){
+ if(self.p.gridToolbar===true && self.p.gridNames===false) {
+ $(tr).append(td);
+ } else {
+ $(tr).append(tl).append(td);
+ }
+ $(tr).append(td);
+ } else {
+ tr1 = document.createElement("tr");
+ $(tr1).append(tl).append(td);
+ $(tbl).append(tr1);
+ }
+ });
+ td = document.createElement("td");
+ if(self.p.enableSearch === true){
+ sb = "<input type='button' id='sButton' class='"+self.p.buttonclass+"' value='"+self.p.searchButton+"'/>";
+ $(td).append(sb);
+ $("input#sButton",td).click(function(){
+ triggerSearch();
+ return false;
+ });
+ }
+ if(self.p.enableClear === true) {
+ cb = "<input type='button' id='cButton' class='"+self.p.buttonclass+"' value='"+self.p.clearButton+"'/>";
+ $(td).append(cb);
+ $("input#cButton",td).click(function(){
+ clearSearch();
+ return false;
+ });
+ }
+ if(self.p.enableClear === true || self.p.enableSearch === true) {
+ if(self.p.formtype=='horizontal') {
+ $(tr).append(td);
+ } else {
+ tr1 = document.createElement("tr");
+ $(tr1).append("<td> </td>").append(td);
+ $(tbl).append(tr1);
+ }
+ }
+ };
+ var frm = $("<form name='SearchForm' style=display:inline;' class='"+this.p.formclass+"'></form>");
+ tbl =$("<table class='"+this.p.tableclass+"' cellspacing='0' cellpading='0' border='0'><tbody></tbody></table>");
+ $(frm).append(tbl);
+ formFill();
+ $(this).append(frm);
+ this.triggerSearch = triggerSearch;
+ this.clearSearch = clearSearch;
+ });
+ }
+
+});
+})(jQuery);
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/grid.postext.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/grid.postext.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/grid.postext.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,64 @@
+;(function($){
+/**
+ * jqGrid extension
+ * Paul Tiseo ptiseo(a)wasteconsultants.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
+**/
+$.jgrid.extend({
+ getPostData : function(){
+ var $t = this[0];
+ if(!$t.grid) { return; }
+ return $t.p.postData;
+ },
+ setPostData : function( newdata ) {
+ var $t = this[0];
+ if(!$t.grid) { return; }
+ // check if newdata is correct type
+ if ( typeof(newdata) === 'object' ) {
+ $t.p.postData = newdata;
+ }
+ else {
+ alert("Error: cannot add a non-object postData value. postData unchanged.");
+ }
+ },
+ appendPostData : function( newdata ) {
+ var $t = this[0];
+ if(!$t.grid) { return; }
+ // check if newdata is correct type
+ if ( typeof(newdata) === 'object' ) {
+ $.extend($t.p.postData, newdata);
+ }
+ else {
+ alert("Error: cannot append a non-object postData value. postData unchanged.");
+ }
+ },
+ setPostDataItem : function( key, val ) {
+ var $t = this[0];
+ if(!$t.grid) { return; }
+ $t.p.postData[key] = val;
+ },
+ getPostDataItem : function( key ) {
+ var $t = this[0];
+ if(!$t.grid) { return; }
+ return $t.p.postData[key];
+ },
+ removePostDataItem : function( key ) {
+ var $t = this[0];
+ if(!$t.grid) { return; }
+ delete $t.p.postData[key];
+ },
+ getUserData : function(){
+ var $t = this[0];
+ if(!$t.grid) { return; }
+ return $t.p.userData;
+ },
+ getUserDataItem : function( key ) {
+ var $t = this[0];
+ if(!$t.grid) { return; }
+ return $t.p.userData[key];
+ }
+});
+})(jQuery);
\ No newline at end of file
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/grid.setcolumns.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/grid.setcolumns.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/grid.setcolumns.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,126 @@
+;(function($){
+/**
+ * jqGrid extension for manipulating columns properties
+ * Piotr Roznicki roznicki(a)o2.pl
+ * http://www.roznicki.prv.pl
+ * 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
+**/
+$.jgrid.extend({
+ setColumns : function(p) {
+ p = $.extend({
+ top : 0,
+ left: 0,
+ width: 200,
+ height: 'auto',
+ dataheight: 'auto',
+ modal: false,
+ drag: true,
+ beforeShowForm: null,
+ afterShowForm: null,
+ afterSubmitForm: null,
+ closeOnEscape : true,
+ ShrinkToFit : false,
+ jqModal : false,
+ saveicon: [true,"left","ui-icon-disk"],
+ closeicon: [true,"left","ui-icon-close"],
+ onClose : null,
+ colnameview : true,
+ closeAfterSubmit : true,
+ updateAfterCheck : false,
+ recreateForm : false
+ }, $.jgrid.col, p ||{});
+ return this.each(function(){
+ var $t = this;
+ if (!$t.grid ) { return; }
+ var onBeforeShow = typeof p.beforeShowForm === 'function' ? true: false;
+ var onAfterShow = typeof p.afterShowForm === 'function' ? true: false;
+ var onAfterSubmit = typeof p.afterSubmitForm === 'function' ? true: false;
+ var gID = $t.p.id,
+ dtbl = "ColTbl_"+gID,
+ IDs = {themodal:'colmod'+gID,modalhead:'colhd'+gID,modalcontent:'colcnt'+gID, scrollelm: dtbl};
+ if(p.recreateForm===true && $("#"+IDs.themodal).html() != null) {
+ $("#"+IDs.themodal).remove();
+ }
+ if ( $("#"+IDs.themodal).html() != null ) {
+ if(onBeforeShow) { p.beforeShowForm($("#"+dtbl)); }
+ $.jgrid.viewModal("#"+IDs.themodal,{gbox:"#gbox_"+gID,jqm:p.jqModal, jqM:false, modal:p.modal});
+ if(onAfterShow) { p.afterShowForm($("#"+dtbl)); }
+ } else {
+ var dh = isNaN(p.dataheight) ? p.dataheight : p.dataheight+"px";
+ var formdata = "<div id='"+dtbl+"' class='formdata' style='width:100%;overflow:auto;position:relative;height:"+dh+";'>";
+ formdata += "<table class='ColTable' cellspacing='1' cellpading='2' border='0'><tbody>";
+ for(i=0;i<this.p.colNames.length;i++){
+ if(!$t.p.colModel[i].hidedlg) { // added from T. Tomov
+ formdata += "<tr><td style='white-space: pre;'><input type='checkbox' style='margin-right:5px;' id='col_" + this.p.colModel[i].name + "' class='cbox' value='T' " +
+ ((this.p.colModel[i].hidden===false)?"checked":"") + "/>" + "<label for='col_" + this.p.colModel[i].name + "'>" + this.p.colNames[i] + ((p.colnameview) ? " (" + this.p.colModel[i].name + ")" : "" )+ "</label></td></tr>";
+ }
+ }
+ formdata += "</tbody></table></div>"
+ var bS = !p.updateAfterCheck ? "<a href='javascript:void(0)' id='dData' class='fm-button ui-state-default ui-corner-all'>"+p.bSubmit+"</a>" : "",
+ bC ="<a href='javascript:void(0)' id='eData' class='fm-button ui-state-default ui-corner-all'>"+p.bCancel+"</a>";
+ formdata += "<table border='0' class='EditTable' id='"+dtbl+"_2'><tbody><tr style='display:block;height:3px;'><td></td></tr><tr><td class='DataTD ui-widget-content'></td></tr><tr><td class='ColButton EditButton'>"+bS+" "+bC+"</td></tr></tbody></table>";
+ p.gbox = "#gbox_"+gID;
+ $.jgrid.createModal(IDs,formdata,p,"#gview_"+$t.p.id,$("#gview_"+$t.p.id)[0]);
+ if(p.saveicon[0]==true) {
+ $("#dData","#"+dtbl+"_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) {
+ $("#eData","#"+dtbl+"_2").addClass(p.closeicon[1] == "right" ? 'fm-button-icon-right' : 'fm-button-icon-left')
+ .append("<span class='ui-icon "+p.closeicon[2]+"'></span>");
+ }
+ if(!p.updateAfterCheck) {
+ $("#dData","#"+dtbl+"_2").click(function(e){
+ for(i=0;i<$t.p.colModel.length;i++){
+ if(!$t.p.colModel[i].hidedlg) { // added from T. Tomov
+ var nm = $t.p.colModel[i].name.replace(/\./g, "\\.");
+ if($("#col_" + nm,"#"+dtbl).attr("checked")) {
+ $($t).jqGrid("showCol",$t.p.colModel[i].name);
+ $("#col_" + nm,"#"+dtbl).attr("defaultChecked",true); // Added from T. Tomov IE BUG
+ } else {
+ $($t).jqGrid("hideCol",$t.p.colModel[i].name);
+ $("#col_" + nm,"#"+dtbl).attr("defaultChecked",""); // Added from T. Tomov IE BUG
+ }
+ }
+ }
+ if(p.ShrinkToFit===true) {
+ $($t).jqGrid("setGridWidth",$t.grid.width-0.001,true);
+ }
+ if(p.closeAfterSubmit) $.jgrid.hideModal("#"+IDs.themodal,{gb:"#gbox_"+gID,jqm:p.jqModal, onClose: p.onClose});
+ if (onAfterSubmit) { p.afterSubmitForm($("#"+dtbl)); }
+ return false;
+ });
+ } else {
+ $(":input","#"+dtbl).click(function(e){
+ var cn = this.id.substr(4);
+ if(cn){
+ if(this.checked) {
+ $($t).jqGrid("showCol",cn);
+ } else {
+ $($t).jqGrid("hideCol",cn);
+ }
+ if(p.ShrinkToFit===true) {
+ $($t).jqGrid("setGridWidth",$t.grid.width-0.001,true);
+ }
+ }
+ return this;
+ });
+ }
+ $("#eData", "#"+dtbl+"_2").click(function(e){
+ $.jgrid.hideModal("#"+IDs.themodal,{gb:"#gbox_"+gID,jqm:p.jqModal, onClose: p.onClose});
+ return false;
+ });
+ $("#dData, #eData","#"+dtbl+"_2").hover(
+ function(){$(this).addClass('ui-state-hover');},
+ function(){$(this).removeClass('ui-state-hover');}
+ );
+ if(onBeforeShow) { p.beforeShowForm($("#"+dtbl)); }
+ $.jgrid.viewModal("#"+IDs.themodal,{gbox:"#gbox_"+gID,jqm:p.jqModal, jqM: true, modal:p.modal});
+ if(onAfterShow) { p.afterShowForm($("#"+dtbl)); }
+ }
+ });
+ }
+});
+})(jQuery);
\ No newline at end of file
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/jquery.contextmenu.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/jquery.contextmenu.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/jquery.contextmenu.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,147 @@
+/*
+ * ContextMenu - jQuery plugin for right-click context menus
+ *
+ * Author: Chris Domigan
+ * Contributors: Dan G. Switzer, II
+ * Parts of this plugin are inspired by Joern Zaefferer's Tooltip plugin
+ *
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * Version: r2
+ * Date: 16 July 2007
+ *
+ * For documentation visit http://www.trendskitchens.co.nz/jquery/contextmenu/
+ *
+ */
+
+(function($) {
+
+ var menu, shadow, content, hash, currentTarget;
+ var defaults = {
+ menuStyle: {
+ listStyle: 'none',
+ padding: '1px',
+ margin: '0px',
+ backgroundColor: '#fff',
+ border: '1px solid #999',
+ width: '100px'
+ },
+ itemStyle: {
+ margin: '0px',
+ color: '#000',
+ display: 'block',
+ cursor: 'default',
+ padding: '3px',
+ border: '1px solid #fff',
+ backgroundColor: 'transparent'
+ },
+ itemHoverStyle: {
+ border: '1px solid #0a246a',
+ backgroundColor: '#b6bdd2'
+ },
+ eventPosX: 'pageX',
+ eventPosY: 'pageY',
+ shadow : true,
+ onContextMenu: null,
+ onShowMenu: null
+ };
+
+ $.fn.contextMenu = function(id, options) {
+ if (!menu) { // Create singleton menu
+ menu = $('<div id="jqContextMenu"></div>')
+ .hide()
+ .css({position:'absolute', zIndex:'500'})
+ .appendTo('body')
+ .bind('click', function(e) {
+ e.stopPropagation();
+ });
+ }
+ if (!shadow) {
+ shadow = $('<div></div>')
+ .css({backgroundColor:'#000',position:'absolute',opacity:0.2,zIndex:499})
+ .appendTo('body')
+ .hide();
+ }
+ hash = hash || [];
+ hash.push({
+ id : id,
+ menuStyle: $.extend({}, defaults.menuStyle, options.menuStyle || {}),
+ itemStyle: $.extend({}, defaults.itemStyle, options.itemStyle || {}),
+ itemHoverStyle: $.extend({}, defaults.itemHoverStyle, options.itemHoverStyle || {}),
+ bindings: options.bindings || {},
+ shadow: options.shadow || options.shadow === false ? options.shadow : defaults.shadow,
+ onContextMenu: options.onContextMenu || defaults.onContextMenu,
+ onShowMenu: options.onShowMenu || defaults.onShowMenu,
+ eventPosX: options.eventPosX || defaults.eventPosX,
+ eventPosY: options.eventPosY || defaults.eventPosY
+ });
+
+ var index = hash.length - 1;
+ $(this).bind('contextmenu', function(e) {
+ // Check if onContextMenu() defined
+ var bShowContext = (!!hash[index].onContextMenu) ? hash[index].onContextMenu(e) : true;
+ currentTarget = e.target;
+ if (bShowContext) {
+ display(index, this, e );
+ return false;
+ }
+ });
+ return this;
+ };
+
+ function display(index, trigger, e ) {
+ var cur = hash[index];
+ content = $('#'+cur.id).find('ul:first').clone(true);
+ content.css(cur.menuStyle).find('li').css(cur.itemStyle).hover(
+ function() {
+ $(this).css(cur.itemHoverStyle);
+ },
+ function(){
+ $(this).css(cur.itemStyle);
+ }
+ ).find('img').css({verticalAlign:'middle',paddingRight:'2px'});
+
+ // Send the content to the menu
+ menu.html(content);
+
+ // if there's an onShowMenu, run it now -- must run after content has been added
+ // if you try to alter the content variable before the menu.html(), IE6 has issues
+ // updating the content
+ if (!!cur.onShowMenu) menu = cur.onShowMenu(e, menu);
+
+ $.each(cur.bindings, function(id, func) {
+ $('#'+id, menu).bind('click', function() {
+ hide();
+ func(trigger, currentTarget);
+ });
+ });
+
+ menu.css({'left':e[cur.eventPosX],'top':e[cur.eventPosY]}).show();
+ if (cur.shadow) shadow.css({width:menu.width(),height:menu.height(),left:e.pageX+2,top:e.pageY+2}).show();
+ $(document).one('click', hide);
+ }
+
+ function hide() {
+ menu.hide();
+ shadow.hide();
+ }
+
+ // Apply defaults
+ $.contextMenu = {
+ defaults : function(userDefaults) {
+ $.each(userDefaults, function(i, val) {
+ if (typeof val == 'object' && defaults[i]) {
+ $.extend(defaults[i], val);
+ }
+ else defaults[i] = val;
+ });
+ }
+ };
+
+})(jQuery);
+
+$(function() {
+ $('div.contextMenu').hide();
+});
\ No newline at end of file
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/jquery.searchFilter.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/jquery.searchFilter.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/jquery.searchFilter.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,716 @@
+/* Plugin: searchFilter v1.2.9
+ * Author: Kasey Speakman (kasey(a)cornerspeed.com)
+ * License: Dual Licensed, MIT and GPL v2 (http://www.gnu.org/licenses/gpl-2.0.html)
+ *
+ * REQUIREMENTS:
+ * jQuery 1.3+ (http://jquery.com/)
+ * A Themeroller Theme (http://jqueryui.com/themeroller/)
+ *
+ * SECURITY WARNING
+ * You should always implement server-side checking to ensure that
+ * the query will fail when forged/invalid data is received.
+ * Clever users can send any value they want through JavaScript and HTTP POST/GET.
+ *
+ * THEMES
+ * Simply include the CSS file for your Themeroller theme.
+ *
+ * DESCRIPTION
+ * This plugin creates a new searchFilter object in the specified container
+ *
+ * INPUT TYPE
+ * fields: an array of field objects. each object has the following properties:
+ * text: a string containing the display name of the field (e.g. "Field 1")
+ * itemval: a string containing the actual field name (e.g. "field1")
+ * optional properties:
+ * ops: an array of operators in the same format as jQuery.fn.searchFilter.defaults.operators
+ * that is: [ { op: 'gt', text: 'greater than'}, { op:'lt', text: 'less than'}, ... ]
+ * if not specified, the passed-in options used, and failting that, jQuery.fn.searchFilter.defaults.operators will be used
+ * *** NOTE ***
+ * Specifying a dataUrl or dataValues property means that a <select ...> (drop-down-list) will be generated
+ * instead of a text input <input type='text'.../> where the user would normally type in their search data
+ * ************
+ * dataUrl: a url that will return the html select for this field, this url will only be called once for this field
+ * dataValues: the possible values for this field in the form [ { text: 'Data Display Text', value: 'data_actual_value' }, { ... } ]
+ * dataInit: a function that you can use to initialize the data field. this function is passed the jQuery-fied data element
+ * dataEvents: list of events to apply to the data element. uses $("#id").bind(type, [data], fn) to bind events to data element
+ * *** JSON of this object could look like this: ***
+ * var fields = [
+ * {
+ * text: 'Field Display Name',
+ * itemval: 'field_actual_name',
+ * // below this are optional values
+ * ops: [ // this format is the same as jQuery.fn.searchFilter.defaults.operators
+ * { op: 'gt', text: 'greater than' },
+ * { op: 'lt', text: 'less than' }
+ * ],
+ * dataUrl: 'http://server/path/script.php?propName=propValue', // using this creates a select for the data input instead of an input type='text'
+ * dataValues: [ // using this creates a select for the data input instead of an input type='text'
+ * { text: 'Data Value Display Name', value: 'data_actual_value' },
+ * { ... }
+ * ],
+ * dataInit: function(jElem) { jElem.datepicker(options); },
+ * dataEvents: [ // these are the same options that you pass to $("#id").bind(type, [data], fn)
+ * { type: 'click', data: { i: 7 }, fn: function(e) { console.log(e.data.i); } },
+ * { type: 'keypress', fn: function(e) { console.log('keypress'); } }
+ * ]
+ * },
+ * { ... }
+ * ]
+ * options: name:value properties containing various creation options
+ * see jQuery.fn.searchFilter.defaults for the overridable options
+ *
+ * RETURN TYPE: This plugin returns a SearchFilter object, which has additional SearchFilter methods:
+ * Methods
+ * add: Adds a filter. added to the end of the list unless a jQuery event object or valid row number is passed.
+ * del: Removes a filter. removed from the end of the list unless a jQuery event object or valid row number is passed.
+ * reset: resets filters back to original state (only one blank filter), and calls onReset
+ * search: puts the search rules into an object and calls onSearch with it
+ * close: calls the onClose event handler
+ *
+ * USAGE
+ * HTML
+ * <head>
+ * ...
+ * <script src="path/to/jquery.min.js" type="text/javascript"></script>
+ * <link href="path/to/themeroller.css" rel="Stylesheet" type="text/css" />
+ * <script src="path/to/jquery.searchFilter.js" type="text/javascript"></script>
+ * <link href="path/to/jquery.searchFilter.css" rel="Stylesheet" type="text/css" />
+ * ...
+ * </head>
+ * <body>
+ * ...
+ * <div id='mySearch'></div>
+ * ...
+ * </body>
+ * JQUERY
+ * Methods
+ * initializing: $("#mySearch").searchFilter([{text: "Field 1", value: "field1"},{text: "Field 2", value: "field2"}], {onSearch: myFilterRuleReceiverFn, onReset: myFilterResetFn });
+ * Manual Methods (there's no need to call these methods unless you are trying to manipulate searchFilter with script)
+ * add: $("#mySearch").searchFilter().add(); // appends a blank filter
+ * $("#mySearch").searchFilter().add(0); // copies the first filter as second
+ * del: $("#mySearch").searchFilter().del(); // removes the bottom filter
+ * $("#mySearch").searchFilter().del(1); // removes the second filter
+ * search: $("#mySearch").searchFilter().search(); // invokes onSearch, passing it a ruleGroup object
+ * reset: $("#mySearch").searchFilter().reset(); // resets rules and invokes onReset
+ * close: $("#mySearch").searchFilter().close(); // without an onClose handler, equivalent to $("#mySearch").hide();
+ *
+ * NOTE: You can get the jQuery object back from the SearchFilter object by chaining .$
+ * Example
+ * $("#mySearch").searchFilter().add().add().reset().$.hide();
+ * Verbose Example
+ * $("#mySearch") // gets jQuery object for the HTML element with id="mySearch"
+ * .searchFilter() // gets the SearchFilter object for an existing search filter
+ * .add() // adds a new filter to the end of the list
+ * .add() // adds another new filter to the end of the list
+ * .reset() // resets filters back to original state, triggers onReset
+ * .$ // returns jQuery object for $("#mySearch")
+ * .hide(); // equivalent to $("#mySearch").hide();
+ */
+
+jQuery.fn.searchFilter = function(fields, options) {
+
+ function SearchFilter(jQ, fields, options) {
+
+
+ //---------------------------------------------------------------
+ // PUBLIC VARS
+ //---------------------------------------------------------------
+
+ this.$ = jQ; // makes the jQuery object available as .$ from the return value
+
+
+ //---------------------------------------------------------------
+ // PUBLIC FUNCTIONS
+ //---------------------------------------------------------------
+
+ this.add = function(i) {
+ if (i == null) jQ.find(".ui-add-last").click();
+ else jQ.find(".sf:eq(" + i + ") .ui-add").click();
+ return this;
+ };
+
+ this.del = function(i) {
+ if (i == null) jQ.find(".sf:last .ui-del").click();
+ else jQ.find(".sf:eq(" + i + ") .ui-del").click();
+ return this;
+ };
+
+ this.search = function(e) {
+ jQ.find(".ui-search").click();
+ return this;
+ };
+
+ this.reset = function(o) {
+ if(o===undefined) o = false;
+ jQ.find(".ui-reset").trigger('click',[o]);
+ return this;
+ };
+
+ this.close = function() {
+ jQ.find(".ui-closer").click();
+ return this;
+ };
+
+
+
+ //---------------------------------------------------------------
+ // "CONSTRUCTOR" (in air quotes)
+ //---------------------------------------------------------------
+
+ if (fields != null) { // type coercion matches undefined as well as null
+
+
+ //---------------------------------------------------------------
+ // UTILITY FUNCTIONS
+ //---------------------------------------------------------------
+
+ function hover() {
+ jQuery(this).toggleClass("ui-state-hover");
+ return false;
+ }
+
+ function active(e) {
+ jQuery(this).toggleClass("ui-state-active", (e.type == "mousedown"));
+ return false;
+ }
+
+ function buildOpt(value, text) {
+ return "<option value='" + value + "'>" + text + "</option>";
+ }
+
+ function buildSel(className, options, isHidden) {
+ return "<select class='" + className + "'" + (isHidden ? " style='display:none;'" : "") + ">" + options + "</select>";
+ }
+
+ function initData(selector, fn) {
+ var jElem = jQ.find("tr.sf td.data " + selector);
+ if (jElem[0] != null)
+ fn(jElem);
+ }
+
+ function bindDataEvents(selector, events) {
+ var jElem = jQ.find("tr.sf td.data " + selector);
+ if (jElem[0] != null) {
+ jQuery.each(events, function() {
+ if (this.data != null)
+ jElem.bind(this.type, this.data, this.fn);
+ else
+ jElem.bind(this.type, this.fn);
+ });
+ }
+ }
+
+
+ //---------------------------------------------------------------
+ // SUPER IMPORTANT PRIVATE VARS
+ //---------------------------------------------------------------
+
+ // copies jQuery.fn.searchFilter.defaults.options properties onto an empty object, then options onto that
+ var opts = jQuery.extend({}, jQuery.fn.searchFilter.defaults, options);
+
+ // this is keeps track of the last asynchronous setup
+ var highest_late_setup = -1;
+
+
+ //---------------------------------------------------------------
+ // CREATION PROCESS STARTS
+ //---------------------------------------------------------------
+
+ // generate the global ops
+ var gOps_html = "";
+ jQuery.each(opts.groupOps, function() { gOps_html += buildOpt(this.op, this.text); });
+ gOps_html = "<select name='groupOp'>" + gOps_html + "</select>";
+
+ /* original content - doesn't minify very well
+ jQ
+ .html("") // clear any old content
+ .addClass("ui-searchFilter") // add classes
+ .append( // add content
+ "\
+ <div class='ui-widget-overlay' style='z-index: -1'> </div>\
+ <table class='ui-widget-content ui-corner-all'>\
+ <thead>\
+ <tr>\
+ <td colspan='5' class='ui-widget-header ui-corner-all' style='line-height: 18px;'>\
+ <div class='ui-closer ui-state-default ui-corner-all ui-helper-clearfix' style='float: right;'>\
+ <span class='ui-icon ui-icon-close'></span>\
+ </div>\
+ " + opts.windowTitle + "\
+ </td>\
+ </tr>\
+ </thead>\
+ <tbody>\
+ <tr class='sf'>\
+ <td class='fields'></td>\
+ <td class='ops'></td>\
+ <td class='data'></td>\
+ <td><div class='ui-del ui-state-default ui-corner-all'><span class='ui-icon ui-icon-minus'></span></div></td>\
+ <td><div class='ui-add ui-state-default ui-corner-all'><span class='ui-icon ui-icon-plus'></span></div></td>\
+ </tr>\
+ <tr>\
+ <td colspan='5' class='divider'><div> </div></td>\
+ </tr>\
+ </tbody>\
+ <tfoot>\
+ <tr>\
+ <td colspan='3'>\
+ <span class='ui-reset ui-state-default ui-corner-all' style='display: inline-block; float: left;'><span class='ui-icon ui-icon-arrowreturnthick-1-w' style='float: left;'></span><span style='line-height: 18px; padding: 0 7px 0 3px;'>" + opts.resetText + "</span></span>\
+ <span class='ui-search ui-state-default ui-corner-all' style='display: inline-block; float: right;'><span class='ui-icon ui-icon-search' style='float: left;'></span><span style='line-height: 18px; padding: 0 7px 0 3px;'>" + opts.searchText + "</span></span>\
+ <span class='matchText'>" + opts.matchText + "</span> \
+ " + gOps_html + " \
+ <span class='rulesText'>" + opts.rulesText + "</span>\
+ </td>\
+ <td> </td>\
+ <td><div class='ui-add-last ui-state-default ui-corner-all'><span class='ui-icon ui-icon-plusthick'></span></div></td>\
+ </tr>\
+ </tfoot>\
+ </table>\
+ ");
+ /* end hard-to-minify code */
+ /* begin easier to minify code */
+ jQ.html("").addClass("ui-searchFilter").append("<div class='ui-widget-overlay' style='z-index: -1'> </div><table class='ui-widget-content ui-corner-all'><thead><tr><td colspan='5' class='ui-widget-header ui-corner-all' style='line-height: 18px;'><div class='ui-closer ui-state-default ui-corner-all ui-helper-clearfix' style='float: right;'><span class='ui-icon ui-icon-close'></span></div>" + opts.windowTitle + "</td></tr></thead><tbody><tr class='sf'><td class='fields'></td><td class='ops'></td><td class='data'></td><td><div class='ui-del ui-state-default ui-corner-all'><span class='ui-icon ui-icon-minus'></span></div></td><td><div class='ui-add ui-state-default ui-corner-all'><span class='ui-icon ui-icon-plus'></span></div></td></tr><tr><td colspan='5' class='divider'><hr class='ui-widget-content' style='margin:1px'/></td></tr></tbody><tfoot><tr><td colspan='3'><span class='ui-reset ui-state-default ui-corner-all' style='display: inline-block; float: left;'><span class='ui-icon ui-icon-arrowreturnthick-1-w' style='float: left;'></span><span style='line-height: 18px; padding: 0 7px 0 3px;'>" + opts.resetText + "</span></span><span class='ui-search ui-state-default ui-corner-all' style='display: inline-block; float: right;'><span class='ui-icon ui-icon-search' style='float: left;'></span><span style='line-height: 18px; padding: 0 7px 0 3px;'>" + opts.searchText + "</span></span><span class='matchText'>" + opts.matchText + "</span> " + gOps_html + " <span class='rulesText'>" + opts.rulesText + "</span></td><td> </td><td><div class='ui-add-last ui-state-default ui-corner-all'><span class='ui-icon ui-icon-plusthick'></span></div></td></tr></tfoot></table>");
+ /* end easier-to-minify code */
+
+ var jRow = jQ.find("tr.sf");
+ var jFields = jRow.find("td.fields");
+ var jOps = jRow.find("td.ops");
+ var jData = jRow.find("td.data");
+
+ // generate the defaults
+ var default_ops_html = "";
+ jQuery.each(opts.operators, function() { default_ops_html += buildOpt(this.op, this.text); });
+ default_ops_html = buildSel("default", default_ops_html, true);
+ jOps.append(default_ops_html);
+ var default_data_html = "<input type='text' class='default' style='display:none;' />";
+ jData.append(default_data_html);
+
+ // generate the field list as a string
+ var fields_html = "";
+ var has_custom_ops = false;
+ var has_custom_data = false;
+ jQuery.each(fields, function(i) {
+ var field_num = i;
+ fields_html += buildOpt(this.itemval, this.text);
+ // add custom ops if they exist
+ if (this.ops != null) {
+ has_custom_ops = true;
+ var custom_ops = "";
+ jQuery.each(this.ops, function() { custom_ops += buildOpt(this.op, this.text); });
+ custom_ops = buildSel("field" + field_num, custom_ops, true);
+ jOps.append(custom_ops);
+ }
+ // add custom data if it is given
+ if (this.dataUrl != null) {
+ if (i > highest_late_setup) highest_late_setup = i;
+ has_custom_data = true;
+ var dEvents = this.dataEvents;
+ var iEvent = this.dataInit;
+ var bs = this.buildSelect;
+ jQuery.ajax(jQuery.extend({
+ url : this.dataUrl,
+ complete: function(data) {
+ var $d;
+ if(bs != null) $d =jQuery("<div />").append(bs(data));
+ else $d = jQuery("<div />").append(data.responseText);
+ $d.find("select").addClass("field" + field_num).hide();
+ jData.append($d.html());
+ if (iEvent) initData(".field" + i, iEvent);
+ if (dEvents) bindDataEvents(".field" + i, dEvents);
+ if (i == highest_late_setup) { // change should get called no more than twice when this searchFilter is constructed
+ jQ.find("tr.sf td.fields select[name='field']").change();
+ }
+ }
+ },opts.ajaxSelectOptions));
+ } else if (this.dataValues != null) {
+ has_custom_data = true;
+ var custom_data = "";
+ jQuery.each(this.dataValues, function() { custom_data += buildOpt(this.value, this.text); });
+ custom_data = buildSel("field" + field_num, custom_data, true);
+ jData.append(custom_data);
+ } else if (this.dataEvents != null || this.dataInit != null) {
+ has_custom_data = true;
+ var custom_data = "<input type='text' class='field" + field_num + "' />";
+ jData.append(custom_data);
+ }
+ // attach events to data if they exist
+ if (this.dataInit != null && i != highest_late_setup)
+ initData(".field" + i, this.dataInit);
+ if (this.dataEvents != null && i != highest_late_setup)
+ bindDataEvents(".field" + i, this.dataEvents);
+ });
+ fields_html = "<select name='field'>" + fields_html + "</select>";
+ jFields.append(fields_html);
+
+ // setup the field select with an on-change event if there are custom ops or data
+ var jFSelect = jFields.find("select[name='field']");
+ if (has_custom_ops) jFSelect.change(function(e) {
+ var index = e.target.selectedIndex;
+ var td = jQuery(e.target).parents("tr.sf").find("td.ops");
+ td.find("select").removeAttr("name").hide(); // disown and hide all elements
+ var jElem = td.find(".field" + index);
+ if (jElem[0] == null) jElem = td.find(".default"); // if there's not an element for that field, use the default one
+ jElem.attr("name", "op").show();
+ return false;
+ });
+ else jOps.find(".default").attr("name", "op").show();
+ if (has_custom_data) jFSelect.change(function(e) {
+ var index = e.target.selectedIndex;
+ var td = jQuery(e.target).parents("tr.sf").find("td.data");
+ td.find("select,input").removeClass("vdata").hide(); // disown and hide all elements
+ var jElem = td.find(".field" + index);
+ if (jElem[0] == null) jElem = td.find(".default"); // if there's not an element for that field, use the default one
+ jElem.show().addClass("vdata");
+ return false;
+ });
+ else jData.find(".default").show().addClass("vdata");
+ // go ahead and call the change event and setup the ops and data values
+ if (has_custom_ops || has_custom_data) jFSelect.change();
+
+ // bind events
+ jQ.find(".ui-state-default").hover(hover, hover).mousedown(active).mouseup(active); // add hover/active effects to all buttons
+ jQ.find(".ui-closer").click(function(e) {
+ opts.onClose(jQuery(jQ.selector));
+ return false;
+ });
+ jQ.find(".ui-del").click(function(e) {
+ var row = jQuery(e.target).parents(".sf");
+ if (row.siblings(".sf").length > 0) { // doesn't remove if there's only one filter left
+ if (opts.datepickerFix === true && jQuery.fn.datepicker !== undefined)
+ row.find(".hasDatepicker").datepicker("destroy"); // clean up datepicker's $.data mess
+ row.remove(); // also unbinds
+ } else { // resets the filter if it's the last one
+ row.find("select[name='field']")[0].selectedIndex = 0;
+ row.find("select[name='op']")[0].selectedIndex = 0;
+ row.find(".data input").val(""); // blank all input values
+ row.find(".data select").each(function() { this.selectedIndex = 0; }); // select first option on all selects
+ row.find("select[name='field']").change(function(event){event.stopPropagation();}); // trigger any change events
+ }
+ return false;
+ });
+ jQ.find(".ui-add").click(function(e) {
+ var row = jQuery(e.target).parents(".sf");
+ var newRow = row.clone(true).insertAfter(row);
+ newRow.find(".ui-state-default").removeClass("ui-state-hover ui-state-active");
+ if (opts.clone) {
+ newRow.find("select[name='field']")[0].selectedIndex = row.find("select[name='field']")[0].selectedIndex;
+ var stupid_browser = (newRow.find("select[name='op']")[0] == null); // true for IE6
+ if (!stupid_browser)
+ newRow.find("select[name='op']").focus()[0].selectedIndex = row.find("select[name='op']")[0].selectedIndex;
+ var jElem = newRow.find("select.vdata");
+ if (jElem[0] != null) // select doesn't copy it's selected index when cloned
+ jElem[0].selectedIndex = row.find("select.vdata")[0].selectedIndex;
+ } else {
+ newRow.find(".data input").val(""); // blank all input values
+ newRow.find("select[name='field']").focus();
+ }
+ if (opts.datepickerFix === true && jQuery.fn.datepicker !== undefined) { // using $.data to associate data with document elements is Not Good
+ row.find(".hasDatepicker").each(function() {
+ var settings = jQuery.data(this, "datepicker").settings;
+ newRow.find("#" + this.id).unbind().removeAttr("id").removeClass("hasDatepicker").datepicker(settings);
+ });
+ }
+ newRow.find("select[name='field']").change(function(event){event.stopPropagation();} );
+ return false;
+ });
+ jQ.find(".ui-search").click(function(e) {
+ var ui = jQuery(jQ.selector); // pointer to search box wrapper element
+ var ruleGroup;
+ var group_op = ui.find("select[name='groupOp'] :selected").val(); // puls "AND" or "OR"
+ if (!opts.stringResult) {
+ ruleGroup = {
+ groupOp: group_op,
+ rules: []
+ };
+ } else {
+ ruleGroup = "{\"groupOp\":\"" + group_op + "\",\"rules\":[";
+ }
+ ui.find(".sf").each(function(i) {
+ var tField = jQuery(this).find("select[name='field'] :selected").val();
+ var tOp = jQuery(this).find("select[name='op'] :selected").val();
+ var tData = jQuery(this).find("input.vdata,select.vdata :selected").val();
+ tData += "";
+ if (!opts.stringResult) {
+ ruleGroup.rules.push({
+ field: tField,
+ op: tOp,
+ data: tData
+ });
+ } else {
+ tData = tData.replace(/\\/g,'\\\\').replace(/\"/g,'\\"');
+ if (i > 0) ruleGroup += ",";
+ ruleGroup += "{\"field\":\"" + tField + "\",";
+ ruleGroup += "\"op\":\"" + tOp + "\",";
+ ruleGroup += "\"data\":\"" + tData + "\"}";
+ }
+ });
+ if (opts.stringResult) ruleGroup += "]}";
+ opts.onSearch(ruleGroup);
+ return false;
+ });
+ jQ.find(".ui-reset").click(function(e,op) {
+ var ui = jQuery(jQ.selector);
+ ui.find(".ui-del").click(); // removes all filters, resets the last one
+ ui.find("select[name='groupOp']")[0].selectedIndex = 0; // changes the op back to the default one
+ opts.onReset(op);
+ return false;
+ });
+ jQ.find(".ui-add-last").click(function() {
+ var row = jQuery(jQ.selector + " .sf:last");
+ var newRow = row.clone(true).insertAfter(row);
+ newRow.find(".ui-state-default").removeClass("ui-state-hover ui-state-active");
+ newRow.find(".data input").val(""); // blank all input values
+ newRow.find("select[name='field']").focus();
+ if (opts.datepickerFix === true && jQuery.fn.datepicker !== undefined) { // using $.data to associate data with document elements is Not Good
+ row.find(".hasDatepicker").each(function() {
+ var settings = jQuery.data(this, "datepicker").settings;
+ newRow.find("#" + this.id).unbind().removeAttr("id").removeClass("hasDatepicker").datepicker(settings);
+ });
+ }
+ newRow.find("select[name='field']").change(function(event){event.stopPropagation();});
+ return false;
+ });
+
+ this.setGroupOp = function(setting) {
+ /* a "setter" for groupping argument.
+ * ("AND" or "OR")
+ *
+ * Inputs:
+ * setting - a string
+ *
+ * Returns:
+ * Does not return anything. May add success / failure reporting in future versions.
+ *
+ * author: Daniel Dotsenko (dotsa(a)hotmail.com)
+ */
+ selDOMobj = jQ.find("select[name='groupOp']")[0];
+ var indexmap = {}, l = selDOMobj.options.length, i;
+ for (i=0; i<l; i++) {
+ indexmap[selDOMobj.options[i].value] = i;
+ }
+ selDOMobj.selectedIndex = indexmap[setting];
+ jQuery(selDOMobj).change(function(event){event.stopPropagation();});
+ };
+
+ this.setFilter = function(settings) {
+ /* a "setter" for an arbitrary SearchFilter's filter line.
+ * designed to abstract the DOM manipulations required to infer
+ * a particular filter is a fit to the search box.
+ *
+ * Inputs:
+ * settings - an "object" (dictionary)
+ * index (optional*) (to be implemented in the future) : signed integer index (from top to bottom per DOM) of the filter line to fill.
+ * Negative integers (rooted in -1 and lower) denote position of the line from the bottom.
+ * sfref (optional*) : DOM object referencing individual '.sf' (normally a TR element) to be populated. (optional)
+ * filter (mandatory) : object (dictionary) of form {'field':'field_value','op':'op_value','data':'data value'}
+ *
+ * * It is mandatory to have either index or sfref defined.
+ *
+ * Returns:
+ * Does not return anything. May add success / failure reporting in future versions.
+ *
+ * author: Daniel Dotsenko (dotsa(a)hotmail.com)
+ */
+
+ var o = settings['sfref'], filter = settings['filter'];
+
+ // setting up valueindexmap that we will need to manipulate SELECT elements.
+ var fields = [], i, j , l, lj, li,
+ valueindexmap = {};
+ // example of valueindexmap:
+ // {'field1':{'index':0,'ops':{'eq':0,'ne':1}},'fieldX':{'index':1,'ops':{'eq':0,'ne':1},'data':{'true':0,'false':1}}},
+ // if data is undefined it's a INPUT field. If defined, it's SELECT
+ selDOMobj = o.find("select[name='field']")[0];
+ for (i=0, l=selDOMobj.options.length; i<l; i++) {
+ valueindexmap[selDOMobj.options[i].value] = {'index':i,'ops':{}};
+ fields.push(selDOMobj.options[i].value);
+ }
+ for (i=0, li=fields.length; i < li; i++) {
+ selDOMobj = o.find(".ops > select[class='field"+i+"']")[0];
+ if (selDOMobj) {
+ for (j=0, lj=selDOMobj.options.length; j<lj; j++) {
+ valueindexmap[fields[i]]['ops'][selDOMobj.options[j].value] = j;
+ }
+ }
+ selDOMobj = o.find(".data > select[class='field"+i+"']")[0];
+ if (selDOMobj) {
+ valueindexmap[fields[i]]['data'] = {}; // this setting is the flag that 'data' is contained in a SELECT
+ for (j=0, lj=selDOMobj.options.length; j<lj; j++) {
+ valueindexmap[fields[i]]['data'][selDOMobj.options[j].value] = j;
+ }
+ }
+ } // done populating valueindexmap
+
+ // preparsing the index values for SELECT elements.
+ var fieldvalue, fieldindex, opindex, datavalue, dataindex;
+ fieldvalue = filter['field'];
+ if (valueindexmap[fieldvalue]) {
+ fieldindex = valueindexmap[fieldvalue]['index'];
+ }
+ if (fieldindex != null) {
+ opindex = valueindexmap[fieldvalue]['ops'][filter['op']];
+ if(opindex === undefined) {
+ for(i=0,li=options.operators.length; i<li;i++) {
+ if(options.operators[i].op == filter.op ){
+ opindex = i;
+ break;
+ }
+ }
+ }
+ datavalue = filter['data'];
+ if (valueindexmap[fieldvalue]['data'] == null) {
+ dataindex = -1; // 'data' is not SELECT, Making the var 'defined'
+ } else {
+ dataindex = valueindexmap[fieldvalue]['data'][datavalue]; // 'undefined' may come from here.
+ }
+ }
+ // only if values for 'field' and 'op' and 'data' are 'found' in mapping...
+ if (fieldindex != null && opindex != null && dataindex != null) {
+ o.find("select[name='field']")[0].selectedIndex = fieldindex;
+ o.find("select[name='field']").change();
+ o.find("select[name='op']")[0].selectedIndex = opindex;
+ o.find("input.vdata").val(datavalue); // if jquery does not find any INPUT, it does not set any. This means we deal with SELECT
+ o = o.find("select.vdata")[0];
+ if (o) {
+ o.selectedIndex = dataindex;
+ }
+ return true
+ } else {
+ return false
+ }
+ }; // end of this.setFilter fn
+ } // end of if fields != null
+ }
+ return new SearchFilter(this, fields, options);
+};
+
+jQuery.fn.searchFilter.version = '1.2.9';
+
+/* This property contains the default options */
+jQuery.fn.searchFilter.defaults = {
+
+ /*
+ * PROPERTY
+ * TYPE: boolean
+ * DESCRIPTION: clone a row if it is added from an existing row
+ * when false, any new added rows will be blank.
+ */
+ clone: true,
+
+ /*
+ * PROPERTY
+ * TYPE: boolean
+ * DESCRIPTION: current version of datepicker uses a data store,
+ * which is incompatible with $().clone(true)
+ */
+ datepickerFix: true,
+
+ /*
+ * FUNCTION
+ * DESCRIPTION: the function that will be called when the user clicks Reset
+ * INPUT TYPE: JS object if stringResult is false, otherwise is JSON string
+ */
+ onReset: function(data) { alert("Reset Clicked. Data Returned: " + data) },
+
+ /*
+ * FUNCTION
+ * DESCRIPTION: the function that will be called when the user clicks Search
+ * INPUT TYPE: JS object if stringResult is false, otherwise is JSON string
+ */
+ onSearch: function(data) { alert("Search Clicked. Data Returned: " + data) },
+
+ /*
+ * FUNCTION
+ * DESCRIPTION: the function that will be called when the user clicks the Closer icon
+ * or the close() function is called
+ * if left null, it simply does a .hide() on the searchFilter
+ * INPUT TYPE: a jQuery object for the searchFilter
+ */
+ onClose: function(jElem) { jElem.hide(); },
+
+ /*
+ * PROPERTY
+ * TYPE: array of objects, each object has the properties op and text
+ * DESCRIPTION: the selectable operators that are applied between rules
+ * e.g. for {op:"AND", text:"all"}
+ * the search filter box will say: match all rules
+ * the server should interpret this as putting the AND op between each rule:
+ * rule1 AND rule2 AND rule3
+ * text will be the option text, and op will be the option value
+ */
+ groupOps: [
+ { op: "AND", text: "all" },
+ { op: "OR", text: "any" }
+ ],
+
+
+ /*
+ * PROPERTY
+ * TYPE: array of objects, each object has the properties op and text
+ * DESCRIPTION: the operators that will appear as drop-down options
+ * text will be the option text, and op will be the option value
+ */
+ operators: [
+ { op: "eq", text: "is equal to" },
+ { op: "ne", text: "is not equal to" },
+ { op: "lt", text: "is less than" },
+ { op: "le", text: "is less or equal to" },
+ { op: "gt", text: "is greater than" },
+ { op: "ge", text: "is greater or equal to" },
+ { op: "in", text: "is in" },
+ { op: "ni", text: "is not in" },
+ { op: "bw", text: "begins with" },
+ { op: "bn", text: "does not begin with" },
+ { op: "ew", text: "ends with" },
+ { op: "en", text: "does not end with" },
+ { op: "cn", text: "contains" },
+ { op: "nc", text: "does not contain" }
+ ],
+
+ /*
+ * PROPERTY
+ * TYPE: string
+ * DESCRIPTION: part of the phrase: _match_ ANY/ALL rules
+ */
+ matchText: "match",
+
+ /*
+ * PROPERTY
+ * TYPE: string
+ * DESCRIPTION: part of the phrase: match ANY/ALL _rules_
+ */
+ rulesText: "rules",
+
+ /*
+ * PROPERTY
+ * TYPE: string
+ * DESCRIPTION: the text that will be displayed in the reset button
+ */
+ resetText: "Reset",
+
+ /*
+ * PROPERTY
+ * TYPE: string
+ * DESCRIPTION: the text that will be displayed in the search button
+ */
+ searchText: "Search",
+
+ /*
+ * PROPERTY
+ * TYPE: boolean
+ * DESCRIPTION: a flag that, when set, will make the onSearch and onReset return strings instead of objects
+ */
+ stringResult: true,
+
+ /*
+ * PROPERTY
+ * TYPE: string
+ * DESCRIPTION: the title of the searchFilter window
+ */
+ windowTitle: "Search Rules",
+ /*
+ * PROPERTY
+ * TYPE: object
+ * DESCRIPTION: options to extend the ajax request
+ */
+ ajaxSelectOptions : {}
+}; /* end of searchFilter */
\ No newline at end of file
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/jquery.tablednd.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/jquery.tablednd.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/jquery.tablednd.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,383 @@
+/**
+ * TableDnD plug-in for JQuery, allows you to drag and drop table rows
+ * You can set up various options to control how the system will work
+ * Copyright (c) Denis Howlett <denish(a)isocra.com>
+ * Licensed like jQuery, see http://docs.jquery.com/License.
+ *
+ * Configuration options:
+ *
+ * onDragStyle
+ * This is the style that is assigned to the row during drag. There are limitations to the styles that can be
+ * associated with a row (such as you can't assign a border--well you can, but it won't be
+ * displayed). (So instead consider using onDragClass.) The CSS style to apply is specified as
+ * a map (as used in the jQuery css(...) function).
+ * onDropStyle
+ * This is the style that is assigned to the row when it is dropped. As for onDragStyle, there are limitations
+ * to what you can do. Also this replaces the original style, so again consider using onDragClass which
+ * is simply added and then removed on drop.
+ * onDragClass
+ * This class is added for the duration of the drag and then removed when the row is dropped. It is more
+ * flexible than using onDragStyle since it can be inherited by the row cells and other content. The default
+ * is class is tDnD_whileDrag. So to use the default, simply customise this CSS class in your
+ * stylesheet.
+ * onDrop
+ * Pass a function that will be called when the row is dropped. The function takes 2 parameters: the table
+ * and the row that was dropped. You can work out the new order of the rows by using
+ * table.rows.
+ * onDragStart
+ * Pass a function that will be called when the user starts dragging. The function takes 2 parameters: the
+ * table and the row which the user has started to drag.
+ * onAllowDrop
+ * Pass a function that will be called as a row is over another row. If the function returns true, allow
+ * dropping on that row, otherwise not. The function takes 2 parameters: the dragged row and the row under
+ * the cursor. It returns a boolean: true allows the drop, false doesn't allow it.
+ * scrollAmount
+ * This is the number of pixels to scroll if the user moves the mouse cursor to the top or bottom of the
+ * window. The page should automatically scroll up or down as appropriate (tested in IE6, IE7, Safari, FF2,
+ * FF3 beta
+ * dragHandle
+ * This is the name of a class that you assign to one or more cells in each row that is draggable. If you
+ * specify this class, then you are responsible for setting cursor: move in the CSS and only these cells
+ * will have the drag behaviour. If you do not specify a dragHandle, then you get the old behaviour where
+ * the whole row is draggable.
+ *
+ * Other ways to control behaviour:
+ *
+ * Add class="nodrop" to any rows for which you don't want to allow dropping, and class="nodrag" to any rows
+ * that you don't want to be draggable.
+ *
+ * Inside the onDrop method you can also call $.tableDnD.serialize() this returns a string of the form
+ * <tableID>[]=<rowID1>&<tableID>[]=<rowID2> so that you can send this back to the server. The table must have
+ * an ID as must all the rows.
+ *
+ * Other methods:
+ *
+ * $("...").tableDnDUpdate()
+ * Will update all the matching tables, that is it will reapply the mousedown method to the rows (or handle cells).
+ * This is useful if you have updated the table rows using Ajax and you want to make the table draggable again.
+ * The table maintains the original configuration (so you don't have to specify it again).
+ *
+ * $("...").tableDnDSerialize()
+ * Will serialize and return the serialized string as above, but for each of the matching tables--so it can be
+ * called from anywhere and isn't dependent on the currentTable being set up correctly before calling
+ *
+ * Known problems:
+ * - Auto-scoll has some problems with IE7 (it scrolls even when it shouldn't), work-around: set scrollAmount to 0
+ *
+ * Version 0.2: 2008-02-20 First public version
+ * Version 0.3: 2008-02-07 Added onDragStart option
+ * Made the scroll amount configurable (default is 5 as before)
+ * Version 0.4: 2008-03-15 Changed the noDrag/noDrop attributes to nodrag/nodrop classes
+ * Added onAllowDrop to control dropping
+ * Fixed a bug which meant that you couldn't set the scroll amount in both directions
+ * Added serialize method
+ * Version 0.5: 2008-05-16 Changed so that if you specify a dragHandle class it doesn't make the whole row
+ * draggable
+ * Improved the serialize method to use a default (and settable) regular expression.
+ * Added tableDnDupate() and tableDnDSerialize() to be called when you are outside the table
+ */
+jQuery.tableDnD = {
+ /** Keep hold of the current table being dragged */
+ currentTable : null,
+ /** Keep hold of the current drag object if any */
+ dragObject: null,
+ /** The current mouse offset */
+ mouseOffset: null,
+ /** Remember the old value of Y so that we don't do too much processing */
+ oldY: 0,
+
+ /** Actually build the structure */
+ build: function(options) {
+ // Set up the defaults if any
+
+ this.each(function() {
+ // This is bound to each matching table, set up the defaults and override with user options
+ this.tableDnDConfig = jQuery.extend({
+ onDragStyle: null,
+ onDropStyle: null,
+ // Add in the default class for whileDragging
+ onDragClass: "tDnD_whileDrag",
+ onDrop: null,
+ onDragStart: null,
+ scrollAmount: 5,
+ serializeRegexp: /[^\-]*$/, // The regular expression to use to trim row IDs
+ serializeParamName: null, // If you want to specify another parameter name instead of the table ID
+ dragHandle: null // If you give the name of a class here, then only Cells with this class will be draggable
+ }, options || {});
+ // Now make the rows draggable
+ jQuery.tableDnD.makeDraggable(this);
+ });
+
+ // Now we need to capture the mouse up and mouse move event
+ // We can use bind so that we don't interfere with other event handlers
+ jQuery(document)
+ .bind('mousemove', jQuery.tableDnD.mousemove)
+ .bind('mouseup', jQuery.tableDnD.mouseup);
+
+ // Don't break the chain
+ return this;
+ },
+
+ /** This function makes all the rows on the table draggable apart from those marked as "NoDrag" */
+ makeDraggable: function(table) {
+ var config = table.tableDnDConfig;
+ if (table.tableDnDConfig.dragHandle) {
+ // We only need to add the event to the specified cells
+ var cells = jQuery("td."+table.tableDnDConfig.dragHandle, table);
+ cells.each(function() {
+ // The cell is bound to "this"
+ jQuery(this).mousedown(function(ev) {
+ jQuery.tableDnD.dragObject = this.parentNode;
+ jQuery.tableDnD.currentTable = table;
+ jQuery.tableDnD.mouseOffset = jQuery.tableDnD.getMouseOffset(this, ev);
+ if (config.onDragStart) {
+ // Call the onDrop method if there is one
+ config.onDragStart(table, this);
+ }
+ return false;
+ });
+ })
+ } else {
+ // For backwards compatibility, we add the event to the whole row
+ var rows = jQuery("tr", table); // get all the rows as a wrapped set
+ rows.each(function() {
+ // Iterate through each row, the row is bound to "this"
+ var row = jQuery(this);
+ if (! row.hasClass("nodrag")) {
+ row.mousedown(function(ev) {
+ if (ev.target.tagName == "TD") {
+ jQuery.tableDnD.dragObject = this;
+ jQuery.tableDnD.currentTable = table;
+ jQuery.tableDnD.mouseOffset = jQuery.tableDnD.getMouseOffset(this, ev);
+ if (config.onDragStart) {
+ // Call the onDrop method if there is one
+ config.onDragStart(table, this);
+ }
+ return false;
+ }
+ }).css("cursor", "move"); // Store the tableDnD object
+ }
+ });
+ }
+ },
+
+ updateTables: function() {
+ this.each(function() {
+ // this is now bound to each matching table
+ if (this.tableDnDConfig) {
+ jQuery.tableDnD.makeDraggable(this);
+ }
+ })
+ },
+
+ /** Get the mouse coordinates from the event (allowing for browser differences) */
+ mouseCoords: function(ev){
+ if(ev.pageX || ev.pageY){
+ return {x:ev.pageX, y:ev.pageY};
+ }
+ return {
+ x:ev.clientX + document.body.scrollLeft - document.body.clientLeft,
+ y:ev.clientY + document.body.scrollTop - document.body.clientTop
+ };
+ },
+
+ /** Given a target element and a mouse event, get the mouse offset from that element.
+ To do this we need the element's position and the mouse position */
+ getMouseOffset: function(target, ev) {
+ ev = ev || window.event;
+
+ var docPos = this.getPosition(target);
+ var mousePos = this.mouseCoords(ev);
+ return {x:mousePos.x - docPos.x, y:mousePos.y - docPos.y};
+ },
+
+ /** Get the position of an element by going up the DOM tree and adding up all the offsets */
+ getPosition: function(e){
+ var left = 0;
+ var top = 0;
+ /** Safari fix -- thanks to Luis Chato for this! */
+ if (e.offsetHeight == 0) {
+ /** Safari 2 doesn't correctly grab the offsetTop of a table row
+ this is detailed here:
+ http://jacob.peargrove.com/blog/2006/technical/table-row-offsettop-bug-in-s…
+ the solution is likewise noted there, grab the offset of a table cell in the row - the firstChild.
+ note that firefox will return a text node as a first child, so designing a more thorough
+ solution may need to take that into account, for now this seems to work in firefox, safari, ie */
+ e = e.firstChild; // a table cell
+ }
+ if (e && e.offsetParent) {
+ while (e.offsetParent){
+ left += e.offsetLeft;
+ top += e.offsetTop;
+ e = e.offsetParent;
+ }
+
+ left += e.offsetLeft;
+ top += e.offsetTop;
+ }
+
+ return {x:left, y:top};
+ },
+
+ mousemove: function(ev) {
+ if (jQuery.tableDnD.dragObject == null) {
+ return;
+ }
+
+ var dragObj = jQuery(jQuery.tableDnD.dragObject);
+ var config = jQuery.tableDnD.currentTable.tableDnDConfig;
+ var mousePos = jQuery.tableDnD.mouseCoords(ev);
+ var y = mousePos.y - jQuery.tableDnD.mouseOffset.y;
+ //auto scroll the window
+ var yOffset = window.pageYOffset;
+ if (document.all) {
+ // Windows version
+ //yOffset=document.body.scrollTop;
+ if (typeof document.compatMode != 'undefined' &&
+ document.compatMode != 'BackCompat') {
+ yOffset = document.documentElement.scrollTop;
+ }
+ else if (typeof document.body != 'undefined') {
+ yOffset=document.body.scrollTop;
+ }
+
+ }
+
+ if (mousePos.y-yOffset < config.scrollAmount) {
+ window.scrollBy(0, -config.scrollAmount);
+ } else {
+ var windowHeight = window.innerHeight ? window.innerHeight
+ : document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight;
+ if (windowHeight-(mousePos.y-yOffset) < config.scrollAmount) {
+ window.scrollBy(0, config.scrollAmount);
+ }
+ }
+
+
+ if (y != jQuery.tableDnD.oldY) {
+ // work out if we're going up or down...
+ var movingDown = y > jQuery.tableDnD.oldY;
+ // update the old value
+ jQuery.tableDnD.oldY = y;
+ // update the style to show we're dragging
+ if (config.onDragClass) {
+ dragObj.addClass(config.onDragClass);
+ } else {
+ dragObj.css(config.onDragStyle);
+ }
+ // If we're over a row then move the dragged row to there so that the user sees the
+ // effect dynamically
+ var currentRow = jQuery.tableDnD.findDropTargetRow(dragObj, y);
+ if (currentRow) {
+ // TODO worry about what happens when there are multiple TBODIES
+ if (movingDown && jQuery.tableDnD.dragObject != currentRow) {
+ jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject, currentRow.nextSibling);
+ } else if (! movingDown && jQuery.tableDnD.dragObject != currentRow) {
+ jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject, currentRow);
+ }
+ }
+ }
+
+ return false;
+ },
+
+ /** We're only worried about the y position really, because we can only move rows up and down */
+ findDropTargetRow: function(draggedRow, y) {
+ var rows = jQuery.tableDnD.currentTable.rows;
+ for (var i=0; i<rows.length; i++) {
+ var row = rows[i];
+ var rowY = this.getPosition(row).y;
+ var rowHeight = parseInt(row.offsetHeight)/2;
+ if (row.offsetHeight == 0) {
+ rowY = this.getPosition(row.firstChild).y;
+ rowHeight = parseInt(row.firstChild.offsetHeight)/2;
+ }
+ // Because we always have to insert before, we need to offset the height a bit
+ if ((y > rowY - rowHeight) && (y < (rowY + rowHeight))) {
+ // that's the row we're over
+ // If it's the same as the current row, ignore it
+ if (row == draggedRow) {return null;}
+ var config = jQuery.tableDnD.currentTable.tableDnDConfig;
+ if (config.onAllowDrop) {
+ if (config.onAllowDrop(draggedRow, row)) {
+ return row;
+ } else {
+ return null;
+ }
+ } else {
+ // If a row has nodrop class, then don't allow dropping (inspired by John Tarr and Famic)
+ var nodrop = jQuery(row).hasClass("nodrop");
+ if (! nodrop) {
+ return row;
+ } else {
+ return null;
+ }
+ }
+ return row;
+ }
+ }
+ return null;
+ },
+
+ mouseup: function(e) {
+ if (jQuery.tableDnD.currentTable && jQuery.tableDnD.dragObject) {
+ var droppedRow = jQuery.tableDnD.dragObject;
+ var config = jQuery.tableDnD.currentTable.tableDnDConfig;
+ // If we have a dragObject, then we need to release it,
+ // The row will already have been moved to the right place so we just reset stuff
+ if (config.onDragClass) {
+ jQuery(droppedRow).removeClass(config.onDragClass);
+ } else {
+ jQuery(droppedRow).css(config.onDropStyle);
+ }
+ jQuery.tableDnD.dragObject = null;
+ if (config.onDrop) {
+ // Call the onDrop method if there is one
+ config.onDrop(jQuery.tableDnD.currentTable, droppedRow);
+ }
+ jQuery.tableDnD.currentTable = null; // let go of the table too
+ }
+ },
+
+ serialize: function() {
+ if (jQuery.tableDnD.currentTable) {
+ return jQuery.tableDnD.serializeTable(jQuery.tableDnD.currentTable);
+ } else {
+ return "Error: No Table id set, you need to set an id on your table and every row";
+ }
+ },
+
+ serializeTable: function(table) {
+ var result = "";
+ var tableId = table.id;
+ var rows = table.rows;
+ for (var i=0; i<rows.length; i++) {
+ if (result.length > 0) result += "&";
+ var rowId = rows[i].id;
+ if (rowId && rowId && table.tableDnDConfig && table.tableDnDConfig.serializeRegexp) {
+ rowId = rowId.match(table.tableDnDConfig.serializeRegexp)[0];
+ }
+
+ result += tableId + '[]=' + rowId;
+ }
+ return result;
+ },
+
+ serializeTables: function() {
+ var result = "";
+ this.each(function() {
+ // this is now bound to each matching table
+ result += jQuery.tableDnD.serializeTable(this);
+ });
+ return result;
+ }
+
+}
+
+jQuery.fn.extend(
+ {
+ tableDnD : jQuery.tableDnD.build,
+ tableDnDUpdate : jQuery.tableDnD.updateTables,
+ tableDnDSerialize: jQuery.tableDnD.serializeTables
+ }
+);
\ No newline at end of file
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/searchFilter.css
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/searchFilter.css (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/searchFilter.css 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,6 @@
+.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;}
+.ui-searchFilter table td input, .ui-searchFilter table td select {margin: 0.1em;}
+.ui-searchFilter .ui-state-default { cursor: pointer; }
+.ui-searchFilter .divider hr {margin: 1px; }
\ No newline at end of file
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/ui.multiselect.css
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/ui.multiselect.css (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/ui.multiselect.css 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,30 @@
+/* Multiselect
+----------------------------------*/
+
+.ui-multiselect { border: solid 1px; font-size: 0.8em; }
+.ui-multiselect ul { -moz-user-select: none; }
+.ui-multiselect li { margin: 0; padding: 0; cursor: default; line-height: 20px; height: 20px; font-size: 11px; list-style: none; }
+.ui-multiselect li a { color: #999; text-decoration: none; padding: 0; display: block; float: left; cursor: pointer;}
+.ui-multiselect li.ui-draggable-dragging { padding-left: 10px; }
+
+.ui-multiselect div.selected { position: relative; padding: 0; margin: 0; border: 0; float:left; }
+.ui-multiselect ul.selected { position: relative; padding: 0; overflow: auto; overflow-x: hidden; background: #fff; margin: 0; list-style: none; border: 0; position: relative; width: 100%; }
+.ui-multiselect ul.selected li { }
+
+.ui-multiselect div.available { position: relative; padding: 0; margin: 0; border: 0; float:left; border-left: 1px solid; }
+.ui-multiselect ul.available { position: relative; padding: 0; overflow: auto; overflow-x: hidden; background: #fff; margin: 0; list-style: none; border: 0; width: 100%; }
+.ui-multiselect ul.available li { padding-left: 10px; }
+
+.ui-multiselect .ui-state-default { border: none; margin-bottom: 1px; position: relative; padding-left: 20px;}
+.ui-multiselect .ui-state-hover { border: none; }
+.ui-multiselect .ui-widget-header {border: none; font-size: 11px; margin-bottom: 1px;}
+
+.ui-multiselect .add-all { float: right; padding: 7px;}
+.ui-multiselect .remove-all { float: right; padding: 7px;}
+.ui-multiselect .search { float: left; padding: 4px;}
+.ui-multiselect .count { float: left; padding: 7px;}
+
+.ui-multiselect li span.ui-icon-arrowthick-2-n-s { position: absolute; left: 2px; }
+.ui-multiselect li a.action { position: absolute; right: 2px; top: 2px; }
+
+.ui-multiselect input.search { height: 14px; padding: 1px; opacity: 0.5; margin: 4px; width: 100px; }
\ No newline at end of file
Added: trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/ui.multiselect.js
===================================================================
--- trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/ui.multiselect.js (rev 0)
+++ trunk/nuiton-js-jqgrid/src/main/resources/nuiton-js-jqgrid/plugins/ui.multiselect.js 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,314 @@
+/*
+ * jQuery UI Multiselect
+ *
+ * Authors:
+ * Michael Aufreiter (quasipartikel.at)
+ * Yanick Rochon (yanick.rochon[at]gmail[dot]com)
+ *
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://www.quasipartikel.at/multiselect/
+ *
+ *
+ * Depends:
+ * ui.core.js
+ * ui.sortable.js
+ *
+ * Optional:
+ * localization (http://plugins.jquery.com/project/localisation)
+ * scrollTo (http://plugins.jquery.com/project/ScrollTo)
+ *
+ * Todo:
+ * Make batch actions faster
+ * Implement dynamic insertion through remote calls
+ */
+
+
+(function($) {
+
+$.widget("ui.multiselect", {
+ _init: function() {
+ this.element.hide();
+ this.id = this.element.attr("id");
+ this.container = $('<div class="ui-multiselect ui-helper-clearfix ui-widget"></div>').insertAfter(this.element);
+ this.count = 0; // number of currently selected options
+ this.selectedContainer = $('<div class="selected"></div>').appendTo(this.container);
+ this.availableContainer = $('<div class="available"></div>').appendTo(this.container);
+ this.selectedActions = $('<div class="actions ui-widget-header ui-helper-clearfix"><span class="count">0 '+$.ui.multiselect.locale.itemsCount+'</span><a href="#" class="remove-all">'+$.ui.multiselect.locale.removeAll+'</a></div>').appendTo(this.selectedContainer);
+ this.availableActions = $('<div class="actions ui-widget-header ui-helper-clearfix"><input type="text" class="search empty ui-widget-content ui-corner-all"/><a href="#" class="add-all">'+$.ui.multiselect.locale.addAll+'</a></div>').appendTo(this.availableContainer);
+ this.selectedList = $('<ul class="selected connected-list"><li class="ui-helper-hidden-accessible"></li></ul>').bind('selectstart', function(){return false;}).appendTo(this.selectedContainer);
+ this.availableList = $('<ul class="available connected-list"><li class="ui-helper-hidden-accessible"></li></ul>').bind('selectstart', function(){return false;}).appendTo(this.availableContainer);
+
+ var that = this;
+
+ // set dimensions
+ this.container.width(this.element.width()+1);
+ this.selectedContainer.width(Math.floor(this.element.width()*this.options.dividerLocation));
+ this.availableContainer.width(Math.floor(this.element.width()*(1-this.options.dividerLocation)));
+
+ // fix list height to match <option> depending on their individual header's heights
+ this.selectedList.height(Math.max(this.element.height()-this.selectedActions.height(),1));
+ this.availableList.height(Math.max(this.element.height()-this.availableActions.height(),1));
+
+ if ( !this.options.animated ) {
+ this.options.show = 'show';
+ this.options.hide = 'hide';
+ }
+
+ // init lists
+ this._populateLists(this.element.find('option'));
+
+ // make selection sortable
+ if (this.options.sortable) {
+ $("ul.selected").sortable({
+ placeholder: 'ui-state-highlight',
+ axis: 'y',
+ update: function(event, ui) {
+ // apply the new sort order to the original selectbox
+ that.selectedList.find('li').each(function() {
+ if ($(this).data('optionLink'))
+ $(this).data('optionLink').remove().appendTo(that.element);
+ });
+ },
+ receive: function(event, ui) {
+ ui.item.data('optionLink').attr('selected', true);
+ // increment count
+ that.count += 1;
+ that._updateCount();
+ // workaround, because there's no way to reference
+ // the new element, see http://dev.jqueryui.com/ticket/4303
+ that.selectedList.children('.ui-draggable').each(function() {
+ $(this).removeClass('ui-draggable');
+ $(this).data('optionLink', ui.item.data('optionLink'));
+ $(this).data('idx', ui.item.data('idx'));
+ that._applyItemState($(this), true);
+ });
+
+ // workaround according to http://dev.jqueryui.com/ticket/4088
+ setTimeout(function() { ui.item.remove(); }, 1);
+ }
+ });
+ }
+
+ // set up livesearch
+ if (this.options.searchable) {
+ this._registerSearchEvents(this.availableContainer.find('input.search'));
+ } else {
+ $('.search').hide();
+ }
+
+ // batch actions
+ $(".remove-all").click(function() {
+ that._populateLists(that.element.find('option').removeAttr('selected'));
+ return false;
+ });
+ $(".add-all").click(function() {
+ that._populateLists(that.element.find('option').attr('selected', 'selected'));
+ return false;
+ });
+ },
+ destroy: function() {
+ this.element.show();
+ this.container.remove();
+
+ $.widget.prototype.destroy.apply(this, arguments);
+ },
+ _populateLists: function(options) {
+ this.selectedList.children('.ui-element').remove();
+ this.availableList.children('.ui-element').remove();
+ this.count = 0;
+
+ var that = this;
+ var items = $(options.map(function(i) {
+ var item = that._getOptionNode(this).appendTo(this.selected ? that.selectedList : that.availableList).show();
+
+ if (this.selected) that.count += 1;
+ that._applyItemState(item, this.selected);
+ item.data('idx', i);
+ return item[0];
+ }));
+
+ // update count
+ this._updateCount();
+ },
+ _updateCount: function() {
+ this.selectedContainer.find('span.count').text(this.count+" "+$.ui.multiselect.locale.itemsCount);
+ },
+ _getOptionNode: function(option) {
+ option = $(option);
+ var node = $('<li class="ui-state-default ui-element" title="'+option.text()+'"><span class="ui-icon"/>'+option.text()+'<a href="#" class="action"><span class="ui-corner-all ui-icon"/></a></li>').hide();
+ node.data('optionLink', option);
+ return node;
+ },
+ // clones an item with associated data
+ // didn't find a smarter away around this
+ _cloneWithData: function(clonee) {
+ var clone = clonee.clone();
+ clone.data('optionLink', clonee.data('optionLink'));
+ clone.data('idx', clonee.data('idx'));
+ return clone;
+ },
+ _setSelected: function(item, selected) {
+ item.data('optionLink').attr('selected', selected);
+
+ if (selected) {
+ var selectedItem = this._cloneWithData(item);
+ item[this.options.hide](this.options.animated, function() { $(this).remove(); });
+ selectedItem.appendTo(this.selectedList).hide()[this.options.show](this.options.animated);
+
+ this._applyItemState(selectedItem, true);
+ return selectedItem;
+ } else {
+
+ // look for successor based on initial option index
+ var items = this.availableList.find('li'), comparator = this.options.nodeComparator;
+ var succ = null, i = item.data('idx'), direction = comparator(item, $(items[i]));
+
+ // TODO: test needed for dynamic list populating
+ if ( direction ) {
+ while (i>=0 && i<items.length) {
+ direction > 0 ? i++ : i--;
+ if ( direction != comparator(item, $(items[i])) ) {
+ // going up, go back one item down, otherwise leave as is
+ succ = items[direction > 0 ? i : i+1];
+ break;
+ }
+ }
+ } else {
+ succ = items[i];
+ }
+
+ var availableItem = this._cloneWithData(item);
+ succ ? availableItem.insertBefore($(succ)) : availableItem.appendTo(this.availableList);
+ item[this.options.hide](this.options.animated, function() { $(this).remove(); });
+ availableItem.hide()[this.options.show](this.options.animated);
+
+ this._applyItemState(availableItem, false);
+ return availableItem;
+ }
+ },
+ _applyItemState: function(item, selected) {
+ if (selected) {
+ if (this.options.sortable)
+ item.children('span').addClass('ui-icon-arrowthick-2-n-s').removeClass('ui-helper-hidden').addClass('ui-icon');
+ else
+ item.children('span').removeClass('ui-icon-arrowthick-2-n-s').addClass('ui-helper-hidden').removeClass('ui-icon');
+ item.find('a.action span').addClass('ui-icon-minus').removeClass('ui-icon-plus');
+ this._registerRemoveEvents(item.find('a.action'));
+
+ } else {
+ item.children('span').removeClass('ui-icon-arrowthick-2-n-s').addClass('ui-helper-hidden').removeClass('ui-icon');
+ item.find('a.action span').addClass('ui-icon-plus').removeClass('ui-icon-minus');
+ this._registerAddEvents(item.find('a.action'));
+ }
+
+ this._registerHoverEvents(item);
+ },
+ // taken from John Resig's liveUpdate script
+ _filter: function(list) {
+ var input = $(this);
+ var rows = list.children('li'),
+ cache = rows.map(function(){
+
+ return $(this).text().toLowerCase();
+ });
+
+ var term = $.trim(input.val().toLowerCase()), scores = [];
+
+ if (!term) {
+ rows.show();
+ } else {
+ rows.hide();
+
+ cache.each(function(i) {
+ if (this.indexOf(term)>-1) { scores.push(i); }
+ });
+
+ $.each(scores, function() {
+ $(rows[this]).show();
+ });
+ }
+ },
+ _registerHoverEvents: function(elements) {
+ elements.removeClass('ui-state-hover');
+ elements.mouseover(function() {
+ $(this).addClass('ui-state-hover');
+ });
+ elements.mouseout(function() {
+ $(this).removeClass('ui-state-hover');
+ });
+ },
+ _registerAddEvents: function(elements) {
+ var that = this;
+ elements.click(function() {
+ var item = that._setSelected($(this).parent(), true);
+ that.count += 1;
+ that._updateCount();
+ return false;
+ })
+ // make draggable
+ .each(function() {
+ $(this).parent().draggable({
+ connectToSortable: 'ul.selected',
+ helper: function() {
+ var selectedItem = that._cloneWithData($(this)).width($(this).width() - 50);
+ selectedItem.width($(this).width());
+ return selectedItem;
+ },
+ appendTo: '.ui-multiselect',
+ containment: '.ui-multiselect',
+ revert: 'invalid'
+ });
+ });
+ },
+ _registerRemoveEvents: function(elements) {
+ var that = this;
+ elements.click(function() {
+ that._setSelected($(this).parent(), false);
+ that.count -= 1;
+ that._updateCount();
+ return false;
+ });
+ },
+ _registerSearchEvents: function(input) {
+ var that = this;
+
+ input.focus(function() {
+ $(this).addClass('ui-state-active');
+ })
+ .blur(function() {
+ $(this).removeClass('ui-state-active');
+ })
+ .keypress(function(e) {
+ if (e.keyCode == 13)
+ return false;
+ })
+ .keyup(function() {
+ that._filter.apply(this, [that.availableList]);
+ });
+ }
+});
+
+$.extend($.ui.multiselect, {
+ defaults: {
+ sortable: true,
+ searchable: true,
+ animated: 'fast',
+ show: 'slideDown',
+ hide: 'slideUp',
+ dividerLocation: 0.6,
+ nodeComparator: function(node1,node2) {
+ var text1 = node1.text(),
+ text2 = node2.text();
+ return text1 == text2 ? 0 : (text1 < text2 ? -1 : 1);
+ }
+ },
+ locale: {
+ addAll:'Add all',
+ removeAll:'Remove all',
+ itemsCount:'items selected'
+ }
+});
+
+})(jQuery);
Added: trunk/nuiton-js-jqgrid/src/site/rst/index.rst
===================================================================
--- trunk/nuiton-js-jqgrid/src/site/rst/index.rst (rev 0)
+++ trunk/nuiton-js-jqgrid/src/site/rst/index.rst 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,70 @@
+Utilisation
+===========
+
+::
+
+ <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+
+ <link rel="stylesheet" type="text/css" href="<c:url value="/nuiton-js/jqgrid.css"/>" />
+ <script language="javascript" type="text/javascript" src="<c:url value="/nuiton-js/jqgrid.js"/>"></script>
+ <script language="javascript" type="text/javascript" src="<c:url value="/nuiton-js/jqgrid-fr.js"/>"></script>
+
+JS disponible
+-------------
+
+- jqgrid-only : jquery-ui
+- jqgrid: jquery et jqgrid
+
+plugins:
+
+- jqgrid-addons:
+- jqgrid-postext:
+- jqgrid-setcolumns:
+- jqgrid-contextmenu:
+- jqgrid-searchFilter:
+- jqgrid-tablednd:
+- jqgrid-multiselect:
+
+fichier de langue:
+
+- jqgrid-ar: specifique i18n
+- jqgrid-bg: specifique i18n
+- jqgrid-bg1251: specifique i18n
+- jqgrid-cat: specifique i18n
+- jqgrid-cn: specifique i18n
+- jqgrid-cs: specifique i18n
+- jqgrid-da: specifique i18n
+- jqgrid-de: specifique i18n
+- jqgrid-dk: specifique i18n
+- jqgrid-el: specifique i18n
+- jqgrid-en: specifique i18n
+- jqgrid-es: specifique i18n
+- jqgrid-fa: specifique i18n
+- jqgrid-fi: specifique i18n
+- jqgrid-fr: specifique i18n
+- jqgrid-gl: specifique i18n
+- jqgrid-he: specifique i18n
+- jqgrid-hr: specifique i18n
+- jqgrid-hr1250: specifique i18n
+- jqgrid-hu: specifique i18n
+- jqgrid-is: specifique i18n
+- jqgrid-it: specifique i18n
+- jqgrid-ja: specifique i18n
+- jqgrid-kr: specifique i18n
+- jqgrid-lt: specifique i18n
+- jqgrid-mne: specifique i18n
+- jqgrid-nl: specifique i18n
+- jqgrid-no: specifique i18n
+- jqgrid-pl: specifique i18n
+- jqgrid-pt-br: specifique i18n
+- jqgrid-pt: specifique i18n
+- jqgrid-ro: specifique i18n
+- jqgrid-ru: specifique i18n
+- jqgrid-sk: specifique i18n
+- jqgrid-sr-latin: specifique i18n
+- jqgrid-sr: specifique i18n
+- jqgrid-sv: specifique i18n
+- jqgrid-th: specifique i18n
+- jqgrid-tr: specifique i18n
+- jqgrid-tw: specifique i18n
+- jqgrid-ua: specifique i18n
Added: trunk/nuiton-js-jqgrid/src/site/site_fr.xml
===================================================================
--- trunk/nuiton-js-jqgrid/src/site/site_fr.xml (rev 0)
+++ trunk/nuiton-js-jqgrid/src/site/site_fr.xml 2013-01-19 11:25:15 UTC (rev 20)
@@ -0,0 +1,49 @@
+<project name="${project.name}">
+
+ <bannerLeft>
+ <src alt="NuitonJS">logo.jpg</src>
+ <name>${project.name}</name>
+ <href>index.html</href>
+ </bannerLeft>
+
+ <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>
+
+ <menu ref="parent"/>
+
+ <menu name="Utilisateurs">
+ <item name="Accueil" href="index.html"/>
+ </menu>
+
+ <menu ref="reports"/>
+
+ <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>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2013-01-19 11:15:23 UTC (rev 19)
+++ trunk/pom.xml 2013-01-19 11:25:15 UTC (rev 20)
@@ -24,6 +24,7 @@
<module>nuiton-js-jqplot</module>
<module>nuiton-js-bootstrap</module>
<module>nuiton-js-jstree</module>
+ <module>nuiton-js-jqgrid</module>
</modules>
<dependencyManagement>
1
0
r19 - in trunk/nuiton-js-jquery-ui: . src/main/resources/META-INF/nuiton-js
by bpoussin@users.nuiton.org 19 Jan '13
by bpoussin@users.nuiton.org 19 Jan '13
19 Jan '13
Author: bpoussin
Date: 2013-01-19 12:15:23 +0100 (Sat, 19 Jan 2013)
New Revision: 19
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/19
Log:
fix bad i18n path
Modified:
trunk/nuiton-js-jquery-ui/generate-i18n-group.sh
trunk/nuiton-js-jquery-ui/src/main/resources/META-INF/nuiton-js/wro-jquery-ui.xml
Modified: trunk/nuiton-js-jquery-ui/generate-i18n-group.sh
===================================================================
--- trunk/nuiton-js-jquery-ui/generate-i18n-group.sh 2013-01-16 17:17:44 UTC (rev 18)
+++ trunk/nuiton-js-jquery-ui/generate-i18n-group.sh 2013-01-19 11:15:23 UTC (rev 19)
@@ -5,6 +5,6 @@
#
for t in src/main/resources/nuiton-js-jquery-ui/js/i18n/*; do
f=$(basename $t)
- n=$(basename $t .js|tr '.' '-')
- echo -e " <group name='$n'>\n <css>classpath:nuiton-js-jquery-ui/i18n/$f</css>\n </group>\n"
+ n=$(basename $t .js|tr '.' '-' |sed 's/datepicker-//g')
+ echo -e " <group name='$n'>\n <css>classpath:nuiton-js-jquery-ui/js/i18n/$f</css>\n </group>\n"
done
Modified: trunk/nuiton-js-jquery-ui/src/main/resources/META-INF/nuiton-js/wro-jquery-ui.xml
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/META-INF/nuiton-js/wro-jquery-ui.xml 2013-01-16 17:17:44 UTC (rev 18)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/META-INF/nuiton-js/wro-jquery-ui.xml 2013-01-19 11:15:23 UTC (rev 19)
@@ -125,279 +125,279 @@
+-->
<group name='jquery-ui-i18n'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery-ui-i18n.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery-ui-i18n.js</css>
</group>
<group name='jquery-ui-af'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-af.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-af.js</css>
</group>
<group name='jquery-ui-ar-DZ'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-ar-DZ.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ar-DZ.js</css>
</group>
<group name='jquery-ui-ar'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-ar.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ar.js</css>
</group>
<group name='jquery-ui-az'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-az.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-az.js</css>
</group>
<group name='jquery-ui-bg'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-bg.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-bg.js</css>
</group>
<group name='jquery-ui-bs'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-bs.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-bs.js</css>
</group>
<group name='jquery-ui-ca'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-ca.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ca.js</css>
</group>
<group name='jquery-ui-cs'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-cs.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-cs.js</css>
</group>
<group name='jquery-ui-cy-GB'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-cy-GB.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-cy-GB.js</css>
</group>
<group name='jquery-ui-da'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-da.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-da.js</css>
</group>
<group name='jquery-ui-de'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-de.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-de.js</css>
</group>
<group name='jquery-ui-el'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-el.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-el.js</css>
</group>
<group name='jquery-ui-en-AU'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-en-AU.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-en-AU.js</css>
</group>
<group name='jquery-ui-en-GB'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-en-GB.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-en-GB.js</css>
</group>
<group name='jquery-ui-en-NZ'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-en-NZ.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-en-NZ.js</css>
</group>
<group name='jquery-ui-eo'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-eo.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-eo.js</css>
</group>
<group name='jquery-ui-es'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-es.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-es.js</css>
</group>
<group name='jquery-ui-et'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-et.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-et.js</css>
</group>
<group name='jquery-ui-eu'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-eu.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-eu.js</css>
</group>
<group name='jquery-ui-fa'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-fa.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-fa.js</css>
</group>
<group name='jquery-ui-fi'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-fi.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-fi.js</css>
</group>
<group name='jquery-ui-fo'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-fo.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-fo.js</css>
</group>
<group name='jquery-ui-fr-CH'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-fr-CH.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-fr-CH.js</css>
</group>
<group name='jquery-ui-fr'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-fr.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-fr.js</css>
</group>
<group name='jquery-ui-gl'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-gl.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-gl.js</css>
</group>
<group name='jquery-ui-he'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-he.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-he.js</css>
</group>
<group name='jquery-ui-hi'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-hi.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-hi.js</css>
</group>
<group name='jquery-ui-hr'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-hr.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-hr.js</css>
</group>
<group name='jquery-ui-hu'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-hu.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-hu.js</css>
</group>
<group name='jquery-ui-hy'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-hy.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-hy.js</css>
</group>
<group name='jquery-ui-id'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-id.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-id.js</css>
</group>
<group name='jquery-ui-is'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-is.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-is.js</css>
</group>
<group name='jquery-ui-it'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-it.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-it.js</css>
</group>
<group name='jquery-ui-ja'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-ja.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ja.js</css>
</group>
<group name='jquery-ui-ka'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-ka.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ka.js</css>
</group>
<group name='jquery-ui-kk'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-kk.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-kk.js</css>
</group>
<group name='jquery-ui-km'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-km.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-km.js</css>
</group>
<group name='jquery-ui-ko'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-ko.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ko.js</css>
</group>
<group name='jquery-ui-lb'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-lb.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-lb.js</css>
</group>
<group name='jquery-ui-lt'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-lt.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-lt.js</css>
</group>
<group name='jquery-ui-lv'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-lv.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-lv.js</css>
</group>
<group name='jquery-ui-mk'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-mk.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-mk.js</css>
</group>
<group name='jquery-ui-ml'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-ml.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ml.js</css>
</group>
<group name='jquery-ui-ms'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-ms.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ms.js</css>
</group>
<group name='jquery-ui-nl-BE'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-nl-BE.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-nl-BE.js</css>
</group>
<group name='jquery-ui-nl'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-nl.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-nl.js</css>
</group>
<group name='jquery-ui-no'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-no.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-no.js</css>
</group>
<group name='jquery-ui-pl'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-pl.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-pl.js</css>
</group>
<group name='jquery-ui-pt-BR'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-pt-BR.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-pt-BR.js</css>
</group>
<group name='jquery-ui-pt'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-pt.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-pt.js</css>
</group>
<group name='jquery-ui-rm'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-rm.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-rm.js</css>
</group>
<group name='jquery-ui-ro'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-ro.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ro.js</css>
</group>
<group name='jquery-ui-ru'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-ru.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ru.js</css>
</group>
<group name='jquery-ui-sk'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-sk.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-sk.js</css>
</group>
<group name='jquery-ui-sl'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-sl.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-sl.js</css>
</group>
<group name='jquery-ui-sq'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-sq.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-sq.js</css>
</group>
<group name='jquery-ui-sr-SR'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-sr-SR.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-sr-SR.js</css>
</group>
<group name='jquery-ui-sr'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-sr.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-sr.js</css>
</group>
<group name='jquery-ui-sv'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-sv.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-sv.js</css>
</group>
<group name='jquery-ui-ta'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-ta.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ta.js</css>
</group>
<group name='jquery-ui-th'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-th.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-th.js</css>
</group>
<group name='jquery-ui-tj'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-tj.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-tj.js</css>
</group>
<group name='jquery-ui-tr'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-tr.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-tr.js</css>
</group>
<group name='jquery-ui-uk'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-uk.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-uk.js</css>
</group>
<group name='jquery-ui-vi'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-vi.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-vi.js</css>
</group>
<group name='jquery-ui-zh-CN'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-zh-CN.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-zh-CN.js</css>
</group>
<group name='jquery-ui-zh-HK'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-zh-HK.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-zh-HK.js</css>
</group>
<group name='jquery-ui-zh-TW'>
- <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-zh-TW.js</css>
+ <css>classpath:nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-zh-TW.js</css>
</group>
</groups>
1
0
r18 - in trunk: . nuiton-js-bootstrap nuiton-js-jqplot nuiton-js-jquery nuiton-js-jquery-ui nuiton-js-jstree nuiton-js-wro
by echatellier@users.nuiton.org 16 Jan '13
by echatellier@users.nuiton.org 16 Jan '13
16 Jan '13
Author: echatellier
Date: 2013-01-16 18:17:44 +0100 (Wed, 16 Jan 2013)
New Revision: 18
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/18
Log:
Fix svn:ignore
Modified:
trunk/
trunk/nuiton-js-bootstrap/
trunk/nuiton-js-jqplot/
trunk/nuiton-js-jquery-ui/
trunk/nuiton-js-jquery/
trunk/nuiton-js-jstree/
trunk/nuiton-js-wro/
Property changes on: trunk
___________________________________________________________________
Modified: svn:ignore
- target
.idea
.ipr
.iws
.iml
+ target
.idea
.ipr
.iws
.iml
.settings
.project
Property changes on: trunk/nuiton-js-bootstrap
___________________________________________________________________
Added: svn:ignore
+ .classpath
.project
.settings
target
Property changes on: trunk/nuiton-js-jqplot
___________________________________________________________________
Added: svn:ignore
+ .classpath
.project
.settings
target
Property changes on: trunk/nuiton-js-jquery
___________________________________________________________________
Modified: svn:ignore
- target
.idea
.ipr
.iws
.iml
+ target
.idea
.ipr
.iws
.iml
.classpath
.project
.settings
Property changes on: trunk/nuiton-js-jquery-ui
___________________________________________________________________
Modified: svn:ignore
- target
.idea
.ipr
.iws
.iml
+ target
.idea
.ipr
.iws
.iml
.classpath
.project
.settings
Property changes on: trunk/nuiton-js-jstree
___________________________________________________________________
Added: svn:ignore
+ .classpath
.project
.settings
target
Property changes on: trunk/nuiton-js-wro
___________________________________________________________________
Modified: svn:ignore
- target
.idea
.ipr
.iws
.iml
+ target
.idea
.ipr
.iws
.iml
.classpath
.project
.settings
1
0
Author: echatellier
Date: 2013-01-16 18:14:36 +0100 (Wed, 16 Jan 2013)
New Revision: 17
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/17
Log:
Add jstree module
Added:
trunk/nuiton-js-jstree/
trunk/nuiton-js-jstree/LICENSE.txt
trunk/nuiton-js-jstree/README.txt
trunk/nuiton-js-jstree/changelog.txt
trunk/nuiton-js-jstree/pom.xml
trunk/nuiton-js-jstree/src/
trunk/nuiton-js-jstree/src/main/
trunk/nuiton-js-jstree/src/main/resources/
trunk/nuiton-js-jstree/src/main/resources/META-INF/
trunk/nuiton-js-jstree/src/main/resources/META-INF/nuiton-js/
trunk/nuiton-js-jstree/src/main/resources/META-INF/nuiton-js/wro-jstree.xml
trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/
trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/js/
trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/js/jquery.jstree.js
trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/
trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/apple/
trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/apple/bg.jpg
trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/apple/d.png
trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/apple/dot_for_ie.gif
trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/apple/style.css
trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/apple/throbber.gif
trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/classic/
trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/classic/d.gif
trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/classic/d.png
trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/classic/dot_for_ie.gif
trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/classic/style.css
trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/classic/throbber.gif
trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/default-rtl/
trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/default-rtl/d.gif
trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/default-rtl/d.png
trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/default-rtl/dots.gif
trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/default-rtl/style.css
trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/default-rtl/throbber.gif
trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/default/
trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/default/d.gif
trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/default/d.png
trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/default/style.css
trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/default/throbber.gif
trunk/nuiton-js-jstree/src/site/
trunk/nuiton-js-jstree/src/site/rst/
trunk/nuiton-js-jstree/src/site/rst/index.rst
trunk/nuiton-js-jstree/src/site/site_fr.xml
Modified:
trunk/pom.xml
Added: trunk/nuiton-js-jstree/LICENSE.txt
===================================================================
--- trunk/nuiton-js-jstree/LICENSE.txt (rev 0)
+++ trunk/nuiton-js-jstree/LICENSE.txt 2013-01-16 17:14:36 UTC (rev 17)
@@ -0,0 +1,166 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
+
Added: trunk/nuiton-js-jstree/README.txt
===================================================================
(Binary files differ)
Property changes on: trunk/nuiton-js-jstree/README.txt
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/nuiton-js-jstree/changelog.txt
===================================================================
--- trunk/nuiton-js-jstree/changelog.txt (rev 0)
+++ trunk/nuiton-js-jstree/changelog.txt 2013-01-16 17:14:36 UTC (rev 17)
@@ -0,0 +1,2 @@
+Please refer to the release note :
+ http://maven-site.nuiton.org/nuiton-js/changes-report.html
Added: trunk/nuiton-js-jstree/pom.xml
===================================================================
(Binary files differ)
Property changes on: trunk/nuiton-js-jstree/pom.xml
___________________________________________________________________
Added: svn:mime-type
+ application/xml
Added: trunk/nuiton-js-jstree/src/main/resources/META-INF/nuiton-js/wro-jstree.xml
===================================================================
--- trunk/nuiton-js-jstree/src/main/resources/META-INF/nuiton-js/wro-jstree.xml (rev 0)
+++ trunk/nuiton-js-jstree/src/main/resources/META-INF/nuiton-js/wro-jstree.xml 2013-01-16 17:14:36 UTC (rev 17)
@@ -0,0 +1,10 @@
+<groups xmlns="http://www.isdc.ro/wro">
+
+ <import>classpath:META-INF/nuiton-js/wro-jquery.xml</import>
+
+ <group name='jstree'>
+ <js>classpath:nuiton-js-jstree/js/*.js</js>
+ <css>classpath:nuiton-js-jstree/themes/*.css</css>
+ </group>
+
+</groups>
Added: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/js/jquery.jstree.js
===================================================================
--- trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/js/jquery.jstree.js (rev 0)
+++ trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/js/jquery.jstree.js 2013-01-16 17:14:36 UTC (rev 17)
@@ -0,0 +1,4561 @@
+/*
+ * jsTree 1.0-rc3
+ * http://jstree.com/
+ *
+ * Copyright (c) 2010 Ivan Bozhanov (vakata.com)
+ *
+ * Licensed same as jquery - under the terms of either the MIT License or the GPL Version 2 License
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * $Date: 2011-02-09 01:17:14 +0200 (ср, 09 февр 2011) $
+ * $Revision: 236 $
+ */
+
+/*jslint browser: true, onevar: true, undef: true, bitwise: true, strict: true */
+/*global window : false, clearInterval: false, clearTimeout: false, document: false, setInterval: false, setTimeout: false, jQuery: false, navigator: false, XSLTProcessor: false, DOMParser: false, XMLSerializer: false, ActiveXObject: false */
+
+"use strict";
+
+// top wrapper to prevent multiple inclusion (is this OK?)
+(function () { if(jQuery && jQuery.jstree) { return; }
+ var is_ie6 = false, is_ie7 = false, is_ff2 = false;
+
+/*
+ * jsTree core
+ */
+(function ($) {
+ // Common functions not related to jsTree
+ // decided to move them to a `vakata` "namespace"
+ $.vakata = {};
+ // CSS related functions
+ $.vakata.css = {
+ get_css : function(rule_name, delete_flag, sheet) {
+ rule_name = rule_name.toLowerCase();
+ var css_rules = sheet.cssRules || sheet.rules,
+ j = 0;
+ do {
+ if(css_rules.length && j > css_rules.length + 5) { return false; }
+ if(css_rules[j].selectorText && css_rules[j].selectorText.toLowerCase() == rule_name) {
+ if(delete_flag === true) {
+ if(sheet.removeRule) { sheet.removeRule(j); }
+ if(sheet.deleteRule) { sheet.deleteRule(j); }
+ return true;
+ }
+ else { return css_rules[j]; }
+ }
+ }
+ while (css_rules[++j]);
+ return false;
+ },
+ add_css : function(rule_name, sheet) {
+ if($.jstree.css.get_css(rule_name, false, sheet)) { return false; }
+ if(sheet.insertRule) { sheet.insertRule(rule_name + ' { }', 0); } else { sheet.addRule(rule_name, null, 0); }
+ return $.vakata.css.get_css(rule_name);
+ },
+ remove_css : function(rule_name, sheet) {
+ return $.vakata.css.get_css(rule_name, true, sheet);
+ },
+ add_sheet : function(opts) {
+ var tmp = false, is_new = true;
+ if(opts.str) {
+ if(opts.title) { tmp = $("style[id='" + opts.title + "-stylesheet']")[0]; }
+ if(tmp) { is_new = false; }
+ else {
+ tmp = document.createElement("style");
+ tmp.setAttribute('type',"text/css");
+ if(opts.title) { tmp.setAttribute("id", opts.title + "-stylesheet"); }
+ }
+ if(tmp.styleSheet) {
+ if(is_new) {
+ document.getElementsByTagName("head")[0].appendChild(tmp);
+ tmp.styleSheet.cssText = opts.str;
+ }
+ else {
+ tmp.styleSheet.cssText = tmp.styleSheet.cssText + " " + opts.str;
+ }
+ }
+ else {
+ tmp.appendChild(document.createTextNode(opts.str));
+ document.getElementsByTagName("head")[0].appendChild(tmp);
+ }
+ return tmp.sheet || tmp.styleSheet;
+ }
+ if(opts.url) {
+ if(document.createStyleSheet) {
+ try { tmp = document.createStyleSheet(opts.url); } catch (e) { }
+ }
+ else {
+ tmp = document.createElement('link');
+ tmp.rel = 'stylesheet';
+ tmp.type = 'text/css';
+ tmp.media = "all";
+ tmp.href = opts.url;
+ document.getElementsByTagName("head")[0].appendChild(tmp);
+ return tmp.styleSheet;
+ }
+ }
+ }
+ };
+
+ // private variables
+ var instances = [], // instance array (used by $.jstree.reference/create/focused)
+ focused_instance = -1, // the index in the instance array of the currently focused instance
+ plugins = {}, // list of included plugins
+ prepared_move = {}; // for the move_node function
+
+ // jQuery plugin wrapper (thanks to jquery UI widget function)
+ $.fn.jstree = function (settings) {
+ var isMethodCall = (typeof settings == 'string'), // is this a method call like $().jstree("open_node")
+ args = Array.prototype.slice.call(arguments, 1),
+ returnValue = this;
+
+ // if a method call execute the method on all selected instances
+ if(isMethodCall) {
+ if(settings.substring(0, 1) == '_') { return returnValue; }
+ this.each(function() {
+ var instance = instances[$.data(this, "jstree_instance_id")],
+ methodValue = (instance && $.isFunction(instance[settings])) ? instance[settings].apply(instance, args) : instance;
+ if(typeof methodValue !== "undefined" && (settings.indexOf("is_") === 0 || (methodValue !== true && methodValue !== false))) { returnValue = methodValue; return false; }
+ });
+ }
+ else {
+ this.each(function() {
+ // extend settings and allow for multiple hashes and $.data
+ var instance_id = $.data(this, "jstree_instance_id"),
+ a = [],
+ b = settings ? $.extend({}, true, settings) : {},
+ c = $(this),
+ s = false,
+ t = [];
+ a = a.concat(args);
+ if(c.data("jstree")) { a.push(c.data("jstree")); }
+ b = a.length ? $.extend.apply(null, [true, b].concat(a)) : b;
+
+ // if an instance already exists, destroy it first
+ if(typeof instance_id !== "undefined" && instances[instance_id]) { instances[instance_id].destroy(); }
+ // push a new empty object to the instances array
+ instance_id = parseInt(instances.push({}),10) - 1;
+ // store the jstree instance id to the container element
+ $.data(this, "jstree_instance_id", instance_id);
+ // clean up all plugins
+ b.plugins = $.isArray(b.plugins) ? b.plugins : $.jstree.defaults.plugins.slice();
+ b.plugins.unshift("core");
+ // only unique plugins
+ b.plugins = b.plugins.sort().join(",,").replace(/(,|^)([^,]+)(,,\2)+(,|$)/g,"$1$2$4").replace(/,,+/g,",").replace(/,$/,"").split(",");
+
+ // extend defaults with passed data
+ s = $.extend(true, {}, $.jstree.defaults, b);
+ s.plugins = b.plugins;
+ $.each(plugins, function (i, val) {
+ if($.inArray(i, s.plugins) === -1) { s[i] = null; delete s[i]; }
+ else { t.push(i); }
+ });
+ s.plugins = t;
+
+ // push the new object to the instances array (at the same time set the default classes to the container) and init
+ instances[instance_id] = new $.jstree._instance(instance_id, $(this).addClass("jstree jstree-" + instance_id), s);
+ // init all activated plugins for this instance
+ $.each(instances[instance_id]._get_settings().plugins, function (i, val) { instances[instance_id].data[val] = {}; });
+ $.each(instances[instance_id]._get_settings().plugins, function (i, val) { if(plugins[val]) { plugins[val].__init.apply(instances[instance_id]); } });
+ // initialize the instance
+ setTimeout(function() { if(instances[instance_id]) { instances[instance_id].init(); } }, 0);
+ });
+ }
+ // return the jquery selection (or if it was a method call that returned a value - the returned value)
+ return returnValue;
+ };
+ // object to store exposed functions and objects
+ $.jstree = {
+ defaults : {
+ plugins : []
+ },
+ _focused : function () { return instances[focused_instance] || null; },
+ _reference : function (needle) {
+ // get by instance id
+ if(instances[needle]) { return instances[needle]; }
+ // get by DOM (if still no luck - return null
+ var o = $(needle);
+ if(!o.length && typeof needle === "string") { o = $("#" + needle); }
+ if(!o.length) { return null; }
+ return instances[o.closest(".jstree").data("jstree_instance_id")] || null;
+ },
+ _instance : function (index, container, settings) {
+ // for plugins to store data in
+ this.data = { core : {} };
+ this.get_settings = function () { return $.extend(true, {}, settings); };
+ this._get_settings = function () { return settings; };
+ this.get_index = function () { return index; };
+ this.get_container = function () { return container; };
+ this.get_container_ul = function () { return container.children("ul:eq(0)"); };
+ this._set_settings = function (s) {
+ settings = $.extend(true, {}, settings, s);
+ };
+ },
+ _fn : { },
+ plugin : function (pname, pdata) {
+ pdata = $.extend({}, {
+ __init : $.noop,
+ __destroy : $.noop,
+ _fn : {},
+ defaults : false
+ }, pdata);
+ plugins[pname] = pdata;
+
+ $.jstree.defaults[pname] = pdata.defaults;
+ $.each(pdata._fn, function (i, val) {
+ val.plugin = pname;
+ val.old = $.jstree._fn[i];
+ $.jstree._fn[i] = function () {
+ var rslt,
+ func = val,
+ args = Array.prototype.slice.call(arguments),
+ evnt = new $.Event("before.jstree"),
+ rlbk = false;
+
+ if(this.data.core.locked === true && i !== "unlock" && i !== "is_locked") { return; }
+
+ // Check if function belongs to the included plugins of this instance
+ do {
+ if(func && func.plugin && $.inArray(func.plugin, this._get_settings().plugins) !== -1) { break; }
+ func = func.old;
+ } while(func);
+ if(!func) { return; }
+
+ // context and function to trigger events, then finally call the function
+ if(i.indexOf("_") === 0) {
+ rslt = func.apply(this, args);
+ }
+ else {
+ rslt = this.get_container().triggerHandler(evnt, { "func" : i, "inst" : this, "args" : args, "plugin" : func.plugin });
+ if(rslt === false) { return; }
+ if(typeof rslt !== "undefined") { args = rslt; }
+
+ rslt = func.apply(
+ $.extend({}, this, {
+ __callback : function (data) {
+ this.get_container().triggerHandler( i + '.jstree', { "inst" : this, "args" : args, "rslt" : data, "rlbk" : rlbk });
+ },
+ __rollback : function () {
+ rlbk = this.get_rollback();
+ return rlbk;
+ },
+ __call_old : function (replace_arguments) {
+ return func.old.apply(this, (replace_arguments ? Array.prototype.slice.call(arguments, 1) : args ) );
+ }
+ }), args);
+ }
+
+ // return the result
+ return rslt;
+ };
+ $.jstree._fn[i].old = val.old;
+ $.jstree._fn[i].plugin = pname;
+ });
+ },
+ rollback : function (rb) {
+ if(rb) {
+ if(!$.isArray(rb)) { rb = [ rb ]; }
+ $.each(rb, function (i, val) {
+ instances[val.i].set_rollback(val.h, val.d);
+ });
+ }
+ }
+ };
+ // set the prototype for all instances
+ $.jstree._fn = $.jstree._instance.prototype = {};
+
+ // load the css when DOM is ready
+ $(function() {
+ // code is copied from jQuery ($.browser is deprecated + there is a bug in IE)
+ var u = navigator.userAgent.toLowerCase(),
+ v = (u.match( /.+?(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1],
+ css_string = '' +
+ '.jstree ul, .jstree li { display:block; margin:0 0 0 0; padding:0 0 0 0; list-style-type:none; } ' +
+ '.jstree li { display:block; min-height:18px; line-height:18px; white-space:nowrap; margin-left:18px; min-width:18px; } ' +
+ '.jstree-rtl li { margin-left:0; margin-right:18px; } ' +
+ '.jstree > ul > li { margin-left:0px; } ' +
+ '.jstree-rtl > ul > li { margin-right:0px; } ' +
+ '.jstree ins { display:inline-block; text-decoration:none; width:18px; height:18px; margin:0 0 0 0; padding:0; } ' +
+ '.jstree a { display:inline-block; line-height:16px; height:16px; color:black; white-space:nowrap; text-decoration:none; padding:1px 2px; margin:0; } ' +
+ '.jstree a:focus { outline: none; } ' +
+ '.jstree a > ins { height:16px; width:16px; } ' +
+ '.jstree a > .jstree-icon { margin-right:3px; } ' +
+ '.jstree-rtl a > .jstree-icon { margin-left:3px; margin-right:0; } ' +
+ 'li.jstree-open > ul { display:block; } ' +
+ 'li.jstree-closed > ul { display:none; } ';
+ // Correct IE 6 (does not support the > CSS selector)
+ if(/msie/.test(u) && parseInt(v, 10) == 6) {
+ is_ie6 = true;
+
+ // fix image flicker and lack of caching
+ try {
+ document.execCommand("BackgroundImageCache", false, true);
+ } catch (err) { }
+
+ css_string += '' +
+ '.jstree li { height:18px; margin-left:0; margin-right:0; } ' +
+ '.jstree li li { margin-left:18px; } ' +
+ '.jstree-rtl li li { margin-left:0px; margin-right:18px; } ' +
+ 'li.jstree-open ul { display:block; } ' +
+ 'li.jstree-closed ul { display:none !important; } ' +
+ '.jstree li a { display:inline; border-width:0 !important; padding:0px 2px !important; } ' +
+ '.jstree li a ins { height:16px; width:16px; margin-right:3px; } ' +
+ '.jstree-rtl li a ins { margin-right:0px; margin-left:3px; } ';
+ }
+ // Correct IE 7 (shifts anchor nodes onhover)
+ if(/msie/.test(u) && parseInt(v, 10) == 7) {
+ is_ie7 = true;
+ css_string += '.jstree li a { border-width:0 !important; padding:0px 2px !important; } ';
+ }
+ // correct ff2 lack of display:inline-block
+ if(!/compatible/.test(u) && /mozilla/.test(u) && parseFloat(v, 10) < 1.9) {
+ is_ff2 = true;
+ css_string += '' +
+ '.jstree ins { display:-moz-inline-box; } ' +
+ '.jstree li { line-height:12px; } ' + // WHY??
+ '.jstree a { display:-moz-inline-box; } ' +
+ '.jstree .jstree-no-icons .jstree-checkbox { display:-moz-inline-stack !important; } ';
+ /* this shouldn't be here as it is theme specific */
+ }
+ // the default stylesheet
+ $.vakata.css.add_sheet({ str : css_string, title : "jstree" });
+ });
+
+ // core functions (open, close, create, update, delete)
+ $.jstree.plugin("core", {
+ __init : function () {
+ this.data.core.locked = false;
+ this.data.core.to_open = this.get_settings().core.initially_open;
+ this.data.core.to_load = this.get_settings().core.initially_load;
+ },
+ defaults : {
+ html_titles : false,
+ animation : 500,
+ initially_open : [],
+ initially_load : [],
+ open_parents : true,
+ notify_plugins : true,
+ rtl : false,
+ load_open : false,
+ strings : {
+ loading : "Loading ...",
+ new_node : "New node",
+ multiple_selection : "Multiple selection"
+ }
+ },
+ _fn : {
+ init : function () {
+ this.set_focus();
+ if(this._get_settings().core.rtl) {
+ this.get_container().addClass("jstree-rtl").css("direction", "rtl");
+ }
+ this.get_container().html("<ul><li class='jstree-last jstree-leaf'><ins> </ins><a class='jstree-loading' href='#'><ins class='jstree-icon'> </ins>" + this._get_string("loading") + "</a></li></ul>");
+ this.data.core.li_height = this.get_container_ul().find("li.jstree-closed, li.jstree-leaf").eq(0).height() || 18;
+
+ this.get_container()
+ .delegate("li > ins", "click.jstree", $.proxy(function (event) {
+ var trgt = $(event.target);
+ // if(trgt.is("ins") && event.pageY - trgt.offset().top < this.data.core.li_height) { this.toggle_node(trgt); }
+ this.toggle_node(trgt);
+ }, this))
+ .bind("mousedown.jstree", $.proxy(function () {
+ this.set_focus(); // This used to be setTimeout(set_focus,0) - why?
+ }, this))
+ .bind("dblclick.jstree", function (event) {
+ var sel;
+ if(document.selection && document.selection.empty) { document.selection.empty(); }
+ else {
+ if(window.getSelection) {
+ sel = window.getSelection();
+ try {
+ sel.removeAllRanges();
+ sel.collapse();
+ } catch (err) { }
+ }
+ }
+ });
+ if(this._get_settings().core.notify_plugins) {
+ this.get_container()
+ .bind("load_node.jstree", $.proxy(function (e, data) {
+ var o = this._get_node(data.rslt.obj),
+ t = this;
+ if(o === -1) { o = this.get_container_ul(); }
+ if(!o.length) { return; }
+ o.find("li").each(function () {
+ var th = $(this);
+ if(th.data("jstree")) {
+ $.each(th.data("jstree"), function (plugin, values) {
+ if(t.data[plugin] && $.isFunction(t["_" + plugin + "_notify"])) {
+ t["_" + plugin + "_notify"].call(t, th, values);
+ }
+ });
+ }
+ });
+ }, this));
+ }
+ if(this._get_settings().core.load_open) {
+ this.get_container()
+ .bind("load_node.jstree", $.proxy(function (e, data) {
+ var o = this._get_node(data.rslt.obj),
+ t = this;
+ if(o === -1) { o = this.get_container_ul(); }
+ if(!o.length) { return; }
+ o.find("li.jstree-open:not(:has(ul))").each(function () {
+ t.load_node(this, $.noop, $.noop);
+ });
+ }, this));
+ }
+ this.__callback();
+ this.load_node(-1, function () { this.loaded(); this.reload_nodes(); });
+ },
+ destroy : function () {
+ var i,
+ n = this.get_index(),
+ s = this._get_settings(),
+ _this = this;
+
+ $.each(s.plugins, function (i, val) {
+ try { plugins[val].__destroy.apply(_this); } catch(err) { }
+ });
+ this.__callback();
+ // set focus to another instance if this one is focused
+ if(this.is_focused()) {
+ for(i in instances) {
+ if(instances.hasOwnProperty(i) && i != n) {
+ instances[i].set_focus();
+ break;
+ }
+ }
+ }
+ // if no other instance found
+ if(n === focused_instance) { focused_instance = -1; }
+ // remove all traces of jstree in the DOM (only the ones set using jstree*) and cleans all events
+ this.get_container()
+ .unbind(".jstree")
+ .undelegate(".jstree")
+ .removeData("jstree_instance_id")
+ .find("[class^='jstree']")
+ .andSelf()
+ .attr("class", function () { return this.className.replace(/jstree[^ ]*|$/ig,''); });
+ $(document)
+ .unbind(".jstree-" + n)
+ .undelegate(".jstree-" + n);
+ // remove the actual data
+ instances[n] = null;
+ delete instances[n];
+ },
+
+ _core_notify : function (n, data) {
+ if(data.opened) {
+ this.open_node(n, false, true);
+ }
+ },
+
+ lock : function () {
+ this.data.core.locked = true;
+ this.get_container().children("ul").addClass("jstree-locked").css("opacity","0.7");
+ this.__callback({});
+ },
+ unlock : function () {
+ this.data.core.locked = false;
+ this.get_container().children("ul").removeClass("jstree-locked").css("opacity","1");
+ this.__callback({});
+ },
+ is_locked : function () { return this.data.core.locked; },
+ save_opened : function () {
+ var _this = this;
+ this.data.core.to_open = [];
+ this.get_container_ul().find("li.jstree-open").each(function () {
+ if(this.id) { _this.data.core.to_open.push("#" + this.id.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:")); }
+ });
+ this.__callback(_this.data.core.to_open);
+ },
+ save_loaded : function () { },
+ reload_nodes : function (is_callback) {
+ var _this = this,
+ done = true,
+ current = [],
+ remaining = [];
+ if(!is_callback) {
+ this.data.core.reopen = false;
+ this.data.core.refreshing = true;
+ this.data.core.to_open = $.map($.makeArray(this.data.core.to_open), function (n) { return "#" + n.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:"); });
+ this.data.core.to_load = $.map($.makeArray(this.data.core.to_load), function (n) { return "#" + n.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:"); });
+ if(this.data.core.to_open.length) {
+ this.data.core.to_load = this.data.core.to_load.concat(this.data.core.to_open);
+ }
+ }
+ if(this.data.core.to_load.length) {
+ $.each(this.data.core.to_load, function (i, val) {
+ if(val == "#") { return true; }
+ if($(val).length) { current.push(val); }
+ else { remaining.push(val); }
+ });
+ if(current.length) {
+ this.data.core.to_load = remaining;
+ $.each(current, function (i, val) {
+ if(!_this._is_loaded(val)) {
+ _this.load_node(val, function () { _this.reload_nodes(true); }, function () { _this.reload_nodes(true); });
+ done = false;
+ }
+ });
+ }
+ }
+ if(this.data.core.to_open.length) {
+ $.each(this.data.core.to_open, function (i, val) {
+ _this.open_node(val, false, true);
+ });
+ }
+ if(done) {
+ // TODO: find a more elegant approach to syncronizing returning requests
+ if(this.data.core.reopen) { clearTimeout(this.data.core.reopen); }
+ this.data.core.reopen = setTimeout(function () { _this.__callback({}, _this); }, 50);
+ this.data.core.refreshing = false;
+ this.reopen();
+ }
+ },
+ reopen : function () {
+ var _this = this;
+ if(this.data.core.to_open.length) {
+ $.each(this.data.core.to_open, function (i, val) {
+ _this.open_node(val, false, true);
+ });
+ }
+ this.__callback({});
+ },
+ refresh : function (obj) {
+ var _this = this;
+ this.save_opened();
+ if(!obj) { obj = -1; }
+ obj = this._get_node(obj);
+ if(!obj) { obj = -1; }
+ if(obj !== -1) { obj.children("UL").remove(); }
+ else { this.get_container_ul().empty(); }
+ this.load_node(obj, function () { _this.__callback({ "obj" : obj}); _this.reload_nodes(); });
+ },
+ // Dummy function to fire after the first load (so that there is a jstree.loaded event)
+ loaded : function () {
+ this.__callback();
+ },
+ // deal with focus
+ set_focus : function () {
+ if(this.is_focused()) { return; }
+ var f = $.jstree._focused();
+ if(f) { f.unset_focus(); }
+
+ this.get_container().addClass("jstree-focused");
+ focused_instance = this.get_index();
+ this.__callback();
+ },
+ is_focused : function () {
+ return focused_instance == this.get_index();
+ },
+ unset_focus : function () {
+ if(this.is_focused()) {
+ this.get_container().removeClass("jstree-focused");
+ focused_instance = -1;
+ }
+ this.__callback();
+ },
+
+ // traverse
+ _get_node : function (obj) {
+ var $obj = $(obj, this.get_container());
+ if($obj.is(".jstree") || obj == -1) { return -1; }
+ $obj = $obj.closest("li", this.get_container());
+ return $obj.length ? $obj : false;
+ },
+ _get_next : function (obj, strict) {
+ obj = this._get_node(obj);
+ if(obj === -1) { return this.get_container().find("> ul > li:first-child"); }
+ if(!obj.length) { return false; }
+ if(strict) { return (obj.nextAll("li").size() > 0) ? obj.nextAll("li:eq(0)") : false; }
+
+ if(obj.hasClass("jstree-open")) { return obj.find("li:eq(0)"); }
+ else if(obj.nextAll("li").size() > 0) { return obj.nextAll("li:eq(0)"); }
+ else { return obj.parentsUntil(".jstree","li").next("li").eq(0); }
+ },
+ _get_prev : function (obj, strict) {
+ obj = this._get_node(obj);
+ if(obj === -1) { return this.get_container().find("> ul > li:last-child"); }
+ if(!obj.length) { return false; }
+ if(strict) { return (obj.prevAll("li").length > 0) ? obj.prevAll("li:eq(0)") : false; }
+
+ if(obj.prev("li").length) {
+ obj = obj.prev("li").eq(0);
+ while(obj.hasClass("jstree-open")) { obj = obj.children("ul:eq(0)").children("li:last"); }
+ return obj;
+ }
+ else { var o = obj.parentsUntil(".jstree","li:eq(0)"); return o.length ? o : false; }
+ },
+ _get_parent : function (obj) {
+ obj = this._get_node(obj);
+ if(obj == -1 || !obj.length) { return false; }
+ var o = obj.parentsUntil(".jstree", "li:eq(0)");
+ return o.length ? o : -1;
+ },
+ _get_children : function (obj) {
+ obj = this._get_node(obj);
+ if(obj === -1) { return this.get_container().children("ul:eq(0)").children("li"); }
+ if(!obj.length) { return false; }
+ return obj.children("ul:eq(0)").children("li");
+ },
+ get_path : function (obj, id_mode) {
+ var p = [],
+ _this = this;
+ obj = this._get_node(obj);
+ if(obj === -1 || !obj || !obj.length) { return false; }
+ obj.parentsUntil(".jstree", "li").each(function () {
+ p.push( id_mode ? this.id : _this.get_text(this) );
+ });
+ p.reverse();
+ p.push( id_mode ? obj.attr("id") : this.get_text(obj) );
+ return p;
+ },
+
+ // string functions
+ _get_string : function (key) {
+ return this._get_settings().core.strings[key] || key;
+ },
+
+ is_open : function (obj) { obj = this._get_node(obj); return obj && obj !== -1 && obj.hasClass("jstree-open"); },
+ is_closed : function (obj) { obj = this._get_node(obj); return obj && obj !== -1 && obj.hasClass("jstree-closed"); },
+ is_leaf : function (obj) { obj = this._get_node(obj); return obj && obj !== -1 && obj.hasClass("jstree-leaf"); },
+ correct_state : function (obj) {
+ obj = this._get_node(obj);
+ if(!obj || obj === -1) { return false; }
+ obj.removeClass("jstree-closed jstree-open").addClass("jstree-leaf").children("ul").remove();
+ this.__callback({ "obj" : obj });
+ },
+ // open/close
+ open_node : function (obj, callback, skip_animation) {
+ obj = this._get_node(obj);
+ if(!obj.length) { return false; }
+ if(!obj.hasClass("jstree-closed")) { if(callback) { callback.call(); } return false; }
+ var s = skip_animation || is_ie6 ? 0 : this._get_settings().core.animation,
+ t = this;
+ if(!this._is_loaded(obj)) {
+ obj.children("a").addClass("jstree-loading");
+ this.load_node(obj, function () { t.open_node(obj, callback, skip_animation); }, callback);
+ }
+ else {
+ if(this._get_settings().core.open_parents) {
+ obj.parentsUntil(".jstree",".jstree-closed").each(function () {
+ t.open_node(this, false, true);
+ });
+ }
+ if(s) { obj.children("ul").css("display","none"); }
+ obj.removeClass("jstree-closed").addClass("jstree-open").children("a").removeClass("jstree-loading");
+ if(s) { obj.children("ul").stop(true, true).slideDown(s, function () { this.style.display = ""; t.after_open(obj); }); }
+ else { t.after_open(obj); }
+ this.__callback({ "obj" : obj });
+ if(callback) { callback.call(); }
+ }
+ },
+ after_open : function (obj) { this.__callback({ "obj" : obj }); },
+ close_node : function (obj, skip_animation) {
+ obj = this._get_node(obj);
+ var s = skip_animation || is_ie6 ? 0 : this._get_settings().core.animation,
+ t = this;
+ if(!obj.length || !obj.hasClass("jstree-open")) { return false; }
+ if(s) { obj.children("ul").attr("style","display:block !important"); }
+ obj.removeClass("jstree-open").addClass("jstree-closed");
+ if(s) { obj.children("ul").stop(true, true).slideUp(s, function () { this.style.display = ""; t.after_close(obj); }); }
+ else { t.after_close(obj); }
+ this.__callback({ "obj" : obj });
+ },
+ after_close : function (obj) { this.__callback({ "obj" : obj }); },
+ toggle_node : function (obj) {
+ obj = this._get_node(obj);
+ if(obj.hasClass("jstree-closed")) { return this.open_node(obj); }
+ if(obj.hasClass("jstree-open")) { return this.close_node(obj); }
+ },
+ open_all : function (obj, do_animation, original_obj) {
+ obj = obj ? this._get_node(obj) : -1;
+ if(!obj || obj === -1) { obj = this.get_container_ul(); }
+ if(original_obj) {
+ obj = obj.find("li.jstree-closed");
+ }
+ else {
+ original_obj = obj;
+ if(obj.is(".jstree-closed")) { obj = obj.find("li.jstree-closed").andSelf(); }
+ else { obj = obj.find("li.jstree-closed"); }
+ }
+ var _this = this;
+ obj.each(function () {
+ var __this = this;
+ if(!_this._is_loaded(this)) { _this.open_node(this, function() { _this.open_all(__this, do_animation, original_obj); }, !do_animation); }
+ else { _this.open_node(this, false, !do_animation); }
+ });
+ // so that callback is fired AFTER all nodes are open
+ if(original_obj.find('li.jstree-closed').length === 0) { this.__callback({ "obj" : original_obj }); }
+ },
+ close_all : function (obj, do_animation) {
+ var _this = this;
+ obj = obj ? this._get_node(obj) : this.get_container();
+ if(!obj || obj === -1) { obj = this.get_container_ul(); }
+ obj.find("li.jstree-open").andSelf().each(function () { _this.close_node(this, !do_animation); });
+ this.__callback({ "obj" : obj });
+ },
+ clean_node : function (obj) {
+ obj = obj && obj != -1 ? $(obj) : this.get_container_ul();
+ obj = obj.is("li") ? obj.find("li").andSelf() : obj.find("li");
+ obj.removeClass("jstree-last")
+ .filter("li:last-child").addClass("jstree-last").end()
+ .filter(":has(li)")
+ .not(".jstree-open").removeClass("jstree-leaf").addClass("jstree-closed");
+ obj.not(".jstree-open, .jstree-closed").addClass("jstree-leaf").children("ul").remove();
+ this.__callback({ "obj" : obj });
+ },
+ // rollback
+ get_rollback : function () {
+ this.__callback();
+ return { i : this.get_index(), h : this.get_container().children("ul").clone(true), d : this.data };
+ },
+ set_rollback : function (html, data) {
+ this.get_container().empty().append(html);
+ this.data = data;
+ this.__callback();
+ },
+ // Dummy functions to be overwritten by any datastore plugin included
+ load_node : function (obj, s_call, e_call) { this.__callback({ "obj" : obj }); },
+ _is_loaded : function (obj) { return true; },
+
+ // Basic operations: create
+ create_node : function (obj, position, js, callback, is_loaded) {
+ obj = this._get_node(obj);
+ position = typeof position === "undefined" ? "last" : position;
+ var d = $("<li />"),
+ s = this._get_settings().core,
+ tmp;
+
+ if(obj !== -1 && !obj.length) { return false; }
+ if(!is_loaded && !this._is_loaded(obj)) { this.load_node(obj, function () { this.create_node(obj, position, js, callback, true); }); return false; }
+
+ this.__rollback();
+
+ if(typeof js === "string") { js = { "data" : js }; }
+ if(!js) { js = {}; }
+ if(js.attr) { d.attr(js.attr); }
+ if(js.metadata) { d.data(js.metadata); }
+ if(js.state) { d.addClass("jstree-" + js.state); }
+ if(!js.data) { js.data = this._get_string("new_node"); }
+ if(!$.isArray(js.data)) { tmp = js.data; js.data = []; js.data.push(tmp); }
+ $.each(js.data, function (i, m) {
+ tmp = $("<a />");
+ if($.isFunction(m)) { m = m.call(this, js); }
+ if(typeof m == "string") { tmp.attr('href','#')[ s.html_titles ? "html" : "text" ](m); }
+ else {
+ if(!m.attr) { m.attr = {}; }
+ if(!m.attr.href) { m.attr.href = '#'; }
+ tmp.attr(m.attr)[ s.html_titles ? "html" : "text" ](m.title);
+ if(m.language) { tmp.addClass(m.language); }
+ }
+ tmp.prepend("<ins class='jstree-icon'> </ins>");
+ if(!m.icon && js.icon) { m.icon = js.icon; }
+ if(m.icon) {
+ if(m.icon.indexOf("/") === -1) { tmp.children("ins").addClass(m.icon); }
+ else { tmp.children("ins").css("background","url('" + m.icon + "') center center no-repeat"); }
+ }
+ d.append(tmp);
+ });
+ d.prepend("<ins class='jstree-icon'> </ins>");
+ if(obj === -1) {
+ obj = this.get_container();
+ if(position === "before") { position = "first"; }
+ if(position === "after") { position = "last"; }
+ }
+ switch(position) {
+ case "before": obj.before(d); tmp = this._get_parent(obj); break;
+ case "after" : obj.after(d); tmp = this._get_parent(obj); break;
+ case "inside":
+ case "first" :
+ if(!obj.children("ul").length) { obj.append("<ul />"); }
+ obj.children("ul").prepend(d);
+ tmp = obj;
+ break;
+ case "last":
+ if(!obj.children("ul").length) { obj.append("<ul />"); }
+ obj.children("ul").append(d);
+ tmp = obj;
+ break;
+ default:
+ if(!obj.children("ul").length) { obj.append("<ul />"); }
+ if(!position) { position = 0; }
+ tmp = obj.children("ul").children("li").eq(position);
+ if(tmp.length) { tmp.before(d); }
+ else { obj.children("ul").append(d); }
+ tmp = obj;
+ break;
+ }
+ if(tmp === -1 || tmp.get(0) === this.get_container().get(0)) { tmp = -1; }
+ this.clean_node(tmp);
+ this.__callback({ "obj" : d, "parent" : tmp });
+ if(callback) { callback.call(this, d); }
+ return d;
+ },
+ // Basic operations: rename (deal with text)
+ get_text : function (obj) {
+ obj = this._get_node(obj);
+ if(!obj.length) { return false; }
+ var s = this._get_settings().core.html_titles;
+ obj = obj.children("a:eq(0)");
+ if(s) {
+ obj = obj.clone();
+ obj.children("INS").remove();
+ return obj.html();
+ }
+ else {
+ obj = obj.contents().filter(function() { return this.nodeType == 3; })[0];
+ return obj.nodeValue;
+ }
+ },
+ set_text : function (obj, val) {
+ obj = this._get_node(obj);
+ if(!obj.length) { return false; }
+ obj = obj.children("a:eq(0)");
+ if(this._get_settings().core.html_titles) {
+ var tmp = obj.children("INS").clone();
+ obj.html(val).prepend(tmp);
+ this.__callback({ "obj" : obj, "name" : val });
+ return true;
+ }
+ else {
+ obj = obj.contents().filter(function() { return this.nodeType == 3; })[0];
+ this.__callback({ "obj" : obj, "name" : val });
+ return (obj.nodeValue = val);
+ }
+ },
+ rename_node : function (obj, val) {
+ obj = this._get_node(obj);
+ this.__rollback();
+ if(obj && obj.length && this.set_text.apply(this, Array.prototype.slice.call(arguments))) { this.__callback({ "obj" : obj, "name" : val }); }
+ },
+ // Basic operations: deleting nodes
+ delete_node : function (obj) {
+ obj = this._get_node(obj);
+ if(!obj.length) { return false; }
+ this.__rollback();
+ var p = this._get_parent(obj), prev = $([]), t = this;
+ obj.each(function () {
+ prev = prev.add(t._get_prev(this));
+ });
+ obj = obj.detach();
+ if(p !== -1 && p.find("> ul > li").length === 0) {
+ p.removeClass("jstree-open jstree-closed").addClass("jstree-leaf");
+ }
+ this.clean_node(p);
+ this.__callback({ "obj" : obj, "prev" : prev, "parent" : p });
+ return obj;
+ },
+ prepare_move : function (o, r, pos, cb, is_cb) {
+ var p = {};
+
+ p.ot = $.jstree._reference(o) || this;
+ p.o = p.ot._get_node(o);
+ p.r = r === - 1 ? -1 : this._get_node(r);
+ p.p = (typeof pos === "undefined" || pos === false) ? "last" : pos; // TODO: move to a setting
+ if(!is_cb && prepared_move.o && prepared_move.o[0] === p.o[0] && prepared_move.r[0] === p.r[0] && prepared_move.p === p.p) {
+ this.__callback(prepared_move);
+ if(cb) { cb.call(this, prepared_move); }
+ return;
+ }
+ p.ot = $.jstree._reference(p.o) || this;
+ p.rt = $.jstree._reference(p.r) || this; // r === -1 ? p.ot : $.jstree._reference(p.r) || this
+ if(p.r === -1 || !p.r) {
+ p.cr = -1;
+ switch(p.p) {
+ case "first":
+ case "before":
+ case "inside":
+ p.cp = 0;
+ break;
+ case "after":
+ case "last":
+ p.cp = p.rt.get_container().find(" > ul > li").length;
+ break;
+ default:
+ p.cp = p.p;
+ break;
+ }
+ }
+ else {
+ if(!/^(before|after)$/.test(p.p) && !this._is_loaded(p.r)) {
+ return this.load_node(p.r, function () { this.prepare_move(o, r, pos, cb, true); });
+ }
+ switch(p.p) {
+ case "before":
+ p.cp = p.r.index();
+ p.cr = p.rt._get_parent(p.r);
+ break;
+ case "after":
+ p.cp = p.r.index() + 1;
+ p.cr = p.rt._get_parent(p.r);
+ break;
+ case "inside":
+ case "first":
+ p.cp = 0;
+ p.cr = p.r;
+ break;
+ case "last":
+ p.cp = p.r.find(" > ul > li").length;
+ p.cr = p.r;
+ break;
+ default:
+ p.cp = p.p;
+ p.cr = p.r;
+ break;
+ }
+ }
+ p.np = p.cr == -1 ? p.rt.get_container() : p.cr;
+ p.op = p.ot._get_parent(p.o);
+ p.cop = p.o.index();
+ if(p.op === -1) { p.op = p.ot ? p.ot.get_container() : this.get_container(); }
+ if(!/^(before|after)$/.test(p.p) && p.op && p.np && p.op[0] === p.np[0] && p.o.index() < p.cp) { p.cp++; }
+ //if(p.p === "before" && p.op && p.np && p.op[0] === p.np[0] && p.o.index() < p.cp) { p.cp--; }
+ p.or = p.np.find(" > ul > li:nth-child(" + (p.cp + 1) + ")");
+ prepared_move = p;
+ this.__callback(prepared_move);
+ if(cb) { cb.call(this, prepared_move); }
+ },
+ check_move : function () {
+ var obj = prepared_move, ret = true, r = obj.r === -1 ? this.get_container() : obj.r;
+ if(!obj || !obj.o || obj.or[0] === obj.o[0]) { return false; }
+ if(!obj.cy) {
+ if(obj.op && obj.np && obj.op[0] === obj.np[0] && obj.cp - 1 === obj.o.index()) { return false; }
+ obj.o.each(function () {
+ if(r.parentsUntil(".jstree", "li").andSelf().index(this) !== -1) { ret = false; return false; }
+ });
+ }
+ return ret;
+ },
+ move_node : function (obj, ref, position, is_copy, is_prepared, skip_check) {
+ if(!is_prepared) {
+ return this.prepare_move(obj, ref, position, function (p) {
+ this.move_node(p, false, false, is_copy, true, skip_check);
+ });
+ }
+ if(is_copy) {
+ prepared_move.cy = true;
+ }
+ if(!skip_check && !this.check_move()) { return false; }
+
+ this.__rollback();
+ var o = false;
+ if(is_copy) {
+ o = obj.o.clone(true);
+ o.find("*[id]").andSelf().each(function () {
+ if(this.id) { this.id = "copy_" + this.id; }
+ });
+ }
+ else { o = obj.o; }
+
+ if(obj.or.length) { obj.or.before(o); }
+ else {
+ if(!obj.np.children("ul").length) { $("<ul />").appendTo(obj.np); }
+ obj.np.children("ul:eq(0)").append(o);
+ }
+
+ try {
+ obj.ot.clean_node(obj.op);
+ obj.rt.clean_node(obj.np);
+ if(!obj.op.find("> ul > li").length) {
+ obj.op.removeClass("jstree-open jstree-closed").addClass("jstree-leaf").children("ul").remove();
+ }
+ } catch (e) { }
+
+ if(is_copy) {
+ prepared_move.cy = true;
+ prepared_move.oc = o;
+ }
+ this.__callback(prepared_move);
+ return prepared_move;
+ },
+ _get_move : function () { return prepared_move; }
+ }
+ });
+})(jQuery);
+//*/
+
+/*
+ * jsTree ui plugin
+ * This plugins handles selecting/deselecting/hovering/dehovering nodes
+ */
+(function ($) {
+ var scrollbar_width, e1, e2;
+ $(function() {
+ if (/msie/.test(navigator.userAgent.toLowerCase())) {
+ e1 = $('<textarea cols="10" rows="2"></textarea>').css({ position: 'absolute', top: -1000, left: 0 }).appendTo('body');
+ e2 = $('<textarea cols="10" rows="2" style="overflow: hidden;"></textarea>').css({ position: 'absolute', top: -1000, left: 0 }).appendTo('body');
+ scrollbar_width = e1.width() - e2.width();
+ e1.add(e2).remove();
+ }
+ else {
+ e1 = $('<div />').css({ width: 100, height: 100, overflow: 'auto', position: 'absolute', top: -1000, left: 0 })
+ .prependTo('body').append('<div />').find('div').css({ width: '100%', height: 200 });
+ scrollbar_width = 100 - e1.width();
+ e1.parent().remove();
+ }
+ });
+ $.jstree.plugin("ui", {
+ __init : function () {
+ this.data.ui.selected = $();
+ this.data.ui.last_selected = false;
+ this.data.ui.hovered = null;
+ this.data.ui.to_select = this.get_settings().ui.initially_select;
+
+ this.get_container()
+ .delegate("a", "click.jstree", $.proxy(function (event) {
+ event.preventDefault();
+ event.currentTarget.blur();
+ if(!$(event.currentTarget).hasClass("jstree-loading")) {
+ this.select_node(event.currentTarget, true, event);
+ }
+ }, this))
+ .delegate("a", "mouseenter.jstree", $.proxy(function (event) {
+ if(!$(event.currentTarget).hasClass("jstree-loading")) {
+ this.hover_node(event.target);
+ }
+ }, this))
+ .delegate("a", "mouseleave.jstree", $.proxy(function (event) {
+ if(!$(event.currentTarget).hasClass("jstree-loading")) {
+ this.dehover_node(event.target);
+ }
+ }, this))
+ .bind("reopen.jstree", $.proxy(function () {
+ this.reselect();
+ }, this))
+ .bind("get_rollback.jstree", $.proxy(function () {
+ this.dehover_node();
+ this.save_selected();
+ }, this))
+ .bind("set_rollback.jstree", $.proxy(function () {
+ this.reselect();
+ }, this))
+ .bind("close_node.jstree", $.proxy(function (event, data) {
+ var s = this._get_settings().ui,
+ obj = this._get_node(data.rslt.obj),
+ clk = (obj && obj.length) ? obj.children("ul").find("a.jstree-clicked") : $(),
+ _this = this;
+ if(s.selected_parent_close === false || !clk.length) { return; }
+ clk.each(function () {
+ _this.deselect_node(this);
+ if(s.selected_parent_close === "select_parent") { _this.select_node(obj); }
+ });
+ }, this))
+ .bind("delete_node.jstree", $.proxy(function (event, data) {
+ var s = this._get_settings().ui.select_prev_on_delete,
+ obj = this._get_node(data.rslt.obj),
+ clk = (obj && obj.length) ? obj.find("a.jstree-clicked") : [],
+ _this = this;
+ clk.each(function () { _this.deselect_node(this); });
+ if(s && clk.length) {
+ data.rslt.prev.each(function () {
+ if(this.parentNode) { _this.select_node(this); return false; /* if return false is removed all prev nodes will be selected */}
+ });
+ }
+ }, this))
+ .bind("move_node.jstree", $.proxy(function (event, data) {
+ if(data.rslt.cy) {
+ data.rslt.oc.find("a.jstree-clicked").removeClass("jstree-clicked");
+ }
+ }, this));
+ },
+ defaults : {
+ select_limit : -1, // 0, 1, 2 ... or -1 for unlimited
+ select_multiple_modifier : "ctrl", // on, or ctrl, shift, alt
+ select_range_modifier : "shift",
+ selected_parent_close : "select_parent", // false, "deselect", "select_parent"
+ selected_parent_open : true,
+ select_prev_on_delete : true,
+ disable_selecting_children : false,
+ initially_select : []
+ },
+ _fn : {
+ _get_node : function (obj, allow_multiple) {
+ if(typeof obj === "undefined" || obj === null) { return allow_multiple ? this.data.ui.selected : this.data.ui.last_selected; }
+ var $obj = $(obj, this.get_container());
+ if($obj.is(".jstree") || obj == -1) { return -1; }
+ $obj = $obj.closest("li", this.get_container());
+ return $obj.length ? $obj : false;
+ },
+ _ui_notify : function (n, data) {
+ if(data.selected) {
+ this.select_node(n, false);
+ }
+ },
+ save_selected : function () {
+ var _this = this;
+ this.data.ui.to_select = [];
+ this.data.ui.selected.each(function () { if(this.id) { _this.data.ui.to_select.push("#" + this.id.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:")); } });
+ this.__callback(this.data.ui.to_select);
+ },
+ reselect : function () {
+ var _this = this,
+ s = this.data.ui.to_select;
+ s = $.map($.makeArray(s), function (n) { return "#" + n.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:"); });
+ // this.deselect_all(); WHY deselect, breaks plugin state notifier?
+ $.each(s, function (i, val) { if(val && val !== "#") { _this.select_node(val); } });
+ this.data.ui.selected = this.data.ui.selected.filter(function () { return this.parentNode; });
+ this.__callback();
+ },
+ refresh : function (obj) {
+ this.save_selected();
+ return this.__call_old();
+ },
+ hover_node : function (obj) {
+ obj = this._get_node(obj);
+ if(!obj.length) { return false; }
+ //if(this.data.ui.hovered && obj.get(0) === this.data.ui.hovered.get(0)) { return; }
+ if(!obj.hasClass("jstree-hovered")) { this.dehover_node(); }
+ this.data.ui.hovered = obj.children("a").addClass("jstree-hovered").parent();
+ this._fix_scroll(obj);
+ this.__callback({ "obj" : obj });
+ },
+ dehover_node : function () {
+ var obj = this.data.ui.hovered, p;
+ if(!obj || !obj.length) { return false; }
+ p = obj.children("a").removeClass("jstree-hovered").parent();
+ if(this.data.ui.hovered[0] === p[0]) { this.data.ui.hovered = null; }
+ this.__callback({ "obj" : obj });
+ },
+ select_node : function (obj, check, e) {
+ obj = this._get_node(obj);
+ if(obj == -1 || !obj || !obj.length) { return false; }
+ var s = this._get_settings().ui,
+ is_multiple = (s.select_multiple_modifier == "on" || (s.select_multiple_modifier !== false && e && e[s.select_multiple_modifier + "Key"])),
+ is_range = (s.select_range_modifier !== false && e && e[s.select_range_modifier + "Key"] && this.data.ui.last_selected && this.data.ui.last_selected[0] !== obj[0] && this.data.ui.last_selected.parent()[0] === obj.parent()[0]),
+ is_selected = this.is_selected(obj),
+ proceed = true,
+ t = this;
+ if(check) {
+ if(s.disable_selecting_children && is_multiple &&
+ (
+ (obj.parentsUntil(".jstree","li").children("a.jstree-clicked").length) ||
+ (obj.children("ul").find("a.jstree-clicked:eq(0)").length)
+ )
+ ) {
+ return false;
+ }
+ proceed = false;
+ switch(!0) {
+ case (is_range):
+ this.data.ui.last_selected.addClass("jstree-last-selected");
+ obj = obj[ obj.index() < this.data.ui.last_selected.index() ? "nextUntil" : "prevUntil" ](".jstree-last-selected").andSelf();
+ if(s.select_limit == -1 || obj.length < s.select_limit) {
+ this.data.ui.last_selected.removeClass("jstree-last-selected");
+ this.data.ui.selected.each(function () {
+ if(this !== t.data.ui.last_selected[0]) { t.deselect_node(this); }
+ });
+ is_selected = false;
+ proceed = true;
+ }
+ else {
+ proceed = false;
+ }
+ break;
+ case (is_selected && !is_multiple):
+ this.deselect_all();
+ is_selected = false;
+ proceed = true;
+ break;
+ case (!is_selected && !is_multiple):
+ if(s.select_limit == -1 || s.select_limit > 0) {
+ this.deselect_all();
+ proceed = true;
+ }
+ break;
+ case (is_selected && is_multiple):
+ this.deselect_node(obj);
+ break;
+ case (!is_selected && is_multiple):
+ if(s.select_limit == -1 || this.data.ui.selected.length + 1 <= s.select_limit) {
+ proceed = true;
+ }
+ break;
+ }
+ }
+ if(proceed && !is_selected) {
+ if(!is_range) { this.data.ui.last_selected = obj; }
+ obj.children("a").addClass("jstree-clicked");
+ if(s.selected_parent_open) {
+ obj.parents(".jstree-closed").each(function () { t.open_node(this, false, true); });
+ }
+ this.data.ui.selected = this.data.ui.selected.add(obj);
+ this._fix_scroll(obj.eq(0));
+ this.__callback({ "obj" : obj, "e" : e });
+ }
+ },
+ _fix_scroll : function (obj) {
+ var c = this.get_container()[0], t;
+ if(c.scrollHeight > c.offsetHeight) {
+ obj = this._get_node(obj);
+ if(!obj || obj === -1 || !obj.length || !obj.is(":visible")) { return; }
+ t = obj.offset().top - this.get_container().offset().top;
+ if(t < 0) {
+ c.scrollTop = c.scrollTop + t - 1;
+ }
+ if(t + this.data.core.li_height + (c.scrollWidth > c.offsetWidth ? scrollbar_width : 0) > c.offsetHeight) {
+ c.scrollTop = c.scrollTop + (t - c.offsetHeight + this.data.core.li_height + 1 + (c.scrollWidth > c.offsetWidth ? scrollbar_width : 0));
+ }
+ }
+ },
+ deselect_node : function (obj) {
+ obj = this._get_node(obj);
+ if(!obj.length) { return false; }
+ if(this.is_selected(obj)) {
+ obj.children("a").removeClass("jstree-clicked");
+ this.data.ui.selected = this.data.ui.selected.not(obj);
+ if(this.data.ui.last_selected.get(0) === obj.get(0)) { this.data.ui.last_selected = this.data.ui.selected.eq(0); }
+ this.__callback({ "obj" : obj });
+ }
+ },
+ toggle_select : function (obj) {
+ obj = this._get_node(obj);
+ if(!obj.length) { return false; }
+ if(this.is_selected(obj)) { this.deselect_node(obj); }
+ else { this.select_node(obj); }
+ },
+ is_selected : function (obj) { return this.data.ui.selected.index(this._get_node(obj)) >= 0; },
+ get_selected : function (context) {
+ return context ? $(context).find("a.jstree-clicked").parent() : this.data.ui.selected;
+ },
+ deselect_all : function (context) {
+ var ret = context ? $(context).find("a.jstree-clicked").parent() : this.get_container().find("a.jstree-clicked").parent();
+ ret.children("a.jstree-clicked").removeClass("jstree-clicked");
+ this.data.ui.selected = $([]);
+ this.data.ui.last_selected = false;
+ this.__callback({ "obj" : ret });
+ }
+ }
+ });
+ // include the selection plugin by default
+ $.jstree.defaults.plugins.push("ui");
+})(jQuery);
+//*/
+
+/*
+ * jsTree CRRM plugin
+ * Handles creating/renaming/removing/moving nodes by user interaction.
+ */
+(function ($) {
+ $.jstree.plugin("crrm", {
+ __init : function () {
+ this.get_container()
+ .bind("move_node.jstree", $.proxy(function (e, data) {
+ if(this._get_settings().crrm.move.open_onmove) {
+ var t = this;
+ data.rslt.np.parentsUntil(".jstree").andSelf().filter(".jstree-closed").each(function () {
+ t.open_node(this, false, true);
+ });
+ }
+ }, this));
+ },
+ defaults : {
+ input_width_limit : 200,
+ move : {
+ always_copy : false, // false, true or "multitree"
+ open_onmove : true,
+ default_position : "last",
+ check_move : function (m) { return true; }
+ }
+ },
+ _fn : {
+ _show_input : function (obj, callback) {
+ obj = this._get_node(obj);
+ var rtl = this._get_settings().core.rtl,
+ w = this._get_settings().crrm.input_width_limit,
+ w1 = obj.children("ins").width(),
+ w2 = obj.find("> a:visible > ins").width() * obj.find("> a:visible > ins").length,
+ t = this.get_text(obj),
+ h1 = $("<div />", { css : { "position" : "absolute", "top" : "-200px", "left" : (rtl ? "0px" : "-1000px"), "visibility" : "hidden" } }).appendTo("body"),
+ h2 = obj.css("position","relative").append(
+ $("<input />", {
+ "value" : t,
+ "class" : "jstree-rename-input",
+ // "size" : t.length,
+ "css" : {
+ "padding" : "0",
+ "border" : "1px solid silver",
+ "position" : "absolute",
+ "left" : (rtl ? "auto" : (w1 + w2 + 4) + "px"),
+ "right" : (rtl ? (w1 + w2 + 4) + "px" : "auto"),
+ "top" : "0px",
+ "height" : (this.data.core.li_height - 2) + "px",
+ "lineHeight" : (this.data.core.li_height - 2) + "px",
+ "width" : "150px" // will be set a bit further down
+ },
+ "blur" : $.proxy(function () {
+ var i = obj.children(".jstree-rename-input"),
+ v = i.val();
+ if(v === "") { v = t; }
+ h1.remove();
+ i.remove(); // rollback purposes
+ this.set_text(obj,t); // rollback purposes
+ this.rename_node(obj, v);
+ callback.call(this, obj, v, t);
+ obj.css("position","");
+ }, this),
+ "keyup" : function (event) {
+ var key = event.keyCode || event.which;
+ if(key == 27) { this.value = t; this.blur(); return; }
+ else if(key == 13) { this.blur(); return; }
+ else {
+ h2.width(Math.min(h1.text("pW" + this.value).width(),w));
+ }
+ },
+ "keypress" : function(event) {
+ var key = event.keyCode || event.which;
+ if(key == 13) { return false; }
+ }
+ })
+ ).children(".jstree-rename-input");
+ this.set_text(obj, "");
+ h1.css({
+ fontFamily : h2.css('fontFamily') || '',
+ fontSize : h2.css('fontSize') || '',
+ fontWeight : h2.css('fontWeight') || '',
+ fontStyle : h2.css('fontStyle') || '',
+ fontStretch : h2.css('fontStretch') || '',
+ fontVariant : h2.css('fontVariant') || '',
+ letterSpacing : h2.css('letterSpacing') || '',
+ wordSpacing : h2.css('wordSpacing') || ''
+ });
+ h2.width(Math.min(h1.text("pW" + h2[0].value).width(),w))[0].select();
+ },
+ rename : function (obj) {
+ obj = this._get_node(obj);
+ this.__rollback();
+ var f = this.__callback;
+ this._show_input(obj, function (obj, new_name, old_name) {
+ f.call(this, { "obj" : obj, "new_name" : new_name, "old_name" : old_name });
+ });
+ },
+ create : function (obj, position, js, callback, skip_rename) {
+ var t, _this = this;
+ obj = this._get_node(obj);
+ if(!obj) { obj = -1; }
+ this.__rollback();
+ t = this.create_node(obj, position, js, function (t) {
+ var p = this._get_parent(t),
+ pos = $(t).index();
+ if(callback) { callback.call(this, t); }
+ if(p.length && p.hasClass("jstree-closed")) { this.open_node(p, false, true); }
+ if(!skip_rename) {
+ this._show_input(t, function (obj, new_name, old_name) {
+ _this.__callback({ "obj" : obj, "name" : new_name, "parent" : p, "position" : pos });
+ });
+ }
+ else { _this.__callback({ "obj" : t, "name" : this.get_text(t), "parent" : p, "position" : pos }); }
+ });
+ return t;
+ },
+ remove : function (obj) {
+ obj = this._get_node(obj, true);
+ var p = this._get_parent(obj), prev = this._get_prev(obj);
+ this.__rollback();
+ obj = this.delete_node(obj);
+ if(obj !== false) { this.__callback({ "obj" : obj, "prev" : prev, "parent" : p }); }
+ },
+ check_move : function () {
+ if(!this.__call_old()) { return false; }
+ var s = this._get_settings().crrm.move;
+ if(!s.check_move.call(this, this._get_move())) { return false; }
+ return true;
+ },
+ move_node : function (obj, ref, position, is_copy, is_prepared, skip_check) {
+ var s = this._get_settings().crrm.move;
+ if(!is_prepared) {
+ if(typeof position === "undefined") { position = s.default_position; }
+ if(position === "inside" && !s.default_position.match(/^(before|after)$/)) { position = s.default_position; }
+ return this.__call_old(true, obj, ref, position, is_copy, false, skip_check);
+ }
+ // if the move is already prepared
+ if(s.always_copy === true || (s.always_copy === "multitree" && obj.rt.get_index() !== obj.ot.get_index() )) {
+ is_copy = true;
+ }
+ this.__call_old(true, obj, ref, position, is_copy, true, skip_check);
+ },
+
+ cut : function (obj) {
+ obj = this._get_node(obj, true);
+ if(!obj || !obj.length) { return false; }
+ this.data.crrm.cp_nodes = false;
+ this.data.crrm.ct_nodes = obj;
+ this.__callback({ "obj" : obj });
+ },
+ copy : function (obj) {
+ obj = this._get_node(obj, true);
+ if(!obj || !obj.length) { return false; }
+ this.data.crrm.ct_nodes = false;
+ this.data.crrm.cp_nodes = obj;
+ this.__callback({ "obj" : obj });
+ },
+ paste : function (obj) {
+ obj = this._get_node(obj);
+ if(!obj || !obj.length) { return false; }
+ var nodes = this.data.crrm.ct_nodes ? this.data.crrm.ct_nodes : this.data.crrm.cp_nodes;
+ if(!this.data.crrm.ct_nodes && !this.data.crrm.cp_nodes) { return false; }
+ if(this.data.crrm.ct_nodes) { this.move_node(this.data.crrm.ct_nodes, obj); this.data.crrm.ct_nodes = false; }
+ if(this.data.crrm.cp_nodes) { this.move_node(this.data.crrm.cp_nodes, obj, false, true); }
+ this.__callback({ "obj" : obj, "nodes" : nodes });
+ }
+ }
+ });
+ // include the crr plugin by default
+ // $.jstree.defaults.plugins.push("crrm");
+})(jQuery);
+//*/
+
+/*
+ * jsTree themes plugin
+ * Handles loading and setting themes, as well as detecting path to themes, etc.
+ */
+(function ($) {
+ var themes_loaded = [];
+ // this variable stores the path to the themes folder - if left as false - it will be autodetected
+ $.jstree._themes = false;
+ $.jstree.plugin("themes", {
+ __init : function () {
+ this.get_container()
+ .bind("init.jstree", $.proxy(function () {
+ var s = this._get_settings().themes;
+ this.data.themes.dots = s.dots;
+ this.data.themes.icons = s.icons;
+ this.set_theme(s.theme, s.url);
+ }, this))
+ .bind("loaded.jstree", $.proxy(function () {
+ // bound here too, as simple HTML tree's won't honor dots & icons otherwise
+ if(!this.data.themes.dots) { this.hide_dots(); }
+ else { this.show_dots(); }
+ if(!this.data.themes.icons) { this.hide_icons(); }
+ else { this.show_icons(); }
+ }, this));
+ },
+ defaults : {
+ theme : "default",
+ url : false,
+ dots : true,
+ icons : true
+ },
+ _fn : {
+ set_theme : function (theme_name, theme_url) {
+ if(!theme_name) { return false; }
+ if(!theme_url) { theme_url = $.jstree._themes + theme_name + '/style.css'; }
+ if($.inArray(theme_url, themes_loaded) == -1) {
+ $.vakata.css.add_sheet({ "url" : theme_url });
+ themes_loaded.push(theme_url);
+ }
+ if(this.data.themes.theme != theme_name) {
+ this.get_container().removeClass('jstree-' + this.data.themes.theme);
+ this.data.themes.theme = theme_name;
+ }
+ this.get_container().addClass('jstree-' + theme_name);
+ if(!this.data.themes.dots) { this.hide_dots(); }
+ else { this.show_dots(); }
+ if(!this.data.themes.icons) { this.hide_icons(); }
+ else { this.show_icons(); }
+ this.__callback();
+ },
+ get_theme : function () { return this.data.themes.theme; },
+
+ show_dots : function () { this.data.themes.dots = true; this.get_container().children("ul").removeClass("jstree-no-dots"); },
+ hide_dots : function () { this.data.themes.dots = false; this.get_container().children("ul").addClass("jstree-no-dots"); },
+ toggle_dots : function () { if(this.data.themes.dots) { this.hide_dots(); } else { this.show_dots(); } },
+
+ show_icons : function () { this.data.themes.icons = true; this.get_container().children("ul").removeClass("jstree-no-icons"); },
+ hide_icons : function () { this.data.themes.icons = false; this.get_container().children("ul").addClass("jstree-no-icons"); },
+ toggle_icons: function () { if(this.data.themes.icons) { this.hide_icons(); } else { this.show_icons(); } }
+ }
+ });
+ // autodetect themes path
+ $(function () {
+ if($.jstree._themes === false) {
+ $("script").each(function () {
+ if(this.src.toString().match(/jquery\.jstree[^\/]*?\.js(\?.*)?$/)) {
+ $.jstree._themes = this.src.toString().replace(/jquery\.jstree[^\/]*?\.js(\?.*)?$/, "") + 'themes/';
+ return false;
+ }
+ });
+ }
+ if($.jstree._themes === false) { $.jstree._themes = "themes/"; }
+ });
+ // include the themes plugin by default
+ $.jstree.defaults.plugins.push("themes");
+})(jQuery);
+//*/
+
+/*
+ * jsTree hotkeys plugin
+ * Enables keyboard navigation for all tree instances
+ * Depends on the jstree ui & jquery hotkeys plugins
+ */
+(function ($) {
+ var bound = [];
+ function exec(i, event) {
+ var f = $.jstree._focused(), tmp;
+ if(f && f.data && f.data.hotkeys && f.data.hotkeys.enabled) {
+ tmp = f._get_settings().hotkeys[i];
+ if(tmp) { return tmp.call(f, event); }
+ }
+ }
+ $.jstree.plugin("hotkeys", {
+ __init : function () {
+ if(typeof $.hotkeys === "undefined") { throw "jsTree hotkeys: jQuery hotkeys plugin not included."; }
+ if(!this.data.ui) { throw "jsTree hotkeys: jsTree UI plugin not included."; }
+ $.each(this._get_settings().hotkeys, function (i, v) {
+ if(v !== false && $.inArray(i, bound) == -1) {
+ $(document).bind("keydown", i, function (event) { return exec(i, event); });
+ bound.push(i);
+ }
+ });
+ this.get_container()
+ .bind("lock.jstree", $.proxy(function () {
+ if(this.data.hotkeys.enabled) { this.data.hotkeys.enabled = false; this.data.hotkeys.revert = true; }
+ }, this))
+ .bind("unlock.jstree", $.proxy(function () {
+ if(this.data.hotkeys.revert) { this.data.hotkeys.enabled = true; }
+ }, this));
+ this.enable_hotkeys();
+ },
+ defaults : {
+ "up" : function () {
+ var o = this.data.ui.hovered || this.data.ui.last_selected || -1;
+ this.hover_node(this._get_prev(o));
+ return false;
+ },
+ "ctrl+up" : function () {
+ var o = this.data.ui.hovered || this.data.ui.last_selected || -1;
+ this.hover_node(this._get_prev(o));
+ return false;
+ },
+ "shift+up" : function () {
+ var o = this.data.ui.hovered || this.data.ui.last_selected || -1;
+ this.hover_node(this._get_prev(o));
+ return false;
+ },
+ "down" : function () {
+ var o = this.data.ui.hovered || this.data.ui.last_selected || -1;
+ this.hover_node(this._get_next(o));
+ return false;
+ },
+ "ctrl+down" : function () {
+ var o = this.data.ui.hovered || this.data.ui.last_selected || -1;
+ this.hover_node(this._get_next(o));
+ return false;
+ },
+ "shift+down" : function () {
+ var o = this.data.ui.hovered || this.data.ui.last_selected || -1;
+ this.hover_node(this._get_next(o));
+ return false;
+ },
+ "left" : function () {
+ var o = this.data.ui.hovered || this.data.ui.last_selected;
+ if(o) {
+ if(o.hasClass("jstree-open")) { this.close_node(o); }
+ else { this.hover_node(this._get_prev(o)); }
+ }
+ return false;
+ },
+ "ctrl+left" : function () {
+ var o = this.data.ui.hovered || this.data.ui.last_selected;
+ if(o) {
+ if(o.hasClass("jstree-open")) { this.close_node(o); }
+ else { this.hover_node(this._get_prev(o)); }
+ }
+ return false;
+ },
+ "shift+left" : function () {
+ var o = this.data.ui.hovered || this.data.ui.last_selected;
+ if(o) {
+ if(o.hasClass("jstree-open")) { this.close_node(o); }
+ else { this.hover_node(this._get_prev(o)); }
+ }
+ return false;
+ },
+ "right" : function () {
+ var o = this.data.ui.hovered || this.data.ui.last_selected;
+ if(o && o.length) {
+ if(o.hasClass("jstree-closed")) { this.open_node(o); }
+ else { this.hover_node(this._get_next(o)); }
+ }
+ return false;
+ },
+ "ctrl+right" : function () {
+ var o = this.data.ui.hovered || this.data.ui.last_selected;
+ if(o && o.length) {
+ if(o.hasClass("jstree-closed")) { this.open_node(o); }
+ else { this.hover_node(this._get_next(o)); }
+ }
+ return false;
+ },
+ "shift+right" : function () {
+ var o = this.data.ui.hovered || this.data.ui.last_selected;
+ if(o && o.length) {
+ if(o.hasClass("jstree-closed")) { this.open_node(o); }
+ else { this.hover_node(this._get_next(o)); }
+ }
+ return false;
+ },
+ "space" : function () {
+ if(this.data.ui.hovered) { this.data.ui.hovered.children("a:eq(0)").click(); }
+ return false;
+ },
+ "ctrl+space" : function (event) {
+ event.type = "click";
+ if(this.data.ui.hovered) { this.data.ui.hovered.children("a:eq(0)").trigger(event); }
+ return false;
+ },
+ "shift+space" : function (event) {
+ event.type = "click";
+ if(this.data.ui.hovered) { this.data.ui.hovered.children("a:eq(0)").trigger(event); }
+ return false;
+ },
+ "f2" : function () { this.rename(this.data.ui.hovered || this.data.ui.last_selected); },
+ "del" : function () { this.remove(this.data.ui.hovered || this._get_node(null)); }
+ },
+ _fn : {
+ enable_hotkeys : function () {
+ this.data.hotkeys.enabled = true;
+ },
+ disable_hotkeys : function () {
+ this.data.hotkeys.enabled = false;
+ }
+ }
+ });
+})(jQuery);
+//*/
+
+/*
+ * jsTree JSON plugin
+ * The JSON data store. Datastores are build by overriding the `load_node` and `_is_loaded` functions.
+ */
+(function ($) {
+ $.jstree.plugin("json_data", {
+ __init : function() {
+ var s = this._get_settings().json_data;
+ if(s.progressive_unload) {
+ this.get_container().bind("after_close.jstree", function (e, data) {
+ data.rslt.obj.children("ul").remove();
+ });
+ }
+ },
+ defaults : {
+ // `data` can be a function:
+ // * accepts two arguments - node being loaded and a callback to pass the result to
+ // * will be executed in the current tree's scope & ajax won't be supported
+ data : false,
+ ajax : false,
+ correct_state : true,
+ progressive_render : false,
+ progressive_unload : false
+ },
+ _fn : {
+ load_node : function (obj, s_call, e_call) { var _this = this; this.load_node_json(obj, function () { _this.__callback({ "obj" : _this._get_node(obj) }); s_call.call(this); }, e_call); },
+ _is_loaded : function (obj) {
+ var s = this._get_settings().json_data;
+ obj = this._get_node(obj);
+ return obj == -1 || !obj || (!s.ajax && !s.progressive_render && !$.isFunction(s.data)) || obj.is(".jstree-open, .jstree-leaf") || obj.children("ul").children("li").length > 0;
+ },
+ refresh : function (obj) {
+ obj = this._get_node(obj);
+ var s = this._get_settings().json_data;
+ if(obj && obj !== -1 && s.progressive_unload && ($.isFunction(s.data) || !!s.ajax)) {
+ obj.removeData("jstree_children");
+ }
+ return this.__call_old();
+ },
+ load_node_json : function (obj, s_call, e_call) {
+ var s = this.get_settings().json_data, d,
+ error_func = function () {},
+ success_func = function () {};
+ obj = this._get_node(obj);
+
+ if(obj && obj !== -1 && (s.progressive_render || s.progressive_unload) && !obj.is(".jstree-open, .jstree-leaf") && obj.children("ul").children("li").length === 0 && obj.data("jstree_children")) {
+ d = this._parse_json(obj.data("jstree_children"), obj);
+ if(d) {
+ obj.append(d);
+ if(!s.progressive_unload) { obj.removeData("jstree_children"); }
+ }
+ this.clean_node(obj);
+ if(s_call) { s_call.call(this); }
+ return;
+ }
+
+ if(obj && obj !== -1) {
+ if(obj.data("jstree_is_loading")) { return; }
+ else { obj.data("jstree_is_loading",true); }
+ }
+ switch(!0) {
+ case (!s.data && !s.ajax): throw "Neither data nor ajax settings supplied.";
+ // function option added here for easier model integration (also supporting async - see callback)
+ case ($.isFunction(s.data)):
+ s.data.call(this, obj, $.proxy(function (d) {
+ d = this._parse_json(d, obj);
+ if(!d) {
+ if(obj === -1 || !obj) {
+ if(s.correct_state) { this.get_container().children("ul").empty(); }
+ }
+ else {
+ obj.children("a.jstree-loading").removeClass("jstree-loading");
+ obj.removeData("jstree_is_loading");
+ if(s.correct_state) { this.correct_state(obj); }
+ }
+ if(e_call) { e_call.call(this); }
+ }
+ else {
+ if(obj === -1 || !obj) { this.get_container().children("ul").empty().append(d.children()); }
+ else { obj.append(d).children("a.jstree-loading").removeClass("jstree-loading"); obj.removeData("jstree_is_loading"); }
+ this.clean_node(obj);
+ if(s_call) { s_call.call(this); }
+ }
+ }, this));
+ break;
+ case (!!s.data && !s.ajax) || (!!s.data && !!s.ajax && (!obj || obj === -1)):
+ if(!obj || obj == -1) {
+ d = this._parse_json(s.data, obj);
+ if(d) {
+ this.get_container().children("ul").empty().append(d.children());
+ this.clean_node();
+ }
+ else {
+ if(s.correct_state) { this.get_container().children("ul").empty(); }
+ }
+ }
+ if(s_call) { s_call.call(this); }
+ break;
+ case (!s.data && !!s.ajax) || (!!s.data && !!s.ajax && obj && obj !== -1):
+ error_func = function (x, t, e) {
+ var ef = this.get_settings().json_data.ajax.error;
+ if(ef) { ef.call(this, x, t, e); }
+ if(obj != -1 && obj.length) {
+ obj.children("a.jstree-loading").removeClass("jstree-loading");
+ obj.removeData("jstree_is_loading");
+ if(t === "success" && s.correct_state) { this.correct_state(obj); }
+ }
+ else {
+ if(t === "success" && s.correct_state) { this.get_container().children("ul").empty(); }
+ }
+ if(e_call) { e_call.call(this); }
+ };
+ success_func = function (d, t, x) {
+ var sf = this.get_settings().json_data.ajax.success;
+ if(sf) { d = sf.call(this,d,t,x) || d; }
+ if(d === "" || (d && d.toString && d.toString().replace(/^[\s\n]+$/,"") === "") || (!$.isArray(d) && !$.isPlainObject(d))) {
+ return error_func.call(this, x, t, "");
+ }
+ d = this._parse_json(d, obj);
+ if(d) {
+ if(obj === -1 || !obj) { this.get_container().children("ul").empty().append(d.children()); }
+ else { obj.append(d).children("a.jstree-loading").removeClass("jstree-loading"); obj.removeData("jstree_is_loading"); }
+ this.clean_node(obj);
+ if(s_call) { s_call.call(this); }
+ }
+ else {
+ if(obj === -1 || !obj) {
+ if(s.correct_state) {
+ this.get_container().children("ul").empty();
+ if(s_call) { s_call.call(this); }
+ }
+ }
+ else {
+ obj.children("a.jstree-loading").removeClass("jstree-loading");
+ obj.removeData("jstree_is_loading");
+ if(s.correct_state) {
+ this.correct_state(obj);
+ if(s_call) { s_call.call(this); }
+ }
+ }
+ }
+ };
+ s.ajax.context = this;
+ s.ajax.error = error_func;
+ s.ajax.success = success_func;
+ if(!s.ajax.dataType) { s.ajax.dataType = "json"; }
+ if($.isFunction(s.ajax.url)) { s.ajax.url = s.ajax.url.call(this, obj); }
+ if($.isFunction(s.ajax.data)) { s.ajax.data = s.ajax.data.call(this, obj); }
+ $.ajax(s.ajax);
+ break;
+ }
+ },
+ _parse_json : function (js, obj, is_callback) {
+ var d = false,
+ p = this._get_settings(),
+ s = p.json_data,
+ t = p.core.html_titles,
+ tmp, i, j, ul1, ul2;
+
+ if(!js) { return d; }
+ if(s.progressive_unload && obj && obj !== -1) {
+ obj.data("jstree_children", d);
+ }
+ if($.isArray(js)) {
+ d = $();
+ if(!js.length) { return false; }
+ for(i = 0, j = js.length; i < j; i++) {
+ tmp = this._parse_json(js[i], obj, true);
+ if(tmp.length) { d = d.add(tmp); }
+ }
+ }
+ else {
+ if(typeof js == "string") { js = { data : js }; }
+ if(!js.data && js.data !== "") { return d; }
+ d = $("<li />");
+ if(js.attr) { d.attr(js.attr); }
+ if(js.metadata) { d.data(js.metadata); }
+ if(js.state) { d.addClass("jstree-" + js.state); }
+ if(!$.isArray(js.data)) { tmp = js.data; js.data = []; js.data.push(tmp); }
+ $.each(js.data, function (i, m) {
+ tmp = $("<a />");
+ if($.isFunction(m)) { m = m.call(this, js); }
+ if(typeof m == "string") { tmp.attr('href','#')[ t ? "html" : "text" ](m); }
+ else {
+ if(!m.attr) { m.attr = {}; }
+ if(!m.attr.href) { m.attr.href = '#'; }
+ tmp.attr(m.attr)[ t ? "html" : "text" ](m.title);
+ if(m.language) { tmp.addClass(m.language); }
+ }
+ tmp.prepend("<ins class='jstree-icon'> </ins>");
+ if(!m.icon && js.icon) { m.icon = js.icon; }
+ if(m.icon) {
+ if(m.icon.indexOf("/") === -1) { tmp.children("ins").addClass(m.icon); }
+ else { tmp.children("ins").css("background","url('" + m.icon + "') center center no-repeat"); }
+ }
+ d.append(tmp);
+ });
+ d.prepend("<ins class='jstree-icon'> </ins>");
+ if(js.children) {
+ if(s.progressive_render && js.state !== "open") {
+ d.addClass("jstree-closed").data("jstree_children", js.children);
+ }
+ else {
+ if(s.progressive_unload) { d.data("jstree_children", js.children); }
+ if($.isArray(js.children) && js.children.length) {
+ tmp = this._parse_json(js.children, obj, true);
+ if(tmp.length) {
+ ul2 = $("<ul />");
+ ul2.append(tmp);
+ d.append(ul2);
+ }
+ }
+ }
+ }
+ }
+ if(!is_callback) {
+ ul1 = $("<ul />");
+ ul1.append(d);
+ d = ul1;
+ }
+ return d;
+ },
+ get_json : function (obj, li_attr, a_attr, is_callback) {
+ var result = [],
+ s = this._get_settings(),
+ _this = this,
+ tmp1, tmp2, li, a, t, lang;
+ obj = this._get_node(obj);
+ if(!obj || obj === -1) { obj = this.get_container().find("> ul > li"); }
+ li_attr = $.isArray(li_attr) ? li_attr : [ "id", "class" ];
+ if(!is_callback && this.data.types) { li_attr.push(s.types.type_attr); }
+ a_attr = $.isArray(a_attr) ? a_attr : [ ];
+
+ obj.each(function () {
+ li = $(this);
+ tmp1 = { data : [] };
+ if(li_attr.length) { tmp1.attr = { }; }
+ $.each(li_attr, function (i, v) {
+ tmp2 = li.attr(v);
+ if(tmp2 && tmp2.length && tmp2.replace(/jstree[^ ]*/ig,'').length) {
+ tmp1.attr[v] = (" " + tmp2).replace(/ jstree[^ ]*/ig,'').replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,"");
+ }
+ });
+ if(li.hasClass("jstree-open")) { tmp1.state = "open"; }
+ if(li.hasClass("jstree-closed")) { tmp1.state = "closed"; }
+ if(li.data()) { tmp1.metadata = li.data(); }
+ a = li.children("a");
+ a.each(function () {
+ t = $(this);
+ if(
+ a_attr.length ||
+ $.inArray("languages", s.plugins) !== -1 ||
+ t.children("ins").get(0).style.backgroundImage.length ||
+ (t.children("ins").get(0).className && t.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,'').length)
+ ) {
+ lang = false;
+ if($.inArray("languages", s.plugins) !== -1 && $.isArray(s.languages) && s.languages.length) {
+ $.each(s.languages, function (l, lv) {
+ if(t.hasClass(lv)) {
+ lang = lv;
+ return false;
+ }
+ });
+ }
+ tmp2 = { attr : { }, title : _this.get_text(t, lang) };
+ $.each(a_attr, function (k, z) {
+ tmp2.attr[z] = (" " + (t.attr(z) || "")).replace(/ jstree[^ ]*/ig,'').replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,"");
+ });
+ if($.inArray("languages", s.plugins) !== -1 && $.isArray(s.languages) && s.languages.length) {
+ $.each(s.languages, function (k, z) {
+ if(t.hasClass(z)) { tmp2.language = z; return true; }
+ });
+ }
+ if(t.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,'').replace(/^\s+$/ig,"").length) {
+ tmp2.icon = t.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,'').replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,"");
+ }
+ if(t.children("ins").get(0).style.backgroundImage.length) {
+ tmp2.icon = t.children("ins").get(0).style.backgroundImage.replace("url(","").replace(")","");
+ }
+ }
+ else {
+ tmp2 = _this.get_text(t);
+ }
+ if(a.length > 1) { tmp1.data.push(tmp2); }
+ else { tmp1.data = tmp2; }
+ });
+ li = li.find("> ul > li");
+ if(li.length) { tmp1.children = _this.get_json(li, li_attr, a_attr, true); }
+ result.push(tmp1);
+ });
+ return result;
+ }
+ }
+ });
+})(jQuery);
+//*/
+
+/*
+ * jsTree languages plugin
+ * Adds support for multiple language versions in one tree
+ * This basically allows for many titles coexisting in one node, but only one of them being visible at any given time
+ * This is useful for maintaining the same structure in many languages (hence the name of the plugin)
+ */
+(function ($) {
+ var sh = false;
+ $.jstree.plugin("languages", {
+ __init : function () { this._load_css(); },
+ defaults : [],
+ _fn : {
+ set_lang : function (i) {
+ var langs = this._get_settings().languages,
+ st = false,
+ selector = ".jstree-" + this.get_index() + ' a';
+ if(!$.isArray(langs) || langs.length === 0) { return false; }
+ if($.inArray(i,langs) == -1) {
+ if(!!langs[i]) { i = langs[i]; }
+ else { return false; }
+ }
+ if(i == this.data.languages.current_language) { return true; }
+ st = $.vakata.css.get_css(selector + "." + this.data.languages.current_language, false, sh);
+ if(st !== false) { st.style.display = "none"; }
+ st = $.vakata.css.get_css(selector + "." + i, false, sh);
+ if(st !== false) { st.style.display = ""; }
+ this.data.languages.current_language = i;
+ this.__callback(i);
+ return true;
+ },
+ get_lang : function () {
+ return this.data.languages.current_language;
+ },
+ _get_string : function (key, lang) {
+ var langs = this._get_settings().languages,
+ s = this._get_settings().core.strings;
+ if($.isArray(langs) && langs.length) {
+ lang = (lang && $.inArray(lang,langs) != -1) ? lang : this.data.languages.current_language;
+ }
+ if(s[lang] && s[lang][key]) { return s[lang][key]; }
+ if(s[key]) { return s[key]; }
+ return key;
+ },
+ get_text : function (obj, lang) {
+ obj = this._get_node(obj) || this.data.ui.last_selected;
+ if(!obj.size()) { return false; }
+ var langs = this._get_settings().languages,
+ s = this._get_settings().core.html_titles;
+ if($.isArray(langs) && langs.length) {
+ lang = (lang && $.inArray(lang,langs) != -1) ? lang : this.data.languages.current_language;
+ obj = obj.children("a." + lang);
+ }
+ else { obj = obj.children("a:eq(0)"); }
+ if(s) {
+ obj = obj.clone();
+ obj.children("INS").remove();
+ return obj.html();
+ }
+ else {
+ obj = obj.contents().filter(function() { return this.nodeType == 3; })[0];
+ return obj.nodeValue;
+ }
+ },
+ set_text : function (obj, val, lang) {
+ obj = this._get_node(obj) || this.data.ui.last_selected;
+ if(!obj.size()) { return false; }
+ var langs = this._get_settings().languages,
+ s = this._get_settings().core.html_titles,
+ tmp;
+ if($.isArray(langs) && langs.length) {
+ lang = (lang && $.inArray(lang,langs) != -1) ? lang : this.data.languages.current_language;
+ obj = obj.children("a." + lang);
+ }
+ else { obj = obj.children("a:eq(0)"); }
+ if(s) {
+ tmp = obj.children("INS").clone();
+ obj.html(val).prepend(tmp);
+ this.__callback({ "obj" : obj, "name" : val, "lang" : lang });
+ return true;
+ }
+ else {
+ obj = obj.contents().filter(function() { return this.nodeType == 3; })[0];
+ this.__callback({ "obj" : obj, "name" : val, "lang" : lang });
+ return (obj.nodeValue = val);
+ }
+ },
+ _load_css : function () {
+ var langs = this._get_settings().languages,
+ str = "/* languages css */",
+ selector = ".jstree-" + this.get_index() + ' a',
+ ln;
+ if($.isArray(langs) && langs.length) {
+ this.data.languages.current_language = langs[0];
+ for(ln = 0; ln < langs.length; ln++) {
+ str += selector + "." + langs[ln] + " {";
+ if(langs[ln] != this.data.languages.current_language) { str += " display:none; "; }
+ str += " } ";
+ }
+ sh = $.vakata.css.add_sheet({ 'str' : str, 'title' : "jstree-languages" });
+ }
+ },
+ create_node : function (obj, position, js, callback) {
+ var t = this.__call_old(true, obj, position, js, function (t) {
+ var langs = this._get_settings().languages,
+ a = t.children("a"),
+ ln;
+ if($.isArray(langs) && langs.length) {
+ for(ln = 0; ln < langs.length; ln++) {
+ if(!a.is("." + langs[ln])) {
+ t.append(a.eq(0).clone().removeClass(langs.join(" ")).addClass(langs[ln]));
+ }
+ }
+ a.not("." + langs.join(", .")).remove();
+ }
+ if(callback) { callback.call(this, t); }
+ });
+ return t;
+ }
+ }
+ });
+})(jQuery);
+//*/
+
+/*
+ * jsTree cookies plugin
+ * Stores the currently opened/selected nodes in a cookie and then restores them
+ * Depends on the jquery.cookie plugin
+ */
+(function ($) {
+ $.jstree.plugin("cookies", {
+ __init : function () {
+ if(typeof $.cookie === "undefined") { throw "jsTree cookie: jQuery cookie plugin not included."; }
+
+ var s = this._get_settings().cookies,
+ tmp;
+ if(!!s.save_loaded) {
+ tmp = $.cookie(s.save_loaded);
+ if(tmp && tmp.length) { this.data.core.to_load = tmp.split(","); }
+ }
+ if(!!s.save_opened) {
+ tmp = $.cookie(s.save_opened);
+ if(tmp && tmp.length) { this.data.core.to_open = tmp.split(","); }
+ }
+ if(!!s.save_selected) {
+ tmp = $.cookie(s.save_selected);
+ if(tmp && tmp.length && this.data.ui) { this.data.ui.to_select = tmp.split(","); }
+ }
+ this.get_container()
+ .one( ( this.data.ui ? "reselect" : "reopen" ) + ".jstree", $.proxy(function () {
+ this.get_container()
+ .bind("open_node.jstree close_node.jstree select_node.jstree deselect_node.jstree", $.proxy(function (e) {
+ if(this._get_settings().cookies.auto_save) { this.save_cookie((e.handleObj.namespace + e.handleObj.type).replace("jstree","")); }
+ }, this));
+ }, this));
+ },
+ defaults : {
+ save_loaded : "jstree_load",
+ save_opened : "jstree_open",
+ save_selected : "jstree_select",
+ auto_save : true,
+ cookie_options : {}
+ },
+ _fn : {
+ save_cookie : function (c) {
+ if(this.data.core.refreshing) { return; }
+ var s = this._get_settings().cookies;
+ if(!c) { // if called manually and not by event
+ if(s.save_loaded) {
+ this.save_loaded();
+ $.cookie(s.save_loaded, this.data.core.to_load.join(","), s.cookie_options);
+ }
+ if(s.save_opened) {
+ this.save_opened();
+ $.cookie(s.save_opened, this.data.core.to_open.join(","), s.cookie_options);
+ }
+ if(s.save_selected && this.data.ui) {
+ this.save_selected();
+ $.cookie(s.save_selected, this.data.ui.to_select.join(","), s.cookie_options);
+ }
+ return;
+ }
+ switch(c) {
+ case "open_node":
+ case "close_node":
+ if(!!s.save_opened) {
+ this.save_opened();
+ $.cookie(s.save_opened, this.data.core.to_open.join(","), s.cookie_options);
+ }
+ if(!!s.save_loaded) {
+ this.save_loaded();
+ $.cookie(s.save_loaded, this.data.core.to_load.join(","), s.cookie_options);
+ }
+ break;
+ case "select_node":
+ case "deselect_node":
+ if(!!s.save_selected && this.data.ui) {
+ this.save_selected();
+ $.cookie(s.save_selected, this.data.ui.to_select.join(","), s.cookie_options);
+ }
+ break;
+ }
+ }
+ }
+ });
+ // include cookies by default
+ // $.jstree.defaults.plugins.push("cookies");
+})(jQuery);
+//*/
+
+/*
+ * jsTree sort plugin
+ * Sorts items alphabetically (or using any other function)
+ */
+(function ($) {
+ $.jstree.plugin("sort", {
+ __init : function () {
+ this.get_container()
+ .bind("load_node.jstree", $.proxy(function (e, data) {
+ var obj = this._get_node(data.rslt.obj);
+ obj = obj === -1 ? this.get_container().children("ul") : obj.children("ul");
+ this.sort(obj);
+ }, this))
+ .bind("rename_node.jstree create_node.jstree create.jstree", $.proxy(function (e, data) {
+ this.sort(data.rslt.obj.parent());
+ }, this))
+ .bind("move_node.jstree", $.proxy(function (e, data) {
+ var m = data.rslt.np == -1 ? this.get_container() : data.rslt.np;
+ this.sort(m.children("ul"));
+ }, this));
+ },
+ defaults : function (a, b) { return this.get_text(a) > this.get_text(b) ? 1 : -1; },
+ _fn : {
+ sort : function (obj) {
+ var s = this._get_settings().sort,
+ t = this;
+ obj.append($.makeArray(obj.children("li")).sort($.proxy(s, t)));
+ obj.find("> li > ul").each(function() { t.sort($(this)); });
+ this.clean_node(obj);
+ }
+ }
+ });
+})(jQuery);
+//*/
+
+/*
+ * jsTree DND plugin
+ * Drag and drop plugin for moving/copying nodes
+ */
+(function ($) {
+ var o = false,
+ r = false,
+ m = false,
+ ml = false,
+ sli = false,
+ sti = false,
+ dir1 = false,
+ dir2 = false,
+ last_pos = false;
+ $.vakata.dnd = {
+ is_down : false,
+ is_drag : false,
+ helper : false,
+ scroll_spd : 10,
+ init_x : 0,
+ init_y : 0,
+ threshold : 5,
+ helper_left : 5,
+ helper_top : 10,
+ user_data : {},
+
+ drag_start : function (e, data, html) {
+ if($.vakata.dnd.is_drag) { $.vakata.drag_stop({}); }
+ try {
+ e.currentTarget.unselectable = "on";
+ e.currentTarget.onselectstart = function() { return false; };
+ if(e.currentTarget.style) { e.currentTarget.style.MozUserSelect = "none"; }
+ } catch(err) { }
+ $.vakata.dnd.init_x = e.pageX;
+ $.vakata.dnd.init_y = e.pageY;
+ $.vakata.dnd.user_data = data;
+ $.vakata.dnd.is_down = true;
+ $.vakata.dnd.helper = $("<div id='vakata-dragged' />").html(html); //.fadeTo(10,0.25);
+ $(document).bind("mousemove", $.vakata.dnd.drag);
+ $(document).bind("mouseup", $.vakata.dnd.drag_stop);
+ return false;
+ },
+ drag : function (e) {
+ if(!$.vakata.dnd.is_down) { return; }
+ if(!$.vakata.dnd.is_drag) {
+ if(Math.abs(e.pageX - $.vakata.dnd.init_x) > 5 || Math.abs(e.pageY - $.vakata.dnd.init_y) > 5) {
+ $.vakata.dnd.helper.appendTo("body");
+ $.vakata.dnd.is_drag = true;
+ $(document).triggerHandler("drag_start.vakata", { "event" : e, "data" : $.vakata.dnd.user_data });
+ }
+ else { return; }
+ }
+
+ // maybe use a scrolling parent element instead of document?
+ if(e.type === "mousemove") { // thought of adding scroll in order to move the helper, but mouse poisition is n/a
+ var d = $(document), t = d.scrollTop(), l = d.scrollLeft();
+ if(e.pageY - t < 20) {
+ if(sti && dir1 === "down") { clearInterval(sti); sti = false; }
+ if(!sti) { dir1 = "up"; sti = setInterval(function () { $(document).scrollTop($(document).scrollTop() - $.vakata.dnd.scroll_spd); }, 150); }
+ }
+ else {
+ if(sti && dir1 === "up") { clearInterval(sti); sti = false; }
+ }
+ if($(window).height() - (e.pageY - t) < 20) {
+ if(sti && dir1 === "up") { clearInterval(sti); sti = false; }
+ if(!sti) { dir1 = "down"; sti = setInterval(function () { $(document).scrollTop($(document).scrollTop() + $.vakata.dnd.scroll_spd); }, 150); }
+ }
+ else {
+ if(sti && dir1 === "down") { clearInterval(sti); sti = false; }
+ }
+
+ if(e.pageX - l < 20) {
+ if(sli && dir2 === "right") { clearInterval(sli); sli = false; }
+ if(!sli) { dir2 = "left"; sli = setInterval(function () { $(document).scrollLeft($(document).scrollLeft() - $.vakata.dnd.scroll_spd); }, 150); }
+ }
+ else {
+ if(sli && dir2 === "left") { clearInterval(sli); sli = false; }
+ }
+ if($(window).width() - (e.pageX - l) < 20) {
+ if(sli && dir2 === "left") { clearInterval(sli); sli = false; }
+ if(!sli) { dir2 = "right"; sli = setInterval(function () { $(document).scrollLeft($(document).scrollLeft() + $.vakata.dnd.scroll_spd); }, 150); }
+ }
+ else {
+ if(sli && dir2 === "right") { clearInterval(sli); sli = false; }
+ }
+ }
+
+ $.vakata.dnd.helper.css({ left : (e.pageX + $.vakata.dnd.helper_left) + "px", top : (e.pageY + $.vakata.dnd.helper_top) + "px" });
+ $(document).triggerHandler("drag.vakata", { "event" : e, "data" : $.vakata.dnd.user_data });
+ },
+ drag_stop : function (e) {
+ if(sli) { clearInterval(sli); }
+ if(sti) { clearInterval(sti); }
+ $(document).unbind("mousemove", $.vakata.dnd.drag);
+ $(document).unbind("mouseup", $.vakata.dnd.drag_stop);
+ $(document).triggerHandler("drag_stop.vakata", { "event" : e, "data" : $.vakata.dnd.user_data });
+ $.vakata.dnd.helper.remove();
+ $.vakata.dnd.init_x = 0;
+ $.vakata.dnd.init_y = 0;
+ $.vakata.dnd.user_data = {};
+ $.vakata.dnd.is_down = false;
+ $.vakata.dnd.is_drag = false;
+ }
+ };
+ $(function() {
+ var css_string = '#vakata-dragged { display:block; margin:0 0 0 0; padding:4px 4px 4px 24px; position:absolute; top:-2000px; line-height:16px; z-index:10000; } ';
+ $.vakata.css.add_sheet({ str : css_string, title : "vakata" });
+ });
+
+ $.jstree.plugin("dnd", {
+ __init : function () {
+ this.data.dnd = {
+ active : false,
+ after : false,
+ inside : false,
+ before : false,
+ off : false,
+ prepared : false,
+ w : 0,
+ to1 : false,
+ to2 : false,
+ cof : false,
+ cw : false,
+ ch : false,
+ i1 : false,
+ i2 : false,
+ mto : false
+ };
+ this.get_container()
+ .bind("mouseenter.jstree", $.proxy(function (e) {
+ if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree) {
+ if(this.data.themes) {
+ m.attr("class", "jstree-" + this.data.themes.theme);
+ if(ml) { ml.attr("class", "jstree-" + this.data.themes.theme); }
+ $.vakata.dnd.helper.attr("class", "jstree-dnd-helper jstree-" + this.data.themes.theme);
+ }
+ //if($(e.currentTarget).find("> ul > li").length === 0) {
+ if(e.currentTarget === e.target && $.vakata.dnd.user_data.obj && $($.vakata.dnd.user_data.obj).length && $($.vakata.dnd.user_data.obj).parents(".jstree:eq(0)")[0] !== e.target) { // node should not be from the same tree
+ var tr = $.jstree._reference(e.target), dc;
+ if(tr.data.dnd.foreign) {
+ dc = tr._get_settings().dnd.drag_check.call(this, { "o" : o, "r" : tr.get_container(), is_root : true });
+ if(dc === true || dc.inside === true || dc.before === true || dc.after === true) {
+ $.vakata.dnd.helper.children("ins").attr("class","jstree-ok");
+ }
+ }
+ else {
+ tr.prepare_move(o, tr.get_container(), "last");
+ if(tr.check_move()) {
+ $.vakata.dnd.helper.children("ins").attr("class","jstree-ok");
+ }
+ }
+ }
+ }
+ }, this))
+ .bind("mouseup.jstree", $.proxy(function (e) {
+ //if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree && $(e.currentTarget).find("> ul > li").length === 0) {
+ if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree && e.currentTarget === e.target && $.vakata.dnd.user_data.obj && $($.vakata.dnd.user_data.obj).length && $($.vakata.dnd.user_data.obj).parents(".jstree:eq(0)")[0] !== e.target) { // node should not be from the same tree
+ var tr = $.jstree._reference(e.currentTarget), dc;
+ if(tr.data.dnd.foreign) {
+ dc = tr._get_settings().dnd.drag_check.call(this, { "o" : o, "r" : tr.get_container(), is_root : true });
+ if(dc === true || dc.inside === true || dc.before === true || dc.after === true) {
+ tr._get_settings().dnd.drag_finish.call(this, { "o" : o, "r" : tr.get_container(), is_root : true });
+ }
+ }
+ else {
+ tr.move_node(o, tr.get_container(), "last", e[tr._get_settings().dnd.copy_modifier + "Key"]);
+ }
+ }
+ }, this))
+ .bind("mouseleave.jstree", $.proxy(function (e) {
+ if(e.relatedTarget && e.relatedTarget.id && e.relatedTarget.id === "jstree-marker-line") {
+ return false;
+ }
+ if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree) {
+ if(this.data.dnd.i1) { clearInterval(this.data.dnd.i1); }
+ if(this.data.dnd.i2) { clearInterval(this.data.dnd.i2); }
+ if(this.data.dnd.to1) { clearTimeout(this.data.dnd.to1); }
+ if(this.data.dnd.to2) { clearTimeout(this.data.dnd.to2); }
+ if($.vakata.dnd.helper.children("ins").hasClass("jstree-ok")) {
+ $.vakata.dnd.helper.children("ins").attr("class","jstree-invalid");
+ }
+ }
+ }, this))
+ .bind("mousemove.jstree", $.proxy(function (e) {
+ if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree) {
+ var cnt = this.get_container()[0];
+
+ // Horizontal scroll
+ if(e.pageX + 24 > this.data.dnd.cof.left + this.data.dnd.cw) {
+ if(this.data.dnd.i1) { clearInterval(this.data.dnd.i1); }
+ this.data.dnd.i1 = setInterval($.proxy(function () { this.scrollLeft += $.vakata.dnd.scroll_spd; }, cnt), 100);
+ }
+ else if(e.pageX - 24 < this.data.dnd.cof.left) {
+ if(this.data.dnd.i1) { clearInterval(this.data.dnd.i1); }
+ this.data.dnd.i1 = setInterval($.proxy(function () { this.scrollLeft -= $.vakata.dnd.scroll_spd; }, cnt), 100);
+ }
+ else {
+ if(this.data.dnd.i1) { clearInterval(this.data.dnd.i1); }
+ }
+
+ // Vertical scroll
+ if(e.pageY + 24 > this.data.dnd.cof.top + this.data.dnd.ch) {
+ if(this.data.dnd.i2) { clearInterval(this.data.dnd.i2); }
+ this.data.dnd.i2 = setInterval($.proxy(function () { this.scrollTop += $.vakata.dnd.scroll_spd; }, cnt), 100);
+ }
+ else if(e.pageY - 24 < this.data.dnd.cof.top) {
+ if(this.data.dnd.i2) { clearInterval(this.data.dnd.i2); }
+ this.data.dnd.i2 = setInterval($.proxy(function () { this.scrollTop -= $.vakata.dnd.scroll_spd; }, cnt), 100);
+ }
+ else {
+ if(this.data.dnd.i2) { clearInterval(this.data.dnd.i2); }
+ }
+
+ }
+ }, this))
+ .bind("scroll.jstree", $.proxy(function (e) {
+ if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree && m && ml) {
+ m.hide();
+ ml.hide();
+ }
+ }, this))
+ .delegate("a", "mousedown.jstree", $.proxy(function (e) {
+ if(e.which === 1) {
+ this.start_drag(e.currentTarget, e);
+ return false;
+ }
+ }, this))
+ .delegate("a", "mouseenter.jstree", $.proxy(function (e) {
+ if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree) {
+ this.dnd_enter(e.currentTarget);
+ }
+ }, this))
+ .delegate("a", "mousemove.jstree", $.proxy(function (e) {
+ if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree) {
+ if(!r || !r.length || r.children("a")[0] !== e.currentTarget) {
+ this.dnd_enter(e.currentTarget);
+ }
+ if(typeof this.data.dnd.off.top === "undefined") { this.data.dnd.off = $(e.target).offset(); }
+ this.data.dnd.w = (e.pageY - (this.data.dnd.off.top || 0)) % this.data.core.li_height;
+ if(this.data.dnd.w < 0) { this.data.dnd.w += this.data.core.li_height; }
+ this.dnd_show();
+ }
+ }, this))
+ .delegate("a", "mouseleave.jstree", $.proxy(function (e) {
+ if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree) {
+ if(e.relatedTarget && e.relatedTarget.id && e.relatedTarget.id === "jstree-marker-line") {
+ return false;
+ }
+ if(m) { m.hide(); }
+ if(ml) { ml.hide(); }
+ /*
+ var ec = $(e.currentTarget).closest("li"),
+ er = $(e.relatedTarget).closest("li");
+ if(er[0] !== ec.prev()[0] && er[0] !== ec.next()[0]) {
+ if(m) { m.hide(); }
+ if(ml) { ml.hide(); }
+ }
+ */
+ this.data.dnd.mto = setTimeout(
+ (function (t) { return function () { t.dnd_leave(e); }; })(this),
+ 0);
+ }
+ }, this))
+ .delegate("a", "mouseup.jstree", $.proxy(function (e) {
+ if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree) {
+ this.dnd_finish(e);
+ }
+ }, this));
+
+ $(document)
+ .bind("drag_stop.vakata", $.proxy(function () {
+ if(this.data.dnd.to1) { clearTimeout(this.data.dnd.to1); }
+ if(this.data.dnd.to2) { clearTimeout(this.data.dnd.to2); }
+ if(this.data.dnd.i1) { clearInterval(this.data.dnd.i1); }
+ if(this.data.dnd.i2) { clearInterval(this.data.dnd.i2); }
+ this.data.dnd.after = false;
+ this.data.dnd.before = false;
+ this.data.dnd.inside = false;
+ this.data.dnd.off = false;
+ this.data.dnd.prepared = false;
+ this.data.dnd.w = false;
+ this.data.dnd.to1 = false;
+ this.data.dnd.to2 = false;
+ this.data.dnd.i1 = false;
+ this.data.dnd.i2 = false;
+ this.data.dnd.active = false;
+ this.data.dnd.foreign = false;
+ if(m) { m.css({ "top" : "-2000px" }); }
+ if(ml) { ml.css({ "top" : "-2000px" }); }
+ }, this))
+ .bind("drag_start.vakata", $.proxy(function (e, data) {
+ if(data.data.jstree) {
+ var et = $(data.event.target);
+ if(et.closest(".jstree").hasClass("jstree-" + this.get_index())) {
+ this.dnd_enter(et);
+ }
+ }
+ }, this));
+ /*
+ .bind("keydown.jstree-" + this.get_index() + " keyup.jstree-" + this.get_index(), $.proxy(function(e) {
+ if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree && !this.data.dnd.foreign) {
+ var h = $.vakata.dnd.helper.children("ins");
+ if(e[this._get_settings().dnd.copy_modifier + "Key"] && h.hasClass("jstree-ok")) {
+ h.parent().html(h.parent().html().replace(/ \(Copy\)$/, "") + " (Copy)");
+ }
+ else {
+ h.parent().html(h.parent().html().replace(/ \(Copy\)$/, ""));
+ }
+ }
+ }, this)); */
+
+
+
+ var s = this._get_settings().dnd;
+ if(s.drag_target) {
+ $(document)
+ .delegate(s.drag_target, "mousedown.jstree-" + this.get_index(), $.proxy(function (e) {
+ o = e.target;
+ $.vakata.dnd.drag_start(e, { jstree : true, obj : e.target }, "<ins class='jstree-icon'></ins>" + $(e.target).text() );
+ if(this.data.themes) {
+ if(m) { m.attr("class", "jstree-" + this.data.themes.theme); }
+ if(ml) { ml.attr("class", "jstree-" + this.data.themes.theme); }
+ $.vakata.dnd.helper.attr("class", "jstree-dnd-helper jstree-" + this.data.themes.theme);
+ }
+ $.vakata.dnd.helper.children("ins").attr("class","jstree-invalid");
+ var cnt = this.get_container();
+ this.data.dnd.cof = cnt.offset();
+ this.data.dnd.cw = parseInt(cnt.width(),10);
+ this.data.dnd.ch = parseInt(cnt.height(),10);
+ this.data.dnd.foreign = true;
+ e.preventDefault();
+ }, this));
+ }
+ if(s.drop_target) {
+ $(document)
+ .delegate(s.drop_target, "mouseenter.jstree-" + this.get_index(), $.proxy(function (e) {
+ if(this.data.dnd.active && this._get_settings().dnd.drop_check.call(this, { "o" : o, "r" : $(e.target), "e" : e })) {
+ $.vakata.dnd.helper.children("ins").attr("class","jstree-ok");
+ }
+ }, this))
+ .delegate(s.drop_target, "mouseleave.jstree-" + this.get_index(), $.proxy(function (e) {
+ if(this.data.dnd.active) {
+ $.vakata.dnd.helper.children("ins").attr("class","jstree-invalid");
+ }
+ }, this))
+ .delegate(s.drop_target, "mouseup.jstree-" + this.get_index(), $.proxy(function (e) {
+ if(this.data.dnd.active && $.vakata.dnd.helper.children("ins").hasClass("jstree-ok")) {
+ this._get_settings().dnd.drop_finish.call(this, { "o" : o, "r" : $(e.target), "e" : e });
+ }
+ }, this));
+ }
+ },
+ defaults : {
+ copy_modifier : "ctrl",
+ check_timeout : 100,
+ open_timeout : 500,
+ drop_target : ".jstree-drop",
+ drop_check : function (data) { return true; },
+ drop_finish : $.noop,
+ drag_target : ".jstree-draggable",
+ drag_finish : $.noop,
+ drag_check : function (data) { return { after : false, before : false, inside : true }; }
+ },
+ _fn : {
+ dnd_prepare : function () {
+ if(!r || !r.length) { return; }
+ this.data.dnd.off = r.offset();
+ if(this._get_settings().core.rtl) {
+ this.data.dnd.off.right = this.data.dnd.off.left + r.width();
+ }
+ if(this.data.dnd.foreign) {
+ var a = this._get_settings().dnd.drag_check.call(this, { "o" : o, "r" : r });
+ this.data.dnd.after = a.after;
+ this.data.dnd.before = a.before;
+ this.data.dnd.inside = a.inside;
+ this.data.dnd.prepared = true;
+ return this.dnd_show();
+ }
+ this.prepare_move(o, r, "before");
+ this.data.dnd.before = this.check_move();
+ this.prepare_move(o, r, "after");
+ this.data.dnd.after = this.check_move();
+ if(this._is_loaded(r)) {
+ this.prepare_move(o, r, "inside");
+ this.data.dnd.inside = this.check_move();
+ }
+ else {
+ this.data.dnd.inside = false;
+ }
+ this.data.dnd.prepared = true;
+ return this.dnd_show();
+ },
+ dnd_show : function () {
+ if(!this.data.dnd.prepared) { return; }
+ var o = ["before","inside","after"],
+ r = false,
+ rtl = this._get_settings().core.rtl,
+ pos;
+ if(this.data.dnd.w < this.data.core.li_height/3) { o = ["before","inside","after"]; }
+ else if(this.data.dnd.w <= this.data.core.li_height*2/3) {
+ o = this.data.dnd.w < this.data.core.li_height/2 ? ["inside","before","after"] : ["inside","after","before"];
+ }
+ else { o = ["after","inside","before"]; }
+ $.each(o, $.proxy(function (i, val) {
+ if(this.data.dnd[val]) {
+ $.vakata.dnd.helper.children("ins").attr("class","jstree-ok");
+ r = val;
+ return false;
+ }
+ }, this));
+ if(r === false) { $.vakata.dnd.helper.children("ins").attr("class","jstree-invalid"); }
+
+ pos = rtl ? (this.data.dnd.off.right - 18) : (this.data.dnd.off.left + 10);
+ switch(r) {
+ case "before":
+ m.css({ "left" : pos + "px", "top" : (this.data.dnd.off.top - 6) + "px" }).show();
+ if(ml) { ml.css({ "left" : (pos + 8) + "px", "top" : (this.data.dnd.off.top - 1) + "px" }).show(); }
+ break;
+ case "after":
+ m.css({ "left" : pos + "px", "top" : (this.data.dnd.off.top + this.data.core.li_height - 6) + "px" }).show();
+ if(ml) { ml.css({ "left" : (pos + 8) + "px", "top" : (this.data.dnd.off.top + this.data.core.li_height - 1) + "px" }).show(); }
+ break;
+ case "inside":
+ m.css({ "left" : pos + ( rtl ? -4 : 4) + "px", "top" : (this.data.dnd.off.top + this.data.core.li_height/2 - 5) + "px" }).show();
+ if(ml) { ml.hide(); }
+ break;
+ default:
+ m.hide();
+ if(ml) { ml.hide(); }
+ break;
+ }
+ last_pos = r;
+ return r;
+ },
+ dnd_open : function () {
+ this.data.dnd.to2 = false;
+ this.open_node(r, $.proxy(this.dnd_prepare,this), true);
+ },
+ dnd_finish : function (e) {
+ if(this.data.dnd.foreign) {
+ if(this.data.dnd.after || this.data.dnd.before || this.data.dnd.inside) {
+ this._get_settings().dnd.drag_finish.call(this, { "o" : o, "r" : r, "p" : last_pos });
+ }
+ }
+ else {
+ this.dnd_prepare();
+ this.move_node(o, r, last_pos, e[this._get_settings().dnd.copy_modifier + "Key"]);
+ }
+ o = false;
+ r = false;
+ m.hide();
+ if(ml) { ml.hide(); }
+ },
+ dnd_enter : function (obj) {
+ if(this.data.dnd.mto) {
+ clearTimeout(this.data.dnd.mto);
+ this.data.dnd.mto = false;
+ }
+ var s = this._get_settings().dnd;
+ this.data.dnd.prepared = false;
+ r = this._get_node(obj);
+ if(s.check_timeout) {
+ // do the calculations after a minimal timeout (users tend to drag quickly to the desired location)
+ if(this.data.dnd.to1) { clearTimeout(this.data.dnd.to1); }
+ this.data.dnd.to1 = setTimeout($.proxy(this.dnd_prepare, this), s.check_timeout);
+ }
+ else {
+ this.dnd_prepare();
+ }
+ if(s.open_timeout) {
+ if(this.data.dnd.to2) { clearTimeout(this.data.dnd.to2); }
+ if(r && r.length && r.hasClass("jstree-closed")) {
+ // if the node is closed - open it, then recalculate
+ this.data.dnd.to2 = setTimeout($.proxy(this.dnd_open, this), s.open_timeout);
+ }
+ }
+ else {
+ if(r && r.length && r.hasClass("jstree-closed")) {
+ this.dnd_open();
+ }
+ }
+ },
+ dnd_leave : function (e) {
+ this.data.dnd.after = false;
+ this.data.dnd.before = false;
+ this.data.dnd.inside = false;
+ $.vakata.dnd.helper.children("ins").attr("class","jstree-invalid");
+ m.hide();
+ if(ml) { ml.hide(); }
+ if(r && r[0] === e.target.parentNode) {
+ if(this.data.dnd.to1) {
+ clearTimeout(this.data.dnd.to1);
+ this.data.dnd.to1 = false;
+ }
+ if(this.data.dnd.to2) {
+ clearTimeout(this.data.dnd.to2);
+ this.data.dnd.to2 = false;
+ }
+ }
+ },
+ start_drag : function (obj, e) {
+ o = this._get_node(obj);
+ if(this.data.ui && this.is_selected(o)) { o = this._get_node(null, true); }
+ var dt = o.length > 1 ? this._get_string("multiple_selection") : this.get_text(o),
+ cnt = this.get_container();
+ if(!this._get_settings().core.html_titles) { dt = dt.replace(/</ig,"<").replace(/>/ig,">"); }
+ $.vakata.dnd.drag_start(e, { jstree : true, obj : o }, "<ins class='jstree-icon'></ins>" + dt );
+ if(this.data.themes) {
+ if(m) { m.attr("class", "jstree-" + this.data.themes.theme); }
+ if(ml) { ml.attr("class", "jstree-" + this.data.themes.theme); }
+ $.vakata.dnd.helper.attr("class", "jstree-dnd-helper jstree-" + this.data.themes.theme);
+ }
+ this.data.dnd.cof = cnt.offset();
+ this.data.dnd.cw = parseInt(cnt.width(),10);
+ this.data.dnd.ch = parseInt(cnt.height(),10);
+ this.data.dnd.active = true;
+ }
+ }
+ });
+ $(function() {
+ var css_string = '' +
+ '#vakata-dragged ins { display:block; text-decoration:none; width:16px; height:16px; margin:0 0 0 0; padding:0; position:absolute; top:4px; left:4px; ' +
+ ' -moz-border-radius:4px; border-radius:4px; -webkit-border-radius:4px; ' +
+ '} ' +
+ '#vakata-dragged .jstree-ok { background:green; } ' +
+ '#vakata-dragged .jstree-invalid { background:red; } ' +
+ '#jstree-marker { padding:0; margin:0; font-size:12px; overflow:hidden; height:12px; width:8px; position:absolute; top:-30px; z-index:10001; background-repeat:no-repeat; display:none; background-color:transparent; text-shadow:1px 1px 1px white; color:black; line-height:10px; } ' +
+ '#jstree-marker-line { padding:0; margin:0; line-height:0%; font-size:1px; overflow:hidden; height:1px; width:100px; position:absolute; top:-30px; z-index:10000; background-repeat:no-repeat; display:none; background-color:#456c43; ' +
+ ' cursor:pointer; border:1px solid #eeeeee; border-left:0; -moz-box-shadow: 0px 0px 2px #666; -webkit-box-shadow: 0px 0px 2px #666; box-shadow: 0px 0px 2px #666; ' +
+ ' -moz-border-radius:1px; border-radius:1px; -webkit-border-radius:1px; ' +
+ '}' +
+ '';
+ $.vakata.css.add_sheet({ str : css_string, title : "jstree" });
+ m = $("<div />").attr({ id : "jstree-marker" }).hide().html("»")
+ .bind("mouseleave mouseenter", function (e) {
+ m.hide();
+ ml.hide();
+ e.preventDefault();
+ e.stopImmediatePropagation();
+ return false;
+ })
+ .appendTo("body");
+ ml = $("<div />").attr({ id : "jstree-marker-line" }).hide()
+ .bind("mouseup", function (e) {
+ if(r && r.length) {
+ r.children("a").trigger(e);
+ e.preventDefault();
+ e.stopImmediatePropagation();
+ return false;
+ }
+ })
+ .bind("mouseleave", function (e) {
+ var rt = $(e.relatedTarget);
+ if(rt.is(".jstree") || rt.closest(".jstree").length === 0) {
+ if(r && r.length) {
+ r.children("a").trigger(e);
+ m.hide();
+ ml.hide();
+ e.preventDefault();
+ e.stopImmediatePropagation();
+ return false;
+ }
+ }
+ })
+ .appendTo("body");
+ $(document).bind("drag_start.vakata", function (e, data) {
+ if(data.data.jstree) { m.show(); if(ml) { ml.show(); } }
+ });
+ $(document).bind("drag_stop.vakata", function (e, data) {
+ if(data.data.jstree) { m.hide(); if(ml) { ml.hide(); } }
+ });
+ });
+})(jQuery);
+//*/
+
+/*
+ * jsTree checkbox plugin
+ * Inserts checkboxes in front of every node
+ * Depends on the ui plugin
+ * DOES NOT WORK NICELY WITH MULTITREE DRAG'N'DROP
+ */
+(function ($) {
+ $.jstree.plugin("checkbox", {
+ __init : function () {
+ this.data.checkbox.noui = this._get_settings().checkbox.override_ui;
+ if(this.data.ui && this.data.checkbox.noui) {
+ this.select_node = this.deselect_node = this.deselect_all = $.noop;
+ this.get_selected = this.get_checked;
+ }
+
+ this.get_container()
+ .bind("open_node.jstree create_node.jstree clean_node.jstree refresh.jstree", $.proxy(function (e, data) {
+ this._prepare_checkboxes(data.rslt.obj);
+ }, this))
+ .bind("loaded.jstree", $.proxy(function (e) {
+ this._prepare_checkboxes();
+ }, this))
+ .delegate( (this.data.ui && this.data.checkbox.noui ? "a" : "ins.jstree-checkbox") , "click.jstree", $.proxy(function (e) {
+ e.preventDefault();
+ if(this._get_node(e.target).hasClass("jstree-checked")) { this.uncheck_node(e.target); }
+ else { this.check_node(e.target); }
+ if(this.data.ui && this.data.checkbox.noui) {
+ this.save_selected();
+ if(this.data.cookies) { this.save_cookie("select_node"); }
+ }
+ else {
+ e.stopImmediatePropagation();
+ return false;
+ }
+ }, this));
+ },
+ defaults : {
+ override_ui : false,
+ two_state : false,
+ real_checkboxes : false,
+ checked_parent_open : true,
+ real_checkboxes_names : function (n) { return [ ("check_" + (n[0].id || Math.ceil(Math.random() * 10000))) , 1]; }
+ },
+ __destroy : function () {
+ this.get_container()
+ .find("input.jstree-real-checkbox").removeClass("jstree-real-checkbox").end()
+ .find("ins.jstree-checkbox").remove();
+ },
+ _fn : {
+ _checkbox_notify : function (n, data) {
+ if(data.checked) {
+ this.check_node(n, false);
+ }
+ },
+ _prepare_checkboxes : function (obj) {
+ obj = !obj || obj == -1 ? this.get_container().find("> ul > li") : this._get_node(obj);
+ if(obj === false) { return; } // added for removing root nodes
+ var c, _this = this, t, ts = this._get_settings().checkbox.two_state, rc = this._get_settings().checkbox.real_checkboxes, rcn = this._get_settings().checkbox.real_checkboxes_names;
+ obj.each(function () {
+ t = $(this);
+ c = t.is("li") && (t.hasClass("jstree-checked") || (rc && t.children(":checked").length)) ? "jstree-checked" : "jstree-unchecked";
+ t.find("li").andSelf().each(function () {
+ var $t = $(this), nm;
+ $t.children("a" + (_this.data.languages ? "" : ":eq(0)") ).not(":has(.jstree-checkbox)").prepend("<ins class='jstree-checkbox'> </ins>").parent().not(".jstree-checked, .jstree-unchecked").addClass( ts ? "jstree-unchecked" : c );
+ if(rc) {
+ if(!$t.children(":checkbox").length) {
+ nm = rcn.call(_this, $t);
+ $t.prepend("<input type='checkbox' class='jstree-real-checkbox' id='" + nm[0] + "' name='" + nm[0] + "' value='" + nm[1] + "' />");
+ }
+ else {
+ $t.children(":checkbox").addClass("jstree-real-checkbox");
+ }
+ }
+ if(!ts) {
+ if(c === "jstree-checked" || $t.hasClass("jstree-checked") || $t.children(':checked').length) {
+ $t.find("li").andSelf().addClass("jstree-checked").children(":checkbox").prop("checked", true);
+ }
+ }
+ else {
+ if($t.hasClass("jstree-checked") || $t.children(':checked').length) {
+ $t.addClass("jstree-checked").children(":checkbox").prop("checked", true);
+ }
+ }
+ });
+ });
+ if(!ts) {
+ obj.find(".jstree-checked").parent().parent().each(function () { _this._repair_state(this); });
+ }
+ },
+ change_state : function (obj, state) {
+ obj = this._get_node(obj);
+ var coll = false, rc = this._get_settings().checkbox.real_checkboxes;
+ if(!obj || obj === -1) { return false; }
+ state = (state === false || state === true) ? state : obj.hasClass("jstree-checked");
+ if(this._get_settings().checkbox.two_state) {
+ if(state) {
+ obj.removeClass("jstree-checked").addClass("jstree-unchecked");
+ if(rc) { obj.children(":checkbox").prop("checked", false); }
+ }
+ else {
+ obj.removeClass("jstree-unchecked").addClass("jstree-checked");
+ if(rc) { obj.children(":checkbox").prop("checked", true); }
+ }
+ }
+ else {
+ if(state) {
+ coll = obj.find("li").andSelf();
+ if(!coll.filter(".jstree-checked, .jstree-undetermined").length) { return false; }
+ coll.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");
+ if(rc) { coll.children(":checkbox").prop("checked", false); }
+ }
+ else {
+ coll = obj.find("li").andSelf();
+ if(!coll.filter(".jstree-unchecked, .jstree-undetermined").length) { return false; }
+ coll.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");
+ if(rc) { coll.children(":checkbox").prop("checked", true); }
+ if(this.data.ui) { this.data.ui.last_selected = obj; }
+ this.data.checkbox.last_selected = obj;
+ }
+ obj.parentsUntil(".jstree", "li").each(function () {
+ var $this = $(this);
+ if(state) {
+ if($this.children("ul").children("li.jstree-checked, li.jstree-undetermined").length) {
+ $this.parentsUntil(".jstree", "li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");
+ if(rc) { $this.parentsUntil(".jstree", "li").andSelf().children(":checkbox").prop("checked", false); }
+ return false;
+ }
+ else {
+ $this.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");
+ if(rc) { $this.children(":checkbox").prop("checked", false); }
+ }
+ }
+ else {
+ if($this.children("ul").children("li.jstree-unchecked, li.jstree-undetermined").length) {
+ $this.parentsUntil(".jstree", "li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");
+ if(rc) { $this.parentsUntil(".jstree", "li").andSelf().children(":checkbox").prop("checked", false); }
+ return false;
+ }
+ else {
+ $this.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");
+ if(rc) { $this.children(":checkbox").prop("checked", true); }
+ }
+ }
+ });
+ }
+ if(this.data.ui && this.data.checkbox.noui) { this.data.ui.selected = this.get_checked(); }
+ this.__callback(obj);
+ return true;
+ },
+ check_node : function (obj) {
+ if(this.change_state(obj, false)) {
+ obj = this._get_node(obj);
+ if(this._get_settings().checkbox.checked_parent_open) {
+ var t = this;
+ obj.parents(".jstree-closed").each(function () { t.open_node(this, false, true); });
+ }
+ this.__callback({ "obj" : obj });
+ }
+ },
+ uncheck_node : function (obj) {
+ if(this.change_state(obj, true)) { this.__callback({ "obj" : this._get_node(obj) }); }
+ },
+ check_all : function () {
+ var _this = this,
+ coll = this._get_settings().checkbox.two_state ? this.get_container_ul().find("li") : this.get_container_ul().children("li");
+ coll.each(function () {
+ _this.change_state(this, false);
+ });
+ this.__callback();
+ },
+ uncheck_all : function () {
+ var _this = this,
+ coll = this._get_settings().checkbox.two_state ? this.get_container_ul().find("li") : this.get_container_ul().children("li");
+ coll.each(function () {
+ _this.change_state(this, true);
+ });
+ this.__callback();
+ },
+
+ is_checked : function(obj) {
+ obj = this._get_node(obj);
+ return obj.length ? obj.is(".jstree-checked") : false;
+ },
+ get_checked : function (obj, get_all) {
+ obj = !obj || obj === -1 ? this.get_container() : this._get_node(obj);
+ return get_all || this._get_settings().checkbox.two_state ? obj.find(".jstree-checked") : obj.find("> ul > .jstree-checked, .jstree-undetermined > ul > .jstree-checked");
+ },
+ get_unchecked : function (obj, get_all) {
+ obj = !obj || obj === -1 ? this.get_container() : this._get_node(obj);
+ return get_all || this._get_settings().checkbox.two_state ? obj.find(".jstree-unchecked") : obj.find("> ul > .jstree-unchecked, .jstree-undetermined > ul > .jstree-unchecked");
+ },
+
+ show_checkboxes : function () { this.get_container().children("ul").removeClass("jstree-no-checkboxes"); },
+ hide_checkboxes : function () { this.get_container().children("ul").addClass("jstree-no-checkboxes"); },
+
+ _repair_state : function (obj) {
+ obj = this._get_node(obj);
+ if(!obj.length) { return; }
+ if(this._get_settings().checkbox.two_state) {
+ obj.find('li').andSelf().not('.jstree-checked').removeClass('jstree-undetermined').addClass('jstree-unchecked').children(':checkbox').prop('checked', true);
+ return;
+ }
+ var rc = this._get_settings().checkbox.real_checkboxes,
+ a = obj.find("> ul > .jstree-checked").length,
+ b = obj.find("> ul > .jstree-undetermined").length,
+ c = obj.find("> ul > li").length;
+ if(c === 0) { if(obj.hasClass("jstree-undetermined")) { this.change_state(obj, false); } }
+ else if(a === 0 && b === 0) { this.change_state(obj, true); }
+ else if(a === c) { this.change_state(obj, false); }
+ else {
+ obj.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");
+ if(rc) { obj.parentsUntil(".jstree", "li").andSelf().children(":checkbox").prop("checked", false); }
+ }
+ },
+ reselect : function () {
+ if(this.data.ui && this.data.checkbox.noui) {
+ var _this = this,
+ s = this.data.ui.to_select;
+ s = $.map($.makeArray(s), function (n) { return "#" + n.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:"); });
+ this.deselect_all();
+ $.each(s, function (i, val) { _this.check_node(val); });
+ this.__callback();
+ }
+ else {
+ this.__call_old();
+ }
+ },
+ save_loaded : function () {
+ var _this = this;
+ this.data.core.to_load = [];
+ this.get_container_ul().find("li.jstree-closed.jstree-undetermined").each(function () {
+ if(this.id) { _this.data.core.to_load.push("#" + this.id); }
+ });
+ }
+ }
+ });
+ $(function() {
+ var css_string = '.jstree .jstree-real-checkbox { display:none; } ';
+ $.vakata.css.add_sheet({ str : css_string, title : "jstree" });
+ });
+})(jQuery);
+//*/
+
+/*
+ * jsTree XML plugin
+ * The XML data store. Datastores are build by overriding the `load_node` and `_is_loaded` functions.
+ */
+(function ($) {
+ $.vakata.xslt = function (xml, xsl, callback) {
+ var r = false, p, q, s;
+ // IE9
+ if(r === false && window.ActiveXObject) {
+ try {
+ r = new ActiveXObject("Msxml2.XSLTemplate");
+ q = new ActiveXObject("Msxml2.DOMDocument");
+ q.loadXML(xml);
+ s = new ActiveXObject("Msxml2.FreeThreadedDOMDocument");
+ s.loadXML(xsl);
+ r.stylesheet = s;
+ p = r.createProcessor();
+ p.input = q;
+ p.transform();
+ r = p.output;
+ }
+ catch (e) { }
+ }
+ xml = $.parseXML(xml);
+ xsl = $.parseXML(xsl);
+ // FF, Chrome
+ if(r === false && typeof (XSLTProcessor) !== "undefined") {
+ p = new XSLTProcessor();
+ p.importStylesheet(xsl);
+ r = p.transformToFragment(xml, document);
+ r = $('<div />').append(r).html();
+ }
+ // OLD IE
+ if(r === false && typeof (xml.transformNode) !== "undefined") {
+ r = xml.transformNode(xsl);
+ }
+ callback.call(null, r);
+ };
+ var xsl = {
+ 'nest' : '<' + '?xml version="1.0" encoding="utf-8" ?>' +
+ '<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >' +
+ '<xsl:output method="html" encoding="utf-8" omit-xml-declaration="yes" standalone="no" indent="no" media-type="text/html" />' +
+ '<xsl:template match="/">' +
+ ' <xsl:call-template name="nodes">' +
+ ' <xsl:with-param name="node" select="/root" />' +
+ ' </xsl:call-template>' +
+ '</xsl:template>' +
+ '<xsl:template name="nodes">' +
+ ' <xsl:param name="node" />' +
+ ' <ul>' +
+ ' <xsl:for-each select="$node/item">' +
+ ' <xsl:variable name="children" select="count(./item) > 0" />' +
+ ' <li>' +
+ ' <xsl:attribute name="class">' +
+ ' <xsl:if test="position() = last()">jstree-last </xsl:if>' +
+ ' <xsl:choose>' +
+ ' <xsl:when test="@state = \'open\'">jstree-open </xsl:when>' +
+ ' <xsl:when test="$children or @hasChildren or @state = \'closed\'">jstree-closed </xsl:when>' +
+ ' <xsl:otherwise>jstree-leaf </xsl:otherwise>' +
+ ' </xsl:choose>' +
+ ' <xsl:value-of select="@class" />' +
+ ' </xsl:attribute>' +
+ ' <xsl:for-each select="@*">' +
+ ' <xsl:if test="name() != \'class\' and name() != \'state\' and name() != \'hasChildren\'">' +
+ ' <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>' +
+ ' </xsl:if>' +
+ ' </xsl:for-each>' +
+ ' <ins class="jstree-icon"><xsl:text> </xsl:text></ins>' +
+ ' <xsl:for-each select="content/name">' +
+ ' <a>' +
+ ' <xsl:attribute name="href">' +
+ ' <xsl:choose>' +
+ ' <xsl:when test="@href"><xsl:value-of select="@href" /></xsl:when>' +
+ ' <xsl:otherwise>#</xsl:otherwise>' +
+ ' </xsl:choose>' +
+ ' </xsl:attribute>' +
+ ' <xsl:attribute name="class"><xsl:value-of select="@lang" /> <xsl:value-of select="@class" /></xsl:attribute>' +
+ ' <xsl:attribute name="style"><xsl:value-of select="@style" /></xsl:attribute>' +
+ ' <xsl:for-each select="@*">' +
+ ' <xsl:if test="name() != \'style\' and name() != \'class\' and name() != \'href\'">' +
+ ' <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>' +
+ ' </xsl:if>' +
+ ' </xsl:for-each>' +
+ ' <ins>' +
+ ' <xsl:attribute name="class">jstree-icon ' +
+ ' <xsl:if test="string-length(attribute::icon) > 0 and not(contains(@icon,\'/\'))"><xsl:value-of select="@icon" /></xsl:if>' +
+ ' </xsl:attribute>' +
+ ' <xsl:if test="string-length(attribute::icon) > 0 and contains(@icon,\'/\')"><xsl:attribute name="style">background:url(<xsl:value-of select="@icon" />) center center no-repeat;</xsl:attribute></xsl:if>' +
+ ' <xsl:text> </xsl:text>' +
+ ' </ins>' +
+ ' <xsl:copy-of select="./child::node()" />' +
+ ' </a>' +
+ ' </xsl:for-each>' +
+ ' <xsl:if test="$children or @hasChildren"><xsl:call-template name="nodes"><xsl:with-param name="node" select="current()" /></xsl:call-template></xsl:if>' +
+ ' </li>' +
+ ' </xsl:for-each>' +
+ ' </ul>' +
+ '</xsl:template>' +
+ '</xsl:stylesheet>',
+
+ 'flat' : '<' + '?xml version="1.0" encoding="utf-8" ?>' +
+ '<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >' +
+ '<xsl:output method="html" encoding="utf-8" omit-xml-declaration="yes" standalone="no" indent="no" media-type="text/xml" />' +
+ '<xsl:template match="/">' +
+ ' <ul>' +
+ ' <xsl:for-each select="//item[not(@parent_id) or @parent_id=0 or not(@parent_id = //item/@id)]">' + /* the last `or` may be removed */
+ ' <xsl:call-template name="nodes">' +
+ ' <xsl:with-param name="node" select="." />' +
+ ' <xsl:with-param name="is_last" select="number(position() = last())" />' +
+ ' </xsl:call-template>' +
+ ' </xsl:for-each>' +
+ ' </ul>' +
+ '</xsl:template>' +
+ '<xsl:template name="nodes">' +
+ ' <xsl:param name="node" />' +
+ ' <xsl:param name="is_last" />' +
+ ' <xsl:variable name="children" select="count(//item[@parent_id=$node/attribute::id]) > 0" />' +
+ ' <li>' +
+ ' <xsl:attribute name="class">' +
+ ' <xsl:if test="$is_last = true()">jstree-last </xsl:if>' +
+ ' <xsl:choose>' +
+ ' <xsl:when test="@state = \'open\'">jstree-open </xsl:when>' +
+ ' <xsl:when test="$children or @hasChildren or @state = \'closed\'">jstree-closed </xsl:when>' +
+ ' <xsl:otherwise>jstree-leaf </xsl:otherwise>' +
+ ' </xsl:choose>' +
+ ' <xsl:value-of select="@class" />' +
+ ' </xsl:attribute>' +
+ ' <xsl:for-each select="@*">' +
+ ' <xsl:if test="name() != \'parent_id\' and name() != \'hasChildren\' and name() != \'class\' and name() != \'state\'">' +
+ ' <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>' +
+ ' </xsl:if>' +
+ ' </xsl:for-each>' +
+ ' <ins class="jstree-icon"><xsl:text> </xsl:text></ins>' +
+ ' <xsl:for-each select="content/name">' +
+ ' <a>' +
+ ' <xsl:attribute name="href">' +
+ ' <xsl:choose>' +
+ ' <xsl:when test="@href"><xsl:value-of select="@href" /></xsl:when>' +
+ ' <xsl:otherwise>#</xsl:otherwise>' +
+ ' </xsl:choose>' +
+ ' </xsl:attribute>' +
+ ' <xsl:attribute name="class"><xsl:value-of select="@lang" /> <xsl:value-of select="@class" /></xsl:attribute>' +
+ ' <xsl:attribute name="style"><xsl:value-of select="@style" /></xsl:attribute>' +
+ ' <xsl:for-each select="@*">' +
+ ' <xsl:if test="name() != \'style\' and name() != \'class\' and name() != \'href\'">' +
+ ' <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>' +
+ ' </xsl:if>' +
+ ' </xsl:for-each>' +
+ ' <ins>' +
+ ' <xsl:attribute name="class">jstree-icon ' +
+ ' <xsl:if test="string-length(attribute::icon) > 0 and not(contains(@icon,\'/\'))"><xsl:value-of select="@icon" /></xsl:if>' +
+ ' </xsl:attribute>' +
+ ' <xsl:if test="string-length(attribute::icon) > 0 and contains(@icon,\'/\')"><xsl:attribute name="style">background:url(<xsl:value-of select="@icon" />) center center no-repeat;</xsl:attribute></xsl:if>' +
+ ' <xsl:text> </xsl:text>' +
+ ' </ins>' +
+ ' <xsl:copy-of select="./child::node()" />' +
+ ' </a>' +
+ ' </xsl:for-each>' +
+ ' <xsl:if test="$children">' +
+ ' <ul>' +
+ ' <xsl:for-each select="//item[@parent_id=$node/attribute::id]">' +
+ ' <xsl:call-template name="nodes">' +
+ ' <xsl:with-param name="node" select="." />' +
+ ' <xsl:with-param name="is_last" select="number(position() = last())" />' +
+ ' </xsl:call-template>' +
+ ' </xsl:for-each>' +
+ ' </ul>' +
+ ' </xsl:if>' +
+ ' </li>' +
+ '</xsl:template>' +
+ '</xsl:stylesheet>'
+ },
+ escape_xml = function(string) {
+ return string
+ .toString()
+ .replace(/&/g, '&')
+ .replace(/</g, '<')
+ .replace(/>/g, '>')
+ .replace(/"/g, '"')
+ .replace(/'/g, ''');
+ };
+ $.jstree.plugin("xml_data", {
+ defaults : {
+ data : false,
+ ajax : false,
+ xsl : "flat",
+ clean_node : false,
+ correct_state : true,
+ get_skip_empty : false,
+ get_include_preamble : true
+ },
+ _fn : {
+ load_node : function (obj, s_call, e_call) { var _this = this; this.load_node_xml(obj, function () { _this.__callback({ "obj" : _this._get_node(obj) }); s_call.call(this); }, e_call); },
+ _is_loaded : function (obj) {
+ var s = this._get_settings().xml_data;
+ obj = this._get_node(obj);
+ return obj == -1 || !obj || (!s.ajax && !$.isFunction(s.data)) || obj.is(".jstree-open, .jstree-leaf") || obj.children("ul").children("li").size() > 0;
+ },
+ load_node_xml : function (obj, s_call, e_call) {
+ var s = this.get_settings().xml_data,
+ error_func = function () {},
+ success_func = function () {};
+
+ obj = this._get_node(obj);
+ if(obj && obj !== -1) {
+ if(obj.data("jstree_is_loading")) { return; }
+ else { obj.data("jstree_is_loading",true); }
+ }
+ switch(!0) {
+ case (!s.data && !s.ajax): throw "Neither data nor ajax settings supplied.";
+ case ($.isFunction(s.data)):
+ s.data.call(this, obj, $.proxy(function (d) {
+ this.parse_xml(d, $.proxy(function (d) {
+ if(d) {
+ d = d.replace(/ ?xmlns="[^"]*"/ig, "");
+ if(d.length > 10) {
+ d = $(d);
+ if(obj === -1 || !obj) { this.get_container().children("ul").empty().append(d.children()); }
+ else { obj.children("a.jstree-loading").removeClass("jstree-loading"); obj.append(d); obj.removeData("jstree_is_loading"); }
+ if(s.clean_node) { this.clean_node(obj); }
+ if(s_call) { s_call.call(this); }
+ }
+ else {
+ if(obj && obj !== -1) {
+ obj.children("a.jstree-loading").removeClass("jstree-loading");
+ obj.removeData("jstree_is_loading");
+ if(s.correct_state) {
+ this.correct_state(obj);
+ if(s_call) { s_call.call(this); }
+ }
+ }
+ else {
+ if(s.correct_state) {
+ this.get_container().children("ul").empty();
+ if(s_call) { s_call.call(this); }
+ }
+ }
+ }
+ }
+ }, this));
+ }, this));
+ break;
+ case (!!s.data && !s.ajax) || (!!s.data && !!s.ajax && (!obj || obj === -1)):
+ if(!obj || obj == -1) {
+ this.parse_xml(s.data, $.proxy(function (d) {
+ if(d) {
+ d = d.replace(/ ?xmlns="[^"]*"/ig, "");
+ if(d.length > 10) {
+ d = $(d);
+ this.get_container().children("ul").empty().append(d.children());
+ if(s.clean_node) { this.clean_node(obj); }
+ if(s_call) { s_call.call(this); }
+ }
+ }
+ else {
+ if(s.correct_state) {
+ this.get_container().children("ul").empty();
+ if(s_call) { s_call.call(this); }
+ }
+ }
+ }, this));
+ }
+ break;
+ case (!s.data && !!s.ajax) || (!!s.data && !!s.ajax && obj && obj !== -1):
+ error_func = function (x, t, e) {
+ var ef = this.get_settings().xml_data.ajax.error;
+ if(ef) { ef.call(this, x, t, e); }
+ if(obj !== -1 && obj.length) {
+ obj.children("a.jstree-loading").removeClass("jstree-loading");
+ obj.removeData("jstree_is_loading");
+ if(t === "success" && s.correct_state) { this.correct_state(obj); }
+ }
+ else {
+ if(t === "success" && s.correct_state) { this.get_container().children("ul").empty(); }
+ }
+ if(e_call) { e_call.call(this); }
+ };
+ success_func = function (d, t, x) {
+ d = x.responseText;
+ var sf = this.get_settings().xml_data.ajax.success;
+ if(sf) { d = sf.call(this,d,t,x) || d; }
+ if(d === "" || (d && d.toString && d.toString().replace(/^[\s\n]+$/,"") === "")) {
+ return error_func.call(this, x, t, "");
+ }
+ this.parse_xml(d, $.proxy(function (d) {
+ if(d) {
+ d = d.replace(/ ?xmlns="[^"]*"/ig, "");
+ if(d.length > 10) {
+ d = $(d);
+ if(obj === -1 || !obj) { this.get_container().children("ul").empty().append(d.children()); }
+ else { obj.children("a.jstree-loading").removeClass("jstree-loading"); obj.append(d); obj.removeData("jstree_is_loading"); }
+ if(s.clean_node) { this.clean_node(obj); }
+ if(s_call) { s_call.call(this); }
+ }
+ else {
+ if(obj && obj !== -1) {
+ obj.children("a.jstree-loading").removeClass("jstree-loading");
+ obj.removeData("jstree_is_loading");
+ if(s.correct_state) {
+ this.correct_state(obj);
+ if(s_call) { s_call.call(this); }
+ }
+ }
+ else {
+ if(s.correct_state) {
+ this.get_container().children("ul").empty();
+ if(s_call) { s_call.call(this); }
+ }
+ }
+ }
+ }
+ }, this));
+ };
+ s.ajax.context = this;
+ s.ajax.error = error_func;
+ s.ajax.success = success_func;
+ if(!s.ajax.dataType) { s.ajax.dataType = "xml"; }
+ if($.isFunction(s.ajax.url)) { s.ajax.url = s.ajax.url.call(this, obj); }
+ if($.isFunction(s.ajax.data)) { s.ajax.data = s.ajax.data.call(this, obj); }
+ $.ajax(s.ajax);
+ break;
+ }
+ },
+ parse_xml : function (xml, callback) {
+ var s = this._get_settings().xml_data;
+ $.vakata.xslt(xml, xsl[s.xsl], callback);
+ },
+ get_xml : function (tp, obj, li_attr, a_attr, is_callback) {
+ var result = "",
+ s = this._get_settings(),
+ _this = this,
+ tmp1, tmp2, li, a, lang;
+ if(!tp) { tp = "flat"; }
+ if(!is_callback) { is_callback = 0; }
+ obj = this._get_node(obj);
+ if(!obj || obj === -1) { obj = this.get_container().find("> ul > li"); }
+ li_attr = $.isArray(li_attr) ? li_attr : [ "id", "class" ];
+ if(!is_callback && this.data.types && $.inArray(s.types.type_attr, li_attr) === -1) { li_attr.push(s.types.type_attr); }
+
+ a_attr = $.isArray(a_attr) ? a_attr : [ ];
+
+ if(!is_callback) {
+ if(s.xml_data.get_include_preamble) {
+ result += '<' + '?xml version="1.0" encoding="UTF-8"?' + '>';
+ }
+ result += "<root>";
+ }
+ obj.each(function () {
+ result += "<item";
+ li = $(this);
+ $.each(li_attr, function (i, v) {
+ var t = li.attr(v);
+ if(!s.xml_data.get_skip_empty || typeof t !== "undefined") {
+ result += " " + v + "=\"" + escape_xml((" " + (t || "")).replace(/ jstree[^ ]*/ig,'').replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,"")) + "\"";
+ }
+ });
+ if(li.hasClass("jstree-open")) { result += " state=\"open\""; }
+ if(li.hasClass("jstree-closed")) { result += " state=\"closed\""; }
+ if(tp === "flat") { result += " parent_id=\"" + escape_xml(is_callback) + "\""; }
+ result += ">";
+ result += "<content>";
+ a = li.children("a");
+ a.each(function () {
+ tmp1 = $(this);
+ lang = false;
+ result += "<name";
+ if($.inArray("languages", s.plugins) !== -1) {
+ $.each(s.languages, function (k, z) {
+ if(tmp1.hasClass(z)) { result += " lang=\"" + escape_xml(z) + "\""; lang = z; return false; }
+ });
+ }
+ if(a_attr.length) {
+ $.each(a_attr, function (k, z) {
+ var t = tmp1.attr(z);
+ if(!s.xml_data.get_skip_empty || typeof t !== "undefined") {
+ result += " " + z + "=\"" + escape_xml((" " + t || "").replace(/ jstree[^ ]*/ig,'').replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,"")) + "\"";
+ }
+ });
+ }
+ if(tmp1.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,'').replace(/^\s+$/ig,"").length) {
+ result += ' icon="' + escape_xml(tmp1.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,'').replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,"")) + '"';
+ }
+ if(tmp1.children("ins").get(0).style.backgroundImage.length) {
+ result += ' icon="' + escape_xml(tmp1.children("ins").get(0).style.backgroundImage.replace("url(","").replace(")","").replace(/'/ig,"").replace(/"/ig,"")) + '"';
+ }
+ result += ">";
+ result += "<![CDATA[" + _this.get_text(tmp1, lang) + "]]>";
+ result += "</name>";
+ });
+ result += "</content>";
+ tmp2 = li[0].id || true;
+ li = li.find("> ul > li");
+ if(li.length) { tmp2 = _this.get_xml(tp, li, li_attr, a_attr, tmp2); }
+ else { tmp2 = ""; }
+ if(tp == "nest") { result += tmp2; }
+ result += "</item>";
+ if(tp == "flat") { result += tmp2; }
+ });
+ if(!is_callback) { result += "</root>"; }
+ return result;
+ }
+ }
+ });
+})(jQuery);
+//*/
+
+/*
+ * jsTree search plugin
+ * Enables both sync and async search on the tree
+ * DOES NOT WORK WITH JSON PROGRESSIVE RENDER
+ */
+(function ($) {
+ if($().jquery.split('.')[1] >= 8) {
+ $.expr[':'].jstree_contains = $.expr.createPseudo(function(search) {
+ return function(a) {
+ return (a.textContent || a.innerText || "").toLowerCase().indexOf(search.toLowerCase())>=0;
+ };
+ });
+ $.expr[':'].jstree_title_contains = $.expr.createPseudo(function(search) {
+ return function(a) {
+ return (a.getAttribute("title") || "").toLowerCase().indexOf(search.toLowerCase())>=0;
+ };
+ });
+ }
+ else {
+ $.expr[':'].jstree_contains = function(a,i,m){
+ return (a.textContent || a.innerText || "").toLowerCase().indexOf(m[3].toLowerCase())>=0;
+ };
+ $.expr[':'].jstree_title_contains = function(a,i,m) {
+ return (a.getAttribute("title") || "").toLowerCase().indexOf(m[3].toLowerCase())>=0;
+ };
+ }
+ $.jstree.plugin("search", {
+ __init : function () {
+ this.data.search.str = "";
+ this.data.search.result = $();
+ if(this._get_settings().search.show_only_matches) {
+ this.get_container()
+ .bind("search.jstree", function (e, data) {
+ $(this).children("ul").find("li").hide().removeClass("jstree-last");
+ data.rslt.nodes.parentsUntil(".jstree").andSelf().show()
+ .filter("ul").each(function () { $(this).children("li:visible").eq(-1).addClass("jstree-last"); });
+ })
+ .bind("clear_search.jstree", function () {
+ $(this).children("ul").find("li").css("display","").end().end().jstree("clean_node", -1);
+ });
+ }
+ },
+ defaults : {
+ ajax : false,
+ search_method : "jstree_contains", // for case insensitive - jstree_contains
+ show_only_matches : false
+ },
+ _fn : {
+ search : function (str, skip_async) {
+ if($.trim(str) === "") { this.clear_search(); return; }
+ var s = this.get_settings().search,
+ t = this,
+ error_func = function () { },
+ success_func = function () { };
+ this.data.search.str = str;
+
+ if(!skip_async && s.ajax !== false && this.get_container_ul().find("li.jstree-closed:not(:has(ul)):eq(0)").length > 0) {
+ this.search.supress_callback = true;
+ error_func = function () { };
+ success_func = function (d, t, x) {
+ var sf = this.get_settings().search.ajax.success;
+ if(sf) { d = sf.call(this,d,t,x) || d; }
+ this.data.search.to_open = d;
+ this._search_open();
+ };
+ s.ajax.context = this;
+ s.ajax.error = error_func;
+ s.ajax.success = success_func;
+ if($.isFunction(s.ajax.url)) { s.ajax.url = s.ajax.url.call(this, str); }
+ if($.isFunction(s.ajax.data)) { s.ajax.data = s.ajax.data.call(this, str); }
+ if(!s.ajax.data) { s.ajax.data = { "search_string" : str }; }
+ if(!s.ajax.dataType || /^json/.exec(s.ajax.dataType)) { s.ajax.dataType = "json"; }
+ $.ajax(s.ajax);
+ return;
+ }
+ if(this.data.search.result.length) { this.clear_search(); }
+ this.data.search.result = this.get_container().find("a" + (this.data.languages ? "." + this.get_lang() : "" ) + ":" + (s.search_method) + "(" + this.data.search.str + ")");
+ this.data.search.result.addClass("jstree-search").parent().parents(".jstree-closed").each(function () {
+ t.open_node(this, false, true);
+ });
+ this.__callback({ nodes : this.data.search.result, str : str });
+ },
+ clear_search : function (str) {
+ this.data.search.result.removeClass("jstree-search");
+ this.__callback(this.data.search.result);
+ this.data.search.result = $();
+ },
+ _search_open : function (is_callback) {
+ var _this = this,
+ done = true,
+ current = [],
+ remaining = [];
+ if(this.data.search.to_open.length) {
+ $.each(this.data.search.to_open, function (i, val) {
+ if(val == "#") { return true; }
+ if($(val).length && $(val).is(".jstree-closed")) { current.push(val); }
+ else { remaining.push(val); }
+ });
+ if(current.length) {
+ this.data.search.to_open = remaining;
+ $.each(current, function (i, val) {
+ _this.open_node(val, function () { _this._search_open(true); });
+ });
+ done = false;
+ }
+ }
+ if(done) { this.search(this.data.search.str, true); }
+ }
+ }
+ });
+})(jQuery);
+//*/
+
+/*
+ * jsTree contextmenu plugin
+ */
+(function ($) {
+ $.vakata.context = {
+ hide_on_mouseleave : false,
+
+ cnt : $("<div id='vakata-contextmenu' />"),
+ vis : false,
+ tgt : false,
+ par : false,
+ func : false,
+ data : false,
+ rtl : false,
+ show : function (s, t, x, y, d, p, rtl) {
+ $.vakata.context.rtl = !!rtl;
+ var html = $.vakata.context.parse(s), h, w;
+ if(!html) { return; }
+ $.vakata.context.vis = true;
+ $.vakata.context.tgt = t;
+ $.vakata.context.par = p || t || null;
+ $.vakata.context.data = d || null;
+ $.vakata.context.cnt
+ .html(html)
+ .css({ "visibility" : "hidden", "display" : "block", "left" : 0, "top" : 0 });
+
+ if($.vakata.context.hide_on_mouseleave) {
+ $.vakata.context.cnt
+ .one("mouseleave", function(e) { $.vakata.context.hide(); });
+ }
+
+ h = $.vakata.context.cnt.height();
+ w = $.vakata.context.cnt.width();
+ if(x + w > $(document).width()) {
+ x = $(document).width() - (w + 5);
+ $.vakata.context.cnt.find("li > ul").addClass("right");
+ }
+ if(y + h > $(document).height()) {
+ y = y - (h + t[0].offsetHeight);
+ $.vakata.context.cnt.find("li > ul").addClass("bottom");
+ }
+
+ $.vakata.context.cnt
+ .css({ "left" : x, "top" : y })
+ .find("li:has(ul)")
+ .bind("mouseenter", function (e) {
+ var w = $(document).width(),
+ h = $(document).height(),
+ ul = $(this).children("ul").show();
+ if(w !== $(document).width()) { ul.toggleClass("right"); }
+ if(h !== $(document).height()) { ul.toggleClass("bottom"); }
+ })
+ .bind("mouseleave", function (e) {
+ $(this).children("ul").hide();
+ })
+ .end()
+ .css({ "visibility" : "visible" })
+ .show();
+ $(document).triggerHandler("context_show.vakata");
+ },
+ hide : function () {
+ $.vakata.context.vis = false;
+ $.vakata.context.cnt.attr("class","").css({ "visibility" : "hidden" });
+ $(document).triggerHandler("context_hide.vakata");
+ },
+ parse : function (s, is_callback) {
+ if(!s) { return false; }
+ var str = "",
+ tmp = false,
+ was_sep = true;
+ if(!is_callback) { $.vakata.context.func = {}; }
+ str += "<ul>";
+ $.each(s, function (i, val) {
+ if(!val) { return true; }
+ $.vakata.context.func[i] = val.action;
+ if(!was_sep && val.separator_before) {
+ str += "<li class='vakata-separator vakata-separator-before'></li>";
+ }
+ was_sep = false;
+ str += "<li class='" + (val._class || "") + (val._disabled ? " jstree-contextmenu-disabled " : "") + "'><ins ";
+ if(val.icon && val.icon.indexOf("/") === -1) { str += " class='" + val.icon + "' "; }
+ if(val.icon && val.icon.indexOf("/") !== -1) { str += " style='background:url(" + val.icon + ") center center no-repeat;' "; }
+ str += "> </ins><a href='#' rel='" + i + "'>";
+ if(val.submenu) {
+ str += "<span style='float:" + ($.vakata.context.rtl ? "left" : "right") + ";'>»</span>";
+ }
+ str += val.label + "</a>";
+ if(val.submenu) {
+ tmp = $.vakata.context.parse(val.submenu, true);
+ if(tmp) { str += tmp; }
+ }
+ str += "</li>";
+ if(val.separator_after) {
+ str += "<li class='vakata-separator vakata-separator-after'></li>";
+ was_sep = true;
+ }
+ });
+ str = str.replace(/<li class\='vakata-separator vakata-separator-after'\><\/li\>$/,"");
+ str += "</ul>";
+ $(document).triggerHandler("context_parse.vakata");
+ return str.length > 10 ? str : false;
+ },
+ exec : function (i) {
+ if($.isFunction($.vakata.context.func[i])) {
+ // if is string - eval and call it!
+ $.vakata.context.func[i].call($.vakata.context.data, $.vakata.context.par);
+ return true;
+ }
+ else { return false; }
+ }
+ };
+ $(function () {
+ var css_string = '' +
+ '#vakata-contextmenu { display:block; visibility:hidden; left:0; top:-200px; position:absolute; margin:0; padding:0; min-width:180px; background:#ebebeb; border:1px solid silver; z-index:10000; *width:180px; } ' +
+ '#vakata-contextmenu ul { min-width:180px; *width:180px; } ' +
+ '#vakata-contextmenu ul, #vakata-contextmenu li { margin:0; padding:0; list-style-type:none; display:block; } ' +
+ '#vakata-contextmenu li { line-height:20px; min-height:20px; position:relative; padding:0px; } ' +
+ '#vakata-contextmenu li a { padding:1px 6px; line-height:17px; display:block; text-decoration:none; margin:1px 1px 0 1px; } ' +
+ '#vakata-contextmenu li ins { float:left; width:16px; height:16px; text-decoration:none; margin-right:2px; } ' +
+ '#vakata-contextmenu li a:hover, #vakata-contextmenu li.vakata-hover > a { background:gray; color:white; } ' +
+ '#vakata-contextmenu li ul { display:none; position:absolute; top:-2px; left:100%; background:#ebebeb; border:1px solid gray; } ' +
+ '#vakata-contextmenu .right { right:100%; left:auto; } ' +
+ '#vakata-contextmenu .bottom { bottom:-1px; top:auto; } ' +
+ '#vakata-contextmenu li.vakata-separator { min-height:0; height:1px; line-height:1px; font-size:1px; overflow:hidden; margin:0 2px; background:silver; /* border-top:1px solid #fefefe; */ padding:0; } ';
+ $.vakata.css.add_sheet({ str : css_string, title : "vakata" });
+ $.vakata.context.cnt
+ .delegate("a","click", function (e) { e.preventDefault(); })
+ .delegate("a","mouseup", function (e) {
+ if(!$(this).parent().hasClass("jstree-contextmenu-disabled") && $.vakata.context.exec($(this).attr("rel"))) {
+ $.vakata.context.hide();
+ }
+ else { $(this).blur(); }
+ })
+ .delegate("a","mouseover", function () {
+ $.vakata.context.cnt.find(".vakata-hover").removeClass("vakata-hover");
+ })
+ .appendTo("body");
+ $(document).bind("mousedown", function (e) { if($.vakata.context.vis && !$.contains($.vakata.context.cnt[0], e.target)) { $.vakata.context.hide(); } });
+ if(typeof $.hotkeys !== "undefined") {
+ $(document)
+ .bind("keydown", "up", function (e) {
+ if($.vakata.context.vis) {
+ var o = $.vakata.context.cnt.find("ul:visible").last().children(".vakata-hover").removeClass("vakata-hover").prevAll("li:not(.vakata-separator)").first();
+ if(!o.length) { o = $.vakata.context.cnt.find("ul:visible").last().children("li:not(.vakata-separator)").last(); }
+ o.addClass("vakata-hover");
+ e.stopImmediatePropagation();
+ e.preventDefault();
+ }
+ })
+ .bind("keydown", "down", function (e) {
+ if($.vakata.context.vis) {
+ var o = $.vakata.context.cnt.find("ul:visible").last().children(".vakata-hover").removeClass("vakata-hover").nextAll("li:not(.vakata-separator)").first();
+ if(!o.length) { o = $.vakata.context.cnt.find("ul:visible").last().children("li:not(.vakata-separator)").first(); }
+ o.addClass("vakata-hover");
+ e.stopImmediatePropagation();
+ e.preventDefault();
+ }
+ })
+ .bind("keydown", "right", function (e) {
+ if($.vakata.context.vis) {
+ $.vakata.context.cnt.find(".vakata-hover").children("ul").show().children("li:not(.vakata-separator)").removeClass("vakata-hover").first().addClass("vakata-hover");
+ e.stopImmediatePropagation();
+ e.preventDefault();
+ }
+ })
+ .bind("keydown", "left", function (e) {
+ if($.vakata.context.vis) {
+ $.vakata.context.cnt.find(".vakata-hover").children("ul").hide().children(".vakata-separator").removeClass("vakata-hover");
+ e.stopImmediatePropagation();
+ e.preventDefault();
+ }
+ })
+ .bind("keydown", "esc", function (e) {
+ $.vakata.context.hide();
+ e.preventDefault();
+ })
+ .bind("keydown", "space", function (e) {
+ $.vakata.context.cnt.find(".vakata-hover").last().children("a").click();
+ e.preventDefault();
+ });
+ }
+ });
+
+ $.jstree.plugin("contextmenu", {
+ __init : function () {
+ this.get_container()
+ .delegate("a", "contextmenu.jstree", $.proxy(function (e) {
+ e.preventDefault();
+ if(!$(e.currentTarget).hasClass("jstree-loading")) {
+ this.show_contextmenu(e.currentTarget, e.pageX, e.pageY);
+ }
+ }, this))
+ .delegate("a", "click.jstree", $.proxy(function (e) {
+ if(this.data.contextmenu) {
+ $.vakata.context.hide();
+ }
+ }, this))
+ .bind("destroy.jstree", $.proxy(function () {
+ // TODO: move this to descruct method
+ if(this.data.contextmenu) {
+ $.vakata.context.hide();
+ }
+ }, this));
+ $(document).bind("context_hide.vakata", $.proxy(function () { this.data.contextmenu = false; }, this));
+ },
+ defaults : {
+ select_node : false, // requires UI plugin
+ show_at_node : true,
+ items : { // Could be a function that should return an object like this one
+ "create" : {
+ "separator_before" : false,
+ "separator_after" : true,
+ "label" : "Create",
+ "action" : function (obj) { this.create(obj); }
+ },
+ "rename" : {
+ "separator_before" : false,
+ "separator_after" : false,
+ "label" : "Rename",
+ "action" : function (obj) { this.rename(obj); }
+ },
+ "remove" : {
+ "separator_before" : false,
+ "icon" : false,
+ "separator_after" : false,
+ "label" : "Delete",
+ "action" : function (obj) { if(this.is_selected(obj)) { this.remove(); } else { this.remove(obj); } }
+ },
+ "ccp" : {
+ "separator_before" : true,
+ "icon" : false,
+ "separator_after" : false,
+ "label" : "Edit",
+ "action" : false,
+ "submenu" : {
+ "cut" : {
+ "separator_before" : false,
+ "separator_after" : false,
+ "label" : "Cut",
+ "action" : function (obj) { this.cut(obj); }
+ },
+ "copy" : {
+ "separator_before" : false,
+ "icon" : false,
+ "separator_after" : false,
+ "label" : "Copy",
+ "action" : function (obj) { this.copy(obj); }
+ },
+ "paste" : {
+ "separator_before" : false,
+ "icon" : false,
+ "separator_after" : false,
+ "label" : "Paste",
+ "action" : function (obj) { this.paste(obj); }
+ }
+ }
+ }
+ }
+ },
+ _fn : {
+ show_contextmenu : function (obj, x, y) {
+ obj = this._get_node(obj);
+ var s = this.get_settings().contextmenu,
+ a = obj.children("a:visible:eq(0)"),
+ o = false,
+ i = false;
+ if(s.select_node && this.data.ui && !this.is_selected(obj)) {
+ this.deselect_all();
+ this.select_node(obj, true);
+ }
+ if(s.show_at_node || typeof x === "undefined" || typeof y === "undefined") {
+ o = a.offset();
+ x = o.left;
+ y = o.top + this.data.core.li_height;
+ }
+ i = obj.data("jstree") && obj.data("jstree").contextmenu ? obj.data("jstree").contextmenu : s.items;
+ if($.isFunction(i)) { i = i.call(this, obj); }
+ this.data.contextmenu = true;
+ $.vakata.context.show(i, a, x, y, this, obj, this._get_settings().core.rtl);
+ if(this.data.themes) { $.vakata.context.cnt.attr("class", "jstree-" + this.data.themes.theme + "-context"); }
+ }
+ }
+ });
+})(jQuery);
+//*/
+
+/*
+ * jsTree types plugin
+ * Adds support types of nodes
+ * You can set an attribute on each li node, that represents its type.
+ * According to the type setting the node may get custom icon/validation rules
+ */
+(function ($) {
+ $.jstree.plugin("types", {
+ __init : function () {
+ var s = this._get_settings().types;
+ this.data.types.attach_to = [];
+ this.get_container()
+ .bind("init.jstree", $.proxy(function () {
+ var types = s.types,
+ attr = s.type_attr,
+ icons_css = "",
+ _this = this;
+
+ $.each(types, function (i, tp) {
+ $.each(tp, function (k, v) {
+ if(!/^(max_depth|max_children|icon|valid_children)$/.test(k)) { _this.data.types.attach_to.push(k); }
+ });
+ if(!tp.icon) { return true; }
+ if( tp.icon.image || tp.icon.position) {
+ if(i == "default") { icons_css += '.jstree-' + _this.get_index() + ' a > .jstree-icon { '; }
+ else { icons_css += '.jstree-' + _this.get_index() + ' li[' + attr + '="' + i + '"] > a > .jstree-icon { '; }
+ if(tp.icon.image) { icons_css += ' background-image:url(' + tp.icon.image + '); '; }
+ if(tp.icon.position){ icons_css += ' background-position:' + tp.icon.position + '; '; }
+ else { icons_css += ' background-position:0 0; '; }
+ icons_css += '} ';
+ }
+ });
+ if(icons_css !== "") { $.vakata.css.add_sheet({ 'str' : icons_css, title : "jstree-types" }); }
+ }, this))
+ .bind("before.jstree", $.proxy(function (e, data) {
+ var s, t,
+ o = this._get_settings().types.use_data ? this._get_node(data.args[0]) : false,
+ d = o && o !== -1 && o.length ? o.data("jstree") : false;
+ if(d && d.types && d.types[data.func] === false) { e.stopImmediatePropagation(); return false; }
+ if($.inArray(data.func, this.data.types.attach_to) !== -1) {
+ if(!data.args[0] || (!data.args[0].tagName && !data.args[0].jquery)) { return; }
+ s = this._get_settings().types.types;
+ t = this._get_type(data.args[0]);
+ if(
+ (
+ (s[t] && typeof s[t][data.func] !== "undefined") ||
+ (s["default"] && typeof s["default"][data.func] !== "undefined")
+ ) && this._check(data.func, data.args[0]) === false
+ ) {
+ e.stopImmediatePropagation();
+ return false;
+ }
+ }
+ }, this));
+ if(is_ie6) {
+ this.get_container()
+ .bind("load_node.jstree set_type.jstree", $.proxy(function (e, data) {
+ var r = data && data.rslt && data.rslt.obj && data.rslt.obj !== -1 ? this._get_node(data.rslt.obj).parent() : this.get_container_ul(),
+ c = false,
+ s = this._get_settings().types;
+ $.each(s.types, function (i, tp) {
+ if(tp.icon && (tp.icon.image || tp.icon.position)) {
+ c = i === "default" ? r.find("li > a > .jstree-icon") : r.find("li[" + s.type_attr + "='" + i + "'] > a > .jstree-icon");
+ if(tp.icon.image) { c.css("backgroundImage","url(" + tp.icon.image + ")"); }
+ c.css("backgroundPosition", tp.icon.position || "0 0");
+ }
+ });
+ }, this));
+ }
+ },
+ defaults : {
+ // defines maximum number of root nodes (-1 means unlimited, -2 means disable max_children checking)
+ max_children : -1,
+ // defines the maximum depth of the tree (-1 means unlimited, -2 means disable max_depth checking)
+ max_depth : -1,
+ // defines valid node types for the root nodes
+ valid_children : "all",
+
+ // whether to use $.data
+ use_data : false,
+ // where is the type stores (the rel attribute of the LI element)
+ type_attr : "rel",
+ // a list of types
+ types : {
+ // the default type
+ "default" : {
+ "max_children" : -1,
+ "max_depth" : -1,
+ "valid_children": "all"
+
+ // Bound functions - you can bind any other function here (using boolean or function)
+ //"select_node" : true
+ }
+ }
+ },
+ _fn : {
+ _types_notify : function (n, data) {
+ if(data.type && this._get_settings().types.use_data) {
+ this.set_type(data.type, n);
+ }
+ },
+ _get_type : function (obj) {
+ obj = this._get_node(obj);
+ return (!obj || !obj.length) ? false : obj.attr(this._get_settings().types.type_attr) || "default";
+ },
+ set_type : function (str, obj) {
+ obj = this._get_node(obj);
+ var ret = (!obj.length || !str) ? false : obj.attr(this._get_settings().types.type_attr, str);
+ if(ret) { this.__callback({ obj : obj, type : str}); }
+ return ret;
+ },
+ _check : function (rule, obj, opts) {
+ obj = this._get_node(obj);
+ var v = false, t = this._get_type(obj), d = 0, _this = this, s = this._get_settings().types, data = false;
+ if(obj === -1) {
+ if(!!s[rule]) { v = s[rule]; }
+ else { return; }
+ }
+ else {
+ if(t === false) { return; }
+ data = s.use_data ? obj.data("jstree") : false;
+ if(data && data.types && typeof data.types[rule] !== "undefined") { v = data.types[rule]; }
+ else if(!!s.types[t] && typeof s.types[t][rule] !== "undefined") { v = s.types[t][rule]; }
+ else if(!!s.types["default"] && typeof s.types["default"][rule] !== "undefined") { v = s.types["default"][rule]; }
+ }
+ if($.isFunction(v)) { v = v.call(this, obj); }
+ if(rule === "max_depth" && obj !== -1 && opts !== false && s.max_depth !== -2 && v !== 0) {
+ // also include the node itself - otherwise if root node it is not checked
+ obj.children("a:eq(0)").parentsUntil(".jstree","li").each(function (i) {
+ // check if current depth already exceeds global tree depth
+ if(s.max_depth !== -1 && s.max_depth - (i + 1) <= 0) { v = 0; return false; }
+ d = (i === 0) ? v : _this._check(rule, this, false);
+ // check if current node max depth is already matched or exceeded
+ if(d !== -1 && d - (i + 1) <= 0) { v = 0; return false; }
+ // otherwise - set the max depth to the current value minus current depth
+ if(d >= 0 && (d - (i + 1) < v || v < 0) ) { v = d - (i + 1); }
+ // if the global tree depth exists and it minus the nodes calculated so far is less than `v` or `v` is unlimited
+ if(s.max_depth >= 0 && (s.max_depth - (i + 1) < v || v < 0) ) { v = s.max_depth - (i + 1); }
+ });
+ }
+ return v;
+ },
+ check_move : function () {
+ if(!this.__call_old()) { return false; }
+ var m = this._get_move(),
+ s = m.rt._get_settings().types,
+ mc = m.rt._check("max_children", m.cr),
+ md = m.rt._check("max_depth", m.cr),
+ vc = m.rt._check("valid_children", m.cr),
+ ch = 0, d = 1, t;
+
+ if(vc === "none") { return false; }
+ if($.isArray(vc) && m.ot && m.ot._get_type) {
+ m.o.each(function () {
+ if($.inArray(m.ot._get_type(this), vc) === -1) { d = false; return false; }
+ });
+ if(d === false) { return false; }
+ }
+ if(s.max_children !== -2 && mc !== -1) {
+ ch = m.cr === -1 ? this.get_container().find("> ul > li").not(m.o).length : m.cr.find("> ul > li").not(m.o).length;
+ if(ch + m.o.length > mc) { return false; }
+ }
+ if(s.max_depth !== -2 && md !== -1) {
+ d = 0;
+ if(md === 0) { return false; }
+ if(typeof m.o.d === "undefined") {
+ // TODO: deal with progressive rendering and async when checking max_depth (how to know the depth of the moved node)
+ t = m.o;
+ while(t.length > 0) {
+ t = t.find("> ul > li");
+ d ++;
+ }
+ m.o.d = d;
+ }
+ if(md - m.o.d < 0) { return false; }
+ }
+ return true;
+ },
+ create_node : function (obj, position, js, callback, is_loaded, skip_check) {
+ if(!skip_check && (is_loaded || this._is_loaded(obj))) {
+ var p = (typeof position == "string" && position.match(/^before|after$/i) && obj !== -1) ? this._get_parent(obj) : this._get_node(obj),
+ s = this._get_settings().types,
+ mc = this._check("max_children", p),
+ md = this._check("max_depth", p),
+ vc = this._check("valid_children", p),
+ ch;
+ if(typeof js === "string") { js = { data : js }; }
+ if(!js) { js = {}; }
+ if(vc === "none") { return false; }
+ if($.isArray(vc)) {
+ if(!js.attr || !js.attr[s.type_attr]) {
+ if(!js.attr) { js.attr = {}; }
+ js.attr[s.type_attr] = vc[0];
+ }
+ else {
+ if($.inArray(js.attr[s.type_attr], vc) === -1) { return false; }
+ }
+ }
+ if(s.max_children !== -2 && mc !== -1) {
+ ch = p === -1 ? this.get_container().find("> ul > li").length : p.find("> ul > li").length;
+ if(ch + 1 > mc) { return false; }
+ }
+ if(s.max_depth !== -2 && md !== -1 && (md - 1) < 0) { return false; }
+ }
+ return this.__call_old(true, obj, position, js, callback, is_loaded, skip_check);
+ }
+ }
+ });
+})(jQuery);
+//*/
+
+/*
+ * jsTree HTML plugin
+ * The HTML data store. Datastores are build by replacing the `load_node` and `_is_loaded` functions.
+ */
+(function ($) {
+ $.jstree.plugin("html_data", {
+ __init : function () {
+ // this used to use html() and clean the whitespace, but this way any attached data was lost
+ this.data.html_data.original_container_html = this.get_container().find(" > ul > li").clone(true);
+ // remove white space from LI node - otherwise nodes appear a bit to the right
+ this.data.html_data.original_container_html.find("li").andSelf().contents().filter(function() { return this.nodeType == 3; }).remove();
+ },
+ defaults : {
+ data : false,
+ ajax : false,
+ correct_state : true
+ },
+ _fn : {
+ load_node : function (obj, s_call, e_call) { var _this = this; this.load_node_html(obj, function () { _this.__callback({ "obj" : _this._get_node(obj) }); s_call.call(this); }, e_call); },
+ _is_loaded : function (obj) {
+ obj = this._get_node(obj);
+ return obj == -1 || !obj || (!this._get_settings().html_data.ajax && !$.isFunction(this._get_settings().html_data.data)) || obj.is(".jstree-open, .jstree-leaf") || obj.children("ul").children("li").size() > 0;
+ },
+ load_node_html : function (obj, s_call, e_call) {
+ var d,
+ s = this.get_settings().html_data,
+ error_func = function () {},
+ success_func = function () {};
+ obj = this._get_node(obj);
+ if(obj && obj !== -1) {
+ if(obj.data("jstree_is_loading")) { return; }
+ else { obj.data("jstree_is_loading",true); }
+ }
+ switch(!0) {
+ case ($.isFunction(s.data)):
+ s.data.call(this, obj, $.proxy(function (d) {
+ if(d && d !== "" && d.toString && d.toString().replace(/^[\s\n]+$/,"") !== "") {
+ d = $(d);
+ if(!d.is("ul")) { d = $("<ul />").append(d); }
+ if(obj == -1 || !obj) { this.get_container().children("ul").empty().append(d.children()).find("li, a").filter(function () { return !this.firstChild || !this.firstChild.tagName || this.firstChild.tagName !== "INS"; }).prepend("<ins class='jstree-icon'> </ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"); }
+ else { obj.children("a.jstree-loading").removeClass("jstree-loading"); obj.append(d).children("ul").find("li, a").filter(function () { return !this.firstChild || !this.firstChild.tagName || this.firstChild.tagName !== "INS"; }).prepend("<ins class='jstree-icon'> </ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"); obj.removeData("jstree_is_loading"); }
+ this.clean_node(obj);
+ if(s_call) { s_call.call(this); }
+ }
+ else {
+ if(obj && obj !== -1) {
+ obj.children("a.jstree-loading").removeClass("jstree-loading");
+ obj.removeData("jstree_is_loading");
+ if(s.correct_state) {
+ this.correct_state(obj);
+ if(s_call) { s_call.call(this); }
+ }
+ }
+ else {
+ if(s.correct_state) {
+ this.get_container().children("ul").empty();
+ if(s_call) { s_call.call(this); }
+ }
+ }
+ }
+ }, this));
+ break;
+ case (!s.data && !s.ajax):
+ if(!obj || obj == -1) {
+ this.get_container()
+ .children("ul").empty()
+ .append(this.data.html_data.original_container_html)
+ .find("li, a").filter(function () { return !this.firstChild || !this.firstChild.tagName || this.firstChild.tagName !== "INS"; }).prepend("<ins class='jstree-icon'> </ins>").end()
+ .filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");
+ this.clean_node();
+ }
+ if(s_call) { s_call.call(this); }
+ break;
+ case (!!s.data && !s.ajax) || (!!s.data && !!s.ajax && (!obj || obj === -1)):
+ if(!obj || obj == -1) {
+ d = $(s.data);
+ if(!d.is("ul")) { d = $("<ul />").append(d); }
+ this.get_container()
+ .children("ul").empty().append(d.children())
+ .find("li, a").filter(function () { return !this.firstChild || !this.firstChild.tagName || this.firstChild.tagName !== "INS"; }).prepend("<ins class='jstree-icon'> </ins>").end()
+ .filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");
+ this.clean_node();
+ }
+ if(s_call) { s_call.call(this); }
+ break;
+ case (!s.data && !!s.ajax) || (!!s.data && !!s.ajax && obj && obj !== -1):
+ obj = this._get_node(obj);
+ error_func = function (x, t, e) {
+ var ef = this.get_settings().html_data.ajax.error;
+ if(ef) { ef.call(this, x, t, e); }
+ if(obj != -1 && obj.length) {
+ obj.children("a.jstree-loading").removeClass("jstree-loading");
+ obj.removeData("jstree_is_loading");
+ if(t === "success" && s.correct_state) { this.correct_state(obj); }
+ }
+ else {
+ if(t === "success" && s.correct_state) { this.get_container().children("ul").empty(); }
+ }
+ if(e_call) { e_call.call(this); }
+ };
+ success_func = function (d, t, x) {
+ var sf = this.get_settings().html_data.ajax.success;
+ if(sf) { d = sf.call(this,d,t,x) || d; }
+ if(d === "" || (d && d.toString && d.toString().replace(/^[\s\n]+$/,"") === "")) {
+ return error_func.call(this, x, t, "");
+ }
+ if(d) {
+ d = $(d);
+ if(!d.is("ul")) { d = $("<ul />").append(d); }
+ if(obj == -1 || !obj) { this.get_container().children("ul").empty().append(d.children()).find("li, a").filter(function () { return !this.firstChild || !this.firstChild.tagName || this.firstChild.tagName !== "INS"; }).prepend("<ins class='jstree-icon'> </ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"); }
+ else { obj.children("a.jstree-loading").removeClass("jstree-loading"); obj.append(d).children("ul").find("li, a").filter(function () { return !this.firstChild || !this.firstChild.tagName || this.firstChild.tagName !== "INS"; }).prepend("<ins class='jstree-icon'> </ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"); obj.removeData("jstree_is_loading"); }
+ this.clean_node(obj);
+ if(s_call) { s_call.call(this); }
+ }
+ else {
+ if(obj && obj !== -1) {
+ obj.children("a.jstree-loading").removeClass("jstree-loading");
+ obj.removeData("jstree_is_loading");
+ if(s.correct_state) {
+ this.correct_state(obj);
+ if(s_call) { s_call.call(this); }
+ }
+ }
+ else {
+ if(s.correct_state) {
+ this.get_container().children("ul").empty();
+ if(s_call) { s_call.call(this); }
+ }
+ }
+ }
+ };
+ s.ajax.context = this;
+ s.ajax.error = error_func;
+ s.ajax.success = success_func;
+ if(!s.ajax.dataType) { s.ajax.dataType = "html"; }
+ if($.isFunction(s.ajax.url)) { s.ajax.url = s.ajax.url.call(this, obj); }
+ if($.isFunction(s.ajax.data)) { s.ajax.data = s.ajax.data.call(this, obj); }
+ $.ajax(s.ajax);
+ break;
+ }
+ }
+ }
+ });
+ // include the HTML data plugin by default
+ $.jstree.defaults.plugins.push("html_data");
+})(jQuery);
+//*/
+
+/*
+ * jsTree themeroller plugin
+ * Adds support for jQuery UI themes. Include this at the end of your plugins list, also make sure "themes" is not included.
+ */
+(function ($) {
+ $.jstree.plugin("themeroller", {
+ __init : function () {
+ var s = this._get_settings().themeroller;
+ this.get_container()
+ .addClass("ui-widget-content")
+ .addClass("jstree-themeroller")
+ .delegate("a","mouseenter.jstree", function (e) {
+ if(!$(e.currentTarget).hasClass("jstree-loading")) {
+ $(this).addClass(s.item_h);
+ }
+ })
+ .delegate("a","mouseleave.jstree", function () {
+ $(this).removeClass(s.item_h);
+ })
+ .bind("init.jstree", $.proxy(function (e, data) {
+ data.inst.get_container().find("> ul > li > .jstree-loading > ins").addClass("ui-icon-refresh");
+ this._themeroller(data.inst.get_container().find("> ul > li"));
+ }, this))
+ .bind("open_node.jstree create_node.jstree", $.proxy(function (e, data) {
+ this._themeroller(data.rslt.obj);
+ }, this))
+ .bind("loaded.jstree refresh.jstree", $.proxy(function (e) {
+ this._themeroller();
+ }, this))
+ .bind("close_node.jstree", $.proxy(function (e, data) {
+ this._themeroller(data.rslt.obj);
+ }, this))
+ .bind("delete_node.jstree", $.proxy(function (e, data) {
+ this._themeroller(data.rslt.parent);
+ }, this))
+ .bind("correct_state.jstree", $.proxy(function (e, data) {
+ data.rslt.obj
+ .children("ins.jstree-icon").removeClass(s.opened + " " + s.closed + " ui-icon").end()
+ .find("> a > ins.ui-icon")
+ .filter(function() {
+ return this.className.toString()
+ .replace(s.item_clsd,"").replace(s.item_open,"").replace(s.item_leaf,"")
+ .indexOf("ui-icon-") === -1;
+ }).removeClass(s.item_open + " " + s.item_clsd).addClass(s.item_leaf || "jstree-no-icon");
+ }, this))
+ .bind("select_node.jstree", $.proxy(function (e, data) {
+ data.rslt.obj.children("a").addClass(s.item_a);
+ }, this))
+ .bind("deselect_node.jstree deselect_all.jstree", $.proxy(function (e, data) {
+ this.get_container()
+ .find("a." + s.item_a).removeClass(s.item_a).end()
+ .find("a.jstree-clicked").addClass(s.item_a);
+ }, this))
+ .bind("dehover_node.jstree", $.proxy(function (e, data) {
+ data.rslt.obj.children("a").removeClass(s.item_h);
+ }, this))
+ .bind("hover_node.jstree", $.proxy(function (e, data) {
+ this.get_container()
+ .find("a." + s.item_h).not(data.rslt.obj).removeClass(s.item_h);
+ data.rslt.obj.children("a").addClass(s.item_h);
+ }, this))
+ .bind("move_node.jstree", $.proxy(function (e, data) {
+ this._themeroller(data.rslt.o);
+ this._themeroller(data.rslt.op);
+ }, this));
+ },
+ __destroy : function () {
+ var s = this._get_settings().themeroller,
+ c = [ "ui-icon" ];
+ $.each(s, function (i, v) {
+ v = v.split(" ");
+ if(v.length) { c = c.concat(v); }
+ });
+ this.get_container()
+ .removeClass("ui-widget-content")
+ .find("." + c.join(", .")).removeClass(c.join(" "));
+ },
+ _fn : {
+ _themeroller : function (obj) {
+ var s = this._get_settings().themeroller;
+ obj = (!obj || obj == -1) ? this.get_container_ul() : this._get_node(obj);
+ obj = (!obj || obj == -1) ? this.get_container_ul() : obj.parent();
+ obj
+ .find("li.jstree-closed")
+ .children("ins.jstree-icon").removeClass(s.opened).addClass("ui-icon " + s.closed).end()
+ .children("a").addClass(s.item)
+ .children("ins.jstree-icon").addClass("ui-icon")
+ .filter(function() {
+ return this.className.toString()
+ .replace(s.item_clsd,"").replace(s.item_open,"").replace(s.item_leaf,"")
+ .indexOf("ui-icon-") === -1;
+ }).removeClass(s.item_leaf + " " + s.item_open).addClass(s.item_clsd || "jstree-no-icon")
+ .end()
+ .end()
+ .end()
+ .end()
+ .find("li.jstree-open")
+ .children("ins.jstree-icon").removeClass(s.closed).addClass("ui-icon " + s.opened).end()
+ .children("a").addClass(s.item)
+ .children("ins.jstree-icon").addClass("ui-icon")
+ .filter(function() {
+ return this.className.toString()
+ .replace(s.item_clsd,"").replace(s.item_open,"").replace(s.item_leaf,"")
+ .indexOf("ui-icon-") === -1;
+ }).removeClass(s.item_leaf + " " + s.item_clsd).addClass(s.item_open || "jstree-no-icon")
+ .end()
+ .end()
+ .end()
+ .end()
+ .find("li.jstree-leaf")
+ .children("ins.jstree-icon").removeClass(s.closed + " ui-icon " + s.opened).end()
+ .children("a").addClass(s.item)
+ .children("ins.jstree-icon").addClass("ui-icon")
+ .filter(function() {
+ return this.className.toString()
+ .replace(s.item_clsd,"").replace(s.item_open,"").replace(s.item_leaf,"")
+ .indexOf("ui-icon-") === -1;
+ }).removeClass(s.item_clsd + " " + s.item_open).addClass(s.item_leaf || "jstree-no-icon");
+ }
+ },
+ defaults : {
+ "opened" : "ui-icon-triangle-1-se",
+ "closed" : "ui-icon-triangle-1-e",
+ "item" : "ui-state-default",
+ "item_h" : "ui-state-hover",
+ "item_a" : "ui-state-active",
+ "item_open" : "ui-icon-folder-open",
+ "item_clsd" : "ui-icon-folder-collapsed",
+ "item_leaf" : "ui-icon-document"
+ }
+ });
+ $(function() {
+ var css_string = '' +
+ '.jstree-themeroller .ui-icon { overflow:visible; } ' +
+ '.jstree-themeroller a { padding:0 2px; } ' +
+ '.jstree-themeroller .jstree-no-icon { display:none; }';
+ $.vakata.css.add_sheet({ str : css_string, title : "jstree" });
+ });
+})(jQuery);
+//*/
+
+/*
+ * jsTree unique plugin
+ * Forces different names amongst siblings (still a bit experimental)
+ * NOTE: does not check language versions (it will not be possible to have nodes with the same title, even in different languages)
+ */
+(function ($) {
+ $.jstree.plugin("unique", {
+ __init : function () {
+ this.get_container()
+ .bind("before.jstree", $.proxy(function (e, data) {
+ var nms = [], res = true, p, t;
+ if(data.func == "move_node") {
+ // obj, ref, position, is_copy, is_prepared, skip_check
+ if(data.args[4] === true) {
+ if(data.args[0].o && data.args[0].o.length) {
+ data.args[0].o.children("a").each(function () { nms.push($(this).text().replace(/^\s+/g,"")); });
+ res = this._check_unique(nms, data.args[0].np.find("> ul > li").not(data.args[0].o), "move_node");
+ }
+ }
+ }
+ if(data.func == "create_node") {
+ // obj, position, js, callback, is_loaded
+ if(data.args[4] || this._is_loaded(data.args[0])) {
+ p = this._get_node(data.args[0]);
+ if(data.args[1] && (data.args[1] === "before" || data.args[1] === "after")) {
+ p = this._get_parent(data.args[0]);
+ if(!p || p === -1) { p = this.get_container(); }
+ }
+ if(typeof data.args[2] === "string") { nms.push(data.args[2]); }
+ else if(!data.args[2] || !data.args[2].data) { nms.push(this._get_string("new_node")); }
+ else { nms.push(data.args[2].data); }
+ res = this._check_unique(nms, p.find("> ul > li"), "create_node");
+ }
+ }
+ if(data.func == "rename_node") {
+ // obj, val
+ nms.push(data.args[1]);
+ t = this._get_node(data.args[0]);
+ p = this._get_parent(t);
+ if(!p || p === -1) { p = this.get_container(); }
+ res = this._check_unique(nms, p.find("> ul > li").not(t), "rename_node");
+ }
+ if(!res) {
+ e.stopPropagation();
+ return false;
+ }
+ }, this));
+ },
+ defaults : {
+ error_callback : $.noop
+ },
+ _fn : {
+ _check_unique : function (nms, p, func) {
+ var cnms = [], ok = true;
+ p.children("a").each(function () { cnms.push($(this).text().replace(/^\s+/g,"")); });
+ if(!cnms.length || !nms.length) { return true; }
+ $.each(nms, function (i, v) {
+ if($.inArray(v, cnms) !== -1) {
+ ok = false;
+ return false;
+ }
+ });
+ if(!ok) {
+ this._get_settings().unique.error_callback.call(null, nms, p, func);
+ }
+ return ok;
+ },
+ check_move : function () {
+ if(!this.__call_old()) { return false; }
+ var p = this._get_move(), nms = [];
+ if(p.o && p.o.length) {
+ p.o.children("a").each(function () { nms.push($(this).text().replace(/^\s+/g,"")); });
+ return this._check_unique(nms, p.np.find("> ul > li").not(p.o), "check_move");
+ }
+ return true;
+ }
+ }
+ });
+})(jQuery);
+//*/
+
+/*
+ * jsTree wholerow plugin
+ * Makes select and hover work on the entire width of the node
+ * MAY BE HEAVY IN LARGE DOM
+ */
+(function ($) {
+ $.jstree.plugin("wholerow", {
+ __init : function () {
+ if(!this.data.ui) { throw "jsTree wholerow: jsTree UI plugin not included."; }
+ this.data.wholerow.html = false;
+ this.data.wholerow.to = false;
+ this.get_container()
+ .bind("init.jstree", $.proxy(function (e, data) {
+ this._get_settings().core.animation = 0;
+ }, this))
+ .bind("open_node.jstree create_node.jstree clean_node.jstree loaded.jstree", $.proxy(function (e, data) {
+ this._prepare_wholerow_span( data && data.rslt && data.rslt.obj ? data.rslt.obj : -1 );
+ }, this))
+ .bind("search.jstree clear_search.jstree reopen.jstree after_open.jstree after_close.jstree create_node.jstree delete_node.jstree clean_node.jstree", $.proxy(function (e, data) {
+ if(this.data.to) { clearTimeout(this.data.to); }
+ this.data.to = setTimeout( (function (t, o) { return function() { t._prepare_wholerow_ul(o); }; })(this, data && data.rslt && data.rslt.obj ? data.rslt.obj : -1), 0);
+ }, this))
+ .bind("deselect_all.jstree", $.proxy(function (e, data) {
+ this.get_container().find(" > .jstree-wholerow .jstree-clicked").removeClass("jstree-clicked " + (this.data.themeroller ? this._get_settings().themeroller.item_a : "" ));
+ }, this))
+ .bind("select_node.jstree deselect_node.jstree ", $.proxy(function (e, data) {
+ data.rslt.obj.each(function () {
+ var ref = data.inst.get_container().find(" > .jstree-wholerow li:visible:eq(" + ( parseInt((($(this).offset().top - data.inst.get_container().offset().top + data.inst.get_container()[0].scrollTop) / data.inst.data.core.li_height),10)) + ")");
+ // ref.children("a")[e.type === "select_node" ? "addClass" : "removeClass"]("jstree-clicked");
+ ref.children("a").attr("class",data.rslt.obj.children("a").attr("class"));
+ });
+ }, this))
+ .bind("hover_node.jstree dehover_node.jstree", $.proxy(function (e, data) {
+ this.get_container().find(" > .jstree-wholerow .jstree-hovered").removeClass("jstree-hovered " + (this.data.themeroller ? this._get_settings().themeroller.item_h : "" ));
+ if(e.type === "hover_node") {
+ var ref = this.get_container().find(" > .jstree-wholerow li:visible:eq(" + ( parseInt(((data.rslt.obj.offset().top - this.get_container().offset().top + this.get_container()[0].scrollTop) / this.data.core.li_height),10)) + ")");
+ // ref.children("a").addClass("jstree-hovered");
+ ref.children("a").attr("class",data.rslt.obj.children(".jstree-hovered").attr("class"));
+ }
+ }, this))
+ .delegate(".jstree-wholerow-span, ins.jstree-icon, li", "click.jstree", function (e) {
+ var n = $(e.currentTarget);
+ if(e.target.tagName === "A" || (e.target.tagName === "INS" && n.closest("li").is(".jstree-open, .jstree-closed"))) { return; }
+ n.closest("li").children("a:visible:eq(0)").click();
+ e.stopImmediatePropagation();
+ })
+ .delegate("li", "mouseover.jstree", $.proxy(function (e) {
+ e.stopImmediatePropagation();
+ if($(e.currentTarget).children(".jstree-hovered, .jstree-clicked").length) { return false; }
+ this.hover_node(e.currentTarget);
+ return false;
+ }, this))
+ .delegate("li", "mouseleave.jstree", $.proxy(function (e) {
+ if($(e.currentTarget).children("a").hasClass("jstree-hovered").length) { return; }
+ this.dehover_node(e.currentTarget);
+ }, this));
+ if(is_ie7 || is_ie6) {
+ $.vakata.css.add_sheet({ str : ".jstree-" + this.get_index() + " { position:relative; } ", title : "jstree" });
+ }
+ },
+ defaults : {
+ },
+ __destroy : function () {
+ this.get_container().children(".jstree-wholerow").remove();
+ this.get_container().find(".jstree-wholerow-span").remove();
+ },
+ _fn : {
+ _prepare_wholerow_span : function (obj) {
+ obj = !obj || obj == -1 ? this.get_container().find("> ul > li") : this._get_node(obj);
+ if(obj === false) { return; } // added for removing root nodes
+ obj.each(function () {
+ $(this).find("li").andSelf().each(function () {
+ var $t = $(this);
+ if($t.children(".jstree-wholerow-span").length) { return true; }
+ $t.prepend("<span class='jstree-wholerow-span' style='width:" + ($t.parentsUntil(".jstree","li").length * 18) + "px;'> </span>");
+ });
+ });
+ },
+ _prepare_wholerow_ul : function () {
+ var o = this.get_container().children("ul").eq(0), h = o.html();
+ o.addClass("jstree-wholerow-real");
+ if(this.data.wholerow.last_html !== h) {
+ this.data.wholerow.last_html = h;
+ this.get_container().children(".jstree-wholerow").remove();
+ this.get_container().append(
+ o.clone().removeClass("jstree-wholerow-real")
+ .wrapAll("<div class='jstree-wholerow' />").parent()
+ .width(o.parent()[0].scrollWidth)
+ .css("top", (o.height() + ( is_ie7 ? 5 : 0)) * -1 )
+ .find("li[id]").each(function () { this.removeAttribute("id"); }).end()
+ );
+ }
+ }
+ }
+ });
+ $(function() {
+ var css_string = '' +
+ '.jstree .jstree-wholerow-real { position:relative; z-index:1; } ' +
+ '.jstree .jstree-wholerow-real li { cursor:pointer; } ' +
+ '.jstree .jstree-wholerow-real a { border-left-color:transparent !important; border-right-color:transparent !important; } ' +
+ '.jstree .jstree-wholerow { position:relative; z-index:0; height:0; } ' +
+ '.jstree .jstree-wholerow ul, .jstree .jstree-wholerow li { width:100%; } ' +
+ '.jstree .jstree-wholerow, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li, .jstree .jstree-wholerow a { margin:0 !important; padding:0 !important; } ' +
+ '.jstree .jstree-wholerow, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li { background:transparent !important; }' +
+ '.jstree .jstree-wholerow ins, .jstree .jstree-wholerow span, .jstree .jstree-wholerow input { display:none !important; }' +
+ '.jstree .jstree-wholerow a, .jstree .jstree-wholerow a:hover { text-indent:-9999px; !important; width:100%; padding:0 !important; border-right-width:0px !important; border-left-width:0px !important; } ' +
+ '.jstree .jstree-wholerow-span { position:absolute; left:0; margin:0px; padding:0; height:18px; border-width:0; padding:0; z-index:0; }';
+ if(is_ff2) {
+ css_string += '' +
+ '.jstree .jstree-wholerow a { display:block; height:18px; margin:0; padding:0; border:0; } ' +
+ '.jstree .jstree-wholerow-real a { border-color:transparent !important; } ';
+ }
+ if(is_ie7 || is_ie6) {
+ css_string += '' +
+ '.jstree .jstree-wholerow, .jstree .jstree-wholerow li, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow a { margin:0; padding:0; line-height:18px; } ' +
+ '.jstree .jstree-wholerow a { display:block; height:18px; line-height:18px; overflow:hidden; } ';
+ }
+ $.vakata.css.add_sheet({ str : css_string, title : "jstree" });
+ });
+})(jQuery);
+//*/
+
+/*
+* jsTree model plugin
+* This plugin gets jstree to use a class model to retrieve data, creating great dynamism
+*/
+(function ($) {
+ var nodeInterface = ["getChildren","getChildrenCount","getAttr","getName","getProps"],
+ validateInterface = function(obj, inter) {
+ var valid = true;
+ obj = obj || {};
+ inter = [].concat(inter);
+ $.each(inter, function (i, v) {
+ if(!$.isFunction(obj[v])) { valid = false; return false; }
+ });
+ return valid;
+ };
+ $.jstree.plugin("model", {
+ __init : function () {
+ if(!this.data.json_data) { throw "jsTree model: jsTree json_data plugin not included."; }
+ this._get_settings().json_data.data = function (n, b) {
+ var obj = (n == -1) ? this._get_settings().model.object : n.data("jstree_model");
+ if(!validateInterface(obj, nodeInterface)) { return b.call(null, false); }
+ if(this._get_settings().model.async) {
+ obj.getChildren($.proxy(function (data) {
+ this.model_done(data, b);
+ }, this));
+ }
+ else {
+ this.model_done(obj.getChildren(), b);
+ }
+ };
+ },
+ defaults : {
+ object : false,
+ id_prefix : false,
+ async : false
+ },
+ _fn : {
+ model_done : function (data, callback) {
+ var ret = [],
+ s = this._get_settings(),
+ _this = this;
+
+ if(!$.isArray(data)) { data = [data]; }
+ $.each(data, function (i, nd) {
+ var r = nd.getProps() || {};
+ r.attr = nd.getAttr() || {};
+ if(nd.getChildrenCount()) { r.state = "closed"; }
+ r.data = nd.getName();
+ if(!$.isArray(r.data)) { r.data = [r.data]; }
+ if(_this.data.types && $.isFunction(nd.getType)) {
+ r.attr[s.types.type_attr] = nd.getType();
+ }
+ if(r.attr.id && s.model.id_prefix) { r.attr.id = s.model.id_prefix + r.attr.id; }
+ if(!r.metadata) { r.metadata = { }; }
+ r.metadata.jstree_model = nd;
+ ret.push(r);
+ });
+ callback.call(null, ret);
+ }
+ }
+ });
+})(jQuery);
+//*/
+
+})();
\ No newline at end of file
Added: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/apple/bg.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/apple/bg.jpg
___________________________________________________________________
Added: svn:mime-type
+ image/jpeg
Added: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/apple/d.png
===================================================================
(Binary files differ)
Property changes on: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/apple/d.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/apple/dot_for_ie.gif
===================================================================
(Binary files differ)
Property changes on: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/apple/dot_for_ie.gif
___________________________________________________________________
Added: svn:mime-type
+ image/gif
Added: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/apple/style.css
===================================================================
--- trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/apple/style.css (rev 0)
+++ trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/apple/style.css 2013-01-16 17:14:36 UTC (rev 17)
@@ -0,0 +1,61 @@
+/*
+ * jsTree apple theme 1.0
+ * Supported features: dots/no-dots, icons/no-icons, focused, loading
+ * Supported plugins: ui (hovered, clicked), checkbox, contextmenu, search
+ */
+
+.jstree-apple > ul { background:url("bg.jpg") left top repeat; }
+.jstree-apple li,
+.jstree-apple ins { background-image:url("d.png"); background-repeat:no-repeat; background-color:transparent; }
+.jstree-apple li { background-position:-90px 0; background-repeat:repeat-y; }
+.jstree-apple li.jstree-last { background:transparent; }
+.jstree-apple .jstree-open > ins { background-position:-72px 0; }
+.jstree-apple .jstree-closed > ins { background-position:-54px 0; }
+.jstree-apple .jstree-leaf > ins { background-position:-36px 0; }
+
+.jstree-apple a { border-radius:4px; -moz-border-radius:4px; -webkit-border-radius:4px; text-shadow:1px 1px 1px white; }
+.jstree-apple .jstree-hovered { background:#e7f4f9; border:1px solid #d8f0fa; padding:0 3px 0 1px; text-shadow:1px 1px 1px silver; }
+.jstree-apple .jstree-clicked { background:#beebff; border:1px solid #99defd; padding:0 3px 0 1px; }
+.jstree-apple a .jstree-icon { background-position:-56px -20px; }
+.jstree-apple a.jstree-loading .jstree-icon { background:url("throbber.gif") center center no-repeat !important; }
+
+.jstree-apple.jstree-focused { background:white; }
+
+.jstree-apple .jstree-no-dots li,
+.jstree-apple .jstree-no-dots .jstree-leaf > ins { background:transparent; }
+.jstree-apple .jstree-no-dots .jstree-open > ins { background-position:-18px 0; }
+.jstree-apple .jstree-no-dots .jstree-closed > ins { background-position:0 0; }
+
+.jstree-apple .jstree-no-icons a .jstree-icon { display:none; }
+
+.jstree-apple .jstree-search { font-style:italic; }
+
+.jstree-apple .jstree-no-icons .jstree-checkbox { display:inline-block; }
+.jstree-apple .jstree-no-checkboxes .jstree-checkbox { display:none !important; }
+.jstree-apple .jstree-checked > a > .jstree-checkbox { background-position:-38px -19px; }
+.jstree-apple .jstree-unchecked > a > .jstree-checkbox { background-position:-2px -19px; }
+.jstree-apple .jstree-undetermined > a > .jstree-checkbox { background-position:-20px -19px; }
+.jstree-apple .jstree-checked > a > .checkbox:hover { background-position:-38px -37px; }
+.jstree-apple .jstree-unchecked > a > .jstree-checkbox:hover { background-position:-2px -37px; }
+.jstree-apple .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-20px -37px; }
+
+#vakata-dragged.jstree-apple ins { background:transparent !important; }
+#vakata-dragged.jstree-apple .jstree-ok { background:url("d.png") -2px -53px no-repeat !important; }
+#vakata-dragged.jstree-apple .jstree-invalid { background:url("d.png") -18px -53px no-repeat !important; }
+#jstree-marker.jstree-apple { background:url("d.png") -41px -57px no-repeat !important; text-indent:-100px; }
+
+.jstree-apple a.jstree-search { color:aqua; }
+.jstree-apple .jstree-locked a { color:silver; cursor:default; }
+
+#vakata-contextmenu.jstree-apple-context,
+#vakata-contextmenu.jstree-apple-context li ul { background:#f0f0f0; border:1px solid #979797; -moz-box-shadow: 1px 1px 2px #999; -webkit-box-shadow: 1px 1px 2px #999; box-shadow: 1px 1px 2px #999; }
+#vakata-contextmenu.jstree-apple-context li { }
+#vakata-contextmenu.jstree-apple-context a { color:black; }
+#vakata-contextmenu.jstree-apple-context a:hover,
+#vakata-contextmenu.jstree-apple-context .vakata-hover > a { padding:0 5px; background:#e8eff7; border:1px solid #aecff7; color:black; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; }
+#vakata-contextmenu.jstree-apple-context li.jstree-contextmenu-disabled a,
+#vakata-contextmenu.jstree-apple-context li.jstree-contextmenu-disabled a:hover { color:silver; background:transparent; border:0; padding:1px 4px; }
+#vakata-contextmenu.jstree-apple-context li.vakata-separator { background:white; border-top:1px solid #e0e0e0; margin:0; }
+#vakata-contextmenu.jstree-apple-context li ul { margin-left:-4px; }
+
+/* TODO: IE6 support - the `>` selectors */
\ No newline at end of file
Added: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/apple/throbber.gif
===================================================================
(Binary files differ)
Property changes on: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/apple/throbber.gif
___________________________________________________________________
Added: svn:mime-type
+ image/gif
Added: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/classic/d.gif
===================================================================
(Binary files differ)
Property changes on: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/classic/d.gif
___________________________________________________________________
Added: svn:mime-type
+ image/gif
Added: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/classic/d.png
===================================================================
(Binary files differ)
Property changes on: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/classic/d.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/classic/dot_for_ie.gif
===================================================================
(Binary files differ)
Property changes on: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/classic/dot_for_ie.gif
___________________________________________________________________
Added: svn:mime-type
+ image/gif
Added: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/classic/style.css
===================================================================
--- trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/classic/style.css (rev 0)
+++ trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/classic/style.css 2013-01-16 17:14:36 UTC (rev 17)
@@ -0,0 +1,77 @@
+/*
+ * jsTree classic theme 1.0
+ * Supported features: dots/no-dots, icons/no-icons, focused, loading
+ * Supported plugins: ui (hovered, clicked), checkbox, contextmenu, search
+ */
+
+.jstree-classic li,
+.jstree-classic ins { background-image:url("d.png"); background-repeat:no-repeat; background-color:transparent; }
+.jstree-classic li { background-position:-90px 0; background-repeat:repeat-y; }
+.jstree-classic li.jstree-last { background:transparent; }
+.jstree-classic .jstree-open > ins { background-position:-72px 0; }
+.jstree-classic .jstree-closed > ins { background-position:-54px 0; }
+.jstree-classic .jstree-leaf > ins { background-position:-36px 0; }
+
+.jstree-classic .jstree-hovered { background:#e7f4f9; border:1px solid #e7f4f9; padding:0 2px 0 1px; }
+.jstree-classic .jstree-clicked { background:navy; border:1px solid navy; padding:0 2px 0 1px; color:white; }
+.jstree-classic a .jstree-icon { background-position:-56px -19px; }
+.jstree-classic .jstree-open > a .jstree-icon { background-position:-56px -36px; }
+.jstree-classic a.jstree-loading .jstree-icon { background:url("throbber.gif") center center no-repeat !important; }
+
+.jstree-classic.jstree-focused { background:white; }
+
+.jstree-classic .jstree-no-dots li,
+.jstree-classic .jstree-no-dots .jstree-leaf > ins { background:transparent; }
+.jstree-classic .jstree-no-dots .jstree-open > ins { background-position:-18px 0; }
+.jstree-classic .jstree-no-dots .jstree-closed > ins { background-position:0 0; }
+
+.jstree-classic .jstree-no-icons a .jstree-icon { display:none; }
+
+.jstree-classic .jstree-search { font-style:italic; }
+
+.jstree-classic .jstree-no-icons .jstree-checkbox { display:inline-block; }
+.jstree-classic .jstree-no-checkboxes .jstree-checkbox { display:none !important; }
+.jstree-classic .jstree-checked > a > .jstree-checkbox { background-position:-38px -19px; }
+.jstree-classic .jstree-unchecked > a > .jstree-checkbox { background-position:-2px -19px; }
+.jstree-classic .jstree-undetermined > a > .jstree-checkbox { background-position:-20px -19px; }
+.jstree-classic .jstree-checked > a > .jstree-checkbox:hover { background-position:-38px -37px; }
+.jstree-classic .jstree-unchecked > a > .jstree-checkbox:hover { background-position:-2px -37px; }
+.jstree-classic .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-20px -37px; }
+
+#vakata-dragged.jstree-classic ins { background:transparent !important; }
+#vakata-dragged.jstree-classic .jstree-ok { background:url("d.png") -2px -53px no-repeat !important; }
+#vakata-dragged.jstree-classic .jstree-invalid { background:url("d.png") -18px -53px no-repeat !important; }
+#jstree-marker.jstree-classic { background:url("d.png") -41px -57px no-repeat !important; text-indent:-100px; }
+
+.jstree-classic a.jstree-search { color:aqua; }
+.jstree-classic .jstree-locked a { color:silver; cursor:default; }
+
+#vakata-contextmenu.jstree-classic-context,
+#vakata-contextmenu.jstree-classic-context li ul { background:#f0f0f0; border:1px solid #979797; -moz-box-shadow: 1px 1px 2px #999; -webkit-box-shadow: 1px 1px 2px #999; box-shadow: 1px 1px 2px #999; }
+#vakata-contextmenu.jstree-classic-context li { }
+#vakata-contextmenu.jstree-classic-context a { color:black; }
+#vakata-contextmenu.jstree-classic-context a:hover,
+#vakata-contextmenu.jstree-classic-context .vakata-hover > a { padding:0 5px; background:#e8eff7; border:1px solid #aecff7; color:black; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; }
+#vakata-contextmenu.jstree-classic-context li.jstree-contextmenu-disabled a,
+#vakata-contextmenu.jstree-classic-context li.jstree-contextmenu-disabled a:hover { color:silver; background:transparent; border:0; padding:1px 4px; }
+#vakata-contextmenu.jstree-classic-context li.vakata-separator { background:white; border-top:1px solid #e0e0e0; margin:0; }
+#vakata-contextmenu.jstree-classic-context li ul { margin-left:-4px; }
+
+/* IE6 BEGIN */
+.jstree-classic li,
+.jstree-classic ins,
+#vakata-dragged.jstree-classic .jstree-invalid,
+#vakata-dragged.jstree-classic .jstree-ok,
+#jstree-marker.jstree-classic { _background-image:url("d.gif"); }
+.jstree-classic .jstree-open ins { _background-position:-72px 0; }
+.jstree-classic .jstree-closed ins { _background-position:-54px 0; }
+.jstree-classic .jstree-leaf ins { _background-position:-36px 0; }
+.jstree-classic .jstree-open a ins.jstree-icon { _background-position:-56px -36px; }
+.jstree-classic .jstree-closed a ins.jstree-icon { _background-position:-56px -19px; }
+.jstree-classic .jstree-leaf a ins.jstree-icon { _background-position:-56px -19px; }
+#vakata-contextmenu.jstree-classic-context ins { _display:none; }
+#vakata-contextmenu.jstree-classic-context li { _zoom:1; }
+.jstree-classic .jstree-undetermined a .jstree-checkbox { _background-position:-20px -19px; }
+.jstree-classic .jstree-checked a .jstree-checkbox { _background-position:-38px -19px; }
+.jstree-classic .jstree-unchecked a .jstree-checkbox { _background-position:-2px -19px; }
+/* IE6 END */
\ No newline at end of file
Added: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/classic/throbber.gif
===================================================================
(Binary files differ)
Property changes on: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/classic/throbber.gif
___________________________________________________________________
Added: svn:mime-type
+ image/gif
Added: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/default/d.gif
===================================================================
(Binary files differ)
Property changes on: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/default/d.gif
___________________________________________________________________
Added: svn:mime-type
+ image/gif
Added: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/default/d.png
===================================================================
(Binary files differ)
Property changes on: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/default/d.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/default/style.css
===================================================================
--- trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/default/style.css (rev 0)
+++ trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/default/style.css 2013-01-16 17:14:36 UTC (rev 17)
@@ -0,0 +1,74 @@
+/*
+ * jsTree default theme 1.0
+ * Supported features: dots/no-dots, icons/no-icons, focused, loading
+ * Supported plugins: ui (hovered, clicked), checkbox, contextmenu, search
+ */
+
+.jstree-default li,
+.jstree-default ins { background-image:url("d.png"); background-repeat:no-repeat; background-color:transparent; }
+.jstree-default li { background-position:-90px 0; background-repeat:repeat-y; }
+.jstree-default li.jstree-last { background:transparent; }
+.jstree-default .jstree-open > ins { background-position:-72px 0; }
+.jstree-default .jstree-closed > ins { background-position:-54px 0; }
+.jstree-default .jstree-leaf > ins { background-position:-36px 0; }
+
+.jstree-default .jstree-hovered { background:#e7f4f9; border:1px solid #d8f0fa; padding:0 2px 0 1px; }
+.jstree-default .jstree-clicked { background:#beebff; border:1px solid #99defd; padding:0 2px 0 1px; }
+.jstree-default a .jstree-icon { background-position:-56px -19px; }
+.jstree-default a.jstree-loading .jstree-icon { background:url("throbber.gif") center center no-repeat !important; }
+
+.jstree-default.jstree-focused { background:#ffffee; }
+
+.jstree-default .jstree-no-dots li,
+.jstree-default .jstree-no-dots .jstree-leaf > ins { background:transparent; }
+.jstree-default .jstree-no-dots .jstree-open > ins { background-position:-18px 0; }
+.jstree-default .jstree-no-dots .jstree-closed > ins { background-position:0 0; }
+
+.jstree-default .jstree-no-icons a .jstree-icon { display:none; }
+
+.jstree-default .jstree-search { font-style:italic; }
+
+.jstree-default .jstree-no-icons .jstree-checkbox { display:inline-block; }
+.jstree-default .jstree-no-checkboxes .jstree-checkbox { display:none !important; }
+.jstree-default .jstree-checked > a > .jstree-checkbox { background-position:-38px -19px; }
+.jstree-default .jstree-unchecked > a > .jstree-checkbox { background-position:-2px -19px; }
+.jstree-default .jstree-undetermined > a > .jstree-checkbox { background-position:-20px -19px; }
+.jstree-default .jstree-checked > a > .jstree-checkbox:hover { background-position:-38px -37px; }
+.jstree-default .jstree-unchecked > a > .jstree-checkbox:hover { background-position:-2px -37px; }
+.jstree-default .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-20px -37px; }
+
+#vakata-dragged.jstree-default ins { background:transparent !important; }
+#vakata-dragged.jstree-default .jstree-ok { background:url("d.png") -2px -53px no-repeat !important; }
+#vakata-dragged.jstree-default .jstree-invalid { background:url("d.png") -18px -53px no-repeat !important; }
+#jstree-marker.jstree-default { background:url("d.png") -41px -57px no-repeat !important; text-indent:-100px; }
+
+.jstree-default a.jstree-search { color:aqua; }
+.jstree-default .jstree-locked a { color:silver; cursor:default; }
+
+#vakata-contextmenu.jstree-default-context,
+#vakata-contextmenu.jstree-default-context li ul { background:#f0f0f0; border:1px solid #979797; -moz-box-shadow: 1px 1px 2px #999; -webkit-box-shadow: 1px 1px 2px #999; box-shadow: 1px 1px 2px #999; }
+#vakata-contextmenu.jstree-default-context li { }
+#vakata-contextmenu.jstree-default-context a { color:black; }
+#vakata-contextmenu.jstree-default-context a:hover,
+#vakata-contextmenu.jstree-default-context .vakata-hover > a { padding:0 5px; background:#e8eff7; border:1px solid #aecff7; color:black; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; }
+#vakata-contextmenu.jstree-default-context li.jstree-contextmenu-disabled a,
+#vakata-contextmenu.jstree-default-context li.jstree-contextmenu-disabled a:hover { color:silver; background:transparent; border:0; padding:1px 4px; }
+#vakata-contextmenu.jstree-default-context li.vakata-separator { background:white; border-top:1px solid #e0e0e0; margin:0; }
+#vakata-contextmenu.jstree-default-context li ul { margin-left:-4px; }
+
+/* IE6 BEGIN */
+.jstree-default li,
+.jstree-default ins,
+#vakata-dragged.jstree-default .jstree-invalid,
+#vakata-dragged.jstree-default .jstree-ok,
+#jstree-marker.jstree-default { _background-image:url("d.gif"); }
+.jstree-default .jstree-open ins { _background-position:-72px 0; }
+.jstree-default .jstree-closed ins { _background-position:-54px 0; }
+.jstree-default .jstree-leaf ins { _background-position:-36px 0; }
+.jstree-default a ins.jstree-icon { _background-position:-56px -19px; }
+#vakata-contextmenu.jstree-default-context ins { _display:none; }
+#vakata-contextmenu.jstree-default-context li { _zoom:1; }
+.jstree-default .jstree-undetermined a .jstree-checkbox { _background-position:-20px -19px; }
+.jstree-default .jstree-checked a .jstree-checkbox { _background-position:-38px -19px; }
+.jstree-default .jstree-unchecked a .jstree-checkbox { _background-position:-2px -19px; }
+/* IE6 END */
\ No newline at end of file
Added: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/default/throbber.gif
===================================================================
(Binary files differ)
Property changes on: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/default/throbber.gif
___________________________________________________________________
Added: svn:mime-type
+ image/gif
Added: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/default-rtl/d.gif
===================================================================
(Binary files differ)
Property changes on: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/default-rtl/d.gif
___________________________________________________________________
Added: svn:mime-type
+ image/gif
Added: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/default-rtl/d.png
===================================================================
(Binary files differ)
Property changes on: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/default-rtl/d.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/default-rtl/dots.gif
===================================================================
(Binary files differ)
Property changes on: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/default-rtl/dots.gif
___________________________________________________________________
Added: svn:mime-type
+ image/gif
Added: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/default-rtl/style.css
===================================================================
--- trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/default-rtl/style.css (rev 0)
+++ trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/default-rtl/style.css 2013-01-16 17:14:36 UTC (rev 17)
@@ -0,0 +1,84 @@
+/*
+ * jsTree default-rtl theme 1.0
+ * Supported features: dots/no-dots, icons/no-icons, focused, loading
+ * Supported plugins: ui (hovered, clicked), checkbox, contextmenu, search
+ */
+
+.jstree-default-rtl li,
+.jstree-default-rtl ins { background-image:url("d.png"); background-repeat:no-repeat; background-color:transparent; }
+.jstree-default-rtl li { background-position:-90px 0; background-repeat:repeat-y; }
+.jstree-default-rtl li.jstree-last { background:transparent; }
+.jstree-default-rtl .jstree-open > ins { background-position:-72px 0; }
+.jstree-default-rtl .jstree-closed > ins { background-position:-54px 0; }
+.jstree-default-rtl .jstree-leaf > ins { background-position:-36px 0; }
+
+.jstree-default-rtl .jstree-hovered { background:#e7f4f9; border:1px solid #d8f0fa; padding:0 2px 0 1px; }
+.jstree-default-rtl .jstree-clicked { background:#beebff; border:1px solid #99defd; padding:0 2px 0 1px; }
+.jstree-default-rtl a .jstree-icon { background-position:-56px -19px; }
+.jstree-default-rtl a.jstree-loading .jstree-icon { background:url("throbber.gif") center center no-repeat !important; }
+
+.jstree-default-rtl.jstree-focused { background:#ffffee; }
+
+.jstree-default-rtl .jstree-no-dots li,
+.jstree-default-rtl .jstree-no-dots .jstree-leaf > ins { background:transparent; }
+.jstree-default-rtl .jstree-no-dots .jstree-open > ins { background-position:-18px 0; }
+.jstree-default-rtl .jstree-no-dots .jstree-closed > ins { background-position:0 0; }
+
+.jstree-default-rtl .jstree-no-icons a .jstree-icon { display:none; }
+
+.jstree-default-rtl .jstree-search { font-style:italic; }
+
+.jstree-default-rtl .jstree-no-icons .jstree-checkbox { display:inline-block; }
+.jstree-default-rtl .jstree-no-checkboxes .jstree-checkbox { display:none !important; }
+.jstree-default-rtl .jstree-checked > a > .jstree-checkbox { background-position:-38px -19px; }
+.jstree-default-rtl .jstree-unchecked > a > .jstree-checkbox { background-position:-2px -19px; }
+.jstree-default-rtl .jstree-undetermined > a > .jstree-checkbox { background-position:-20px -19px; }
+.jstree-default-rtl .jstree-checked > a > .jstree-checkbox:hover { background-position:-38px -37px; }
+.jstree-default-rtl .jstree-unchecked > a > .jstree-checkbox:hover { background-position:-2px -37px; }
+.jstree-default-rtl .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-20px -37px; }
+
+#vakata-dragged.jstree-default-rtl ins { background:transparent !important; }
+#vakata-dragged.jstree-default-rtl .jstree-ok { background:url("d.png") -2px -53px no-repeat !important; }
+#vakata-dragged.jstree-default-rtl .jstree-invalid { background:url("d.png") -18px -53px no-repeat !important; }
+#jstree-marker.jstree-default-rtl { background:url("d.png") -41px -57px no-repeat !important; text-indent:-100px; }
+
+.jstree-default-rtl a.jstree-search { color:aqua; }
+.jstree-default-rtl .jstree-locked a { color:silver; cursor:default; }
+
+#vakata-contextmenu.jstree-default-rtl-context,
+#vakata-contextmenu.jstree-default-rtl-context li ul { background:#f0f0f0; border:1px solid #979797; -moz-box-shadow: 1px 1px 2px #999; -webkit-box-shadow: 1px 1px 2px #999; box-shadow: 1px 1px 2px #999; }
+#vakata-contextmenu.jstree-default-rtl-context li { }
+#vakata-contextmenu.jstree-default-rtl-context a { color:black; }
+#vakata-contextmenu.jstree-default-rtl-context a:hover,
+#vakata-contextmenu.jstree-default-rtl-context .vakata-hover > a { padding:0 5px; background:#e8eff7; border:1px solid #aecff7; color:black; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; }
+#vakata-contextmenu.jstree-default-rtl-context li.jstree-contextmenu-disabled a,
+#vakata-contextmenu.jstree-default-rtl-context li.jstree-contextmenu-disabled a:hover { color:silver; background:transparent; border:0; padding:1px 4px; }
+#vakata-contextmenu.jstree-default-rtl-context li.vakata-separator { background:white; border-top:1px solid #e0e0e0; margin:0; }
+#vakata-contextmenu.jstree-default-rtl-context li ul { margin-left:-4px; }
+
+/* IE6 BEGIN */
+.jstree-default-rtl li,
+.jstree-default-rtl ins,
+#vakata-dragged.jstree-default-rtl .jstree-invalid,
+#vakata-dragged.jstree-default-rtl .jstree-ok,
+#jstree-marker.jstree-default-rtl { _background-image:url("d.gif"); }
+.jstree-default-rtl .jstree-open ins { _background-position:-72px 0; }
+.jstree-default-rtl .jstree-closed ins { _background-position:-54px 0; }
+.jstree-default-rtl .jstree-leaf ins { _background-position:-36px 0; }
+.jstree-default-rtl a ins.jstree-icon { _background-position:-56px -19px; }
+#vakata-contextmenu.jstree-default-rtl-context ins { _display:none; }
+#vakata-contextmenu.jstree-default-rtl-context li { _zoom:1; }
+.jstree-default-rtl .jstree-undetermined a .jstree-checkbox { _background-position:-18px -19px; }
+.jstree-default-rtl .jstree-checked a .jstree-checkbox { _background-position:-36px -19px; }
+.jstree-default-rtl .jstree-unchecked a .jstree-checkbox { _background-position:0px -19px; }
+/* IE6 END */
+
+/* RTL part */
+.jstree-default-rtl .jstree-hovered, .jstree-default-rtl .jstree-clicked { padding:0 1px 0 2px; }
+.jstree-default-rtl li { background-image:url("dots.gif"); background-position: 100% 0px; }
+.jstree-default-rtl .jstree-checked > a > .jstree-checkbox { background-position:-36px -19px; margin-left:2px; }
+.jstree-default-rtl .jstree-unchecked > a > .jstree-checkbox { background-position:0px -19px; margin-left:2px; }
+.jstree-default-rtl .jstree-undetermined > a > .jstree-checkbox { background-position:-18px -19px; margin-left:2px; }
+.jstree-default-rtl .jstree-checked > a > .jstree-checkbox:hover { background-position:-36px -37px; }
+.jstree-default-rtl .jstree-unchecked > a > .jstree-checkbox:hover { background-position:0px -37px; }
+.jstree-default-rtl .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-18px -37px; }
\ No newline at end of file
Added: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/default-rtl/throbber.gif
===================================================================
(Binary files differ)
Property changes on: trunk/nuiton-js-jstree/src/main/resources/nuiton-js-jstree/themes/default-rtl/throbber.gif
___________________________________________________________________
Added: svn:mime-type
+ image/gif
Added: trunk/nuiton-js-jstree/src/site/rst/index.rst
===================================================================
--- trunk/nuiton-js-jstree/src/site/rst/index.rst (rev 0)
+++ trunk/nuiton-js-jstree/src/site/rst/index.rst 2013-01-16 17:14:36 UTC (rev 17)
@@ -0,0 +1,9 @@
+Utilisation
+===========
+
+::
+
+ <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+
+ <link rel="stylesheet" type="text/css" href="<c:url value="/nuiton-js/jstree.css"/>" />
+ <script language="javascript" type="text/javascript" src="<c:url value="/nuiton-js/jstree.js"/>"></script>
Added: trunk/nuiton-js-jstree/src/site/site_fr.xml
===================================================================
--- trunk/nuiton-js-jstree/src/site/site_fr.xml (rev 0)
+++ trunk/nuiton-js-jstree/src/site/site_fr.xml 2013-01-16 17:14:36 UTC (rev 17)
@@ -0,0 +1,49 @@
+<project name="${project.name}">
+
+ <bannerLeft>
+ <src alt="NuitonJS">logo.jpg</src>
+ <name>${project.name}</name>
+ <href>index.html</href>
+ </bannerLeft>
+
+ <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>
+
+ <menu ref="parent"/>
+
+ <menu name="Utilisateurs">
+ <item name="Accueil" href="index.html"/>
+ </menu>
+
+ <menu ref="reports"/>
+
+ <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>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2013-01-15 20:37:13 UTC (rev 16)
+++ trunk/pom.xml 2013-01-16 17:14:36 UTC (rev 17)
@@ -23,6 +23,7 @@
<module>nuiton-js-jquery-ui</module>
<module>nuiton-js-jqplot</module>
<module>nuiton-js-bootstrap</module>
+ <module>nuiton-js-jstree</module>
</modules>
<dependencyManagement>
1
0
r16 - in trunk/nuiton-js-jquery-ui/src: main/resources/META-INF/nuiton-js site/rst
by bpoussin@users.nuiton.org 15 Jan '13
by bpoussin@users.nuiton.org 15 Jan '13
15 Jan '13
Author: bpoussin
Date: 2013-01-15 21:37:13 +0100 (Tue, 15 Jan 2013)
New Revision: 16
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/16
Log:
suppression du mot datepicker dans les groupes de langue
Modified:
trunk/nuiton-js-jquery-ui/src/main/resources/META-INF/nuiton-js/wro-jquery-ui.xml
trunk/nuiton-js-jquery-ui/src/site/rst/index.rst
Modified: trunk/nuiton-js-jquery-ui/src/main/resources/META-INF/nuiton-js/wro-jquery-ui.xml
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/META-INF/nuiton-js/wro-jquery-ui.xml 2013-01-15 20:28:34 UTC (rev 15)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/META-INF/nuiton-js/wro-jquery-ui.xml 2013-01-15 20:37:13 UTC (rev 16)
@@ -128,275 +128,275 @@
<css>classpath:nuiton-js-jquery-ui/i18n/jquery-ui-i18n.js</css>
</group>
- <group name='jquery-ui-datepicker-af'>
+ <group name='jquery-ui-af'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-af.js</css>
</group>
- <group name='jquery-ui-datepicker-ar-DZ'>
+ <group name='jquery-ui-ar-DZ'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-ar-DZ.js</css>
</group>
- <group name='jquery-ui-datepicker-ar'>
+ <group name='jquery-ui-ar'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-ar.js</css>
</group>
- <group name='jquery-ui-datepicker-az'>
+ <group name='jquery-ui-az'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-az.js</css>
</group>
- <group name='jquery-ui-datepicker-bg'>
+ <group name='jquery-ui-bg'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-bg.js</css>
</group>
- <group name='jquery-ui-datepicker-bs'>
+ <group name='jquery-ui-bs'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-bs.js</css>
</group>
- <group name='jquery-ui-datepicker-ca'>
+ <group name='jquery-ui-ca'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-ca.js</css>
</group>
- <group name='jquery-ui-datepicker-cs'>
+ <group name='jquery-ui-cs'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-cs.js</css>
</group>
- <group name='jquery-ui-datepicker-cy-GB'>
+ <group name='jquery-ui-cy-GB'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-cy-GB.js</css>
</group>
- <group name='jquery-ui-datepicker-da'>
+ <group name='jquery-ui-da'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-da.js</css>
</group>
- <group name='jquery-ui-datepicker-de'>
+ <group name='jquery-ui-de'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-de.js</css>
</group>
- <group name='jquery-ui-datepicker-el'>
+ <group name='jquery-ui-el'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-el.js</css>
</group>
- <group name='jquery-ui-datepicker-en-AU'>
+ <group name='jquery-ui-en-AU'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-en-AU.js</css>
</group>
- <group name='jquery-ui-datepicker-en-GB'>
+ <group name='jquery-ui-en-GB'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-en-GB.js</css>
</group>
- <group name='jquery-ui-datepicker-en-NZ'>
+ <group name='jquery-ui-en-NZ'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-en-NZ.js</css>
</group>
- <group name='jquery-ui-datepicker-eo'>
+ <group name='jquery-ui-eo'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-eo.js</css>
</group>
- <group name='jquery-ui-datepicker-es'>
+ <group name='jquery-ui-es'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-es.js</css>
</group>
- <group name='jquery-ui-datepicker-et'>
+ <group name='jquery-ui-et'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-et.js</css>
</group>
- <group name='jquery-ui-datepicker-eu'>
+ <group name='jquery-ui-eu'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-eu.js</css>
</group>
- <group name='jquery-ui-datepicker-fa'>
+ <group name='jquery-ui-fa'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-fa.js</css>
</group>
- <group name='jquery-ui-datepicker-fi'>
+ <group name='jquery-ui-fi'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-fi.js</css>
</group>
- <group name='jquery-ui-datepicker-fo'>
+ <group name='jquery-ui-fo'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-fo.js</css>
</group>
- <group name='jquery-ui-datepicker-fr-CH'>
+ <group name='jquery-ui-fr-CH'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-fr-CH.js</css>
</group>
- <group name='jquery-ui-datepicker-fr'>
+ <group name='jquery-ui-fr'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-fr.js</css>
</group>
- <group name='jquery-ui-datepicker-gl'>
+ <group name='jquery-ui-gl'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-gl.js</css>
</group>
- <group name='jquery-ui-datepicker-he'>
+ <group name='jquery-ui-he'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-he.js</css>
</group>
- <group name='jquery-ui-datepicker-hi'>
+ <group name='jquery-ui-hi'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-hi.js</css>
</group>
- <group name='jquery-ui-datepicker-hr'>
+ <group name='jquery-ui-hr'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-hr.js</css>
</group>
- <group name='jquery-ui-datepicker-hu'>
+ <group name='jquery-ui-hu'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-hu.js</css>
</group>
- <group name='jquery-ui-datepicker-hy'>
+ <group name='jquery-ui-hy'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-hy.js</css>
</group>
- <group name='jquery-ui-datepicker-id'>
+ <group name='jquery-ui-id'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-id.js</css>
</group>
- <group name='jquery-ui-datepicker-is'>
+ <group name='jquery-ui-is'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-is.js</css>
</group>
- <group name='jquery-ui-datepicker-it'>
+ <group name='jquery-ui-it'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-it.js</css>
</group>
- <group name='jquery-ui-datepicker-ja'>
+ <group name='jquery-ui-ja'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-ja.js</css>
</group>
- <group name='jquery-ui-datepicker-ka'>
+ <group name='jquery-ui-ka'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-ka.js</css>
</group>
- <group name='jquery-ui-datepicker-kk'>
+ <group name='jquery-ui-kk'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-kk.js</css>
</group>
- <group name='jquery-ui-datepicker-km'>
+ <group name='jquery-ui-km'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-km.js</css>
</group>
- <group name='jquery-ui-datepicker-ko'>
+ <group name='jquery-ui-ko'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-ko.js</css>
</group>
- <group name='jquery-ui-datepicker-lb'>
+ <group name='jquery-ui-lb'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-lb.js</css>
</group>
- <group name='jquery-ui-datepicker-lt'>
+ <group name='jquery-ui-lt'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-lt.js</css>
</group>
- <group name='jquery-ui-datepicker-lv'>
+ <group name='jquery-ui-lv'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-lv.js</css>
</group>
- <group name='jquery-ui-datepicker-mk'>
+ <group name='jquery-ui-mk'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-mk.js</css>
</group>
- <group name='jquery-ui-datepicker-ml'>
+ <group name='jquery-ui-ml'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-ml.js</css>
</group>
- <group name='jquery-ui-datepicker-ms'>
+ <group name='jquery-ui-ms'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-ms.js</css>
</group>
- <group name='jquery-ui-datepicker-nl-BE'>
+ <group name='jquery-ui-nl-BE'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-nl-BE.js</css>
</group>
- <group name='jquery-ui-datepicker-nl'>
+ <group name='jquery-ui-nl'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-nl.js</css>
</group>
- <group name='jquery-ui-datepicker-no'>
+ <group name='jquery-ui-no'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-no.js</css>
</group>
- <group name='jquery-ui-datepicker-pl'>
+ <group name='jquery-ui-pl'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-pl.js</css>
</group>
- <group name='jquery-ui-datepicker-pt-BR'>
+ <group name='jquery-ui-pt-BR'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-pt-BR.js</css>
</group>
- <group name='jquery-ui-datepicker-pt'>
+ <group name='jquery-ui-pt'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-pt.js</css>
</group>
- <group name='jquery-ui-datepicker-rm'>
+ <group name='jquery-ui-rm'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-rm.js</css>
</group>
- <group name='jquery-ui-datepicker-ro'>
+ <group name='jquery-ui-ro'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-ro.js</css>
</group>
- <group name='jquery-ui-datepicker-ru'>
+ <group name='jquery-ui-ru'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-ru.js</css>
</group>
- <group name='jquery-ui-datepicker-sk'>
+ <group name='jquery-ui-sk'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-sk.js</css>
</group>
- <group name='jquery-ui-datepicker-sl'>
+ <group name='jquery-ui-sl'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-sl.js</css>
</group>
- <group name='jquery-ui-datepicker-sq'>
+ <group name='jquery-ui-sq'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-sq.js</css>
</group>
- <group name='jquery-ui-datepicker-sr-SR'>
+ <group name='jquery-ui-sr-SR'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-sr-SR.js</css>
</group>
- <group name='jquery-ui-datepicker-sr'>
+ <group name='jquery-ui-sr'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-sr.js</css>
</group>
- <group name='jquery-ui-datepicker-sv'>
+ <group name='jquery-ui-sv'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-sv.js</css>
</group>
- <group name='jquery-ui-datepicker-ta'>
+ <group name='jquery-ui-ta'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-ta.js</css>
</group>
- <group name='jquery-ui-datepicker-th'>
+ <group name='jquery-ui-th'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-th.js</css>
</group>
- <group name='jquery-ui-datepicker-tj'>
+ <group name='jquery-ui-tj'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-tj.js</css>
</group>
- <group name='jquery-ui-datepicker-tr'>
+ <group name='jquery-ui-tr'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-tr.js</css>
</group>
- <group name='jquery-ui-datepicker-uk'>
+ <group name='jquery-ui-uk'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-uk.js</css>
</group>
- <group name='jquery-ui-datepicker-vi'>
+ <group name='jquery-ui-vi'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-vi.js</css>
</group>
- <group name='jquery-ui-datepicker-zh-CN'>
+ <group name='jquery-ui-zh-CN'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-zh-CN.js</css>
</group>
- <group name='jquery-ui-datepicker-zh-HK'>
+ <group name='jquery-ui-zh-HK'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-zh-HK.js</css>
</group>
- <group name='jquery-ui-datepicker-zh-TW'>
+ <group name='jquery-ui-zh-TW'>
<css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-zh-TW.js</css>
</group>
Modified: trunk/nuiton-js-jquery-ui/src/site/rst/index.rst
===================================================================
--- trunk/nuiton-js-jquery-ui/src/site/rst/index.rst 2013-01-15 20:28:34 UTC (rev 15)
+++ trunk/nuiton-js-jquery-ui/src/site/rst/index.rst 2013-01-15 20:37:13 UTC (rev 16)
@@ -14,75 +14,75 @@
- jquery-ui-only : jquery-ui
- jquery-ui: jquery et query-ui
-- jquery-ui-i18n: datepicker specifique i18n (toutes les langues)
-- jquery-ui-datepicker-af: datepicker specifique i18n
-- jquery-ui-datepicker-ar-DZ: datepicker specifique i18n
-- jquery-ui-datepicker-ar: datepicker specifique i18n
-- jquery-ui-datepicker-az: datepicker specifique i18n
-- jquery-ui-datepicker-bg: datepicker specifique i18n
-- jquery-ui-datepicker-bs: datepicker specifique i18n
-- jquery-ui-datepicker-ca: datepicker specifique i18n
-- jquery-ui-datepicker-cs: datepicker specifique i18n
-- jquery-ui-datepicker-cy-GB: datepicker specifique i18n
-- jquery-ui-datepicker-da: datepicker specifique i18n
-- jquery-ui-datepicker-de: datepicker specifique i18n
-- jquery-ui-datepicker-el: datepicker specifique i18n
-- jquery-ui-datepicker-en-AU: datepicker specifique i18n
-- jquery-ui-datepicker-en-GB: datepicker specifique i18n
-- jquery-ui-datepicker-en-NZ: datepicker specifique i18n
-- jquery-ui-datepicker-eo: datepicker specifique i18n
-- jquery-ui-datepicker-es: datepicker specifique i18n
-- jquery-ui-datepicker-et: datepicker specifique i18n
-- jquery-ui-datepicker-eu: datepicker specifique i18n
-- jquery-ui-datepicker-fa: datepicker specifique i18n
-- jquery-ui-datepicker-fi: datepicker specifique i18n
-- jquery-ui-datepicker-fo: datepicker specifique i18n
-- jquery-ui-datepicker-fr-CH: datepicker specifique i18n
-- jquery-ui-datepicker-fr: datepicker specifique i18n
-- jquery-ui-datepicker-gl: datepicker specifique i18n
-- jquery-ui-datepicker-he: datepicker specifique i18n
-- jquery-ui-datepicker-hi: datepicker specifique i18n
-- jquery-ui-datepicker-hr: datepicker specifique i18n
-- jquery-ui-datepicker-hu: datepicker specifique i18n
-- jquery-ui-datepicker-hy: datepicker specifique i18n
-- jquery-ui-datepicker-id: datepicker specifique i18n
-- jquery-ui-datepicker-is: datepicker specifique i18n
-- jquery-ui-datepicker-it: datepicker specifique i18n
-- jquery-ui-datepicker-ja: datepicker specifique i18n
-- jquery-ui-datepicker-ka: datepicker specifique i18n
-- jquery-ui-datepicker-kk: datepicker specifique i18n
-- jquery-ui-datepicker-km: datepicker specifique i18n
-- jquery-ui-datepicker-ko: datepicker specifique i18n
-- jquery-ui-datepicker-lb: datepicker specifique i18n
-- jquery-ui-datepicker-lt: datepicker specifique i18n
-- jquery-ui-datepicker-lv: datepicker specifique i18n
-- jquery-ui-datepicker-mk: datepicker specifique i18n
-- jquery-ui-datepicker-ml: datepicker specifique i18n
-- jquery-ui-datepicker-ms: datepicker specifique i18n
-- jquery-ui-datepicker-nl-BE: datepicker specifique i18n
-- jquery-ui-datepicker-nl: datepicker specifique i18n
-- jquery-ui-datepicker-no: datepicker specifique i18n
-- jquery-ui-datepicker-pl: datepicker specifique i18n
-- jquery-ui-datepicker-pt-BR: datepicker specifique i18n
-- jquery-ui-datepicker-pt: datepicker specifique i18n
-- jquery-ui-datepicker-rm: datepicker specifique i18n
-- jquery-ui-datepicker-ro: datepicker specifique i18n
-- jquery-ui-datepicker-ru: datepicker specifique i18n
-- jquery-ui-datepicker-sk: datepicker specifique i18n
-- jquery-ui-datepicker-sl: datepicker specifique i18n
-- jquery-ui-datepicker-sq: datepicker specifique i18n
-- jquery-ui-datepicker-sr-SR: datepicker specifique i18n
-- jquery-ui-datepicker-sr: datepicker specifique i18n
-- jquery-ui-datepicker-sv: datepicker specifique i18n
-- jquery-ui-datepicker-ta: datepicker specifique i18n
-- jquery-ui-datepicker-th: datepicker specifique i18n
-- jquery-ui-datepicker-tj: datepicker specifique i18n
-- jquery-ui-datepicker-tr: datepicker specifique i18n
-- jquery-ui-datepicker-uk: datepicker specifique i18n
-- jquery-ui-datepicker-vi: datepicker specifique i18n
-- jquery-ui-datepicker-zh-CN: datepicker specifique i18n
-- jquery-ui-datepicker-zh-HK: datepicker specifique i18n
-- jquery-ui-datepicker-zh-TW: datepicker specifique i18n
+- jquery-ui-i18n: specifique i18n (toutes les langues)
+- jquery-ui-af: specifique i18n
+- jquery-ui-ar-DZ: specifique i18n
+- jquery-ui-ar: specifique i18n
+- jquery-ui-az: specifique i18n
+- jquery-ui-bg: specifique i18n
+- jquery-ui-bs: specifique i18n
+- jquery-ui-ca: specifique i18n
+- jquery-ui-cs: specifique i18n
+- jquery-ui-cy-GB: specifique i18n
+- jquery-ui-da: specifique i18n
+- jquery-ui-de: specifique i18n
+- jquery-ui-el: specifique i18n
+- jquery-ui-en-AU: specifique i18n
+- jquery-ui-en-GB: specifique i18n
+- jquery-ui-en-NZ: specifique i18n
+- jquery-ui-eo: specifique i18n
+- jquery-ui-es: specifique i18n
+- jquery-ui-et: specifique i18n
+- jquery-ui-eu: specifique i18n
+- jquery-ui-fa: specifique i18n
+- jquery-ui-fi: specifique i18n
+- jquery-ui-fo: specifique i18n
+- jquery-ui-fr-CH: specifique i18n
+- jquery-ui-fr: specifique i18n
+- jquery-ui-gl: specifique i18n
+- jquery-ui-he: specifique i18n
+- jquery-ui-hi: specifique i18n
+- jquery-ui-hr: specifique i18n
+- jquery-ui-hu: specifique i18n
+- jquery-ui-hy: specifique i18n
+- jquery-ui-id: specifique i18n
+- jquery-ui-is: specifique i18n
+- jquery-ui-it: specifique i18n
+- jquery-ui-ja: specifique i18n
+- jquery-ui-ka: specifique i18n
+- jquery-ui-kk: specifique i18n
+- jquery-ui-km: specifique i18n
+- jquery-ui-ko: specifique i18n
+- jquery-ui-lb: specifique i18n
+- jquery-ui-lt: specifique i18n
+- jquery-ui-lv: specifique i18n
+- jquery-ui-mk: specifique i18n
+- jquery-ui-ml: specifique i18n
+- jquery-ui-ms: specifique i18n
+- jquery-ui-nl-BE: specifique i18n
+- jquery-ui-nl: specifique i18n
+- jquery-ui-no: specifique i18n
+- jquery-ui-pl: specifique i18n
+- jquery-ui-pt-BR: specifique i18n
+- jquery-ui-pt: specifique i18n
+- jquery-ui-rm: specifique i18n
+- jquery-ui-ro: specifique i18n
+- jquery-ui-ru: specifique i18n
+- jquery-ui-sk: specifique i18n
+- jquery-ui-sl: specifique i18n
+- jquery-ui-sq: specifique i18n
+- jquery-ui-sr-SR: specifique i18n
+- jquery-ui-sr: specifique i18n
+- jquery-ui-sv: specifique i18n
+- jquery-ui-ta: specifique i18n
+- jquery-ui-th: specifique i18n
+- jquery-ui-tj: specifique i18n
+- jquery-ui-tr: specifique i18n
+- jquery-ui-uk: specifique i18n
+- jquery-ui-vi: specifique i18n
+- jquery-ui-zh-CN: specifique i18n
+- jquery-ui-zh-HK: specifique i18n
+- jquery-ui-zh-TW: specifique i18n
CSS disponible
--------------
1
0
Author: bpoussin
Date: 2013-01-15 21:28:34 +0100 (Tue, 15 Jan 2013)
New Revision: 15
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/15
Log:
correction dans le nom des groupes i18n
Modified:
trunk/nuiton-js-jquery-ui/src/site/rst/index.rst
Modified: trunk/nuiton-js-jquery-ui/src/site/rst/index.rst
===================================================================
--- trunk/nuiton-js-jquery-ui/src/site/rst/index.rst 2013-01-15 20:20:11 UTC (rev 14)
+++ trunk/nuiton-js-jquery-ui/src/site/rst/index.rst 2013-01-15 20:28:34 UTC (rev 15)
@@ -15,74 +15,74 @@
- jquery-ui: jquery et query-ui
- jquery-ui-i18n: datepicker specifique i18n (toutes les langues)
-- jquery.ui.datepicker-af: datepicker specifique i18n
-- jquery.ui.datepicker-ar-DZ: datepicker specifique i18n
-- jquery.ui.datepicker-ar: datepicker specifique i18n
-- jquery.ui.datepicker-az: datepicker specifique i18n
-- jquery.ui.datepicker-bg: datepicker specifique i18n
-- jquery.ui.datepicker-bs: datepicker specifique i18n
-- jquery.ui.datepicker-ca: datepicker specifique i18n
-- jquery.ui.datepicker-cs: datepicker specifique i18n
-- jquery.ui.datepicker-cy-GB: datepicker specifique i18n
-- jquery.ui.datepicker-da: datepicker specifique i18n
-- jquery.ui.datepicker-de: datepicker specifique i18n
-- jquery.ui.datepicker-el: datepicker specifique i18n
-- jquery.ui.datepicker-en-AU: datepicker specifique i18n
-- jquery.ui.datepicker-en-GB: datepicker specifique i18n
-- jquery.ui.datepicker-en-NZ: datepicker specifique i18n
-- jquery.ui.datepicker-eo: datepicker specifique i18n
-- jquery.ui.datepicker-es: datepicker specifique i18n
-- jquery.ui.datepicker-et: datepicker specifique i18n
-- jquery.ui.datepicker-eu: datepicker specifique i18n
-- jquery.ui.datepicker-fa: datepicker specifique i18n
-- jquery.ui.datepicker-fi: datepicker specifique i18n
-- jquery.ui.datepicker-fo: datepicker specifique i18n
-- jquery.ui.datepicker-fr-CH: datepicker specifique i18n
-- jquery.ui.datepicker-fr: datepicker specifique i18n
-- jquery.ui.datepicker-gl: datepicker specifique i18n
-- jquery.ui.datepicker-he: datepicker specifique i18n
-- jquery.ui.datepicker-hi: datepicker specifique i18n
-- jquery.ui.datepicker-hr: datepicker specifique i18n
-- jquery.ui.datepicker-hu: datepicker specifique i18n
-- jquery.ui.datepicker-hy: datepicker specifique i18n
-- jquery.ui.datepicker-id: datepicker specifique i18n
-- jquery.ui.datepicker-is: datepicker specifique i18n
-- jquery.ui.datepicker-it: datepicker specifique i18n
-- jquery.ui.datepicker-ja: datepicker specifique i18n
-- jquery.ui.datepicker-ka: datepicker specifique i18n
-- jquery.ui.datepicker-kk: datepicker specifique i18n
-- jquery.ui.datepicker-km: datepicker specifique i18n
-- jquery.ui.datepicker-ko: datepicker specifique i18n
-- jquery.ui.datepicker-lb: datepicker specifique i18n
-- jquery.ui.datepicker-lt: datepicker specifique i18n
-- jquery.ui.datepicker-lv: datepicker specifique i18n
-- jquery.ui.datepicker-mk: datepicker specifique i18n
-- jquery.ui.datepicker-ml: datepicker specifique i18n
-- jquery.ui.datepicker-ms: datepicker specifique i18n
-- jquery.ui.datepicker-nl-BE: datepicker specifique i18n
-- jquery.ui.datepicker-nl: datepicker specifique i18n
-- jquery.ui.datepicker-no: datepicker specifique i18n
-- jquery.ui.datepicker-pl: datepicker specifique i18n
-- jquery.ui.datepicker-pt-BR: datepicker specifique i18n
-- jquery.ui.datepicker-pt: datepicker specifique i18n
-- jquery.ui.datepicker-rm: datepicker specifique i18n
-- jquery.ui.datepicker-ro: datepicker specifique i18n
-- jquery.ui.datepicker-ru: datepicker specifique i18n
-- jquery.ui.datepicker-sk: datepicker specifique i18n
-- jquery.ui.datepicker-sl: datepicker specifique i18n
-- jquery.ui.datepicker-sq: datepicker specifique i18n
-- jquery.ui.datepicker-sr-SR: datepicker specifique i18n
-- jquery.ui.datepicker-sr: datepicker specifique i18n
-- jquery.ui.datepicker-sv: datepicker specifique i18n
-- jquery.ui.datepicker-ta: datepicker specifique i18n
-- jquery.ui.datepicker-th: datepicker specifique i18n
-- jquery.ui.datepicker-tj: datepicker specifique i18n
-- jquery.ui.datepicker-tr: datepicker specifique i18n
-- jquery.ui.datepicker-uk: datepicker specifique i18n
-- jquery.ui.datepicker-vi: datepicker specifique i18n
-- jquery.ui.datepicker-zh-CN: datepicker specifique i18n
-- jquery.ui.datepicker-zh-HK: datepicker specifique i18n
-- jquery.ui.datepicker-zh-TW: datepicker specifique i18n
+- jquery-ui-datepicker-af: datepicker specifique i18n
+- jquery-ui-datepicker-ar-DZ: datepicker specifique i18n
+- jquery-ui-datepicker-ar: datepicker specifique i18n
+- jquery-ui-datepicker-az: datepicker specifique i18n
+- jquery-ui-datepicker-bg: datepicker specifique i18n
+- jquery-ui-datepicker-bs: datepicker specifique i18n
+- jquery-ui-datepicker-ca: datepicker specifique i18n
+- jquery-ui-datepicker-cs: datepicker specifique i18n
+- jquery-ui-datepicker-cy-GB: datepicker specifique i18n
+- jquery-ui-datepicker-da: datepicker specifique i18n
+- jquery-ui-datepicker-de: datepicker specifique i18n
+- jquery-ui-datepicker-el: datepicker specifique i18n
+- jquery-ui-datepicker-en-AU: datepicker specifique i18n
+- jquery-ui-datepicker-en-GB: datepicker specifique i18n
+- jquery-ui-datepicker-en-NZ: datepicker specifique i18n
+- jquery-ui-datepicker-eo: datepicker specifique i18n
+- jquery-ui-datepicker-es: datepicker specifique i18n
+- jquery-ui-datepicker-et: datepicker specifique i18n
+- jquery-ui-datepicker-eu: datepicker specifique i18n
+- jquery-ui-datepicker-fa: datepicker specifique i18n
+- jquery-ui-datepicker-fi: datepicker specifique i18n
+- jquery-ui-datepicker-fo: datepicker specifique i18n
+- jquery-ui-datepicker-fr-CH: datepicker specifique i18n
+- jquery-ui-datepicker-fr: datepicker specifique i18n
+- jquery-ui-datepicker-gl: datepicker specifique i18n
+- jquery-ui-datepicker-he: datepicker specifique i18n
+- jquery-ui-datepicker-hi: datepicker specifique i18n
+- jquery-ui-datepicker-hr: datepicker specifique i18n
+- jquery-ui-datepicker-hu: datepicker specifique i18n
+- jquery-ui-datepicker-hy: datepicker specifique i18n
+- jquery-ui-datepicker-id: datepicker specifique i18n
+- jquery-ui-datepicker-is: datepicker specifique i18n
+- jquery-ui-datepicker-it: datepicker specifique i18n
+- jquery-ui-datepicker-ja: datepicker specifique i18n
+- jquery-ui-datepicker-ka: datepicker specifique i18n
+- jquery-ui-datepicker-kk: datepicker specifique i18n
+- jquery-ui-datepicker-km: datepicker specifique i18n
+- jquery-ui-datepicker-ko: datepicker specifique i18n
+- jquery-ui-datepicker-lb: datepicker specifique i18n
+- jquery-ui-datepicker-lt: datepicker specifique i18n
+- jquery-ui-datepicker-lv: datepicker specifique i18n
+- jquery-ui-datepicker-mk: datepicker specifique i18n
+- jquery-ui-datepicker-ml: datepicker specifique i18n
+- jquery-ui-datepicker-ms: datepicker specifique i18n
+- jquery-ui-datepicker-nl-BE: datepicker specifique i18n
+- jquery-ui-datepicker-nl: datepicker specifique i18n
+- jquery-ui-datepicker-no: datepicker specifique i18n
+- jquery-ui-datepicker-pl: datepicker specifique i18n
+- jquery-ui-datepicker-pt-BR: datepicker specifique i18n
+- jquery-ui-datepicker-pt: datepicker specifique i18n
+- jquery-ui-datepicker-rm: datepicker specifique i18n
+- jquery-ui-datepicker-ro: datepicker specifique i18n
+- jquery-ui-datepicker-ru: datepicker specifique i18n
+- jquery-ui-datepicker-sk: datepicker specifique i18n
+- jquery-ui-datepicker-sl: datepicker specifique i18n
+- jquery-ui-datepicker-sq: datepicker specifique i18n
+- jquery-ui-datepicker-sr-SR: datepicker specifique i18n
+- jquery-ui-datepicker-sr: datepicker specifique i18n
+- jquery-ui-datepicker-sv: datepicker specifique i18n
+- jquery-ui-datepicker-ta: datepicker specifique i18n
+- jquery-ui-datepicker-th: datepicker specifique i18n
+- jquery-ui-datepicker-tj: datepicker specifique i18n
+- jquery-ui-datepicker-tr: datepicker specifique i18n
+- jquery-ui-datepicker-uk: datepicker specifique i18n
+- jquery-ui-datepicker-vi: datepicker specifique i18n
+- jquery-ui-datepicker-zh-CN: datepicker specifique i18n
+- jquery-ui-datepicker-zh-HK: datepicker specifique i18n
+- jquery-ui-datepicker-zh-TW: datepicker specifique i18n
CSS disponible
--------------
1
0
r14 - in trunk/nuiton-js-jquery-ui: . src/main/resources/META-INF/nuiton-js src/main/resources/nuiton-js-jquery-ui/css src/main/resources/nuiton-js-jquery-ui/css/base src/main/resources/nuiton-js-jquery-ui/css/base/images src/main/resources/nuiton-js-jquery-ui/js src/main/resources/nuiton-js-jquery-ui/js/i18n src/site/rst
by bpoussin@users.nuiton.org 15 Jan '13
by bpoussin@users.nuiton.org 15 Jan '13
15 Jan '13
Author: bpoussin
Date: 2013-01-15 21:20:11 +0100 (Tue, 15 Jan 2013)
New Revision: 14
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/14
Log:
- ajout des fichiers de langue
- ajout du theme base
- ajout script de generation de groupe pour i18n
Added:
trunk/nuiton-js-jquery-ui/generate-i18n-group.sh
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-bg_flat_0_aaaaaa_40x100.png
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-bg_flat_75_ffffff_40x100.png
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-bg_glass_55_fbf9ee_1x400.png
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-bg_glass_65_ffffff_1x400.png
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-bg_glass_75_dadada_1x400.png
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-bg_glass_75_e6e6e6_1x400.png
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-bg_glass_95_fef1ec_1x400.png
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-icons_222222_256x240.png
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-icons_2e83ff_256x240.png
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-icons_454545_256x240.png
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-icons_888888_256x240.png
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-icons_cd0a0a_256x240.png
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/jquery-ui.css
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery-ui-i18n.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-af.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ar-DZ.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ar.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-az.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-bg.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-bs.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ca.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-cs.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-cy-GB.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-da.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-de.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-el.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-en-AU.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-en-GB.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-en-NZ.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-eo.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-es.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-et.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-eu.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-fa.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-fi.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-fo.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-fr-CH.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-fr.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-gl.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-he.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-hi.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-hr.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-hu.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-hy.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-id.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-is.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-it.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ja.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ka.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-kk.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-km.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ko.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-lb.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-lt.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-lv.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-mk.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ml.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ms.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-nl-BE.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-nl.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-no.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-pl.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-pt-BR.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-pt.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-rm.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ro.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ru.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-sk.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-sl.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-sq.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-sr-SR.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-sr.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-sv.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ta.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-th.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-tj.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-tr.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-uk.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-vi.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-zh-CN.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-zh-HK.js
trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-zh-TW.js
Modified:
trunk/nuiton-js-jquery-ui/src/main/resources/META-INF/nuiton-js/wro-jquery-ui.xml
trunk/nuiton-js-jquery-ui/src/site/rst/index.rst
Added: trunk/nuiton-js-jquery-ui/generate-i18n-group.sh
===================================================================
--- trunk/nuiton-js-jquery-ui/generate-i18n-group.sh (rev 0)
+++ trunk/nuiton-js-jquery-ui/generate-i18n-group.sh 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# Permet de genere le code XML necessaire pour la declaration des themes
+# il faut ensuite mettre ce qui est genere dans le fichier META-INF/nuiton-js/nuiton-js-jquery-ui.xml
+#
+for t in src/main/resources/nuiton-js-jquery-ui/js/i18n/*; do
+ f=$(basename $t)
+ n=$(basename $t .js|tr '.' '-')
+ echo -e " <group name='$n'>\n <css>classpath:nuiton-js-jquery-ui/i18n/$f</css>\n </group>\n"
+done
Property changes on: trunk/nuiton-js-jquery-ui/generate-i18n-group.sh
___________________________________________________________________
Added: svn:executable
+ *
Modified: trunk/nuiton-js-jquery-ui/src/main/resources/META-INF/nuiton-js/wro-jquery-ui.xml
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/META-INF/nuiton-js/wro-jquery-ui.xml 2013-01-15 19:02:02 UTC (rev 13)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/META-INF/nuiton-js/wro-jquery-ui.xml 2013-01-15 20:20:11 UTC (rev 14)
@@ -8,14 +8,18 @@
</group>
<group name='jquery-ui-only'>
- <js>classpath:nuiton-js-jquery-ui/**.js</js>
+ <js>classpath:nuiton-js-jquery-ui/*.js</js>
</group>
<!--
- | le reste du fichier est genere par generate-theme-group.sh a la
- | racine du module
+ | le reste du fichier est genere par generate-theme-group.sh et
+ | generate-i18n-group.sh a la racine du module
+-->
+ <group name='jquery-ui-base'>
+ <css>classpath:nuiton-js-jquery-ui/css/base/**.css</css>
+ </group>
+
<group name='jquery-ui-black-tie'>
<css>classpath:nuiton-js-jquery-ui/css/black-tie/**.css</css>
</group>
@@ -116,4 +120,284 @@
<css>classpath:nuiton-js-jquery-ui/css/vader/**.css</css>
</group>
+ <!--
+ | i18n
+ +-->
+
+ <group name='jquery-ui-i18n'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery-ui-i18n.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-af'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-af.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-ar-DZ'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-ar-DZ.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-ar'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-ar.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-az'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-az.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-bg'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-bg.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-bs'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-bs.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-ca'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-ca.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-cs'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-cs.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-cy-GB'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-cy-GB.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-da'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-da.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-de'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-de.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-el'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-el.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-en-AU'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-en-AU.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-en-GB'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-en-GB.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-en-NZ'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-en-NZ.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-eo'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-eo.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-es'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-es.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-et'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-et.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-eu'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-eu.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-fa'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-fa.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-fi'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-fi.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-fo'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-fo.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-fr-CH'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-fr-CH.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-fr'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-fr.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-gl'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-gl.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-he'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-he.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-hi'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-hi.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-hr'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-hr.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-hu'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-hu.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-hy'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-hy.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-id'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-id.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-is'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-is.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-it'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-it.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-ja'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-ja.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-ka'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-ka.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-kk'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-kk.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-km'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-km.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-ko'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-ko.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-lb'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-lb.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-lt'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-lt.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-lv'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-lv.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-mk'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-mk.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-ml'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-ml.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-ms'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-ms.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-nl-BE'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-nl-BE.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-nl'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-nl.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-no'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-no.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-pl'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-pl.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-pt-BR'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-pt-BR.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-pt'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-pt.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-rm'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-rm.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-ro'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-ro.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-ru'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-ru.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-sk'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-sk.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-sl'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-sl.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-sq'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-sq.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-sr-SR'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-sr-SR.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-sr'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-sr.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-sv'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-sv.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-ta'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-ta.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-th'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-th.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-tj'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-tj.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-tr'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-tr.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-uk'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-uk.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-vi'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-vi.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-zh-CN'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-zh-CN.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-zh-HK'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-zh-HK.js</css>
+ </group>
+
+ <group name='jquery-ui-datepicker-zh-TW'>
+ <css>classpath:nuiton-js-jquery-ui/i18n/jquery.ui.datepicker-zh-TW.js</css>
+ </group>
+
</groups>
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-bg_flat_0_aaaaaa_40x100.png
===================================================================
(Binary files differ)
Property changes on: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-bg_flat_0_aaaaaa_40x100.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-bg_flat_75_ffffff_40x100.png
===================================================================
(Binary files differ)
Property changes on: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-bg_flat_75_ffffff_40x100.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-bg_glass_55_fbf9ee_1x400.png
===================================================================
(Binary files differ)
Property changes on: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-bg_glass_55_fbf9ee_1x400.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-bg_glass_65_ffffff_1x400.png
===================================================================
(Binary files differ)
Property changes on: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-bg_glass_65_ffffff_1x400.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-bg_glass_75_dadada_1x400.png
===================================================================
(Binary files differ)
Property changes on: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-bg_glass_75_dadada_1x400.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-bg_glass_75_e6e6e6_1x400.png
===================================================================
(Binary files differ)
Property changes on: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-bg_glass_75_e6e6e6_1x400.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-bg_glass_95_fef1ec_1x400.png
===================================================================
(Binary files differ)
Property changes on: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-bg_glass_95_fef1ec_1x400.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png
===================================================================
(Binary files differ)
Property changes on: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-icons_222222_256x240.png
===================================================================
(Binary files differ)
Property changes on: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-icons_222222_256x240.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-icons_2e83ff_256x240.png
===================================================================
(Binary files differ)
Property changes on: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-icons_2e83ff_256x240.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-icons_454545_256x240.png
===================================================================
(Binary files differ)
Property changes on: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-icons_454545_256x240.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-icons_888888_256x240.png
===================================================================
(Binary files differ)
Property changes on: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-icons_888888_256x240.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-icons_cd0a0a_256x240.png
===================================================================
(Binary files differ)
Property changes on: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/images/ui-icons_cd0a0a_256x240.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/jquery-ui.css
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/jquery-ui.css (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/css/base/jquery-ui.css 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,461 @@
+/*! jQuery UI - v1.9.2 - 2012-11-23
+* http://jqueryui.com
+* Includes: jquery.ui.core.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css
+* Copyright (c) 2012 jQuery Foundation and other contributors Licensed MIT */
+
+/* Layout helpers
+----------------------------------*/
+.ui-helper-hidden { display: none; }
+.ui-helper-hidden-accessible { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
+.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
+.ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; }
+.ui-helper-clearfix:after { clear: both; }
+.ui-helper-clearfix { zoom: 1; }
+.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
+
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-disabled { cursor: default !important; }
+
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Overlays */
+.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
+.ui-accordion .ui-accordion-header { display: block; cursor: pointer; position: relative; margin-top: 2px; padding: .5em .5em .5em .7em; zoom: 1; }
+.ui-accordion .ui-accordion-icons { padding-left: 2.2em; }
+.ui-accordion .ui-accordion-noicons { padding-left: .7em; }
+.ui-accordion .ui-accordion-icons .ui-accordion-icons { padding-left: 2.2em; }
+.ui-accordion .ui-accordion-header .ui-accordion-header-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
+.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; overflow: auto; zoom: 1; }
+.ui-autocomplete {
+ position: absolute;
+ top: 0;
+ left: 0;
+ cursor: default;
+}
+
+/* workarounds */
+* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
+.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
+.ui-button, .ui-button:link, .ui-button:visited, .ui-button:hover, .ui-button:active { text-decoration: none; }
+.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
+button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
+.ui-button-icons-only { width: 3.4em; }
+button.ui-button-icons-only { width: 3.7em; }
+
+/*button text element */
+.ui-button .ui-button-text { display: block; line-height: 1.4; }
+.ui-button-text-only .ui-button-text { padding: .4em 1em; }
+.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
+.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
+.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
+.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
+/* no icon support for input elements, provide padding by default */
+input.ui-button { padding: .4em 1em; }
+
+/*button icon element(s) */
+.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
+.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
+.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
+.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
+.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
+
+/*button sets*/
+.ui-buttonset { margin-right: 7px; }
+.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
+
+/* workarounds */
+button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
+.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
+.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
+.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
+.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
+.ui-datepicker .ui-datepicker-prev { left:2px; }
+.ui-datepicker .ui-datepicker-next { right:2px; }
+.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
+.ui-datepicker .ui-datepicker-next-hover { right:1px; }
+.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
+.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
+.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
+.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
+.ui-datepicker select.ui-datepicker-month,
+.ui-datepicker select.ui-datepicker-year { width: 49%;}
+.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
+.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
+.ui-datepicker td { border: 0; padding: 1px; }
+.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
+.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
+.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
+.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
+
+/* with multiple calendars */
+.ui-datepicker.ui-datepicker-multi { width:auto; }
+.ui-datepicker-multi .ui-datepicker-group { float:left; }
+.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
+.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
+.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
+.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
+.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
+.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
+
+/* RTL support */
+.ui-datepicker-rtl { direction: rtl; }
+.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+
+/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
+.ui-datepicker-cover {
+ position: absolute; /*must have*/
+ z-index: -1; /*must have*/
+ filter: mask(); /*must have*/
+ top: -4px; /*must have*/
+ left: -4px; /*must have*/
+ width: 200px; /*must have*/
+ height: 200px; /*must have*/
+}.ui-dialog { position: absolute; top: 0; left: 0; padding: .2em; width: 300px; overflow: hidden; }
+.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
+.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
+.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
+.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
+.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
+.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
+.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
+.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
+.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
+.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
+.ui-draggable .ui-dialog-titlebar { cursor: move; }
+.ui-menu { list-style:none; padding: 2px; margin: 0; display:block; outline: none; }
+.ui-menu .ui-menu { margin-top: -3px; position: absolute; }
+.ui-menu .ui-menu-item { margin: 0; padding: 0; zoom: 1; width: 100%; }
+.ui-menu .ui-menu-divider { margin: 5px -2px 5px -2px; height: 0; font-size: 0; line-height: 0; border-width: 1px 0 0 0; }
+.ui-menu .ui-menu-item a { text-decoration: none; display: block; padding: 2px .4em; line-height: 1.5; zoom: 1; font-weight: normal; }
+.ui-menu .ui-menu-item a.ui-state-focus,
+.ui-menu .ui-menu-item a.ui-state-active { font-weight: normal; margin: -1px; }
+
+.ui-menu .ui-state-disabled { font-weight: normal; margin: .4em 0 .2em; line-height: 1.5; }
+.ui-menu .ui-state-disabled a { cursor: default; }
+
+/* icon support */
+.ui-menu-icons { position: relative; }
+.ui-menu-icons .ui-menu-item a { position: relative; padding-left: 2em; }
+
+/* left-aligned */
+.ui-menu .ui-icon { position: absolute; top: .2em; left: .2em; }
+
+/* right-aligned */
+.ui-menu .ui-menu-icon { position: static; float: right; }
+.ui-progressbar { height:2em; text-align: left; overflow: hidden; }
+.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }.ui-resizable { position: relative;}
+.ui-resizable-handle { position: absolute;font-size: 0.1px; display: block; }
+.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
+.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
+.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
+.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
+.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
+.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
+.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
+.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
+.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
+.ui-slider { position: relative; text-align: left; }
+.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
+.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
+
+.ui-slider-horizontal { height: .8em; }
+.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
+.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
+.ui-slider-horizontal .ui-slider-range-min { left: 0; }
+.ui-slider-horizontal .ui-slider-range-max { right: 0; }
+
+.ui-slider-vertical { width: .8em; height: 100px; }
+.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
+.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
+.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
+.ui-slider-vertical .ui-slider-range-max { top: 0; }.ui-spinner { position:relative; display: inline-block; overflow: hidden; padding: 0; vertical-align: middle; }
+.ui-spinner-input { border: none; background: none; padding: 0; margin: .2em 0; vertical-align: middle; margin-left: .4em; margin-right: 22px; }
+.ui-spinner-button { width: 16px; height: 50%; font-size: .5em; padding: 0; margin: 0; text-align: center; position: absolute; cursor: default; display: block; overflow: hidden; right: 0; }
+.ui-spinner a.ui-spinner-button { border-top: none; border-bottom: none; border-right: none; } /* more specificity required here to overide default borders */
+.ui-spinner .ui-icon { position: absolute; margin-top: -8px; top: 50%; left: 0; } /* vertical centre icon */
+.ui-spinner-up { top: 0; }
+.ui-spinner-down { bottom: 0; }
+
+/* TR overrides */
+.ui-spinner .ui-icon-triangle-1-s {
+ /* need to fix icons sprite */
+ background-position:-65px -16px;
+}
+.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
+.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
+.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 0; margin: 1px .2em 0 0; border-bottom: 0; padding: 0; white-space: nowrap; }
+.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
+.ui-tabs .ui-tabs-nav li.ui-tabs-active { margin-bottom: -1px; padding-bottom: 1px; }
+.ui-tabs .ui-tabs-nav li.ui-tabs-active a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-tabs-loading a { cursor: text; }
+.ui-tabs .ui-tabs-nav li a, .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
+.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
+.ui-tooltip {
+ padding: 8px;
+ position: absolute;
+ z-index: 9999;
+ max-width: 300px;
+ -webkit-box-shadow: 0 0 5px #aaa;
+ box-shadow: 0 0 5px #aaa;
+}
+/* Fades and background-images don't work well together in IE6, drop the image */
+* html .ui-tooltip {
+ background-image: none;
+}
+body .ui-tooltip { border-width: 2px; }
+
+/* Component containers
+----------------------------------*/
+.ui-widget { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1.1em/*{fsDefault}*/; }
+.ui-widget .ui-widget { font-size: 1em; }
+.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1em; }
+.ui-widget-content { border: 1px solid #aaaaaa/*{borderColorContent}*/; background: #ffffff/*{bgColorContent}*/ url(images/ui-bg_flat_75_ffffff_40x100.png)/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/; color: #222222/*{fcContent}*/; }
+.ui-widget-content a { color: #222222/*{fcContent}*/; }
+.ui-widget-header { border: 1px solid #aaaaaa/*{borderColorHeader}*/; background: #cccccc/*{bgColorHeader}*/ url(images/ui-bg_highlight-soft_75_cccccc_1x100.png)/*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/; color: #222222/*{fcHeader}*/; font-weight: bold; }
+.ui-widget-header a { color: #222222/*{fcHeader}*/; }
+
+/* Interaction states
+----------------------------------*/
+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3/*{borderColorDefault}*/; background: #e6e6e6/*{bgColorDefault}*/ url(images/ui-bg_glass_75_e6e6e6_1x400.png)/*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #555555/*{fcDefault}*/; }
+.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555/*{fcDefault}*/; text-decoration: none; }
+.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999/*{borderColorHover}*/; background: #dadada/*{bgColorHover}*/ url(images/ui-bg_glass_75_dadada_1x400.png)/*{bgImgUrlHover}*/ 50%/*{bgHoverXPos}*/ 50%/*{bgHoverYPos}*/ repeat-x/*{bgHoverRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcHover}*/; }
+.ui-state-hover a, .ui-state-hover a:hover, .ui-state-hover a:link, .ui-state-hover a:visited { color: #212121/*{fcHover}*/; text-decoration: none; }
+.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa/*{borderColorActive}*/; background: #ffffff/*{bgColorActive}*/ url(images/ui-bg_glass_65_ffffff_1x400.png)/*{bgImgUrlActive}*/ 50%/*{bgActiveXPos}*/ 50%/*{bgActiveYPos}*/ repeat-x/*{bgActiveRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcActive}*/; }
+.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121/*{fcActive}*/; text-decoration: none; }
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1/*{borderColorHighlight}*/; background: #fbf9ee/*{bgColorHighlight}*/ url(images/ui-bg_glass_55_fbf9ee_1x400.png)/*{bgImgUrlHighlight}*/ 50%/*{bgHighlightXPos}*/ 50%/*{bgHighlightYPos}*/ repeat-x/*{bgHighlightRepeat}*/; color: #363636/*{fcHighlight}*/; }
+.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636/*{fcHighlight}*/; }
+.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a/*{borderColorError}*/; background: #fef1ec/*{bgColorError}*/ url(images/ui-bg_glass_95_fef1ec_1x400.png)/*{bgImgUrlError}*/ 50%/*{bgErrorXPos}*/ 50%/*{bgErrorYPos}*/ repeat-x/*{bgErrorRepeat}*/; color: #cd0a0a/*{fcError}*/; }
+.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a/*{fcError}*/; }
+.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a/*{fcError}*/; }
+.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
+.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
+.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
+.ui-state-disabled .ui-icon { filter:Alpha(Opacity=35); } /* For IE8 - See #6059 */
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; }
+.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; }
+.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsHeader}*/; }
+.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png)/*{iconsDefault}*/; }
+.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsHover}*/; }
+.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsActive}*/; }
+.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png)/*{iconsHighlight}*/; }
+.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png)/*{iconsError}*/; }
+
+/* positioning */
+.ui-icon-carat-1-n { background-position: 0 0; }
+.ui-icon-carat-1-ne { background-position: -16px 0; }
+.ui-icon-carat-1-e { background-position: -32px 0; }
+.ui-icon-carat-1-se { background-position: -48px 0; }
+.ui-icon-carat-1-s { background-position: -64px 0; }
+.ui-icon-carat-1-sw { background-position: -80px 0; }
+.ui-icon-carat-1-w { background-position: -96px 0; }
+.ui-icon-carat-1-nw { background-position: -112px 0; }
+.ui-icon-carat-2-n-s { background-position: -128px 0; }
+.ui-icon-carat-2-e-w { background-position: -144px 0; }
+.ui-icon-triangle-1-n { background-position: 0 -16px; }
+.ui-icon-triangle-1-ne { background-position: -16px -16px; }
+.ui-icon-triangle-1-e { background-position: -32px -16px; }
+.ui-icon-triangle-1-se { background-position: -48px -16px; }
+.ui-icon-triangle-1-s { background-position: -64px -16px; }
+.ui-icon-triangle-1-sw { background-position: -80px -16px; }
+.ui-icon-triangle-1-w { background-position: -96px -16px; }
+.ui-icon-triangle-1-nw { background-position: -112px -16px; }
+.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
+.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
+.ui-icon-arrow-1-n { background-position: 0 -32px; }
+.ui-icon-arrow-1-ne { background-position: -16px -32px; }
+.ui-icon-arrow-1-e { background-position: -32px -32px; }
+.ui-icon-arrow-1-se { background-position: -48px -32px; }
+.ui-icon-arrow-1-s { background-position: -64px -32px; }
+.ui-icon-arrow-1-sw { background-position: -80px -32px; }
+.ui-icon-arrow-1-w { background-position: -96px -32px; }
+.ui-icon-arrow-1-nw { background-position: -112px -32px; }
+.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
+.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
+.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
+.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
+.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
+.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
+.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
+.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
+.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
+.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
+.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
+.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
+.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
+.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
+.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
+.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
+.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
+.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
+.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
+.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
+.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
+.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
+.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
+.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
+.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
+.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
+.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
+.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
+.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
+.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
+.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
+.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
+.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
+.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
+.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
+.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
+.ui-icon-arrow-4 { background-position: 0 -80px; }
+.ui-icon-arrow-4-diag { background-position: -16px -80px; }
+.ui-icon-extlink { background-position: -32px -80px; }
+.ui-icon-newwin { background-position: -48px -80px; }
+.ui-icon-refresh { background-position: -64px -80px; }
+.ui-icon-shuffle { background-position: -80px -80px; }
+.ui-icon-transfer-e-w { background-position: -96px -80px; }
+.ui-icon-transferthick-e-w { background-position: -112px -80px; }
+.ui-icon-folder-collapsed { background-position: 0 -96px; }
+.ui-icon-folder-open { background-position: -16px -96px; }
+.ui-icon-document { background-position: -32px -96px; }
+.ui-icon-document-b { background-position: -48px -96px; }
+.ui-icon-note { background-position: -64px -96px; }
+.ui-icon-mail-closed { background-position: -80px -96px; }
+.ui-icon-mail-open { background-position: -96px -96px; }
+.ui-icon-suitcase { background-position: -112px -96px; }
+.ui-icon-comment { background-position: -128px -96px; }
+.ui-icon-person { background-position: -144px -96px; }
+.ui-icon-print { background-position: -160px -96px; }
+.ui-icon-trash { background-position: -176px -96px; }
+.ui-icon-locked { background-position: -192px -96px; }
+.ui-icon-unlocked { background-position: -208px -96px; }
+.ui-icon-bookmark { background-position: -224px -96px; }
+.ui-icon-tag { background-position: -240px -96px; }
+.ui-icon-home { background-position: 0 -112px; }
+.ui-icon-flag { background-position: -16px -112px; }
+.ui-icon-calendar { background-position: -32px -112px; }
+.ui-icon-cart { background-position: -48px -112px; }
+.ui-icon-pencil { background-position: -64px -112px; }
+.ui-icon-clock { background-position: -80px -112px; }
+.ui-icon-disk { background-position: -96px -112px; }
+.ui-icon-calculator { background-position: -112px -112px; }
+.ui-icon-zoomin { background-position: -128px -112px; }
+.ui-icon-zoomout { background-position: -144px -112px; }
+.ui-icon-search { background-position: -160px -112px; }
+.ui-icon-wrench { background-position: -176px -112px; }
+.ui-icon-gear { background-position: -192px -112px; }
+.ui-icon-heart { background-position: -208px -112px; }
+.ui-icon-star { background-position: -224px -112px; }
+.ui-icon-link { background-position: -240px -112px; }
+.ui-icon-cancel { background-position: 0 -128px; }
+.ui-icon-plus { background-position: -16px -128px; }
+.ui-icon-plusthick { background-position: -32px -128px; }
+.ui-icon-minus { background-position: -48px -128px; }
+.ui-icon-minusthick { background-position: -64px -128px; }
+.ui-icon-close { background-position: -80px -128px; }
+.ui-icon-closethick { background-position: -96px -128px; }
+.ui-icon-key { background-position: -112px -128px; }
+.ui-icon-lightbulb { background-position: -128px -128px; }
+.ui-icon-scissors { background-position: -144px -128px; }
+.ui-icon-clipboard { background-position: -160px -128px; }
+.ui-icon-copy { background-position: -176px -128px; }
+.ui-icon-contact { background-position: -192px -128px; }
+.ui-icon-image { background-position: -208px -128px; }
+.ui-icon-video { background-position: -224px -128px; }
+.ui-icon-script { background-position: -240px -128px; }
+.ui-icon-alert { background-position: 0 -144px; }
+.ui-icon-info { background-position: -16px -144px; }
+.ui-icon-notice { background-position: -32px -144px; }
+.ui-icon-help { background-position: -48px -144px; }
+.ui-icon-check { background-position: -64px -144px; }
+.ui-icon-bullet { background-position: -80px -144px; }
+.ui-icon-radio-on { background-position: -96px -144px; }
+.ui-icon-radio-off { background-position: -112px -144px; }
+.ui-icon-pin-w { background-position: -128px -144px; }
+.ui-icon-pin-s { background-position: -144px -144px; }
+.ui-icon-play { background-position: 0 -160px; }
+.ui-icon-pause { background-position: -16px -160px; }
+.ui-icon-seek-next { background-position: -32px -160px; }
+.ui-icon-seek-prev { background-position: -48px -160px; }
+.ui-icon-seek-end { background-position: -64px -160px; }
+.ui-icon-seek-start { background-position: -80px -160px; }
+/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
+.ui-icon-seek-first { background-position: -80px -160px; }
+.ui-icon-stop { background-position: -96px -160px; }
+.ui-icon-eject { background-position: -112px -160px; }
+.ui-icon-volume-off { background-position: -128px -160px; }
+.ui-icon-volume-on { background-position: -144px -160px; }
+.ui-icon-power { background-position: 0 -176px; }
+.ui-icon-signal-diag { background-position: -16px -176px; }
+.ui-icon-signal { background-position: -32px -176px; }
+.ui-icon-battery-0 { background-position: -48px -176px; }
+.ui-icon-battery-1 { background-position: -64px -176px; }
+.ui-icon-battery-2 { background-position: -80px -176px; }
+.ui-icon-battery-3 { background-position: -96px -176px; }
+.ui-icon-circle-plus { background-position: 0 -192px; }
+.ui-icon-circle-minus { background-position: -16px -192px; }
+.ui-icon-circle-close { background-position: -32px -192px; }
+.ui-icon-circle-triangle-e { background-position: -48px -192px; }
+.ui-icon-circle-triangle-s { background-position: -64px -192px; }
+.ui-icon-circle-triangle-w { background-position: -80px -192px; }
+.ui-icon-circle-triangle-n { background-position: -96px -192px; }
+.ui-icon-circle-arrow-e { background-position: -112px -192px; }
+.ui-icon-circle-arrow-s { background-position: -128px -192px; }
+.ui-icon-circle-arrow-w { background-position: -144px -192px; }
+.ui-icon-circle-arrow-n { background-position: -160px -192px; }
+.ui-icon-circle-zoomin { background-position: -176px -192px; }
+.ui-icon-circle-zoomout { background-position: -192px -192px; }
+.ui-icon-circle-check { background-position: -208px -192px; }
+.ui-icon-circlesmall-plus { background-position: 0 -208px; }
+.ui-icon-circlesmall-minus { background-position: -16px -208px; }
+.ui-icon-circlesmall-close { background-position: -32px -208px; }
+.ui-icon-squaresmall-plus { background-position: -48px -208px; }
+.ui-icon-squaresmall-minus { background-position: -64px -208px; }
+.ui-icon-squaresmall-close { background-position: -80px -208px; }
+.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
+.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
+.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
+.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
+.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
+.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Corner radius */
+.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; -khtml-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; }
+.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; -khtml-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; }
+.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; -khtml-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; }
+.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; -khtml-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; }
+
+/* Overlays */
+.ui-widget-overlay { background: #aaaaaa/*{bgColorOverlay}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlOverlay}*/ 50%/*{bgOverlayXPos}*/ 50%/*{bgOverlayYPos}*/ repeat-x/*{bgOverlayRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityOverlay}*/; }
+.ui-widget-shadow { margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/; padding: 8px/*{thicknessShadow}*/; background: #aaaaaa/*{bgColorShadow}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityShadow}*/; -moz-border-radius: 8px/*{cornerRadiusShadow}*/; -khtml-border-radius: 8px/*{cornerRadiusShadow}*/; -webkit-border-radius: 8px/*{cornerRadiusShadow}*/; border-radius: 8px/*{cornerRadiusShadow}*/; }
\ No newline at end of file
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery-ui-i18n.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery-ui-i18n.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery-ui-i18n.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,1675 @@
+/*! jQuery UI - v1.9.2 - 2012-11-23
+* http://jqueryui.com
+* Includes: jquery.ui.datepicker-af.js, jquery.ui.datepicker-ar-DZ.js, jquery.ui.datepicker-ar.js, jquery.ui.datepicker-az.js, jquery.ui.datepicker-bg.js, jquery.ui.datepicker-bs.js, jquery.ui.datepicker-ca.js, jquery.ui.datepicker-cs.js, jquery.ui.datepicker-cy-GB.js, jquery.ui.datepicker-da.js, jquery.ui.datepicker-de.js, jquery.ui.datepicker-el.js, jquery.ui.datepicker-en-AU.js, jquery.ui.datepicker-en-GB.js, jquery.ui.datepicker-en-NZ.js, jquery.ui.datepicker-eo.js, jquery.ui.datepicker-es.js, jquery.ui.datepicker-et.js, jquery.ui.datepicker-eu.js, jquery.ui.datepicker-fa.js, jquery.ui.datepicker-fi.js, jquery.ui.datepicker-fo.js, jquery.ui.datepicker-fr-CH.js, jquery.ui.datepicker-fr.js, jquery.ui.datepicker-gl.js, jquery.ui.datepicker-he.js, jquery.ui.datepicker-hi.js, jquery.ui.datepicker-hr.js, jquery.ui.datepicker-hu.js, jquery.ui.datepicker-hy.js, jquery.ui.datepicker-id.js, jquery.ui.datepicker-is.js, jquery.ui.datepicker-it.js, jquery.ui.datepicker-ja.js, jquery.ui.datepicker-ka.js, jquery.ui.datepicker-kk.js, jquery.ui.datepicker-km.js, jquery.ui.datepicker-ko.js, jquery.ui.datepicker-lb.js, jquery.ui.datepicker-lt.js, jquery.ui.datepicker-lv.js, jquery.ui.datepicker-mk.js, jquery.ui.datepicker-ml.js, jquery.ui.datepicker-ms.js, jquery.ui.datepicker-nl-BE.js, jquery.ui.datepicker-nl.js, jquery.ui.datepicker-no.js, jquery.ui.datepicker-pl.js, jquery.ui.datepicker-pt-BR.js, jquery.ui.datepicker-pt.js, jquery.ui.datepicker-rm.js, jquery.ui.datepicker-ro.js, jquery.ui.datepicker-ru.js, jquery.ui.datepicker-sk.js, jquery.ui.datepicker-sl.js, jquery.ui.datepicker-sq.js, jquery.ui.datepicker-sr-SR.js, jquery.ui.datepicker-sr.js, jquery.ui.datepicker-sv.js, jquery.ui.datepicker-ta.js, jquery.ui.datepicker-th.js, jquery.ui.datepicker-tj.js, jquery.ui.datepicker-tr.js, jquery.ui.datepicker-uk.js, jquery.ui.datepicker-vi.js, jquery.ui.datepicker-zh-CN.js, jquery.ui.datepicker-zh-HK.js, jquery.ui.datepicker-zh-TW.js
+* Copyright 2012 jQuery Foundation and other contributors; Licensed MIT */
+
+/* Afrikaans initialisation for the jQuery UI date picker plugin. */
+/* Written by Renier Pretorius. */
+jQuery(function($){
+ $.datepicker.regional['af'] = {
+ closeText: 'Selekteer',
+ prevText: 'Vorige',
+ nextText: 'Volgende',
+ currentText: 'Vandag',
+ monthNames: ['Januarie','Februarie','Maart','April','Mei','Junie',
+ 'Julie','Augustus','September','Oktober','November','Desember'],
+ monthNamesShort: ['Jan', 'Feb', 'Mrt', 'Apr', 'Mei', 'Jun',
+ 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Des'],
+ dayNames: ['Sondag', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrydag', 'Saterdag'],
+ dayNamesShort: ['Son', 'Maa', 'Din', 'Woe', 'Don', 'Vry', 'Sat'],
+ dayNamesMin: ['So','Ma','Di','Wo','Do','Vr','Sa'],
+ weekHeader: 'Wk',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['af']);
+});
+
+/* Algerian Arabic Translation for jQuery UI date picker plugin. (can be used for Tunisia)*/
+/* Mohamed Cherif BOUCHELAGHEM -- cherifbouchelaghem(a)yahoo.fr */
+
+jQuery(function($){
+ $.datepicker.regional['ar-DZ'] = {
+ closeText: 'إغلاق',
+ prevText: '<السابق',
+ nextText: 'التالي>',
+ currentText: 'اليوم',
+ monthNames: ['جانفي', 'فيفري', 'مارس', 'أفريل', 'ماي', 'جوان',
+ 'جويلية', 'أوت', 'سبتمبر','أكتوبر', 'نوفمبر', 'ديسمبر'],
+ monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
+ dayNames: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
+ dayNamesShort: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
+ dayNamesMin: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
+ weekHeader: 'أسبوع',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 6,
+ isRTL: true,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['ar-DZ']);
+});
+
+/* Arabic Translation for jQuery UI date picker plugin. */
+/* Khaled Alhourani -- me(a)khaledalhourani.com */
+/* NOTE: monthNames are the original months names and they are the Arabic names, not the new months name فبراير - يناير and there isn't any Arabic roots for these months */
+jQuery(function($){
+ $.datepicker.regional['ar'] = {
+ closeText: 'إغلاق',
+ prevText: '<السابق',
+ nextText: 'التالي>',
+ currentText: 'اليوم',
+ monthNames: ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'مايو', 'حزيران',
+ 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'],
+ monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
+ dayNames: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
+ dayNamesShort: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
+ dayNamesMin: ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
+ weekHeader: 'أسبوع',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 6,
+ isRTL: true,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['ar']);
+});
+
+/* Azerbaijani (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Jamil Najafov (necefov33(a)gmail.com) */
+jQuery(function($) {
+ $.datepicker.regional['az'] = {
+ closeText: 'Bağla',
+ prevText: '<Geri',
+ nextText: 'İrəli>',
+ currentText: 'Bugün',
+ monthNames: ['Yanvar','Fevral','Mart','Aprel','May','İyun',
+ 'İyul','Avqust','Sentyabr','Oktyabr','Noyabr','Dekabr'],
+ monthNamesShort: ['Yan','Fev','Mar','Apr','May','İyun',
+ 'İyul','Avq','Sen','Okt','Noy','Dek'],
+ dayNames: ['Bazar','Bazar ertəsi','Çərşənbə axşamı','Çərşənbə','Cümə axşamı','Cümə','Şənbə'],
+ dayNamesShort: ['B','Be','Ça','Ç','Ca','C','Ş'],
+ dayNamesMin: ['B','B','Ç','С','Ç','C','Ş'],
+ weekHeader: 'Hf',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['az']);
+});
+
+/* Bulgarian initialisation for the jQuery UI date picker plugin. */
+/* Written by Stoyan Kyosev (http://svest.org) */
+jQuery(function($){
+ $.datepicker.regional['bg'] = {
+ closeText: 'затвори',
+ prevText: '<назад',
+ nextText: 'напред>',
+ nextBigText: '>>',
+ currentText: 'днес',
+ monthNames: ['Януари','Февруари','Март','Април','Май','Юни',
+ 'Юли','Август','Септември','Октомври','Ноември','Декември'],
+ monthNamesShort: ['Яну','Фев','Мар','Апр','Май','Юни',
+ 'Юли','Авг','Сеп','Окт','Нов','Дек'],
+ dayNames: ['Неделя','Понеделник','Вторник','Сряда','Четвъртък','Петък','Събота'],
+ dayNamesShort: ['Нед','Пон','Вто','Сря','Чет','Пет','Съб'],
+ dayNamesMin: ['Не','По','Вт','Ср','Че','Пе','Съ'],
+ weekHeader: 'Wk',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['bg']);
+});
+
+/* Bosnian i18n for the jQuery UI date picker plugin. */
+/* Written by Kenan Konjo. */
+jQuery(function($){
+ $.datepicker.regional['bs'] = {
+ closeText: 'Zatvori',
+ prevText: '<',
+ nextText: '>',
+ currentText: 'Danas',
+ monthNames: ['Januar','Februar','Mart','April','Maj','Juni',
+ 'Juli','August','Septembar','Oktobar','Novembar','Decembar'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
+ 'Jul','Aug','Sep','Okt','Nov','Dec'],
+ dayNames: ['Nedelja','Ponedeljak','Utorak','Srijeda','Četvrtak','Petak','Subota'],
+ dayNamesShort: ['Ned','Pon','Uto','Sri','Čet','Pet','Sub'],
+ dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
+ weekHeader: 'Wk',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['bs']);
+});
+
+/* Inicialització en català per a l'extensió 'UI date picker' per jQuery. */
+/* Writers: (joan.leon(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['ca'] = {
+ closeText: 'Tanca',
+ prevText: 'Anterior',
+ nextText: 'Següent',
+ currentText: 'Avui',
+ monthNames: ['gener','febrer','març','abril','maig','juny',
+ 'juliol','agost','setembre','octubre','novembre','desembre'],
+ monthNamesShort: ['gen','feb','març','abr','maig','juny',
+ 'jul','ag','set','oct','nov','des'],
+ dayNames: ['diumenge','dilluns','dimarts','dimecres','dijous','divendres','dissabte'],
+ dayNamesShort: ['dg','dl','dt','dc','dj','dv','ds'],
+ dayNamesMin: ['dg','dl','dt','dc','dj','dv','ds'],
+ weekHeader: 'Set',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['ca']);
+});
+
+/* Czech initialisation for the jQuery UI date picker plugin. */
+/* Written by Tomas Muller (tomas(a)tomas-muller.net) */
+jQuery(function($){
+ $.datepicker.regional['cs'] = {
+ closeText: 'Zavřít',
+ prevText: '<Dříve',
+ nextText: 'Později>',
+ currentText: 'Nyní',
+ monthNames: ['leden','únor','březen','duben','květen','červen',
+ 'červenec','srpen','září','říjen','listopad','prosinec'],
+ monthNamesShort: ['led','úno','bře','dub','kvě','čer',
+ 'čvc','srp','zář','říj','lis','pro'],
+ dayNames: ['neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota'],
+ dayNamesShort: ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so'],
+ dayNamesMin: ['ne','po','út','st','čt','pá','so'],
+ weekHeader: 'Týd',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['cs']);
+});
+
+/* Welsh/UK initialisation for the jQuery UI date picker plugin. */
+/* Written by William Griffiths. */
+jQuery(function($){
+ $.datepicker.regional['cy-GB'] = {
+ closeText: 'Done',
+ prevText: 'Prev',
+ nextText: 'Next',
+ currentText: 'Today',
+ monthNames: ['Ionawr','Chwefror','Mawrth','Ebrill','Mai','Mehefin',
+ 'Gorffennaf','Awst','Medi','Hydref','Tachwedd','Rhagfyr'],
+ monthNamesShort: ['Ion', 'Chw', 'Maw', 'Ebr', 'Mai', 'Meh',
+ 'Gor', 'Aws', 'Med', 'Hyd', 'Tac', 'Rha'],
+ dayNames: ['Dydd Sul', 'Dydd Llun', 'Dydd Mawrth', 'Dydd Mercher', 'Dydd Iau', 'Dydd Gwener', 'Dydd Sadwrn'],
+ dayNamesShort: ['Sul', 'Llu', 'Maw', 'Mer', 'Iau', 'Gwe', 'Sad'],
+ dayNamesMin: ['Su','Ll','Ma','Me','Ia','Gw','Sa'],
+ weekHeader: 'Wy',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['cy-GB']);
+});
+
+/* Danish initialisation for the jQuery UI date picker plugin. */
+/* Written by Jan Christensen ( deletestuff(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['da'] = {
+ closeText: 'Luk',
+ prevText: '<Forrige',
+ nextText: 'Næste>',
+ currentText: 'Idag',
+ monthNames: ['Januar','Februar','Marts','April','Maj','Juni',
+ 'Juli','August','September','Oktober','November','December'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
+ 'Jul','Aug','Sep','Okt','Nov','Dec'],
+ dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'],
+ dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'],
+ dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'],
+ weekHeader: 'Uge',
+ dateFormat: 'dd-mm-yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['da']);
+});
+
+/* German initialisation for the jQuery UI date picker plugin. */
+/* Written by Milian Wolff (mail(a)milianw.de) */
+jQuery(function($){
+ $.datepicker.regional['de'] = {
+ closeText: 'schließen',
+ prevText: '<zurück',
+ nextText: 'Vor>',
+ currentText: 'heute',
+ monthNames: ['Januar','Februar','März','April','Mai','Juni',
+ 'Juli','August','September','Oktober','November','Dezember'],
+ monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun',
+ 'Jul','Aug','Sep','Okt','Nov','Dez'],
+ dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
+ dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
+ dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
+ weekHeader: 'KW',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['de']);
+});
+
+/* Greek (el) initialisation for the jQuery UI date picker plugin. */
+/* Written by Alex Cicovic (http://www.alexcicovic.com) */
+jQuery(function($){
+ $.datepicker.regional['el'] = {
+ closeText: 'Κλείσιμο',
+ prevText: 'Προηγούμενος',
+ nextText: 'Επόμενος',
+ currentText: 'Τρέχων Μήνας',
+ monthNames: ['Ιανουάριος','Φεβρουάριος','Μάρτιος','Απρίλιος','Μάιος','Ιούνιος',
+ 'Ιούλιος','Αύγουστος','Σεπτέμβριος','Οκτώβριος','Νοέμβριος','Δεκέμβριος'],
+ monthNamesShort: ['Ιαν','Φεβ','Μαρ','Απρ','Μαι','Ιουν',
+ 'Ιουλ','Αυγ','Σεπ','Οκτ','Νοε','Δεκ'],
+ dayNames: ['Κυριακή','Δευτέρα','Τρίτη','Τετάρτη','Πέμπτη','Παρασκευή','Σάββατο'],
+ dayNamesShort: ['Κυρ','Δευ','Τρι','Τετ','Πεμ','Παρ','Σαβ'],
+ dayNamesMin: ['Κυ','Δε','Τρ','Τε','Πε','Πα','Σα'],
+ weekHeader: 'Εβδ',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['el']);
+});
+
+/* English/Australia initialisation for the jQuery UI date picker plugin. */
+/* Based on the en-GB initialisation. */
+jQuery(function($){
+ $.datepicker.regional['en-AU'] = {
+ closeText: 'Done',
+ prevText: 'Prev',
+ nextText: 'Next',
+ currentText: 'Today',
+ monthNames: ['January','February','March','April','May','June',
+ 'July','August','September','October','November','December'],
+ monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
+ 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
+ dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
+ dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
+ dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
+ weekHeader: 'Wk',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['en-AU']);
+});
+
+/* English/UK initialisation for the jQuery UI date picker plugin. */
+/* Written by Stuart. */
+jQuery(function($){
+ $.datepicker.regional['en-GB'] = {
+ closeText: 'Done',
+ prevText: 'Prev',
+ nextText: 'Next',
+ currentText: 'Today',
+ monthNames: ['January','February','March','April','May','June',
+ 'July','August','September','October','November','December'],
+ monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
+ 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
+ dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
+ dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
+ dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
+ weekHeader: 'Wk',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['en-GB']);
+});
+
+/* English/New Zealand initialisation for the jQuery UI date picker plugin. */
+/* Based on the en-GB initialisation. */
+jQuery(function($){
+ $.datepicker.regional['en-NZ'] = {
+ closeText: 'Done',
+ prevText: 'Prev',
+ nextText: 'Next',
+ currentText: 'Today',
+ monthNames: ['January','February','March','April','May','June',
+ 'July','August','September','October','November','December'],
+ monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
+ 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
+ dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
+ dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
+ dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
+ weekHeader: 'Wk',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['en-NZ']);
+});
+
+/* Esperanto initialisation for the jQuery UI date picker plugin. */
+/* Written by Olivier M. (olivierweb(a)ifrance.com) */
+jQuery(function($){
+ $.datepicker.regional['eo'] = {
+ closeText: 'Fermi',
+ prevText: '<Anta',
+ nextText: 'Sekv>',
+ currentText: 'Nuna',
+ monthNames: ['Januaro','Februaro','Marto','Aprilo','Majo','Junio',
+ 'Julio','Aŭgusto','Septembro','Oktobro','Novembro','Decembro'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
+ 'Jul','Aŭg','Sep','Okt','Nov','Dec'],
+ dayNames: ['Dimanĉo','Lundo','Mardo','Merkredo','Ĵaŭdo','Vendredo','Sabato'],
+ dayNamesShort: ['Dim','Lun','Mar','Mer','Ĵaŭ','Ven','Sab'],
+ dayNamesMin: ['Di','Lu','Ma','Me','Ĵa','Ve','Sa'],
+ weekHeader: 'Sb',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['eo']);
+});
+
+/* Inicialización en español para la extensión 'UI date picker' para jQuery. */
+/* Traducido por Vester (xvester(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['es'] = {
+ closeText: 'Cerrar',
+ prevText: '<Ant',
+ nextText: 'Sig>',
+ currentText: 'Hoy',
+ monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio',
+ 'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'],
+ monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun',
+ 'Jul','Ago','Sep','Oct','Nov','Dic'],
+ dayNames: ['Domingo','Lunes','Martes','Miércoles','Jueves','Viernes','Sábado'],
+ dayNamesShort: ['Dom','Lun','Mar','Mié','Juv','Vie','Sáb'],
+ dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','Sá'],
+ weekHeader: 'Sm',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['es']);
+});
+
+/* Estonian initialisation for the jQuery UI date picker plugin. */
+/* Written by Mart Sõmermaa (mrts.pydev at gmail com). */
+jQuery(function($){
+ $.datepicker.regional['et'] = {
+ closeText: 'Sulge',
+ prevText: 'Eelnev',
+ nextText: 'Järgnev',
+ currentText: 'Täna',
+ monthNames: ['Jaanuar','Veebruar','Märts','Aprill','Mai','Juuni',
+ 'Juuli','August','September','Oktoober','November','Detsember'],
+ monthNamesShort: ['Jaan', 'Veebr', 'Märts', 'Apr', 'Mai', 'Juuni',
+ 'Juuli', 'Aug', 'Sept', 'Okt', 'Nov', 'Dets'],
+ dayNames: ['Pühapäev', 'Esmaspäev', 'Teisipäev', 'Kolmapäev', 'Neljapäev', 'Reede', 'Laupäev'],
+ dayNamesShort: ['Pühap', 'Esmasp', 'Teisip', 'Kolmap', 'Neljap', 'Reede', 'Laup'],
+ dayNamesMin: ['P','E','T','K','N','R','L'],
+ weekHeader: 'näd',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['et']);
+});
+
+/* Euskarako oinarria 'UI date picker' jquery-ko extentsioarentzat */
+/* Karrikas-ek itzulia (karrikas(a)karrikas.com) */
+jQuery(function($){
+ $.datepicker.regional['eu'] = {
+ closeText: 'Egina',
+ prevText: '<Aur',
+ nextText: 'Hur>',
+ currentText: 'Gaur',
+ monthNames: ['urtarrila','otsaila','martxoa','apirila','maiatza','ekaina',
+ 'uztaila','abuztua','iraila','urria','azaroa','abendua'],
+ monthNamesShort: ['urt.','ots.','mar.','api.','mai.','eka.',
+ 'uzt.','abu.','ira.','urr.','aza.','abe.'],
+ dayNames: ['igandea','astelehena','asteartea','asteazkena','osteguna','ostirala','larunbata'],
+ dayNamesShort: ['ig.','al.','ar.','az.','og.','ol.','lr.'],
+ dayNamesMin: ['ig','al','ar','az','og','ol','lr'],
+ weekHeader: 'As',
+ dateFormat: 'yy-mm-dd',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['eu']);
+});
+
+/* Persian (Farsi) Translation for the jQuery UI date picker plugin. */
+/* Javad Mowlanezhad -- jmowla(a)gmail.com */
+/* Jalali calendar should supported soon! (Its implemented but I have to test it) */
+jQuery(function($) {
+ $.datepicker.regional['fa'] = {
+ closeText: 'بستن',
+ prevText: '<قبلی',
+ nextText: 'بعدی>',
+ currentText: 'امروز',
+ monthNames: [
+ 'فروردين',
+ 'ارديبهشت',
+ 'خرداد',
+ 'تير',
+ 'مرداد',
+ 'شهريور',
+ 'مهر',
+ 'آبان',
+ 'آذر',
+ 'دی',
+ 'بهمن',
+ 'اسفند'
+ ],
+ monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'],
+ dayNames: [
+ 'يکشنبه',
+ 'دوشنبه',
+ 'سهشنبه',
+ 'چهارشنبه',
+ 'پنجشنبه',
+ 'جمعه',
+ 'شنبه'
+ ],
+ dayNamesShort: [
+ 'ی',
+ 'د',
+ 'س',
+ 'چ',
+ 'پ',
+ 'ج',
+ 'ش'
+ ],
+ dayNamesMin: [
+ 'ی',
+ 'د',
+ 'س',
+ 'چ',
+ 'پ',
+ 'ج',
+ 'ش'
+ ],
+ weekHeader: 'هف',
+ dateFormat: 'yy/mm/dd',
+ firstDay: 6,
+ isRTL: true,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['fa']);
+});
+
+/* Finnish initialisation for the jQuery UI date picker plugin. */
+/* Written by Harri Kilpiö (harrikilpio(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['fi'] = {
+ closeText: 'Sulje',
+ prevText: '«Edellinen',
+ nextText: 'Seuraava»',
+ currentText: 'Tänään',
+ monthNames: ['Tammikuu','Helmikuu','Maaliskuu','Huhtikuu','Toukokuu','Kesäkuu',
+ 'Heinäkuu','Elokuu','Syyskuu','Lokakuu','Marraskuu','Joulukuu'],
+ monthNamesShort: ['Tammi','Helmi','Maalis','Huhti','Touko','Kesä',
+ 'Heinä','Elo','Syys','Loka','Marras','Joulu'],
+ dayNamesShort: ['Su','Ma','Ti','Ke','To','Pe','La'],
+ dayNames: ['Sunnuntai','Maanantai','Tiistai','Keskiviikko','Torstai','Perjantai','Lauantai'],
+ dayNamesMin: ['Su','Ma','Ti','Ke','To','Pe','La'],
+ weekHeader: 'Vk',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['fi']);
+});
+
+/* Faroese initialisation for the jQuery UI date picker plugin */
+/* Written by Sverri Mohr Olsen, sverrimo(a)gmail.com */
+jQuery(function($){
+ $.datepicker.regional['fo'] = {
+ closeText: 'Lat aftur',
+ prevText: '<Fyrra',
+ nextText: 'Næsta>',
+ currentText: 'Í dag',
+ monthNames: ['Januar','Februar','Mars','Apríl','Mei','Juni',
+ 'Juli','August','September','Oktober','November','Desember'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun',
+ 'Jul','Aug','Sep','Okt','Nov','Des'],
+ dayNames: ['Sunnudagur','Mánadagur','Týsdagur','Mikudagur','Hósdagur','Fríggjadagur','Leyardagur'],
+ dayNamesShort: ['Sun','Mán','Týs','Mik','Hós','Frí','Ley'],
+ dayNamesMin: ['Su','Má','Tý','Mi','Hó','Fr','Le'],
+ weekHeader: 'Vk',
+ dateFormat: 'dd-mm-yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['fo']);
+});
+
+/* Swiss-French initialisation for the jQuery UI date picker plugin. */
+/* Written Martin Voelkle (martin.voelkle(a)e-tc.ch) */
+jQuery(function($){
+ $.datepicker.regional['fr-CH'] = {
+ closeText: 'Fermer',
+ prevText: '<Préc',
+ nextText: 'Suiv>',
+ currentText: 'Courant',
+ monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
+ 'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
+ monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jun',
+ 'Jul','Aoû','Sep','Oct','Nov','Déc'],
+ dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
+ dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'],
+ dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'],
+ weekHeader: 'Sm',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['fr-CH']);
+});
+
+/* French initialisation for the jQuery UI date picker plugin. */
+/* Written by Keith Wood (kbwood{at}iinet.com.au),
+ Stéphane Nahmani (sholby(a)sholby.net)
+ Stéphane Raimbault <stephane.raimbault(a)gmail.com> */
+jQuery(function($){
+ $.datepicker.regional['fr'] = {
+ closeText: 'Fermer',
+ prevText: 'Précédent',
+ nextText: 'Suivant',
+ currentText: 'Aujourd\'hui',
+ monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
+ 'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
+ monthNamesShort: ['Janv.','Févr.','Mars','Avril','Mai','Juin',
+ 'Juil.','Août','Sept.','Oct.','Nov.','Déc.'],
+ dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
+ dayNamesShort: ['Dim.','Lun.','Mar.','Mer.','Jeu.','Ven.','Sam.'],
+ dayNamesMin: ['D','L','M','M','J','V','S'],
+ weekHeader: 'Sem.',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['fr']);
+});
+
+/* Galician localization for 'UI date picker' jQuery extension. */
+/* Translated by Jorge Barreiro <yortx.barry(a)gmail.com>. */
+jQuery(function($){
+ $.datepicker.regional['gl'] = {
+ closeText: 'Pechar',
+ prevText: '<Ant',
+ nextText: 'Seg>',
+ currentText: 'Hoxe',
+ monthNames: ['Xaneiro','Febreiro','Marzo','Abril','Maio','Xuño',
+ 'Xullo','Agosto','Setembro','Outubro','Novembro','Decembro'],
+ monthNamesShort: ['Xan','Feb','Mar','Abr','Mai','Xuñ',
+ 'Xul','Ago','Set','Out','Nov','Dec'],
+ dayNames: ['Domingo','Luns','Martes','Mércores','Xoves','Venres','Sábado'],
+ dayNamesShort: ['Dom','Lun','Mar','Mér','Xov','Ven','Sáb'],
+ dayNamesMin: ['Do','Lu','Ma','Mé','Xo','Ve','Sá'],
+ weekHeader: 'Sm',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['gl']);
+});
+
+/* Hebrew initialisation for the UI Datepicker extension. */
+/* Written by Amir Hardon (ahardon at gmail dot com). */
+jQuery(function($){
+ $.datepicker.regional['he'] = {
+ closeText: 'סגור',
+ prevText: '<הקודם',
+ nextText: 'הבא>',
+ currentText: 'היום',
+ monthNames: ['ינואר','פברואר','מרץ','אפריל','מאי','יוני',
+ 'יולי','אוגוסט','ספטמבר','אוקטובר','נובמבר','דצמבר'],
+ monthNamesShort: ['ינו','פבר','מרץ','אפר','מאי','יוני',
+ 'יולי','אוג','ספט','אוק','נוב','דצמ'],
+ dayNames: ['ראשון','שני','שלישי','רביעי','חמישי','שישי','שבת'],
+ dayNamesShort: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'],
+ dayNamesMin: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'],
+ weekHeader: 'Wk',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 0,
+ isRTL: true,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['he']);
+});
+
+/* Hindi initialisation for the jQuery UI date picker plugin. */
+/* Written by Michael Dawart. */
+jQuery(function($){
+ $.datepicker.regional['hi'] = {
+ closeText: 'बंद',
+ prevText: 'पिछला',
+ nextText: 'अगला',
+ currentText: 'आज',
+ monthNames: ['जनवरी ','फरवरी','मार्च','अप्रेल','मई','जून',
+ 'जूलाई','अगस्त ','सितम्बर','अक्टूबर','नवम्बर','दिसम्बर'],
+ monthNamesShort: ['जन', 'फर', 'मार्च', 'अप्रेल', 'मई', 'जून',
+ 'जूलाई', 'अग', 'सित', 'अक्ट', 'नव', 'दि'],
+ dayNames: ['रविवार', 'सोमवार', 'मंगलवार', 'बुधवार', 'गुरुवार', 'शुक्रवार', 'शनिवार'],
+ dayNamesShort: ['रवि', 'सोम', 'मंगल', 'बुध', 'गुरु', 'शुक्र', 'शनि'],
+ dayNamesMin: ['रवि', 'सोम', 'मंगल', 'बुध', 'गुरु', 'शुक्र', 'शनि'],
+ weekHeader: 'हफ्ता',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['hi']);
+});
+
+/* Croatian i18n for the jQuery UI date picker plugin. */
+/* Written by Vjekoslav Nesek. */
+jQuery(function($){
+ $.datepicker.regional['hr'] = {
+ closeText: 'Zatvori',
+ prevText: '<',
+ nextText: '>',
+ currentText: 'Danas',
+ monthNames: ['Siječanj','Veljača','Ožujak','Travanj','Svibanj','Lipanj',
+ 'Srpanj','Kolovoz','Rujan','Listopad','Studeni','Prosinac'],
+ monthNamesShort: ['Sij','Velj','Ožu','Tra','Svi','Lip',
+ 'Srp','Kol','Ruj','Lis','Stu','Pro'],
+ dayNames: ['Nedjelja','Ponedjeljak','Utorak','Srijeda','Četvrtak','Petak','Subota'],
+ dayNamesShort: ['Ned','Pon','Uto','Sri','Čet','Pet','Sub'],
+ dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
+ weekHeader: 'Tje',
+ dateFormat: 'dd.mm.yy.',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['hr']);
+});
+
+/* Hungarian initialisation for the jQuery UI date picker plugin. */
+/* Written by Istvan Karaszi (jquery(a)spam.raszi.hu) */
+jQuery(function($){
+ $.datepicker.regional['hu'] = {
+ closeText: 'bezár',
+ prevText: 'vissza',
+ nextText: 'előre',
+ currentText: 'ma',
+ monthNames: ['Január', 'Február', 'Március', 'Április', 'Május', 'Június',
+ 'Július', 'Augusztus', 'Szeptember', 'Október', 'November', 'December'],
+ monthNamesShort: ['Jan', 'Feb', 'Már', 'Ápr', 'Máj', 'Jún',
+ 'Júl', 'Aug', 'Szep', 'Okt', 'Nov', 'Dec'],
+ dayNames: ['Vasárnap', 'Hétfő', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'],
+ dayNamesShort: ['Vas', 'Hét', 'Ked', 'Sze', 'Csü', 'Pén', 'Szo'],
+ dayNamesMin: ['V', 'H', 'K', 'Sze', 'Cs', 'P', 'Szo'],
+ weekHeader: 'Hét',
+ dateFormat: 'yy.mm.dd.',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: true,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['hu']);
+});
+
+/* Armenian(UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Levon Zakaryan (levon.zakaryan(a)gmail.com)*/
+jQuery(function($){
+ $.datepicker.regional['hy'] = {
+ closeText: 'Փակել',
+ prevText: '<Նախ.',
+ nextText: 'Հաջ.>',
+ currentText: 'Այսօր',
+ monthNames: ['Հունվար','Փետրվար','Մարտ','Ապրիլ','Մայիս','Հունիս',
+ 'Հուլիս','Օգոստոս','Սեպտեմբեր','Հոկտեմբեր','Նոյեմբեր','Դեկտեմբեր'],
+ monthNamesShort: ['Հունվ','Փետր','Մարտ','Ապր','Մայիս','Հունիս',
+ 'Հուլ','Օգս','Սեպ','Հոկ','Նոյ','Դեկ'],
+ dayNames: ['կիրակի','եկուշաբթի','երեքշաբթի','չորեքշաբթի','հինգշաբթի','ուրբաթ','շաբաթ'],
+ dayNamesShort: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'],
+ dayNamesMin: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'],
+ weekHeader: 'ՇԲՏ',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['hy']);
+});
+
+/* Indonesian initialisation for the jQuery UI date picker plugin. */
+/* Written by Deden Fathurahman (dedenf(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['id'] = {
+ closeText: 'Tutup',
+ prevText: '<mundur',
+ nextText: 'maju>',
+ currentText: 'hari ini',
+ monthNames: ['Januari','Februari','Maret','April','Mei','Juni',
+ 'Juli','Agustus','September','Oktober','Nopember','Desember'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun',
+ 'Jul','Agus','Sep','Okt','Nop','Des'],
+ dayNames: ['Minggu','Senin','Selasa','Rabu','Kamis','Jumat','Sabtu'],
+ dayNamesShort: ['Min','Sen','Sel','Rab','kam','Jum','Sab'],
+ dayNamesMin: ['Mg','Sn','Sl','Rb','Km','jm','Sb'],
+ weekHeader: 'Mg',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['id']);
+});
+
+/* Icelandic initialisation for the jQuery UI date picker plugin. */
+/* Written by Haukur H. Thorsson (haukur(a)eskill.is) */
+jQuery(function($){
+ $.datepicker.regional['is'] = {
+ closeText: 'Loka',
+ prevText: '< Fyrri',
+ nextText: 'Næsti >',
+ currentText: 'Í dag',
+ monthNames: ['Janúar','Febrúar','Mars','Apríl','Maí','Júní',
+ 'Júlí','Ágúst','September','Október','Nóvember','Desember'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maí','Jún',
+ 'Júl','Ágú','Sep','Okt','Nóv','Des'],
+ dayNames: ['Sunnudagur','Mánudagur','Þriðjudagur','Miðvikudagur','Fimmtudagur','Föstudagur','Laugardagur'],
+ dayNamesShort: ['Sun','Mán','Þri','Mið','Fim','Fös','Lau'],
+ dayNamesMin: ['Su','Má','Þr','Mi','Fi','Fö','La'],
+ weekHeader: 'Vika',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['is']);
+});
+
+/* Italian initialisation for the jQuery UI date picker plugin. */
+/* Written by Antonello Pasella (antonello.pasella(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['it'] = {
+ closeText: 'Chiudi',
+ prevText: '<Prec',
+ nextText: 'Succ>',
+ currentText: 'Oggi',
+ monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno',
+ 'Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'],
+ monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu',
+ 'Lug','Ago','Set','Ott','Nov','Dic'],
+ dayNames: ['Domenica','Lunedì','Martedì','Mercoledì','Giovedì','Venerdì','Sabato'],
+ dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'],
+ dayNamesMin: ['Do','Lu','Ma','Me','Gi','Ve','Sa'],
+ weekHeader: 'Sm',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['it']);
+});
+
+/* Japanese initialisation for the jQuery UI date picker plugin. */
+/* Written by Kentaro SATO (kentaro(a)ranvis.com) */
+jQuery(function($){
+ $.datepicker.regional['ja'] = {
+ closeText: '閉じる',
+ prevText: '<前',
+ nextText: '次>',
+ currentText: '今日',
+ monthNames: ['1月','2月','3月','4月','5月','6月',
+ '7月','8月','9月','10月','11月','12月'],
+ monthNamesShort: ['1月','2月','3月','4月','5月','6月',
+ '7月','8月','9月','10月','11月','12月'],
+ dayNames: ['日曜日','月曜日','火曜日','水曜日','木曜日','金曜日','土曜日'],
+ dayNamesShort: ['日','月','火','水','木','金','土'],
+ dayNamesMin: ['日','月','火','水','木','金','土'],
+ weekHeader: '週',
+ dateFormat: 'yy/mm/dd',
+ firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: true,
+ yearSuffix: '年'};
+ $.datepicker.setDefaults($.datepicker.regional['ja']);
+});
+
+/* Georgian (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Lado Lomidze (lado.lomidze(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['ka'] = {
+ closeText: 'დახურვა',
+ prevText: '< წინა',
+ nextText: 'შემდეგი >',
+ currentText: 'დღეს',
+ monthNames: ['იანვარი','თებერვალი','მარტი','აპრილი','მაისი','ივნისი', 'ივლისი','აგვისტო','სექტემბერი','ოქტომბერი','ნოემბერი','დეკემბერი'],
+ monthNamesShort: ['იან','თებ','მარ','აპრ','მაი','ივნ', 'ივლ','აგვ','სექ','ოქტ','ნოე','დეკ'],
+ dayNames: ['კვირა','ორშაბათი','სამშაბათი','ოთხშაბათი','ხუთშაბათი','პარასკევი','შაბათი'],
+ dayNamesShort: ['კვ','ორშ','სამ','ოთხ','ხუთ','პარ','შაბ'],
+ dayNamesMin: ['კვ','ორშ','სამ','ოთხ','ხუთ','პარ','შაბ'],
+ weekHeader: 'კვირა',
+ dateFormat: 'dd-mm-yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['ka']);
+});
+
+/* Kazakh (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Dmitriy Karasyov (dmitriy.karasyov(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['kk'] = {
+ closeText: 'Жабу',
+ prevText: '<Алдыңғы',
+ nextText: 'Келесі>',
+ currentText: 'Бүгін',
+ monthNames: ['Қаңтар','Ақпан','Наурыз','Сәуір','Мамыр','Маусым',
+ 'Шілде','Тамыз','Қыркүйек','Қазан','Қараша','Желтоқсан'],
+ monthNamesShort: ['Қаң','Ақп','Нау','Сәу','Мам','Мау',
+ 'Шіл','Там','Қыр','Қаз','Қар','Жел'],
+ dayNames: ['Жексенбі','Дүйсенбі','Сейсенбі','Сәрсенбі','Бейсенбі','Жұма','Сенбі'],
+ dayNamesShort: ['жкс','дсн','ссн','срс','бсн','жма','снб'],
+ dayNamesMin: ['Жк','Дс','Сс','Ср','Бс','Жм','Сн'],
+ weekHeader: 'Не',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['kk']);
+});
+
+/* Khmer initialisation for the jQuery calendar extension. */
+/* Written by Chandara Om (chandara.teacher(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['km'] = {
+ closeText: 'ធ្វើរួច',
+ prevText: 'មុន',
+ nextText: 'បន្ទាប់',
+ currentText: 'ថ្ងៃនេះ',
+ monthNames: ['មករា','កុម្ភៈ','មីនា','មេសា','ឧសភា','មិថុនា',
+ 'កក្កដា','សីហា','កញ្ញា','តុលា','វិច្ឆិកា','ធ្នូ'],
+ monthNamesShort: ['មករា','កុម្ភៈ','មីនា','មេសា','ឧសភា','មិថុនា',
+ 'កក្កដា','សីហា','កញ្ញា','តុលា','វិច្ឆិកា','ធ្នូ'],
+ dayNames: ['អាទិត្យ', 'ចន្ទ', 'អង្គារ', 'ពុធ', 'ព្រហស្បតិ៍', 'សុក្រ', 'សៅរ៍'],
+ dayNamesShort: ['អា', 'ច', 'អ', 'ពុ', 'ព្រហ', 'សុ', 'សៅ'],
+ dayNamesMin: ['អា', 'ច', 'អ', 'ពុ', 'ព្រហ', 'សុ', 'សៅ'],
+ weekHeader: 'សប្ដាហ៍',
+ dateFormat: 'dd-mm-yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['km']);
+});
+
+/* Korean initialisation for the jQuery calendar extension. */
+/* Written by DaeKwon Kang (ncrash.dk(a)gmail.com) Edited by Genie. */
+jQuery(function($){
+ $.datepicker.regional['ko'] = {
+ closeText: '닫기',
+ prevText: '이전달',
+ nextText: '다음달',
+ currentText: '오늘',
+ monthNames: ['1월','2월','3월','4월','5월','6월',
+ '7월','8월','9월','10월','11월','12월'],
+ monthNamesShort: ['1월','2월','3월','4월','5월','6월',
+ '7월','8월','9월','10월','11월','12월'],
+ dayNames: ['일요일','월요일','화요일','수요일','목요일','금요일','토요일'],
+ dayNamesShort: ['일','월','화','수','목','금','토'],
+ dayNamesMin: ['일','월','화','수','목','금','토'],
+ weekHeader: 'Wk',
+ dateFormat: 'yy-mm-dd',
+ firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: true,
+ yearSuffix: '년'};
+ $.datepicker.setDefaults($.datepicker.regional['ko']);
+});
+
+/* Luxembourgish initialisation for the jQuery UI date picker plugin. */
+/* Written by Michel Weimerskirch <michel(a)weimerskirch.net> */
+jQuery(function($){
+ $.datepicker.regional['lb'] = {
+ closeText: 'Fäerdeg',
+ prevText: 'Zréck',
+ nextText: 'Weider',
+ currentText: 'Haut',
+ monthNames: ['Januar','Februar','Mäerz','Abrëll','Mee','Juni',
+ 'Juli','August','September','Oktober','November','Dezember'],
+ monthNamesShort: ['Jan', 'Feb', 'Mäe', 'Abr', 'Mee', 'Jun',
+ 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'],
+ dayNames: ['Sonndeg', 'Méindeg', 'Dënschdeg', 'Mëttwoch', 'Donneschdeg', 'Freideg', 'Samschdeg'],
+ dayNamesShort: ['Son', 'Méi', 'Dën', 'Mët', 'Don', 'Fre', 'Sam'],
+ dayNamesMin: ['So','Mé','Dë','Më','Do','Fr','Sa'],
+ weekHeader: 'W',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['lb']);
+});
+
+/* Lithuanian (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* @author Arturas Paleicikas <arturas(a)avalon.lt> */
+jQuery(function($){
+ $.datepicker.regional['lt'] = {
+ closeText: 'Uždaryti',
+ prevText: '<Atgal',
+ nextText: 'Pirmyn>',
+ currentText: 'Šiandien',
+ monthNames: ['Sausis','Vasaris','Kovas','Balandis','Gegužė','Birželis',
+ 'Liepa','Rugpjūtis','Rugsėjis','Spalis','Lapkritis','Gruodis'],
+ monthNamesShort: ['Sau','Vas','Kov','Bal','Geg','Bir',
+ 'Lie','Rugp','Rugs','Spa','Lap','Gru'],
+ dayNames: ['sekmadienis','pirmadienis','antradienis','trečiadienis','ketvirtadienis','penktadienis','šeštadienis'],
+ dayNamesShort: ['sek','pir','ant','tre','ket','pen','šeš'],
+ dayNamesMin: ['Se','Pr','An','Tr','Ke','Pe','Še'],
+ weekHeader: 'Wk',
+ dateFormat: 'yy-mm-dd',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['lt']);
+});
+
+/* Latvian (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* @author Arturas Paleicikas <arturas.paleicikas(a)metasite.net> */
+jQuery(function($){
+ $.datepicker.regional['lv'] = {
+ closeText: 'Aizvērt',
+ prevText: 'Iepr',
+ nextText: 'Nāka',
+ currentText: 'Šodien',
+ monthNames: ['Janvāris','Februāris','Marts','Aprīlis','Maijs','Jūnijs',
+ 'Jūlijs','Augusts','Septembris','Oktobris','Novembris','Decembris'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','Jūn',
+ 'Jūl','Aug','Sep','Okt','Nov','Dec'],
+ dayNames: ['svētdiena','pirmdiena','otrdiena','trešdiena','ceturtdiena','piektdiena','sestdiena'],
+ dayNamesShort: ['svt','prm','otr','tre','ctr','pkt','sst'],
+ dayNamesMin: ['Sv','Pr','Ot','Tr','Ct','Pk','Ss'],
+ weekHeader: 'Nav',
+ dateFormat: 'dd-mm-yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['lv']);
+});
+
+/* Macedonian i18n for the jQuery UI date picker plugin. */
+/* Written by Stojce Slavkovski. */
+jQuery(function($){
+ $.datepicker.regional['mk'] = {
+ closeText: 'Затвори',
+ prevText: '<',
+ nextText: '>',
+ currentText: 'Денес',
+ monthNames: ['Јануари','Февруари','Март','Април','Мај','Јуни',
+ 'Јули','Август','Септември','Октомври','Ноември','Декември'],
+ monthNamesShort: ['Јан','Фев','Мар','Апр','Мај','Јун',
+ 'Јул','Авг','Сеп','Окт','Ное','Дек'],
+ dayNames: ['Недела','Понеделник','Вторник','Среда','Четврток','Петок','Сабота'],
+ dayNamesShort: ['Нед','Пон','Вто','Сре','Чет','Пет','Саб'],
+ dayNamesMin: ['Не','По','Вт','Ср','Че','Пе','Са'],
+ weekHeader: 'Сед',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['mk']);
+});
+
+/* Malayalam (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Saji Nediyanchath (saji89(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['ml'] = {
+ closeText: 'ശരി',
+ prevText: 'മുന്നത്തെ',
+ nextText: 'അടുത്തത് ',
+ currentText: 'ഇന്ന്',
+ monthNames: ['ജനുവരി','ഫെബ്രുവരി','മാര്ച്ച്','ഏപ്രില്','മേയ്','ജൂണ്',
+ 'ജൂലൈ','ആഗസ്റ്റ്','സെപ്റ്റംബര്','ഒക്ടോബര്','നവംബര്','ഡിസംബര്'],
+ monthNamesShort: ['ജനു', 'ഫെബ്', 'മാര്', 'ഏപ്രി', 'മേയ്', 'ജൂണ്',
+ 'ജൂലാ', 'ആഗ', 'സെപ്', 'ഒക്ടോ', 'നവം', 'ഡിസ'],
+ dayNames: ['ഞായര്', 'തിങ്കള്', 'ചൊവ്വ', 'ബുധന്', 'വ്യാഴം', 'വെള്ളി', 'ശനി'],
+ dayNamesShort: ['ഞായ', 'തിങ്ക', 'ചൊവ്വ', 'ബുധ', 'വ്യാഴം', 'വെള്ളി', 'ശനി'],
+ dayNamesMin: ['ഞാ','തി','ചൊ','ബു','വ്യാ','വെ','ശ'],
+ weekHeader: 'ആ',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['ml']);
+});
+
+/* Malaysian initialisation for the jQuery UI date picker plugin. */
+/* Written by Mohd Nawawi Mohamad Jamili (nawawi(a)ronggeng.net) */
+jQuery(function($){
+ $.datepicker.regional['ms'] = {
+ closeText: 'Tutup',
+ prevText: '<Sebelum',
+ nextText: 'Selepas>',
+ currentText: 'hari ini',
+ monthNames: ['Januari','Februari','Mac','April','Mei','Jun',
+ 'Julai','Ogos','September','Oktober','November','Disember'],
+ monthNamesShort: ['Jan','Feb','Mac','Apr','Mei','Jun',
+ 'Jul','Ogo','Sep','Okt','Nov','Dis'],
+ dayNames: ['Ahad','Isnin','Selasa','Rabu','Khamis','Jumaat','Sabtu'],
+ dayNamesShort: ['Aha','Isn','Sel','Rab','kha','Jum','Sab'],
+ dayNamesMin: ['Ah','Is','Se','Ra','Kh','Ju','Sa'],
+ weekHeader: 'Mg',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['ms']);
+});
+
+/* Dutch (Belgium) initialisation for the jQuery UI date picker plugin. */
+/* David De Sloovere @DavidDeSloovere */
+jQuery(function($){
+ $.datepicker.regional['nl-BE'] = {
+ closeText: 'Sluiten',
+ prevText: '←',
+ nextText: '→',
+ currentText: 'Vandaag',
+ monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni',
+ 'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
+ monthNamesShort: ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun',
+ 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
+ dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'],
+ dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'],
+ dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
+ weekHeader: 'Wk',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['nl-BE']);
+});
+
+/* Dutch (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Mathias Bynens <http://mathiasbynens.be/> */
+jQuery(function($){
+ $.datepicker.regional.nl = {
+ closeText: 'Sluiten',
+ prevText: '←',
+ nextText: '→',
+ currentText: 'Vandaag',
+ monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni',
+ 'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
+ monthNamesShort: ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun',
+ 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
+ dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'],
+ dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'],
+ dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
+ weekHeader: 'Wk',
+ dateFormat: 'dd-mm-yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional.nl);
+});
+
+/* Norwegian initialisation for the jQuery UI date picker plugin. */
+/* Written by Naimdjon Takhirov (naimdjon(a)gmail.com) */
+
+jQuery(function($){
+ $.datepicker.regional['no'] = {
+ closeText: 'Lukk',
+ prevText: '«Forrige',
+ nextText: 'Neste»',
+ currentText: 'I dag',
+ monthNames: ['januar','februar','mars','april','mai','juni','juli','august','september','oktober','november','desember'],
+ monthNamesShort: ['jan','feb','mar','apr','mai','jun','jul','aug','sep','okt','nov','des'],
+ dayNamesShort: ['søn','man','tir','ons','tor','fre','lør'],
+ dayNames: ['søndag','mandag','tirsdag','onsdag','torsdag','fredag','lørdag'],
+ dayNamesMin: ['sø','ma','ti','on','to','fr','lø'],
+ weekHeader: 'Uke',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''
+ };
+ $.datepicker.setDefaults($.datepicker.regional['no']);
+});
+
+/* Polish initialisation for the jQuery UI date picker plugin. */
+/* Written by Jacek Wysocki (jacek.wysocki(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['pl'] = {
+ closeText: 'Zamknij',
+ prevText: '<Poprzedni',
+ nextText: 'Następny>',
+ currentText: 'Dziś',
+ monthNames: ['Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec',
+ 'Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'],
+ monthNamesShort: ['Sty','Lu','Mar','Kw','Maj','Cze',
+ 'Lip','Sie','Wrz','Pa','Lis','Gru'],
+ dayNames: ['Niedziela','Poniedziałek','Wtorek','Środa','Czwartek','Piątek','Sobota'],
+ dayNamesShort: ['Nie','Pn','Wt','Śr','Czw','Pt','So'],
+ dayNamesMin: ['N','Pn','Wt','Śr','Cz','Pt','So'],
+ weekHeader: 'Tydz',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['pl']);
+});
+
+/* Brazilian initialisation for the jQuery UI date picker plugin. */
+/* Written by Leonildo Costa Silva (leocsilva(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['pt-BR'] = {
+ closeText: 'Fechar',
+ prevText: '<Anterior',
+ nextText: 'Próximo>',
+ currentText: 'Hoje',
+ monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho',
+ 'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
+ monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
+ 'Jul','Ago','Set','Out','Nov','Dez'],
+ dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'],
+ dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
+ dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
+ weekHeader: 'Sm',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['pt-BR']);
+});
+
+/* Portuguese initialisation for the jQuery UI date picker plugin. */
+jQuery(function($){
+ $.datepicker.regional['pt'] = {
+ closeText: 'Fechar',
+ prevText: '<Anterior',
+ nextText: 'Seguinte',
+ currentText: 'Hoje',
+ monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho',
+ 'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
+ monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
+ 'Jul','Ago','Set','Out','Nov','Dez'],
+ dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'],
+ dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
+ dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
+ weekHeader: 'Sem',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['pt']);
+});
+
+/* Romansh initialisation for the jQuery UI date picker plugin. */
+/* Written by Yvonne Gienal (yvonne.gienal(a)educa.ch) */
+jQuery(function($){
+ $.datepicker.regional['rm'] = {
+ closeText: 'Serrar',
+ prevText: '<Suandant',
+ nextText: 'Precedent>',
+ currentText: 'Actual',
+ monthNames: ['Schaner','Favrer','Mars','Avrigl','Matg','Zercladur', 'Fanadur','Avust','Settember','October','November','December'],
+ monthNamesShort: ['Scha','Fev','Mar','Avr','Matg','Zer', 'Fan','Avu','Sett','Oct','Nov','Dec'],
+ dayNames: ['Dumengia','Glindesdi','Mardi','Mesemna','Gievgia','Venderdi','Sonda'],
+ dayNamesShort: ['Dum','Gli','Mar','Mes','Gie','Ven','Som'],
+ dayNamesMin: ['Du','Gl','Ma','Me','Gi','Ve','So'],
+ weekHeader: 'emna',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['rm']);
+});
+
+/* Romanian initialisation for the jQuery UI date picker plugin.
+ *
+ * Written by Edmond L. (ll_edmond(a)walla.com)
+ * and Ionut G. Stan (ionut.g.stan(a)gmail.com)
+ */
+jQuery(function($){
+ $.datepicker.regional['ro'] = {
+ closeText: 'Închide',
+ prevText: '« Luna precedentă',
+ nextText: 'Luna următoare »',
+ currentText: 'Azi',
+ monthNames: ['Ianuarie','Februarie','Martie','Aprilie','Mai','Iunie',
+ 'Iulie','August','Septembrie','Octombrie','Noiembrie','Decembrie'],
+ monthNamesShort: ['Ian', 'Feb', 'Mar', 'Apr', 'Mai', 'Iun',
+ 'Iul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
+ dayNames: ['Duminică', 'Luni', 'Marţi', 'Miercuri', 'Joi', 'Vineri', 'Sâmbătă'],
+ dayNamesShort: ['Dum', 'Lun', 'Mar', 'Mie', 'Joi', 'Vin', 'Sâm'],
+ dayNamesMin: ['Du','Lu','Ma','Mi','Jo','Vi','Sâ'],
+ weekHeader: 'Săpt',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['ro']);
+});
+
+/* Russian (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Andrew Stromnov (stromnov(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['ru'] = {
+ closeText: 'Закрыть',
+ prevText: '<Пред',
+ nextText: 'След>',
+ currentText: 'Сегодня',
+ monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь',
+ 'Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'],
+ monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
+ 'Июл','Авг','Сен','Окт','Ноя','Дек'],
+ dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'],
+ dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'],
+ dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'],
+ weekHeader: 'Нед',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['ru']);
+});
+
+/* Slovak initialisation for the jQuery UI date picker plugin. */
+/* Written by Vojtech Rinik (vojto(a)hmm.sk) */
+jQuery(function($){
+ $.datepicker.regional['sk'] = {
+ closeText: 'Zavrieť',
+ prevText: '<Predchádzajúci',
+ nextText: 'Nasledujúci>',
+ currentText: 'Dnes',
+ monthNames: ['Január','Február','Marec','Apríl','Máj','Jún',
+ 'Júl','August','September','Október','November','December'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Máj','Jún',
+ 'Júl','Aug','Sep','Okt','Nov','Dec'],
+ dayNames: ['Nedeľa','Pondelok','Utorok','Streda','Štvrtok','Piatok','Sobota'],
+ dayNamesShort: ['Ned','Pon','Uto','Str','Štv','Pia','Sob'],
+ dayNamesMin: ['Ne','Po','Ut','St','Št','Pia','So'],
+ weekHeader: 'Ty',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['sk']);
+});
+
+/* Slovenian initialisation for the jQuery UI date picker plugin. */
+/* Written by Jaka Jancar (jaka(a)kubje.org) */
+/* c = č, s = š z = ž C = Č S = Š Z = Ž */
+jQuery(function($){
+ $.datepicker.regional['sl'] = {
+ closeText: 'Zapri',
+ prevText: '<Prejšnji',
+ nextText: 'Naslednji>',
+ currentText: 'Trenutni',
+ monthNames: ['Januar','Februar','Marec','April','Maj','Junij',
+ 'Julij','Avgust','September','Oktober','November','December'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
+ 'Jul','Avg','Sep','Okt','Nov','Dec'],
+ dayNames: ['Nedelja','Ponedeljek','Torek','Sreda','Četrtek','Petek','Sobota'],
+ dayNamesShort: ['Ned','Pon','Tor','Sre','Čet','Pet','Sob'],
+ dayNamesMin: ['Ne','Po','To','Sr','Če','Pe','So'],
+ weekHeader: 'Teden',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['sl']);
+});
+
+/* Albanian initialisation for the jQuery UI date picker plugin. */
+/* Written by Flakron Bytyqi (flakron(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['sq'] = {
+ closeText: 'mbylle',
+ prevText: '<mbrapa',
+ nextText: 'Përpara>',
+ currentText: 'sot',
+ monthNames: ['Janar','Shkurt','Mars','Prill','Maj','Qershor',
+ 'Korrik','Gusht','Shtator','Tetor','Nëntor','Dhjetor'],
+ monthNamesShort: ['Jan','Shk','Mar','Pri','Maj','Qer',
+ 'Kor','Gus','Sht','Tet','Nën','Dhj'],
+ dayNames: ['E Diel','E Hënë','E Martë','E Mërkurë','E Enjte','E Premte','E Shtune'],
+ dayNamesShort: ['Di','Hë','Ma','Më','En','Pr','Sh'],
+ dayNamesMin: ['Di','Hë','Ma','Më','En','Pr','Sh'],
+ weekHeader: 'Ja',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['sq']);
+});
+
+/* Serbian i18n for the jQuery UI date picker plugin. */
+/* Written by Dejan Dimić. */
+jQuery(function($){
+ $.datepicker.regional['sr-SR'] = {
+ closeText: 'Zatvori',
+ prevText: '<',
+ nextText: '>',
+ currentText: 'Danas',
+ monthNames: ['Januar','Februar','Mart','April','Maj','Jun',
+ 'Jul','Avgust','Septembar','Oktobar','Novembar','Decembar'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
+ 'Jul','Avg','Sep','Okt','Nov','Dec'],
+ dayNames: ['Nedelja','Ponedeljak','Utorak','Sreda','Četvrtak','Petak','Subota'],
+ dayNamesShort: ['Ned','Pon','Uto','Sre','Čet','Pet','Sub'],
+ dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
+ weekHeader: 'Sed',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['sr-SR']);
+});
+
+/* Serbian i18n for the jQuery UI date picker plugin. */
+/* Written by Dejan Dimić. */
+jQuery(function($){
+ $.datepicker.regional['sr'] = {
+ closeText: 'Затвори',
+ prevText: '<',
+ nextText: '>',
+ currentText: 'Данас',
+ monthNames: ['Јануар','Фебруар','Март','Април','Мај','Јун',
+ 'Јул','Август','Септембар','Октобар','Новембар','Децембар'],
+ monthNamesShort: ['Јан','Феб','Мар','Апр','Мај','Јун',
+ 'Јул','Авг','Сеп','Окт','Нов','Дец'],
+ dayNames: ['Недеља','Понедељак','Уторак','Среда','Четвртак','Петак','Субота'],
+ dayNamesShort: ['Нед','Пон','Уто','Сре','Чет','Пет','Суб'],
+ dayNamesMin: ['Не','По','Ут','Ср','Че','Пе','Су'],
+ weekHeader: 'Сед',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['sr']);
+});
+
+/* Swedish initialisation for the jQuery UI date picker plugin. */
+/* Written by Anders Ekdahl ( anders(a)nomadiz.se) */
+jQuery(function($){
+ $.datepicker.regional['sv'] = {
+ closeText: 'Stäng',
+ prevText: '«Förra',
+ nextText: 'Nästa»',
+ currentText: 'Idag',
+ 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'],
+ dayNamesShort: ['Sön','Mån','Tis','Ons','Tor','Fre','Lör'],
+ dayNames: ['Söndag','Måndag','Tisdag','Onsdag','Torsdag','Fredag','Lördag'],
+ dayNamesMin: ['Sö','Må','Ti','On','To','Fr','Lö'],
+ weekHeader: 'Ve',
+ dateFormat: 'yy-mm-dd',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['sv']);
+});
+
+/* Tamil (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by S A Sureshkumar (saskumar(a)live.com) */
+jQuery(function($){
+ $.datepicker.regional['ta'] = {
+ closeText: 'மூடு',
+ prevText: 'முன்னையது',
+ nextText: 'அடுத்தது',
+ currentText: 'இன்று',
+ monthNames: ['தை','மாசி','பங்குனி','சித்திரை','வைகாசி','ஆனி',
+ 'ஆடி','ஆவணி','புரட்டாசி','ஐப்பசி','கார்த்திகை','மார்கழி'],
+ monthNamesShort: ['தை','மாசி','பங்','சித்','வைகா','ஆனி',
+ 'ஆடி','ஆவ','புர','ஐப்','கார்','மார்'],
+ dayNames: ['ஞாயிற்றுக்கிழமை','திங்கட்கிழமை','செவ்வாய்க்கிழமை','புதன்கிழமை','வியாழக்கிழமை','வெள்ளிக்கிழமை','சனிக்கிழமை'],
+ dayNamesShort: ['ஞாயிறு','திங்கள்','செவ்வாய்','புதன்','வியாழன்','வெள்ளி','சனி'],
+ dayNamesMin: ['ஞா','தி','செ','பு','வி','வெ','ச'],
+ weekHeader: 'Не',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['ta']);
+});
+
+/* Thai initialisation for the jQuery UI date picker plugin. */
+/* Written by pipo (pipo(a)sixhead.com) */
+jQuery(function($){
+ $.datepicker.regional['th'] = {
+ closeText: 'ปิด',
+ prevText: '« ย้อน',
+ nextText: 'ถัดไป »',
+ currentText: 'วันนี้',
+ monthNames: ['มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน',
+ 'กรกฎาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม'],
+ monthNamesShort: ['ม.ค.','ก.พ.','มี.ค.','เม.ย.','พ.ค.','มิ.ย.',
+ 'ก.ค.','ส.ค.','ก.ย.','ต.ค.','พ.ย.','ธ.ค.'],
+ dayNames: ['อาทิตย์','จันทร์','อังคาร','พุธ','พฤหัสบดี','ศุกร์','เสาร์'],
+ dayNamesShort: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'],
+ dayNamesMin: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'],
+ weekHeader: 'Wk',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['th']);
+});
+
+/* Tajiki (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Abdurahmon Saidov (saidovab(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['tj'] = {
+ closeText: 'Идома',
+ prevText: '<Қафо',
+ nextText: 'Пеш>',
+ currentText: 'Имрӯз',
+ monthNames: ['Январ','Феврал','Март','Апрел','Май','Июн',
+ 'Июл','Август','Сентябр','Октябр','Ноябр','Декабр'],
+ monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
+ 'Июл','Авг','Сен','Окт','Ноя','Дек'],
+ dayNames: ['якшанбе','душанбе','сешанбе','чоршанбе','панҷшанбе','ҷумъа','шанбе'],
+ dayNamesShort: ['якш','душ','сеш','чор','пан','ҷум','шан'],
+ dayNamesMin: ['Як','Дш','Сш','Чш','Пш','Ҷм','Шн'],
+ weekHeader: 'Хф',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['tj']);
+});
+
+/* Turkish initialisation for the jQuery UI date picker plugin. */
+/* Written by Izzet Emre Erkan (kara(a)karalamalar.net) */
+jQuery(function($){
+ $.datepicker.regional['tr'] = {
+ closeText: 'kapat',
+ prevText: '<geri',
+ nextText: 'ileri>',
+ currentText: 'bugün',
+ monthNames: ['Ocak','Şubat','Mart','Nisan','Mayıs','Haziran',
+ 'Temmuz','Ağustos','Eylül','Ekim','Kasım','Aralık'],
+ monthNamesShort: ['Oca','Şub','Mar','Nis','May','Haz',
+ 'Tem','Ağu','Eyl','Eki','Kas','Ara'],
+ dayNames: ['Pazar','Pazartesi','Salı','Çarşamba','Perşembe','Cuma','Cumartesi'],
+ dayNamesShort: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'],
+ dayNamesMin: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'],
+ weekHeader: 'Hf',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['tr']);
+});
+
+/* Ukrainian (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Maxim Drogobitskiy (maxdao(a)gmail.com) */
+/* Corrected by Igor Milla (igor.fsp.milla(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['uk'] = {
+ closeText: 'Закрити',
+ prevText: '<',
+ nextText: '>',
+ currentText: 'Сьогодні',
+ monthNames: ['Січень','Лютий','Березень','Квітень','Травень','Червень',
+ 'Липень','Серпень','Вересень','Жовтень','Листопад','Грудень'],
+ monthNamesShort: ['Січ','Лют','Бер','Кві','Тра','Чер',
+ 'Лип','Сер','Вер','Жов','Лис','Гру'],
+ dayNames: ['неділя','понеділок','вівторок','середа','четвер','п’ятниця','субота'],
+ dayNamesShort: ['нед','пнд','вів','срд','чтв','птн','сбт'],
+ dayNamesMin: ['Нд','Пн','Вт','Ср','Чт','Пт','Сб'],
+ weekHeader: 'Тиж',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['uk']);
+});
+
+/* Vietnamese initialisation for the jQuery UI date picker plugin. */
+/* Translated by Le Thanh Huy (lthanhhuy(a)cit.ctu.edu.vn) */
+jQuery(function($){
+ $.datepicker.regional['vi'] = {
+ closeText: 'Đóng',
+ prevText: '<Trước',
+ nextText: 'Tiếp>',
+ currentText: 'Hôm nay',
+ monthNames: ['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'],
+ monthNamesShort: ['Tháng 1', 'Tháng 2', 'Tháng 3', 'Tháng 4', 'Tháng 5', 'Tháng 6',
+ 'Tháng 7', 'Tháng 8', 'Tháng 9', 'Tháng 10', 'Tháng 11', 'Tháng 12'],
+ dayNames: ['Chủ Nhật', 'Thứ Hai', 'Thứ Ba', 'Thứ Tư', 'Thứ Năm', 'Thứ Sáu', 'Thứ Bảy'],
+ dayNamesShort: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'],
+ dayNamesMin: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'],
+ weekHeader: 'Tu',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['vi']);
+});
+
+/* Chinese initialisation for the jQuery UI date picker plugin. */
+/* Written by Cloudream (cloudream(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['zh-CN'] = {
+ closeText: '关闭',
+ prevText: '<上月',
+ nextText: '下月>',
+ currentText: '今天',
+ monthNames: ['一月','二月','三月','四月','五月','六月',
+ '七月','八月','九月','十月','十一月','十二月'],
+ monthNamesShort: ['一月','二月','三月','四月','五月','六月',
+ '七月','八月','九月','十月','十一月','十二月'],
+ dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
+ dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
+ dayNamesMin: ['日','一','二','三','四','五','六'],
+ weekHeader: '周',
+ dateFormat: 'yy-mm-dd',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: true,
+ yearSuffix: '年'};
+ $.datepicker.setDefaults($.datepicker.regional['zh-CN']);
+});
+
+/* Chinese initialisation for the jQuery UI date picker plugin. */
+/* Written by SCCY (samuelcychan(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['zh-HK'] = {
+ closeText: '關閉',
+ prevText: '<上月',
+ nextText: '下月>',
+ currentText: '今天',
+ monthNames: ['一月','二月','三月','四月','五月','六月',
+ '七月','八月','九月','十月','十一月','十二月'],
+ monthNamesShort: ['一月','二月','三月','四月','五月','六月',
+ '七月','八月','九月','十月','十一月','十二月'],
+ dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
+ dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
+ dayNamesMin: ['日','一','二','三','四','五','六'],
+ weekHeader: '周',
+ dateFormat: 'dd-mm-yy',
+ firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: true,
+ yearSuffix: '年'};
+ $.datepicker.setDefaults($.datepicker.regional['zh-HK']);
+});
+
+/* Chinese initialisation for the jQuery UI date picker plugin. */
+/* Written by Ressol (ressol(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['zh-TW'] = {
+ closeText: '關閉',
+ prevText: '<上月',
+ nextText: '下月>',
+ currentText: '今天',
+ monthNames: ['一月','二月','三月','四月','五月','六月',
+ '七月','八月','九月','十月','十一月','十二月'],
+ monthNamesShort: ['一月','二月','三月','四月','五月','六月',
+ '七月','八月','九月','十月','十一月','十二月'],
+ dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
+ dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
+ dayNamesMin: ['日','一','二','三','四','五','六'],
+ weekHeader: '周',
+ dateFormat: 'yy/mm/dd',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: true,
+ yearSuffix: '年'};
+ $.datepicker.setDefaults($.datepicker.regional['zh-TW']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-af.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-af.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-af.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Afrikaans initialisation for the jQuery UI date picker plugin. */
+/* Written by Renier Pretorius. */
+jQuery(function($){
+ $.datepicker.regional['af'] = {
+ closeText: 'Selekteer',
+ prevText: 'Vorige',
+ nextText: 'Volgende',
+ currentText: 'Vandag',
+ monthNames: ['Januarie','Februarie','Maart','April','Mei','Junie',
+ 'Julie','Augustus','September','Oktober','November','Desember'],
+ monthNamesShort: ['Jan', 'Feb', 'Mrt', 'Apr', 'Mei', 'Jun',
+ 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Des'],
+ dayNames: ['Sondag', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrydag', 'Saterdag'],
+ dayNamesShort: ['Son', 'Maa', 'Din', 'Woe', 'Don', 'Vry', 'Sat'],
+ dayNamesMin: ['So','Ma','Di','Wo','Do','Vr','Sa'],
+ weekHeader: 'Wk',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['af']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ar-DZ.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ar-DZ.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ar-DZ.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Algerian Arabic Translation for jQuery UI date picker plugin. (can be used for Tunisia)*/
+/* Mohamed Cherif BOUCHELAGHEM -- cherifbouchelaghem(a)yahoo.fr */
+
+jQuery(function($){
+ $.datepicker.regional['ar-DZ'] = {
+ closeText: 'إغلاق',
+ prevText: '<السابق',
+ nextText: 'التالي>',
+ currentText: 'اليوم',
+ monthNames: ['جانفي', 'فيفري', 'مارس', 'أفريل', 'ماي', 'جوان',
+ 'جويلية', 'أوت', 'سبتمبر','أكتوبر', 'نوفمبر', 'ديسمبر'],
+ monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
+ dayNames: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
+ dayNamesShort: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
+ dayNamesMin: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
+ weekHeader: 'أسبوع',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 6,
+ isRTL: true,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['ar-DZ']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ar.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ar.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ar.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Arabic Translation for jQuery UI date picker plugin. */
+/* Khaled Alhourani -- me(a)khaledalhourani.com */
+/* NOTE: monthNames are the original months names and they are the Arabic names, not the new months name فبراير - يناير and there isn't any Arabic roots for these months */
+jQuery(function($){
+ $.datepicker.regional['ar'] = {
+ closeText: 'إغلاق',
+ prevText: '<السابق',
+ nextText: 'التالي>',
+ currentText: 'اليوم',
+ monthNames: ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'مايو', 'حزيران',
+ 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'],
+ monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
+ dayNames: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
+ dayNamesShort: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
+ dayNamesMin: ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
+ weekHeader: 'أسبوع',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 6,
+ isRTL: true,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['ar']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-az.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-az.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-az.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Azerbaijani (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Jamil Najafov (necefov33(a)gmail.com) */
+jQuery(function($) {
+ $.datepicker.regional['az'] = {
+ closeText: 'Bağla',
+ prevText: '<Geri',
+ nextText: 'İrəli>',
+ currentText: 'Bugün',
+ monthNames: ['Yanvar','Fevral','Mart','Aprel','May','İyun',
+ 'İyul','Avqust','Sentyabr','Oktyabr','Noyabr','Dekabr'],
+ monthNamesShort: ['Yan','Fev','Mar','Apr','May','İyun',
+ 'İyul','Avq','Sen','Okt','Noy','Dek'],
+ dayNames: ['Bazar','Bazar ertəsi','Çərşənbə axşamı','Çərşənbə','Cümə axşamı','Cümə','Şənbə'],
+ dayNamesShort: ['B','Be','Ça','Ç','Ca','C','Ş'],
+ dayNamesMin: ['B','B','Ç','С','Ç','C','Ş'],
+ weekHeader: 'Hf',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['az']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-bg.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-bg.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-bg.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,24 @@
+/* Bulgarian initialisation for the jQuery UI date picker plugin. */
+/* Written by Stoyan Kyosev (http://svest.org) */
+jQuery(function($){
+ $.datepicker.regional['bg'] = {
+ closeText: 'затвори',
+ prevText: '<назад',
+ nextText: 'напред>',
+ nextBigText: '>>',
+ currentText: 'днес',
+ monthNames: ['Януари','Февруари','Март','Април','Май','Юни',
+ 'Юли','Август','Септември','Октомври','Ноември','Декември'],
+ monthNamesShort: ['Яну','Фев','Мар','Апр','Май','Юни',
+ 'Юли','Авг','Сеп','Окт','Нов','Дек'],
+ dayNames: ['Неделя','Понеделник','Вторник','Сряда','Четвъртък','Петък','Събота'],
+ dayNamesShort: ['Нед','Пон','Вто','Сря','Чет','Пет','Съб'],
+ dayNamesMin: ['Не','По','Вт','Ср','Че','Пе','Съ'],
+ weekHeader: 'Wk',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['bg']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-bs.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-bs.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-bs.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Bosnian i18n for the jQuery UI date picker plugin. */
+/* Written by Kenan Konjo. */
+jQuery(function($){
+ $.datepicker.regional['bs'] = {
+ closeText: 'Zatvori',
+ prevText: '<',
+ nextText: '>',
+ currentText: 'Danas',
+ monthNames: ['Januar','Februar','Mart','April','Maj','Juni',
+ 'Juli','August','Septembar','Oktobar','Novembar','Decembar'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
+ 'Jul','Aug','Sep','Okt','Nov','Dec'],
+ dayNames: ['Nedelja','Ponedeljak','Utorak','Srijeda','Četvrtak','Petak','Subota'],
+ dayNamesShort: ['Ned','Pon','Uto','Sri','Čet','Pet','Sub'],
+ dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
+ weekHeader: 'Wk',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['bs']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ca.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ca.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ca.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Inicialització en català per a l'extensió 'UI date picker' per jQuery. */
+/* Writers: (joan.leon(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['ca'] = {
+ closeText: 'Tanca',
+ prevText: 'Anterior',
+ nextText: 'Següent',
+ currentText: 'Avui',
+ monthNames: ['gener','febrer','març','abril','maig','juny',
+ 'juliol','agost','setembre','octubre','novembre','desembre'],
+ monthNamesShort: ['gen','feb','març','abr','maig','juny',
+ 'jul','ag','set','oct','nov','des'],
+ dayNames: ['diumenge','dilluns','dimarts','dimecres','dijous','divendres','dissabte'],
+ dayNamesShort: ['dg','dl','dt','dc','dj','dv','ds'],
+ dayNamesMin: ['dg','dl','dt','dc','dj','dv','ds'],
+ weekHeader: 'Set',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['ca']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-cs.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-cs.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-cs.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Czech initialisation for the jQuery UI date picker plugin. */
+/* Written by Tomas Muller (tomas(a)tomas-muller.net) */
+jQuery(function($){
+ $.datepicker.regional['cs'] = {
+ closeText: 'Zavřít',
+ prevText: '<Dříve',
+ nextText: 'Později>',
+ currentText: 'Nyní',
+ monthNames: ['leden','únor','březen','duben','květen','červen',
+ 'červenec','srpen','září','říjen','listopad','prosinec'],
+ monthNamesShort: ['led','úno','bře','dub','kvě','čer',
+ 'čvc','srp','zář','říj','lis','pro'],
+ dayNames: ['neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota'],
+ dayNamesShort: ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so'],
+ dayNamesMin: ['ne','po','út','st','čt','pá','so'],
+ weekHeader: 'Týd',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['cs']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-cy-GB.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-cy-GB.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-cy-GB.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Welsh/UK initialisation for the jQuery UI date picker plugin. */
+/* Written by William Griffiths. */
+jQuery(function($){
+ $.datepicker.regional['cy-GB'] = {
+ closeText: 'Done',
+ prevText: 'Prev',
+ nextText: 'Next',
+ currentText: 'Today',
+ monthNames: ['Ionawr','Chwefror','Mawrth','Ebrill','Mai','Mehefin',
+ 'Gorffennaf','Awst','Medi','Hydref','Tachwedd','Rhagfyr'],
+ monthNamesShort: ['Ion', 'Chw', 'Maw', 'Ebr', 'Mai', 'Meh',
+ 'Gor', 'Aws', 'Med', 'Hyd', 'Tac', 'Rha'],
+ dayNames: ['Dydd Sul', 'Dydd Llun', 'Dydd Mawrth', 'Dydd Mercher', 'Dydd Iau', 'Dydd Gwener', 'Dydd Sadwrn'],
+ dayNamesShort: ['Sul', 'Llu', 'Maw', 'Mer', 'Iau', 'Gwe', 'Sad'],
+ dayNamesMin: ['Su','Ll','Ma','Me','Ia','Gw','Sa'],
+ weekHeader: 'Wy',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['cy-GB']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-da.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-da.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-da.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Danish initialisation for the jQuery UI date picker plugin. */
+/* Written by Jan Christensen ( deletestuff(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['da'] = {
+ closeText: 'Luk',
+ prevText: '<Forrige',
+ nextText: 'Næste>',
+ currentText: 'Idag',
+ monthNames: ['Januar','Februar','Marts','April','Maj','Juni',
+ 'Juli','August','September','Oktober','November','December'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
+ 'Jul','Aug','Sep','Okt','Nov','Dec'],
+ dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'],
+ dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'],
+ dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'],
+ weekHeader: 'Uge',
+ dateFormat: 'dd-mm-yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['da']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-de.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-de.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-de.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* German initialisation for the jQuery UI date picker plugin. */
+/* Written by Milian Wolff (mail(a)milianw.de) */
+jQuery(function($){
+ $.datepicker.regional['de'] = {
+ closeText: 'schließen',
+ prevText: '<zurück',
+ nextText: 'Vor>',
+ currentText: 'heute',
+ monthNames: ['Januar','Februar','März','April','Mai','Juni',
+ 'Juli','August','September','Oktober','November','Dezember'],
+ monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun',
+ 'Jul','Aug','Sep','Okt','Nov','Dez'],
+ dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
+ dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
+ dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
+ weekHeader: 'KW',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['de']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-el.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-el.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-el.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Greek (el) initialisation for the jQuery UI date picker plugin. */
+/* Written by Alex Cicovic (http://www.alexcicovic.com) */
+jQuery(function($){
+ $.datepicker.regional['el'] = {
+ closeText: 'Κλείσιμο',
+ prevText: 'Προηγούμενος',
+ nextText: 'Επόμενος',
+ currentText: 'Τρέχων Μήνας',
+ monthNames: ['Ιανουάριος','Φεβρουάριος','Μάρτιος','Απρίλιος','Μάιος','Ιούνιος',
+ 'Ιούλιος','Αύγουστος','Σεπτέμβριος','Οκτώβριος','Νοέμβριος','Δεκέμβριος'],
+ monthNamesShort: ['Ιαν','Φεβ','Μαρ','Απρ','Μαι','Ιουν',
+ 'Ιουλ','Αυγ','Σεπ','Οκτ','Νοε','Δεκ'],
+ dayNames: ['Κυριακή','Δευτέρα','Τρίτη','Τετάρτη','Πέμπτη','Παρασκευή','Σάββατο'],
+ dayNamesShort: ['Κυρ','Δευ','Τρι','Τετ','Πεμ','Παρ','Σαβ'],
+ dayNamesMin: ['Κυ','Δε','Τρ','Τε','Πε','Πα','Σα'],
+ weekHeader: 'Εβδ',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['el']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-en-AU.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-en-AU.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-en-AU.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* English/Australia initialisation for the jQuery UI date picker plugin. */
+/* Based on the en-GB initialisation. */
+jQuery(function($){
+ $.datepicker.regional['en-AU'] = {
+ closeText: 'Done',
+ prevText: 'Prev',
+ nextText: 'Next',
+ currentText: 'Today',
+ monthNames: ['January','February','March','April','May','June',
+ 'July','August','September','October','November','December'],
+ monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
+ 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
+ dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
+ dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
+ dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
+ weekHeader: 'Wk',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['en-AU']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-en-GB.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-en-GB.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-en-GB.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* English/UK initialisation for the jQuery UI date picker plugin. */
+/* Written by Stuart. */
+jQuery(function($){
+ $.datepicker.regional['en-GB'] = {
+ closeText: 'Done',
+ prevText: 'Prev',
+ nextText: 'Next',
+ currentText: 'Today',
+ monthNames: ['January','February','March','April','May','June',
+ 'July','August','September','October','November','December'],
+ monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
+ 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
+ dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
+ dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
+ dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
+ weekHeader: 'Wk',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['en-GB']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-en-NZ.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-en-NZ.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-en-NZ.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* English/New Zealand initialisation for the jQuery UI date picker plugin. */
+/* Based on the en-GB initialisation. */
+jQuery(function($){
+ $.datepicker.regional['en-NZ'] = {
+ closeText: 'Done',
+ prevText: 'Prev',
+ nextText: 'Next',
+ currentText: 'Today',
+ monthNames: ['January','February','March','April','May','June',
+ 'July','August','September','October','November','December'],
+ monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
+ 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
+ dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
+ dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
+ dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
+ weekHeader: 'Wk',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['en-NZ']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-eo.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-eo.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-eo.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Esperanto initialisation for the jQuery UI date picker plugin. */
+/* Written by Olivier M. (olivierweb(a)ifrance.com) */
+jQuery(function($){
+ $.datepicker.regional['eo'] = {
+ closeText: 'Fermi',
+ prevText: '<Anta',
+ nextText: 'Sekv>',
+ currentText: 'Nuna',
+ monthNames: ['Januaro','Februaro','Marto','Aprilo','Majo','Junio',
+ 'Julio','Aŭgusto','Septembro','Oktobro','Novembro','Decembro'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
+ 'Jul','Aŭg','Sep','Okt','Nov','Dec'],
+ dayNames: ['Dimanĉo','Lundo','Mardo','Merkredo','Ĵaŭdo','Vendredo','Sabato'],
+ dayNamesShort: ['Dim','Lun','Mar','Mer','Ĵaŭ','Ven','Sab'],
+ dayNamesMin: ['Di','Lu','Ma','Me','Ĵa','Ve','Sa'],
+ weekHeader: 'Sb',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['eo']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-es.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-es.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-es.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Inicialización en español para la extensión 'UI date picker' para jQuery. */
+/* Traducido por Vester (xvester(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['es'] = {
+ closeText: 'Cerrar',
+ prevText: '<Ant',
+ nextText: 'Sig>',
+ currentText: 'Hoy',
+ monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio',
+ 'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'],
+ monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun',
+ 'Jul','Ago','Sep','Oct','Nov','Dic'],
+ dayNames: ['Domingo','Lunes','Martes','Miércoles','Jueves','Viernes','Sábado'],
+ dayNamesShort: ['Dom','Lun','Mar','Mié','Juv','Vie','Sáb'],
+ dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','Sá'],
+ weekHeader: 'Sm',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['es']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-et.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-et.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-et.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Estonian initialisation for the jQuery UI date picker plugin. */
+/* Written by Mart Sõmermaa (mrts.pydev at gmail com). */
+jQuery(function($){
+ $.datepicker.regional['et'] = {
+ closeText: 'Sulge',
+ prevText: 'Eelnev',
+ nextText: 'Järgnev',
+ currentText: 'Täna',
+ monthNames: ['Jaanuar','Veebruar','Märts','Aprill','Mai','Juuni',
+ 'Juuli','August','September','Oktoober','November','Detsember'],
+ monthNamesShort: ['Jaan', 'Veebr', 'Märts', 'Apr', 'Mai', 'Juuni',
+ 'Juuli', 'Aug', 'Sept', 'Okt', 'Nov', 'Dets'],
+ dayNames: ['Pühapäev', 'Esmaspäev', 'Teisipäev', 'Kolmapäev', 'Neljapäev', 'Reede', 'Laupäev'],
+ dayNamesShort: ['Pühap', 'Esmasp', 'Teisip', 'Kolmap', 'Neljap', 'Reede', 'Laup'],
+ dayNamesMin: ['P','E','T','K','N','R','L'],
+ weekHeader: 'näd',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['et']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-eu.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-eu.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-eu.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Euskarako oinarria 'UI date picker' jquery-ko extentsioarentzat */
+/* Karrikas-ek itzulia (karrikas(a)karrikas.com) */
+jQuery(function($){
+ $.datepicker.regional['eu'] = {
+ closeText: 'Egina',
+ prevText: '<Aur',
+ nextText: 'Hur>',
+ currentText: 'Gaur',
+ monthNames: ['urtarrila','otsaila','martxoa','apirila','maiatza','ekaina',
+ 'uztaila','abuztua','iraila','urria','azaroa','abendua'],
+ monthNamesShort: ['urt.','ots.','mar.','api.','mai.','eka.',
+ 'uzt.','abu.','ira.','urr.','aza.','abe.'],
+ dayNames: ['igandea','astelehena','asteartea','asteazkena','osteguna','ostirala','larunbata'],
+ dayNamesShort: ['ig.','al.','ar.','az.','og.','ol.','lr.'],
+ dayNamesMin: ['ig','al','ar','az','og','ol','lr'],
+ weekHeader: 'As',
+ dateFormat: 'yy-mm-dd',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['eu']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-fa.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-fa.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-fa.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,59 @@
+/* Persian (Farsi) Translation for the jQuery UI date picker plugin. */
+/* Javad Mowlanezhad -- jmowla(a)gmail.com */
+/* Jalali calendar should supported soon! (Its implemented but I have to test it) */
+jQuery(function($) {
+ $.datepicker.regional['fa'] = {
+ closeText: 'بستن',
+ prevText: '<قبلی',
+ nextText: 'بعدی>',
+ currentText: 'امروز',
+ monthNames: [
+ 'فروردين',
+ 'ارديبهشت',
+ 'خرداد',
+ 'تير',
+ 'مرداد',
+ 'شهريور',
+ 'مهر',
+ 'آبان',
+ 'آذر',
+ 'دی',
+ 'بهمن',
+ 'اسفند'
+ ],
+ monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'],
+ dayNames: [
+ 'يکشنبه',
+ 'دوشنبه',
+ 'سهشنبه',
+ 'چهارشنبه',
+ 'پنجشنبه',
+ 'جمعه',
+ 'شنبه'
+ ],
+ dayNamesShort: [
+ 'ی',
+ 'د',
+ 'س',
+ 'چ',
+ 'پ',
+ 'ج',
+ 'ش'
+ ],
+ dayNamesMin: [
+ 'ی',
+ 'د',
+ 'س',
+ 'چ',
+ 'پ',
+ 'ج',
+ 'ش'
+ ],
+ weekHeader: 'هف',
+ dateFormat: 'yy/mm/dd',
+ firstDay: 6,
+ isRTL: true,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['fa']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-fi.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-fi.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-fi.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Finnish initialisation for the jQuery UI date picker plugin. */
+/* Written by Harri Kilpiö (harrikilpio(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['fi'] = {
+ closeText: 'Sulje',
+ prevText: '«Edellinen',
+ nextText: 'Seuraava»',
+ currentText: 'Tänään',
+ monthNames: ['Tammikuu','Helmikuu','Maaliskuu','Huhtikuu','Toukokuu','Kesäkuu',
+ 'Heinäkuu','Elokuu','Syyskuu','Lokakuu','Marraskuu','Joulukuu'],
+ monthNamesShort: ['Tammi','Helmi','Maalis','Huhti','Touko','Kesä',
+ 'Heinä','Elo','Syys','Loka','Marras','Joulu'],
+ dayNamesShort: ['Su','Ma','Ti','Ke','To','Pe','La'],
+ dayNames: ['Sunnuntai','Maanantai','Tiistai','Keskiviikko','Torstai','Perjantai','Lauantai'],
+ dayNamesMin: ['Su','Ma','Ti','Ke','To','Pe','La'],
+ weekHeader: 'Vk',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['fi']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-fo.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-fo.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-fo.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Faroese initialisation for the jQuery UI date picker plugin */
+/* Written by Sverri Mohr Olsen, sverrimo(a)gmail.com */
+jQuery(function($){
+ $.datepicker.regional['fo'] = {
+ closeText: 'Lat aftur',
+ prevText: '<Fyrra',
+ nextText: 'Næsta>',
+ currentText: 'Í dag',
+ monthNames: ['Januar','Februar','Mars','Apríl','Mei','Juni',
+ 'Juli','August','September','Oktober','November','Desember'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun',
+ 'Jul','Aug','Sep','Okt','Nov','Des'],
+ dayNames: ['Sunnudagur','Mánadagur','Týsdagur','Mikudagur','Hósdagur','Fríggjadagur','Leyardagur'],
+ dayNamesShort: ['Sun','Mán','Týs','Mik','Hós','Frí','Ley'],
+ dayNamesMin: ['Su','Má','Tý','Mi','Hó','Fr','Le'],
+ weekHeader: 'Vk',
+ dateFormat: 'dd-mm-yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['fo']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-fr-CH.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-fr-CH.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-fr-CH.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Swiss-French initialisation for the jQuery UI date picker plugin. */
+/* Written Martin Voelkle (martin.voelkle(a)e-tc.ch) */
+jQuery(function($){
+ $.datepicker.regional['fr-CH'] = {
+ closeText: 'Fermer',
+ prevText: '<Préc',
+ nextText: 'Suiv>',
+ currentText: 'Courant',
+ monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
+ 'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
+ monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jun',
+ 'Jul','Aoû','Sep','Oct','Nov','Déc'],
+ dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
+ dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'],
+ dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'],
+ weekHeader: 'Sm',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['fr-CH']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-fr.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-fr.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-fr.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,25 @@
+/* French initialisation for the jQuery UI date picker plugin. */
+/* Written by Keith Wood (kbwood{at}iinet.com.au),
+ Stéphane Nahmani (sholby(a)sholby.net)
+ Stéphane Raimbault <stephane.raimbault(a)gmail.com> */
+jQuery(function($){
+ $.datepicker.regional['fr'] = {
+ closeText: 'Fermer',
+ prevText: 'Précédent',
+ nextText: 'Suivant',
+ currentText: 'Aujourd\'hui',
+ monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
+ 'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
+ monthNamesShort: ['Janv.','Févr.','Mars','Avril','Mai','Juin',
+ 'Juil.','Août','Sept.','Oct.','Nov.','Déc.'],
+ dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
+ dayNamesShort: ['Dim.','Lun.','Mar.','Mer.','Jeu.','Ven.','Sam.'],
+ dayNamesMin: ['D','L','M','M','J','V','S'],
+ weekHeader: 'Sem.',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['fr']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-gl.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-gl.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-gl.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Galician localization for 'UI date picker' jQuery extension. */
+/* Translated by Jorge Barreiro <yortx.barry(a)gmail.com>. */
+jQuery(function($){
+ $.datepicker.regional['gl'] = {
+ closeText: 'Pechar',
+ prevText: '<Ant',
+ nextText: 'Seg>',
+ currentText: 'Hoxe',
+ monthNames: ['Xaneiro','Febreiro','Marzo','Abril','Maio','Xuño',
+ 'Xullo','Agosto','Setembro','Outubro','Novembro','Decembro'],
+ monthNamesShort: ['Xan','Feb','Mar','Abr','Mai','Xuñ',
+ 'Xul','Ago','Set','Out','Nov','Dec'],
+ dayNames: ['Domingo','Luns','Martes','Mércores','Xoves','Venres','Sábado'],
+ dayNamesShort: ['Dom','Lun','Mar','Mér','Xov','Ven','Sáb'],
+ dayNamesMin: ['Do','Lu','Ma','Mé','Xo','Ve','Sá'],
+ weekHeader: 'Sm',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['gl']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-he.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-he.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-he.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Hebrew initialisation for the UI Datepicker extension. */
+/* Written by Amir Hardon (ahardon at gmail dot com). */
+jQuery(function($){
+ $.datepicker.regional['he'] = {
+ closeText: 'סגור',
+ prevText: '<הקודם',
+ nextText: 'הבא>',
+ currentText: 'היום',
+ monthNames: ['ינואר','פברואר','מרץ','אפריל','מאי','יוני',
+ 'יולי','אוגוסט','ספטמבר','אוקטובר','נובמבר','דצמבר'],
+ monthNamesShort: ['ינו','פבר','מרץ','אפר','מאי','יוני',
+ 'יולי','אוג','ספט','אוק','נוב','דצמ'],
+ dayNames: ['ראשון','שני','שלישי','רביעי','חמישי','שישי','שבת'],
+ dayNamesShort: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'],
+ dayNamesMin: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'],
+ weekHeader: 'Wk',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 0,
+ isRTL: true,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['he']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-hi.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-hi.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-hi.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Hindi initialisation for the jQuery UI date picker plugin. */
+/* Written by Michael Dawart. */
+jQuery(function($){
+ $.datepicker.regional['hi'] = {
+ closeText: 'बंद',
+ prevText: 'पिछला',
+ nextText: 'अगला',
+ currentText: 'आज',
+ monthNames: ['जनवरी ','फरवरी','मार्च','अप्रेल','मई','जून',
+ 'जूलाई','अगस्त ','सितम्बर','अक्टूबर','नवम्बर','दिसम्बर'],
+ monthNamesShort: ['जन', 'फर', 'मार्च', 'अप्रेल', 'मई', 'जून',
+ 'जूलाई', 'अग', 'सित', 'अक्ट', 'नव', 'दि'],
+ dayNames: ['रविवार', 'सोमवार', 'मंगलवार', 'बुधवार', 'गुरुवार', 'शुक्रवार', 'शनिवार'],
+ dayNamesShort: ['रवि', 'सोम', 'मंगल', 'बुध', 'गुरु', 'शुक्र', 'शनि'],
+ dayNamesMin: ['रवि', 'सोम', 'मंगल', 'बुध', 'गुरु', 'शुक्र', 'शनि'],
+ weekHeader: 'हफ्ता',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['hi']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-hr.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-hr.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-hr.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Croatian i18n for the jQuery UI date picker plugin. */
+/* Written by Vjekoslav Nesek. */
+jQuery(function($){
+ $.datepicker.regional['hr'] = {
+ closeText: 'Zatvori',
+ prevText: '<',
+ nextText: '>',
+ currentText: 'Danas',
+ monthNames: ['Siječanj','Veljača','Ožujak','Travanj','Svibanj','Lipanj',
+ 'Srpanj','Kolovoz','Rujan','Listopad','Studeni','Prosinac'],
+ monthNamesShort: ['Sij','Velj','Ožu','Tra','Svi','Lip',
+ 'Srp','Kol','Ruj','Lis','Stu','Pro'],
+ dayNames: ['Nedjelja','Ponedjeljak','Utorak','Srijeda','Četvrtak','Petak','Subota'],
+ dayNamesShort: ['Ned','Pon','Uto','Sri','Čet','Pet','Sub'],
+ dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
+ weekHeader: 'Tje',
+ dateFormat: 'dd.mm.yy.',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['hr']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-hu.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-hu.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-hu.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Hungarian initialisation for the jQuery UI date picker plugin. */
+/* Written by Istvan Karaszi (jquery(a)spam.raszi.hu) */
+jQuery(function($){
+ $.datepicker.regional['hu'] = {
+ closeText: 'bezár',
+ prevText: 'vissza',
+ nextText: 'előre',
+ currentText: 'ma',
+ monthNames: ['Január', 'Február', 'Március', 'Április', 'Május', 'Június',
+ 'Július', 'Augusztus', 'Szeptember', 'Október', 'November', 'December'],
+ monthNamesShort: ['Jan', 'Feb', 'Már', 'Ápr', 'Máj', 'Jún',
+ 'Júl', 'Aug', 'Szep', 'Okt', 'Nov', 'Dec'],
+ dayNames: ['Vasárnap', 'Hétfő', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'],
+ dayNamesShort: ['Vas', 'Hét', 'Ked', 'Sze', 'Csü', 'Pén', 'Szo'],
+ dayNamesMin: ['V', 'H', 'K', 'Sze', 'Cs', 'P', 'Szo'],
+ weekHeader: 'Hét',
+ dateFormat: 'yy.mm.dd.',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: true,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['hu']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-hy.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-hy.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-hy.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Armenian(UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Levon Zakaryan (levon.zakaryan(a)gmail.com)*/
+jQuery(function($){
+ $.datepicker.regional['hy'] = {
+ closeText: 'Փակել',
+ prevText: '<Նախ.',
+ nextText: 'Հաջ.>',
+ currentText: 'Այսօր',
+ monthNames: ['Հունվար','Փետրվար','Մարտ','Ապրիլ','Մայիս','Հունիս',
+ 'Հուլիս','Օգոստոս','Սեպտեմբեր','Հոկտեմբեր','Նոյեմբեր','Դեկտեմբեր'],
+ monthNamesShort: ['Հունվ','Փետր','Մարտ','Ապր','Մայիս','Հունիս',
+ 'Հուլ','Օգս','Սեպ','Հոկ','Նոյ','Դեկ'],
+ dayNames: ['կիրակի','եկուշաբթի','երեքշաբթի','չորեքշաբթի','հինգշաբթի','ուրբաթ','շաբաթ'],
+ dayNamesShort: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'],
+ dayNamesMin: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'],
+ weekHeader: 'ՇԲՏ',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['hy']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-id.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-id.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-id.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Indonesian initialisation for the jQuery UI date picker plugin. */
+/* Written by Deden Fathurahman (dedenf(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['id'] = {
+ closeText: 'Tutup',
+ prevText: '<mundur',
+ nextText: 'maju>',
+ currentText: 'hari ini',
+ monthNames: ['Januari','Februari','Maret','April','Mei','Juni',
+ 'Juli','Agustus','September','Oktober','Nopember','Desember'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun',
+ 'Jul','Agus','Sep','Okt','Nop','Des'],
+ dayNames: ['Minggu','Senin','Selasa','Rabu','Kamis','Jumat','Sabtu'],
+ dayNamesShort: ['Min','Sen','Sel','Rab','kam','Jum','Sab'],
+ dayNamesMin: ['Mg','Sn','Sl','Rb','Km','jm','Sb'],
+ weekHeader: 'Mg',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['id']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-is.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-is.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-is.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Icelandic initialisation for the jQuery UI date picker plugin. */
+/* Written by Haukur H. Thorsson (haukur(a)eskill.is) */
+jQuery(function($){
+ $.datepicker.regional['is'] = {
+ closeText: 'Loka',
+ prevText: '< Fyrri',
+ nextText: 'Næsti >',
+ currentText: 'Í dag',
+ monthNames: ['Janúar','Febrúar','Mars','Apríl','Maí','Júní',
+ 'Júlí','Ágúst','September','Október','Nóvember','Desember'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maí','Jún',
+ 'Júl','Ágú','Sep','Okt','Nóv','Des'],
+ dayNames: ['Sunnudagur','Mánudagur','Þriðjudagur','Miðvikudagur','Fimmtudagur','Föstudagur','Laugardagur'],
+ dayNamesShort: ['Sun','Mán','Þri','Mið','Fim','Fös','Lau'],
+ dayNamesMin: ['Su','Má','Þr','Mi','Fi','Fö','La'],
+ weekHeader: 'Vika',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['is']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-it.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-it.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-it.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Italian initialisation for the jQuery UI date picker plugin. */
+/* Written by Antonello Pasella (antonello.pasella(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['it'] = {
+ closeText: 'Chiudi',
+ prevText: '<Prec',
+ nextText: 'Succ>',
+ currentText: 'Oggi',
+ monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno',
+ 'Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'],
+ monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu',
+ 'Lug','Ago','Set','Ott','Nov','Dic'],
+ dayNames: ['Domenica','Lunedì','Martedì','Mercoledì','Giovedì','Venerdì','Sabato'],
+ dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'],
+ dayNamesMin: ['Do','Lu','Ma','Me','Gi','Ve','Sa'],
+ weekHeader: 'Sm',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['it']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ja.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ja.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ja.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Japanese initialisation for the jQuery UI date picker plugin. */
+/* Written by Kentaro SATO (kentaro(a)ranvis.com) */
+jQuery(function($){
+ $.datepicker.regional['ja'] = {
+ closeText: '閉じる',
+ prevText: '<前',
+ nextText: '次>',
+ currentText: '今日',
+ monthNames: ['1月','2月','3月','4月','5月','6月',
+ '7月','8月','9月','10月','11月','12月'],
+ monthNamesShort: ['1月','2月','3月','4月','5月','6月',
+ '7月','8月','9月','10月','11月','12月'],
+ dayNames: ['日曜日','月曜日','火曜日','水曜日','木曜日','金曜日','土曜日'],
+ dayNamesShort: ['日','月','火','水','木','金','土'],
+ dayNamesMin: ['日','月','火','水','木','金','土'],
+ weekHeader: '週',
+ dateFormat: 'yy/mm/dd',
+ firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: true,
+ yearSuffix: '年'};
+ $.datepicker.setDefaults($.datepicker.regional['ja']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ka.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ka.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ka.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,21 @@
+/* Georgian (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Lado Lomidze (lado.lomidze(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['ka'] = {
+ closeText: 'დახურვა',
+ prevText: '< წინა',
+ nextText: 'შემდეგი >',
+ currentText: 'დღეს',
+ monthNames: ['იანვარი','თებერვალი','მარტი','აპრილი','მაისი','ივნისი', 'ივლისი','აგვისტო','სექტემბერი','ოქტომბერი','ნოემბერი','დეკემბერი'],
+ monthNamesShort: ['იან','თებ','მარ','აპრ','მაი','ივნ', 'ივლ','აგვ','სექ','ოქტ','ნოე','დეკ'],
+ dayNames: ['კვირა','ორშაბათი','სამშაბათი','ოთხშაბათი','ხუთშაბათი','პარასკევი','შაბათი'],
+ dayNamesShort: ['კვ','ორშ','სამ','ოთხ','ხუთ','პარ','შაბ'],
+ dayNamesMin: ['კვ','ორშ','სამ','ოთხ','ხუთ','პარ','შაბ'],
+ weekHeader: 'კვირა',
+ dateFormat: 'dd-mm-yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['ka']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-kk.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-kk.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-kk.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Kazakh (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Dmitriy Karasyov (dmitriy.karasyov(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['kk'] = {
+ closeText: 'Жабу',
+ prevText: '<Алдыңғы',
+ nextText: 'Келесі>',
+ currentText: 'Бүгін',
+ monthNames: ['Қаңтар','Ақпан','Наурыз','Сәуір','Мамыр','Маусым',
+ 'Шілде','Тамыз','Қыркүйек','Қазан','Қараша','Желтоқсан'],
+ monthNamesShort: ['Қаң','Ақп','Нау','Сәу','Мам','Мау',
+ 'Шіл','Там','Қыр','Қаз','Қар','Жел'],
+ dayNames: ['Жексенбі','Дүйсенбі','Сейсенбі','Сәрсенбі','Бейсенбі','Жұма','Сенбі'],
+ dayNamesShort: ['жкс','дсн','ссн','срс','бсн','жма','снб'],
+ dayNamesMin: ['Жк','Дс','Сс','Ср','Бс','Жм','Сн'],
+ weekHeader: 'Не',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['kk']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-km.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-km.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-km.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Khmer initialisation for the jQuery calendar extension. */
+/* Written by Chandara Om (chandara.teacher(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['km'] = {
+ closeText: 'ធ្វើរួច',
+ prevText: 'មុន',
+ nextText: 'បន្ទាប់',
+ currentText: 'ថ្ងៃនេះ',
+ monthNames: ['មករា','កុម្ភៈ','មីនា','មេសា','ឧសភា','មិថុនា',
+ 'កក្កដា','សីហា','កញ្ញា','តុលា','វិច្ឆិកា','ធ្នូ'],
+ monthNamesShort: ['មករា','កុម្ភៈ','មីនា','មេសា','ឧសភា','មិថុនា',
+ 'កក្កដា','សីហា','កញ្ញា','តុលា','វិច្ឆិកា','ធ្នូ'],
+ dayNames: ['អាទិត្យ', 'ចន្ទ', 'អង្គារ', 'ពុធ', 'ព្រហស្បតិ៍', 'សុក្រ', 'សៅរ៍'],
+ dayNamesShort: ['អា', 'ច', 'អ', 'ពុ', 'ព្រហ', 'សុ', 'សៅ'],
+ dayNamesMin: ['អា', 'ច', 'អ', 'ពុ', 'ព្រហ', 'សុ', 'សៅ'],
+ weekHeader: 'សប្ដាហ៍',
+ dateFormat: 'dd-mm-yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['km']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ko.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ko.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ko.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Korean initialisation for the jQuery calendar extension. */
+/* Written by DaeKwon Kang (ncrash.dk(a)gmail.com) Edited by Genie. */
+jQuery(function($){
+ $.datepicker.regional['ko'] = {
+ closeText: '닫기',
+ prevText: '이전달',
+ nextText: '다음달',
+ currentText: '오늘',
+ monthNames: ['1월','2월','3월','4월','5월','6월',
+ '7월','8월','9월','10월','11월','12월'],
+ monthNamesShort: ['1월','2월','3월','4월','5월','6월',
+ '7월','8월','9월','10월','11월','12월'],
+ dayNames: ['일요일','월요일','화요일','수요일','목요일','금요일','토요일'],
+ dayNamesShort: ['일','월','화','수','목','금','토'],
+ dayNamesMin: ['일','월','화','수','목','금','토'],
+ weekHeader: 'Wk',
+ dateFormat: 'yy-mm-dd',
+ firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: true,
+ yearSuffix: '년'};
+ $.datepicker.setDefaults($.datepicker.regional['ko']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-lb.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-lb.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-lb.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Luxembourgish initialisation for the jQuery UI date picker plugin. */
+/* Written by Michel Weimerskirch <michel(a)weimerskirch.net> */
+jQuery(function($){
+ $.datepicker.regional['lb'] = {
+ closeText: 'Fäerdeg',
+ prevText: 'Zréck',
+ nextText: 'Weider',
+ currentText: 'Haut',
+ monthNames: ['Januar','Februar','Mäerz','Abrëll','Mee','Juni',
+ 'Juli','August','September','Oktober','November','Dezember'],
+ monthNamesShort: ['Jan', 'Feb', 'Mäe', 'Abr', 'Mee', 'Jun',
+ 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'],
+ dayNames: ['Sonndeg', 'Méindeg', 'Dënschdeg', 'Mëttwoch', 'Donneschdeg', 'Freideg', 'Samschdeg'],
+ dayNamesShort: ['Son', 'Méi', 'Dën', 'Mët', 'Don', 'Fre', 'Sam'],
+ dayNamesMin: ['So','Mé','Dë','Më','Do','Fr','Sa'],
+ weekHeader: 'W',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['lb']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-lt.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-lt.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-lt.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Lithuanian (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* @author Arturas Paleicikas <arturas(a)avalon.lt> */
+jQuery(function($){
+ $.datepicker.regional['lt'] = {
+ closeText: 'Uždaryti',
+ prevText: '<Atgal',
+ nextText: 'Pirmyn>',
+ currentText: 'Šiandien',
+ monthNames: ['Sausis','Vasaris','Kovas','Balandis','Gegužė','Birželis',
+ 'Liepa','Rugpjūtis','Rugsėjis','Spalis','Lapkritis','Gruodis'],
+ monthNamesShort: ['Sau','Vas','Kov','Bal','Geg','Bir',
+ 'Lie','Rugp','Rugs','Spa','Lap','Gru'],
+ dayNames: ['sekmadienis','pirmadienis','antradienis','trečiadienis','ketvirtadienis','penktadienis','šeštadienis'],
+ dayNamesShort: ['sek','pir','ant','tre','ket','pen','šeš'],
+ dayNamesMin: ['Se','Pr','An','Tr','Ke','Pe','Še'],
+ weekHeader: 'Wk',
+ dateFormat: 'yy-mm-dd',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['lt']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-lv.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-lv.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-lv.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Latvian (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* @author Arturas Paleicikas <arturas.paleicikas(a)metasite.net> */
+jQuery(function($){
+ $.datepicker.regional['lv'] = {
+ closeText: 'Aizvērt',
+ prevText: 'Iepr',
+ nextText: 'Nāka',
+ currentText: 'Šodien',
+ monthNames: ['Janvāris','Februāris','Marts','Aprīlis','Maijs','Jūnijs',
+ 'Jūlijs','Augusts','Septembris','Oktobris','Novembris','Decembris'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','Jūn',
+ 'Jūl','Aug','Sep','Okt','Nov','Dec'],
+ dayNames: ['svētdiena','pirmdiena','otrdiena','trešdiena','ceturtdiena','piektdiena','sestdiena'],
+ dayNamesShort: ['svt','prm','otr','tre','ctr','pkt','sst'],
+ dayNamesMin: ['Sv','Pr','Ot','Tr','Ct','Pk','Ss'],
+ weekHeader: 'Nav',
+ dateFormat: 'dd-mm-yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['lv']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-mk.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-mk.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-mk.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Macedonian i18n for the jQuery UI date picker plugin. */
+/* Written by Stojce Slavkovski. */
+jQuery(function($){
+ $.datepicker.regional['mk'] = {
+ closeText: 'Затвори',
+ prevText: '<',
+ nextText: '>',
+ currentText: 'Денес',
+ monthNames: ['Јануари','Февруари','Март','Април','Мај','Јуни',
+ 'Јули','Август','Септември','Октомври','Ноември','Декември'],
+ monthNamesShort: ['Јан','Фев','Мар','Апр','Мај','Јун',
+ 'Јул','Авг','Сеп','Окт','Ное','Дек'],
+ dayNames: ['Недела','Понеделник','Вторник','Среда','Четврток','Петок','Сабота'],
+ dayNamesShort: ['Нед','Пон','Вто','Сре','Чет','Пет','Саб'],
+ dayNamesMin: ['Не','По','Вт','Ср','Че','Пе','Са'],
+ weekHeader: 'Сед',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['mk']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ml.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ml.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ml.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Malayalam (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Saji Nediyanchath (saji89(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['ml'] = {
+ closeText: 'ശരി',
+ prevText: 'മുന്നത്തെ',
+ nextText: 'അടുത്തത് ',
+ currentText: 'ഇന്ന്',
+ monthNames: ['ജനുവരി','ഫെബ്രുവരി','മാര്ച്ച്','ഏപ്രില്','മേയ്','ജൂണ്',
+ 'ജൂലൈ','ആഗസ്റ്റ്','സെപ്റ്റംബര്','ഒക്ടോബര്','നവംബര്','ഡിസംബര്'],
+ monthNamesShort: ['ജനു', 'ഫെബ്', 'മാര്', 'ഏപ്രി', 'മേയ്', 'ജൂണ്',
+ 'ജൂലാ', 'ആഗ', 'സെപ്', 'ഒക്ടോ', 'നവം', 'ഡിസ'],
+ dayNames: ['ഞായര്', 'തിങ്കള്', 'ചൊവ്വ', 'ബുധന്', 'വ്യാഴം', 'വെള്ളി', 'ശനി'],
+ dayNamesShort: ['ഞായ', 'തിങ്ക', 'ചൊവ്വ', 'ബുധ', 'വ്യാഴം', 'വെള്ളി', 'ശനി'],
+ dayNamesMin: ['ഞാ','തി','ചൊ','ബു','വ്യാ','വെ','ശ'],
+ weekHeader: 'ആ',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['ml']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ms.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ms.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ms.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Malaysian initialisation for the jQuery UI date picker plugin. */
+/* Written by Mohd Nawawi Mohamad Jamili (nawawi(a)ronggeng.net) */
+jQuery(function($){
+ $.datepicker.regional['ms'] = {
+ closeText: 'Tutup',
+ prevText: '<Sebelum',
+ nextText: 'Selepas>',
+ currentText: 'hari ini',
+ monthNames: ['Januari','Februari','Mac','April','Mei','Jun',
+ 'Julai','Ogos','September','Oktober','November','Disember'],
+ monthNamesShort: ['Jan','Feb','Mac','Apr','Mei','Jun',
+ 'Jul','Ogo','Sep','Okt','Nov','Dis'],
+ dayNames: ['Ahad','Isnin','Selasa','Rabu','Khamis','Jumaat','Sabtu'],
+ dayNamesShort: ['Aha','Isn','Sel','Rab','kha','Jum','Sab'],
+ dayNamesMin: ['Ah','Is','Se','Ra','Kh','Ju','Sa'],
+ weekHeader: 'Mg',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['ms']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-nl-BE.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-nl-BE.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-nl-BE.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Dutch (Belgium) initialisation for the jQuery UI date picker plugin. */
+/* David De Sloovere @DavidDeSloovere */
+jQuery(function($){
+ $.datepicker.regional['nl-BE'] = {
+ closeText: 'Sluiten',
+ prevText: '←',
+ nextText: '→',
+ currentText: 'Vandaag',
+ monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni',
+ 'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
+ monthNamesShort: ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun',
+ 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
+ dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'],
+ dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'],
+ dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
+ weekHeader: 'Wk',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['nl-BE']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-nl.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-nl.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-nl.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Dutch (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Mathias Bynens <http://mathiasbynens.be/> */
+jQuery(function($){
+ $.datepicker.regional.nl = {
+ closeText: 'Sluiten',
+ prevText: '←',
+ nextText: '→',
+ currentText: 'Vandaag',
+ monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni',
+ 'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
+ monthNamesShort: ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun',
+ 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
+ dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'],
+ dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'],
+ dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
+ weekHeader: 'Wk',
+ dateFormat: 'dd-mm-yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional.nl);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-no.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-no.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-no.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Norwegian initialisation for the jQuery UI date picker plugin. */
+/* Written by Naimdjon Takhirov (naimdjon(a)gmail.com) */
+
+jQuery(function($){
+ $.datepicker.regional['no'] = {
+ closeText: 'Lukk',
+ prevText: '«Forrige',
+ nextText: 'Neste»',
+ currentText: 'I dag',
+ monthNames: ['januar','februar','mars','april','mai','juni','juli','august','september','oktober','november','desember'],
+ monthNamesShort: ['jan','feb','mar','apr','mai','jun','jul','aug','sep','okt','nov','des'],
+ dayNamesShort: ['søn','man','tir','ons','tor','fre','lør'],
+ dayNames: ['søndag','mandag','tirsdag','onsdag','torsdag','fredag','lørdag'],
+ dayNamesMin: ['sø','ma','ti','on','to','fr','lø'],
+ weekHeader: 'Uke',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''
+ };
+ $.datepicker.setDefaults($.datepicker.regional['no']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-pl.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-pl.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-pl.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Polish initialisation for the jQuery UI date picker plugin. */
+/* Written by Jacek Wysocki (jacek.wysocki(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['pl'] = {
+ closeText: 'Zamknij',
+ prevText: '<Poprzedni',
+ nextText: 'Następny>',
+ currentText: 'Dziś',
+ monthNames: ['Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec',
+ 'Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'],
+ monthNamesShort: ['Sty','Lu','Mar','Kw','Maj','Cze',
+ 'Lip','Sie','Wrz','Pa','Lis','Gru'],
+ dayNames: ['Niedziela','Poniedziałek','Wtorek','Środa','Czwartek','Piątek','Sobota'],
+ dayNamesShort: ['Nie','Pn','Wt','Śr','Czw','Pt','So'],
+ dayNamesMin: ['N','Pn','Wt','Śr','Cz','Pt','So'],
+ weekHeader: 'Tydz',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['pl']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-pt-BR.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-pt-BR.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-pt-BR.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Brazilian initialisation for the jQuery UI date picker plugin. */
+/* Written by Leonildo Costa Silva (leocsilva(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['pt-BR'] = {
+ closeText: 'Fechar',
+ prevText: '<Anterior',
+ nextText: 'Próximo>',
+ currentText: 'Hoje',
+ monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho',
+ 'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
+ monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
+ 'Jul','Ago','Set','Out','Nov','Dez'],
+ dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'],
+ dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
+ dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
+ weekHeader: 'Sm',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['pt-BR']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-pt.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-pt.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-pt.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,22 @@
+/* Portuguese initialisation for the jQuery UI date picker plugin. */
+jQuery(function($){
+ $.datepicker.regional['pt'] = {
+ closeText: 'Fechar',
+ prevText: '<Anterior',
+ nextText: 'Seguinte',
+ currentText: 'Hoje',
+ monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho',
+ 'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
+ monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
+ 'Jul','Ago','Set','Out','Nov','Dez'],
+ dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'],
+ dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
+ dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
+ weekHeader: 'Sem',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['pt']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-rm.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-rm.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-rm.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,21 @@
+/* Romansh initialisation for the jQuery UI date picker plugin. */
+/* Written by Yvonne Gienal (yvonne.gienal(a)educa.ch) */
+jQuery(function($){
+ $.datepicker.regional['rm'] = {
+ closeText: 'Serrar',
+ prevText: '<Suandant',
+ nextText: 'Precedent>',
+ currentText: 'Actual',
+ monthNames: ['Schaner','Favrer','Mars','Avrigl','Matg','Zercladur', 'Fanadur','Avust','Settember','October','November','December'],
+ monthNamesShort: ['Scha','Fev','Mar','Avr','Matg','Zer', 'Fan','Avu','Sett','Oct','Nov','Dec'],
+ dayNames: ['Dumengia','Glindesdi','Mardi','Mesemna','Gievgia','Venderdi','Sonda'],
+ dayNamesShort: ['Dum','Gli','Mar','Mes','Gie','Ven','Som'],
+ dayNamesMin: ['Du','Gl','Ma','Me','Gi','Ve','So'],
+ weekHeader: 'emna',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['rm']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ro.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ro.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ro.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,26 @@
+/* Romanian initialisation for the jQuery UI date picker plugin.
+ *
+ * Written by Edmond L. (ll_edmond(a)walla.com)
+ * and Ionut G. Stan (ionut.g.stan(a)gmail.com)
+ */
+jQuery(function($){
+ $.datepicker.regional['ro'] = {
+ closeText: 'Închide',
+ prevText: '« Luna precedentă',
+ nextText: 'Luna următoare »',
+ currentText: 'Azi',
+ monthNames: ['Ianuarie','Februarie','Martie','Aprilie','Mai','Iunie',
+ 'Iulie','August','Septembrie','Octombrie','Noiembrie','Decembrie'],
+ monthNamesShort: ['Ian', 'Feb', 'Mar', 'Apr', 'Mai', 'Iun',
+ 'Iul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
+ dayNames: ['Duminică', 'Luni', 'Marţi', 'Miercuri', 'Joi', 'Vineri', 'Sâmbătă'],
+ dayNamesShort: ['Dum', 'Lun', 'Mar', 'Mie', 'Joi', 'Vin', 'Sâm'],
+ dayNamesMin: ['Du','Lu','Ma','Mi','Jo','Vi','Sâ'],
+ weekHeader: 'Săpt',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['ro']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ru.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ru.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ru.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Russian (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Andrew Stromnov (stromnov(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['ru'] = {
+ closeText: 'Закрыть',
+ prevText: '<Пред',
+ nextText: 'След>',
+ currentText: 'Сегодня',
+ monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь',
+ 'Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'],
+ monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
+ 'Июл','Авг','Сен','Окт','Ноя','Дек'],
+ dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'],
+ dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'],
+ dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'],
+ weekHeader: 'Нед',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['ru']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-sk.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-sk.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-sk.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Slovak initialisation for the jQuery UI date picker plugin. */
+/* Written by Vojtech Rinik (vojto(a)hmm.sk) */
+jQuery(function($){
+ $.datepicker.regional['sk'] = {
+ closeText: 'Zavrieť',
+ prevText: '<Predchádzajúci',
+ nextText: 'Nasledujúci>',
+ currentText: 'Dnes',
+ monthNames: ['Január','Február','Marec','Apríl','Máj','Jún',
+ 'Júl','August','September','Október','November','December'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Máj','Jún',
+ 'Júl','Aug','Sep','Okt','Nov','Dec'],
+ dayNames: ['Nedeľa','Pondelok','Utorok','Streda','Štvrtok','Piatok','Sobota'],
+ dayNamesShort: ['Ned','Pon','Uto','Str','Štv','Pia','Sob'],
+ dayNamesMin: ['Ne','Po','Ut','St','Št','Pia','So'],
+ weekHeader: 'Ty',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['sk']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-sl.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-sl.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-sl.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,24 @@
+/* Slovenian initialisation for the jQuery UI date picker plugin. */
+/* Written by Jaka Jancar (jaka(a)kubje.org) */
+/* c = č, s = š z = ž C = Č S = Š Z = Ž */
+jQuery(function($){
+ $.datepicker.regional['sl'] = {
+ closeText: 'Zapri',
+ prevText: '<Prejšnji',
+ nextText: 'Naslednji>',
+ currentText: 'Trenutni',
+ monthNames: ['Januar','Februar','Marec','April','Maj','Junij',
+ 'Julij','Avgust','September','Oktober','November','December'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
+ 'Jul','Avg','Sep','Okt','Nov','Dec'],
+ dayNames: ['Nedelja','Ponedeljek','Torek','Sreda','Četrtek','Petek','Sobota'],
+ dayNamesShort: ['Ned','Pon','Tor','Sre','Čet','Pet','Sob'],
+ dayNamesMin: ['Ne','Po','To','Sr','Če','Pe','So'],
+ weekHeader: 'Teden',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['sl']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-sq.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-sq.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-sq.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Albanian initialisation for the jQuery UI date picker plugin. */
+/* Written by Flakron Bytyqi (flakron(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['sq'] = {
+ closeText: 'mbylle',
+ prevText: '<mbrapa',
+ nextText: 'Përpara>',
+ currentText: 'sot',
+ monthNames: ['Janar','Shkurt','Mars','Prill','Maj','Qershor',
+ 'Korrik','Gusht','Shtator','Tetor','Nëntor','Dhjetor'],
+ monthNamesShort: ['Jan','Shk','Mar','Pri','Maj','Qer',
+ 'Kor','Gus','Sht','Tet','Nën','Dhj'],
+ dayNames: ['E Diel','E Hënë','E Martë','E Mërkurë','E Enjte','E Premte','E Shtune'],
+ dayNamesShort: ['Di','Hë','Ma','Më','En','Pr','Sh'],
+ dayNamesMin: ['Di','Hë','Ma','Më','En','Pr','Sh'],
+ weekHeader: 'Ja',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['sq']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-sr-SR.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-sr-SR.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-sr-SR.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Serbian i18n for the jQuery UI date picker plugin. */
+/* Written by Dejan Dimić. */
+jQuery(function($){
+ $.datepicker.regional['sr-SR'] = {
+ closeText: 'Zatvori',
+ prevText: '<',
+ nextText: '>',
+ currentText: 'Danas',
+ monthNames: ['Januar','Februar','Mart','April','Maj','Jun',
+ 'Jul','Avgust','Septembar','Oktobar','Novembar','Decembar'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
+ 'Jul','Avg','Sep','Okt','Nov','Dec'],
+ dayNames: ['Nedelja','Ponedeljak','Utorak','Sreda','Četvrtak','Petak','Subota'],
+ dayNamesShort: ['Ned','Pon','Uto','Sre','Čet','Pet','Sub'],
+ dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
+ weekHeader: 'Sed',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['sr-SR']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-sr.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-sr.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-sr.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Serbian i18n for the jQuery UI date picker plugin. */
+/* Written by Dejan Dimić. */
+jQuery(function($){
+ $.datepicker.regional['sr'] = {
+ closeText: 'Затвори',
+ prevText: '<',
+ nextText: '>',
+ currentText: 'Данас',
+ monthNames: ['Јануар','Фебруар','Март','Април','Мај','Јун',
+ 'Јул','Август','Септембар','Октобар','Новембар','Децембар'],
+ monthNamesShort: ['Јан','Феб','Мар','Апр','Мај','Јун',
+ 'Јул','Авг','Сеп','Окт','Нов','Дец'],
+ dayNames: ['Недеља','Понедељак','Уторак','Среда','Четвртак','Петак','Субота'],
+ dayNamesShort: ['Нед','Пон','Уто','Сре','Чет','Пет','Суб'],
+ dayNamesMin: ['Не','По','Ут','Ср','Че','Пе','Су'],
+ weekHeader: 'Сед',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['sr']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-sv.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-sv.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-sv.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Swedish initialisation for the jQuery UI date picker plugin. */
+/* Written by Anders Ekdahl ( anders(a)nomadiz.se) */
+jQuery(function($){
+ $.datepicker.regional['sv'] = {
+ closeText: 'Stäng',
+ prevText: '«Förra',
+ nextText: 'Nästa»',
+ currentText: 'Idag',
+ 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'],
+ dayNamesShort: ['Sön','Mån','Tis','Ons','Tor','Fre','Lör'],
+ dayNames: ['Söndag','Måndag','Tisdag','Onsdag','Torsdag','Fredag','Lördag'],
+ dayNamesMin: ['Sö','Må','Ti','On','To','Fr','Lö'],
+ weekHeader: 'Ve',
+ dateFormat: 'yy-mm-dd',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['sv']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ta.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ta.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-ta.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Tamil (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by S A Sureshkumar (saskumar(a)live.com) */
+jQuery(function($){
+ $.datepicker.regional['ta'] = {
+ closeText: 'மூடு',
+ prevText: 'முன்னையது',
+ nextText: 'அடுத்தது',
+ currentText: 'இன்று',
+ monthNames: ['தை','மாசி','பங்குனி','சித்திரை','வைகாசி','ஆனி',
+ 'ஆடி','ஆவணி','புரட்டாசி','ஐப்பசி','கார்த்திகை','மார்கழி'],
+ monthNamesShort: ['தை','மாசி','பங்','சித்','வைகா','ஆனி',
+ 'ஆடி','ஆவ','புர','ஐப்','கார்','மார்'],
+ dayNames: ['ஞாயிற்றுக்கிழமை','திங்கட்கிழமை','செவ்வாய்க்கிழமை','புதன்கிழமை','வியாழக்கிழமை','வெள்ளிக்கிழமை','சனிக்கிழமை'],
+ dayNamesShort: ['ஞாயிறு','திங்கள்','செவ்வாய்','புதன்','வியாழன்','வெள்ளி','சனி'],
+ dayNamesMin: ['ஞா','தி','செ','பு','வி','வெ','ச'],
+ weekHeader: 'Не',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['ta']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-th.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-th.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-th.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Thai initialisation for the jQuery UI date picker plugin. */
+/* Written by pipo (pipo(a)sixhead.com) */
+jQuery(function($){
+ $.datepicker.regional['th'] = {
+ closeText: 'ปิด',
+ prevText: '« ย้อน',
+ nextText: 'ถัดไป »',
+ currentText: 'วันนี้',
+ monthNames: ['มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน',
+ 'กรกฎาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม'],
+ monthNamesShort: ['ม.ค.','ก.พ.','มี.ค.','เม.ย.','พ.ค.','มิ.ย.',
+ 'ก.ค.','ส.ค.','ก.ย.','ต.ค.','พ.ย.','ธ.ค.'],
+ dayNames: ['อาทิตย์','จันทร์','อังคาร','พุธ','พฤหัสบดี','ศุกร์','เสาร์'],
+ dayNamesShort: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'],
+ dayNamesMin: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'],
+ weekHeader: 'Wk',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['th']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-tj.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-tj.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-tj.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Tajiki (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Abdurahmon Saidov (saidovab(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['tj'] = {
+ closeText: 'Идома',
+ prevText: '<Қафо',
+ nextText: 'Пеш>',
+ currentText: 'Имрӯз',
+ monthNames: ['Январ','Феврал','Март','Апрел','Май','Июн',
+ 'Июл','Август','Сентябр','Октябр','Ноябр','Декабр'],
+ monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
+ 'Июл','Авг','Сен','Окт','Ноя','Дек'],
+ dayNames: ['якшанбе','душанбе','сешанбе','чоршанбе','панҷшанбе','ҷумъа','шанбе'],
+ dayNamesShort: ['якш','душ','сеш','чор','пан','ҷум','шан'],
+ dayNamesMin: ['Як','Дш','Сш','Чш','Пш','Ҷм','Шн'],
+ weekHeader: 'Хф',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['tj']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-tr.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-tr.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-tr.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Turkish initialisation for the jQuery UI date picker plugin. */
+/* Written by Izzet Emre Erkan (kara(a)karalamalar.net) */
+jQuery(function($){
+ $.datepicker.regional['tr'] = {
+ closeText: 'kapat',
+ prevText: '<geri',
+ nextText: 'ileri>',
+ currentText: 'bugün',
+ monthNames: ['Ocak','Şubat','Mart','Nisan','Mayıs','Haziran',
+ 'Temmuz','Ağustos','Eylül','Ekim','Kasım','Aralık'],
+ monthNamesShort: ['Oca','Şub','Mar','Nis','May','Haz',
+ 'Tem','Ağu','Eyl','Eki','Kas','Ara'],
+ dayNames: ['Pazar','Pazartesi','Salı','Çarşamba','Perşembe','Cuma','Cumartesi'],
+ dayNamesShort: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'],
+ dayNamesMin: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'],
+ weekHeader: 'Hf',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['tr']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-uk.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-uk.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-uk.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,24 @@
+/* Ukrainian (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Maxim Drogobitskiy (maxdao(a)gmail.com) */
+/* Corrected by Igor Milla (igor.fsp.milla(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['uk'] = {
+ closeText: 'Закрити',
+ prevText: '<',
+ nextText: '>',
+ currentText: 'Сьогодні',
+ monthNames: ['Січень','Лютий','Березень','Квітень','Травень','Червень',
+ 'Липень','Серпень','Вересень','Жовтень','Листопад','Грудень'],
+ monthNamesShort: ['Січ','Лют','Бер','Кві','Тра','Чер',
+ 'Лип','Сер','Вер','Жов','Лис','Гру'],
+ dayNames: ['неділя','понеділок','вівторок','середа','четвер','п’ятниця','субота'],
+ dayNamesShort: ['нед','пнд','вів','срд','чтв','птн','сбт'],
+ dayNamesMin: ['Нд','Пн','Вт','Ср','Чт','Пт','Сб'],
+ weekHeader: 'Тиж',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['uk']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-vi.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-vi.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-vi.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Vietnamese initialisation for the jQuery UI date picker plugin. */
+/* Translated by Le Thanh Huy (lthanhhuy(a)cit.ctu.edu.vn) */
+jQuery(function($){
+ $.datepicker.regional['vi'] = {
+ closeText: 'Đóng',
+ prevText: '<Trước',
+ nextText: 'Tiếp>',
+ currentText: 'Hôm nay',
+ monthNames: ['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'],
+ monthNamesShort: ['Tháng 1', 'Tháng 2', 'Tháng 3', 'Tháng 4', 'Tháng 5', 'Tháng 6',
+ 'Tháng 7', 'Tháng 8', 'Tháng 9', 'Tháng 10', 'Tháng 11', 'Tháng 12'],
+ dayNames: ['Chủ Nhật', 'Thứ Hai', 'Thứ Ba', 'Thứ Tư', 'Thứ Năm', 'Thứ Sáu', 'Thứ Bảy'],
+ dayNamesShort: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'],
+ dayNamesMin: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'],
+ weekHeader: 'Tu',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['vi']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-zh-CN.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-zh-CN.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-zh-CN.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Chinese initialisation for the jQuery UI date picker plugin. */
+/* Written by Cloudream (cloudream(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['zh-CN'] = {
+ closeText: '关闭',
+ prevText: '<上月',
+ nextText: '下月>',
+ currentText: '今天',
+ monthNames: ['一月','二月','三月','四月','五月','六月',
+ '七月','八月','九月','十月','十一月','十二月'],
+ monthNamesShort: ['一月','二月','三月','四月','五月','六月',
+ '七月','八月','九月','十月','十一月','十二月'],
+ dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
+ dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
+ dayNamesMin: ['日','一','二','三','四','五','六'],
+ weekHeader: '周',
+ dateFormat: 'yy-mm-dd',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: true,
+ yearSuffix: '年'};
+ $.datepicker.setDefaults($.datepicker.regional['zh-CN']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-zh-HK.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-zh-HK.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-zh-HK.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Chinese initialisation for the jQuery UI date picker plugin. */
+/* Written by SCCY (samuelcychan(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['zh-HK'] = {
+ closeText: '關閉',
+ prevText: '<上月',
+ nextText: '下月>',
+ currentText: '今天',
+ monthNames: ['一月','二月','三月','四月','五月','六月',
+ '七月','八月','九月','十月','十一月','十二月'],
+ monthNamesShort: ['一月','二月','三月','四月','五月','六月',
+ '七月','八月','九月','十月','十一月','十二月'],
+ dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
+ dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
+ dayNamesMin: ['日','一','二','三','四','五','六'],
+ weekHeader: '周',
+ dateFormat: 'dd-mm-yy',
+ firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: true,
+ yearSuffix: '年'};
+ $.datepicker.setDefaults($.datepicker.regional['zh-HK']);
+});
Added: trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-zh-TW.js
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-zh-TW.js (rev 0)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/nuiton-js-jquery-ui/js/i18n/jquery.ui.datepicker-zh-TW.js 2013-01-15 20:20:11 UTC (rev 14)
@@ -0,0 +1,23 @@
+/* Chinese initialisation for the jQuery UI date picker plugin. */
+/* Written by Ressol (ressol(a)gmail.com) */
+jQuery(function($){
+ $.datepicker.regional['zh-TW'] = {
+ closeText: '關閉',
+ prevText: '<上月',
+ nextText: '下月>',
+ currentText: '今天',
+ monthNames: ['一月','二月','三月','四月','五月','六月',
+ '七月','八月','九月','十月','十一月','十二月'],
+ monthNamesShort: ['一月','二月','三月','四月','五月','六月',
+ '七月','八月','九月','十月','十一月','十二月'],
+ dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
+ dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
+ dayNamesMin: ['日','一','二','三','四','五','六'],
+ weekHeader: '周',
+ dateFormat: 'yy/mm/dd',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: true,
+ yearSuffix: '年'};
+ $.datepicker.setDefaults($.datepicker.regional['zh-TW']);
+});
Modified: trunk/nuiton-js-jquery-ui/src/site/rst/index.rst
===================================================================
--- trunk/nuiton-js-jquery-ui/src/site/rst/index.rst 2013-01-15 19:02:02 UTC (rev 13)
+++ trunk/nuiton-js-jquery-ui/src/site/rst/index.rst 2013-01-15 20:20:11 UTC (rev 14)
@@ -14,9 +14,80 @@
- jquery-ui-only : jquery-ui
- jquery-ui: jquery et query-ui
+- jquery-ui-i18n: datepicker specifique i18n (toutes les langues)
+- jquery.ui.datepicker-af: datepicker specifique i18n
+- jquery.ui.datepicker-ar-DZ: datepicker specifique i18n
+- jquery.ui.datepicker-ar: datepicker specifique i18n
+- jquery.ui.datepicker-az: datepicker specifique i18n
+- jquery.ui.datepicker-bg: datepicker specifique i18n
+- jquery.ui.datepicker-bs: datepicker specifique i18n
+- jquery.ui.datepicker-ca: datepicker specifique i18n
+- jquery.ui.datepicker-cs: datepicker specifique i18n
+- jquery.ui.datepicker-cy-GB: datepicker specifique i18n
+- jquery.ui.datepicker-da: datepicker specifique i18n
+- jquery.ui.datepicker-de: datepicker specifique i18n
+- jquery.ui.datepicker-el: datepicker specifique i18n
+- jquery.ui.datepicker-en-AU: datepicker specifique i18n
+- jquery.ui.datepicker-en-GB: datepicker specifique i18n
+- jquery.ui.datepicker-en-NZ: datepicker specifique i18n
+- jquery.ui.datepicker-eo: datepicker specifique i18n
+- jquery.ui.datepicker-es: datepicker specifique i18n
+- jquery.ui.datepicker-et: datepicker specifique i18n
+- jquery.ui.datepicker-eu: datepicker specifique i18n
+- jquery.ui.datepicker-fa: datepicker specifique i18n
+- jquery.ui.datepicker-fi: datepicker specifique i18n
+- jquery.ui.datepicker-fo: datepicker specifique i18n
+- jquery.ui.datepicker-fr-CH: datepicker specifique i18n
+- jquery.ui.datepicker-fr: datepicker specifique i18n
+- jquery.ui.datepicker-gl: datepicker specifique i18n
+- jquery.ui.datepicker-he: datepicker specifique i18n
+- jquery.ui.datepicker-hi: datepicker specifique i18n
+- jquery.ui.datepicker-hr: datepicker specifique i18n
+- jquery.ui.datepicker-hu: datepicker specifique i18n
+- jquery.ui.datepicker-hy: datepicker specifique i18n
+- jquery.ui.datepicker-id: datepicker specifique i18n
+- jquery.ui.datepicker-is: datepicker specifique i18n
+- jquery.ui.datepicker-it: datepicker specifique i18n
+- jquery.ui.datepicker-ja: datepicker specifique i18n
+- jquery.ui.datepicker-ka: datepicker specifique i18n
+- jquery.ui.datepicker-kk: datepicker specifique i18n
+- jquery.ui.datepicker-km: datepicker specifique i18n
+- jquery.ui.datepicker-ko: datepicker specifique i18n
+- jquery.ui.datepicker-lb: datepicker specifique i18n
+- jquery.ui.datepicker-lt: datepicker specifique i18n
+- jquery.ui.datepicker-lv: datepicker specifique i18n
+- jquery.ui.datepicker-mk: datepicker specifique i18n
+- jquery.ui.datepicker-ml: datepicker specifique i18n
+- jquery.ui.datepicker-ms: datepicker specifique i18n
+- jquery.ui.datepicker-nl-BE: datepicker specifique i18n
+- jquery.ui.datepicker-nl: datepicker specifique i18n
+- jquery.ui.datepicker-no: datepicker specifique i18n
+- jquery.ui.datepicker-pl: datepicker specifique i18n
+- jquery.ui.datepicker-pt-BR: datepicker specifique i18n
+- jquery.ui.datepicker-pt: datepicker specifique i18n
+- jquery.ui.datepicker-rm: datepicker specifique i18n
+- jquery.ui.datepicker-ro: datepicker specifique i18n
+- jquery.ui.datepicker-ru: datepicker specifique i18n
+- jquery.ui.datepicker-sk: datepicker specifique i18n
+- jquery.ui.datepicker-sl: datepicker specifique i18n
+- jquery.ui.datepicker-sq: datepicker specifique i18n
+- jquery.ui.datepicker-sr-SR: datepicker specifique i18n
+- jquery.ui.datepicker-sr: datepicker specifique i18n
+- jquery.ui.datepicker-sv: datepicker specifique i18n
+- jquery.ui.datepicker-ta: datepicker specifique i18n
+- jquery.ui.datepicker-th: datepicker specifique i18n
+- jquery.ui.datepicker-tj: datepicker specifique i18n
+- jquery.ui.datepicker-tr: datepicker specifique i18n
+- jquery.ui.datepicker-uk: datepicker specifique i18n
+- jquery.ui.datepicker-vi: datepicker specifique i18n
+- jquery.ui.datepicker-zh-CN: datepicker specifique i18n
+- jquery.ui.datepicker-zh-HK: datepicker specifique i18n
+- jquery.ui.datepicker-zh-TW: datepicker specifique i18n
+
CSS disponible
--------------
+- jquery-ui-base
- jquery-ui-black-tie
- jquery-ui-blitzer
- jquery-ui-cupertino
1
0
r13 - in trunk/nuiton-js-jquery-ui: . src/main/resources/META-INF/nuiton-js
by bpoussin@users.nuiton.org 15 Jan '13
by bpoussin@users.nuiton.org 15 Jan '13
15 Jan '13
Author: bpoussin
Date: 2013-01-15 20:02:02 +0100 (Tue, 15 Jan 2013)
New Revision: 13
Url: http://nuiton.org/projects/nuiton-js/repository/revisions/13
Log:
bug fix in theme generation xml code
Modified:
trunk/nuiton-js-jquery-ui/generate-theme-group.sh
trunk/nuiton-js-jquery-ui/src/main/resources/META-INF/nuiton-js/wro-jquery-ui.xml
Modified: trunk/nuiton-js-jquery-ui/generate-theme-group.sh
===================================================================
--- trunk/nuiton-js-jquery-ui/generate-theme-group.sh 2013-01-05 19:20:43 UTC (rev 12)
+++ trunk/nuiton-js-jquery-ui/generate-theme-group.sh 2013-01-15 19:02:02 UTC (rev 13)
@@ -3,4 +3,7 @@
# Permet de genere le code XML necessaire pour la declaration des themes
# il faut ensuite mettre ce qui est genere dans le fichier META-INF/nuiton-js/nuiton-js-jquery-ui.xml
#
-for t in src/main/resources/nuiton-js-jquery-ui/css/*; do n=$(basename $t); echo -e " <group name='jquery-ui-$n'>\n <css>classpath:nuiton-js-jquery-ui/css/**.css</css>\n </group>\n"; done
+for t in src/main/resources/nuiton-js-jquery-ui/css/*; do
+ n=$(basename $t)
+ echo -e " <group name='jquery-ui-$n'>\n <css>classpath:nuiton-js-jquery-ui/css/$n/**.css</css>\n </group>\n"
+done
Modified: trunk/nuiton-js-jquery-ui/src/main/resources/META-INF/nuiton-js/wro-jquery-ui.xml
===================================================================
--- trunk/nuiton-js-jquery-ui/src/main/resources/META-INF/nuiton-js/wro-jquery-ui.xml 2013-01-05 19:20:43 UTC (rev 12)
+++ trunk/nuiton-js-jquery-ui/src/main/resources/META-INF/nuiton-js/wro-jquery-ui.xml 2013-01-15 19:02:02 UTC (rev 13)
@@ -17,103 +17,103 @@
+-->
<group name='jquery-ui-black-tie'>
- <css>classpath:nuiton-js-jquery-ui/css/**.css</css>
+ <css>classpath:nuiton-js-jquery-ui/css/black-tie/**.css</css>
</group>
<group name='jquery-ui-blitzer'>
- <css>classpath:nuiton-js-jquery-ui/css/**.css</css>
+ <css>classpath:nuiton-js-jquery-ui/css/blitzer/**.css</css>
</group>
<group name='jquery-ui-cupertino'>
- <css>classpath:nuiton-js-jquery-ui/css/**.css</css>
+ <css>classpath:nuiton-js-jquery-ui/css/cupertino/**.css</css>
</group>
<group name='jquery-ui-dark-hive'>
- <css>classpath:nuiton-js-jquery-ui/css/**.css</css>
+ <css>classpath:nuiton-js-jquery-ui/css/dark-hive/**.css</css>
</group>
<group name='jquery-ui-dot-luv'>
- <css>classpath:nuiton-js-jquery-ui/css/**.css</css>
+ <css>classpath:nuiton-js-jquery-ui/css/dot-luv/**.css</css>
</group>
<group name='jquery-ui-eggplant'>
- <css>classpath:nuiton-js-jquery-ui/css/**.css</css>
+ <css>classpath:nuiton-js-jquery-ui/css/eggplant/**.css</css>
</group>
<group name='jquery-ui-excite-bike'>
- <css>classpath:nuiton-js-jquery-ui/css/**.css</css>
+ <css>classpath:nuiton-js-jquery-ui/css/excite-bike/**.css</css>
</group>
<group name='jquery-ui-flick'>
- <css>classpath:nuiton-js-jquery-ui/css/**.css</css>
+ <css>classpath:nuiton-js-jquery-ui/css/flick/**.css</css>
</group>
<group name='jquery-ui-hot-sneaks'>
- <css>classpath:nuiton-js-jquery-ui/css/**.css</css>
+ <css>classpath:nuiton-js-jquery-ui/css/hot-sneaks/**.css</css>
</group>
<group name='jquery-ui-humanity'>
- <css>classpath:nuiton-js-jquery-ui/css/**.css</css>
+ <css>classpath:nuiton-js-jquery-ui/css/humanity/**.css</css>
</group>
<group name='jquery-ui-le-frog'>
- <css>classpath:nuiton-js-jquery-ui/css/**.css</css>
+ <css>classpath:nuiton-js-jquery-ui/css/le-frog/**.css</css>
</group>
<group name='jquery-ui-mint-choc'>
- <css>classpath:nuiton-js-jquery-ui/css/**.css</css>
+ <css>classpath:nuiton-js-jquery-ui/css/mint-choc/**.css</css>
</group>
<group name='jquery-ui-no-theme'>
- <css>classpath:nuiton-js-jquery-ui/css/**.css</css>
+ <css>classpath:nuiton-js-jquery-ui/css/no-theme/**.css</css>
</group>
<group name='jquery-ui-overcast'>
- <css>classpath:nuiton-js-jquery-ui/css/**.css</css>
+ <css>classpath:nuiton-js-jquery-ui/css/overcast/**.css</css>
</group>
<group name='jquery-ui-pepper-grinder'>
- <css>classpath:nuiton-js-jquery-ui/css/**.css</css>
+ <css>classpath:nuiton-js-jquery-ui/css/pepper-grinder/**.css</css>
</group>
<group name='jquery-ui-redmond'>
- <css>classpath:nuiton-js-jquery-ui/css/**.css</css>
+ <css>classpath:nuiton-js-jquery-ui/css/redmond/**.css</css>
</group>
<group name='jquery-ui-smoothness'>
- <css>classpath:nuiton-js-jquery-ui/css/**.css</css>
+ <css>classpath:nuiton-js-jquery-ui/css/smoothness/**.css</css>
</group>
<group name='jquery-ui-south-street'>
- <css>classpath:nuiton-js-jquery-ui/css/**.css</css>
+ <css>classpath:nuiton-js-jquery-ui/css/south-street/**.css</css>
</group>
<group name='jquery-ui-start'>
- <css>classpath:nuiton-js-jquery-ui/css/**.css</css>
+ <css>classpath:nuiton-js-jquery-ui/css/start/**.css</css>
</group>
<group name='jquery-ui-sunny'>
- <css>classpath:nuiton-js-jquery-ui/css/**.css</css>
+ <css>classpath:nuiton-js-jquery-ui/css/sunny/**.css</css>
</group>
<group name='jquery-ui-swanky-purse'>
- <css>classpath:nuiton-js-jquery-ui/css/**.css</css>
+ <css>classpath:nuiton-js-jquery-ui/css/swanky-purse/**.css</css>
</group>
<group name='jquery-ui-trontastic'>
- <css>classpath:nuiton-js-jquery-ui/css/**.css</css>
+ <css>classpath:nuiton-js-jquery-ui/css/trontastic/**.css</css>
</group>
<group name='jquery-ui-ui-darkness'>
- <css>classpath:nuiton-js-jquery-ui/css/**.css</css>
+ <css>classpath:nuiton-js-jquery-ui/css/ui-darkness/**.css</css>
</group>
<group name='jquery-ui-ui-lightness'>
- <css>classpath:nuiton-js-jquery-ui/css/**.css</css>
+ <css>classpath:nuiton-js-jquery-ui/css/ui-lightness/**.css</css>
</group>
<group name='jquery-ui-vader'>
- <css>classpath:nuiton-js-jquery-ui/css/**.css</css>
+ <css>classpath:nuiton-js-jquery-ui/css/vader/**.css</css>
</group>
</groups>
1
0