浏览代码

Add some functions

ailton 8 年之前
父节点
当前提交
d41021ceed
共有 24 个文件被更改,包括 3270 次插入0 次删除
  1. 25 0
      officialjournal-spring.iml
  2. 5 0
      pom.xml
  3. 46 0
      src/main/java/org/develop/officialjournal/controllers/LawyerController.java
  4. 60 0
      src/main/java/org/develop/officialjournal/controllers/ProcessController.java
  5. 74 0
      src/main/java/org/develop/officialjournal/controllers/SearchController.java
  6. 120 0
      src/main/java/org/develop/officialjournal/services/Database.java
  7. 18 0
      src/main/java/org/develop/officialjournal/services/Initializer.java
  8. 110 0
      src/main/resources/static/index.html
  9. 13 0
      src/main/resources/static/script/jquery/jquery-ui.js
  10. 81 0
      src/main/resources/static/script/jquery/jquery.browser.js
  11. 114 0
      src/main/resources/static/script/jquery/jquery.cookie.js
  12. 205 0
      src/main/resources/static/script/jquery/jquery.easing.1.3.js
  13. 1089 0
      src/main/resources/static/script/jquery/jquery.form.js
  14. 4 0
      src/main/resources/static/script/jquery/jquery.js
  15. 11 0
      src/main/resources/static/script/jquery/jquery.mask.min.js
  16. 78 0
      src/main/resources/static/script/jquery/jquery.mousewheel.js
  17. 111 0
      src/main/resources/static/script/jquery/jquery.nicescroll.js
  18. 474 0
      src/main/resources/static/script/jquery/jquery.translate.js
  19. 64 0
      src/main/resources/static/script/jquery/jquery.ui.effect-slide.js
  20. 415 0
      src/main/resources/static/script/jquery/jquery.vaccordion.js
  21. 85 0
      src/main/resources/static/script/module/ajax.js
  22. 5 0
      src/main/resources/static/script/module/app.js
  23. 25 0
      src/main/resources/static/script/module/lawyer.js
  24. 38 0
      src/main/resources/static/script/module/search.js

+ 25 - 0
officialjournal-spring.iml

@@ -0,0 +1,25 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<module type="JAVA_MODULE" version="4">
3
+  <component name="EclipseModuleManager">
4
+    <conelement value="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER" />
5
+    <src_description expected_position="0">
6
+      <src_folder value="file://$MODULE_DIR$/src/main/java" expected_position="0" />
7
+      <src_folder value="file://$MODULE_DIR$/src/main/resources" expected_position="1" />
8
+      <src_folder value="file://$MODULE_DIR$/src/test/java" expected_position="2" />
9
+      <src_folder value="file://$MODULE_DIR$/src/test/resources" expected_position="3" />
10
+    </src_description>
11
+  </component>
12
+  <component name="NewModuleRootManager" inherit-compiler-output="false">
13
+    <output url="file://$MODULE_DIR$/target/classes" />
14
+    <exclude-output />
15
+    <content url="file://$MODULE_DIR$">
16
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
17
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
18
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="false" />
19
+      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="false" />
20
+    </content>
21
+    <orderEntry type="sourceFolder" forTests="false" />
22
+    <orderEntry type="inheritedJdk" />
23
+    <orderEntry type="library" name="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER" level="application" />
24
+  </component>
25
+</module>

+ 5 - 0
pom.xml

@@ -38,6 +38,11 @@
38 38
 			<artifactId>spring-boot-starter-test</artifactId>
39 39
 			<scope>test</scope>
40 40
 		</dependency>
41
+		<dependency>
42
+			<groupId>org.develop.officialjournal</groupId>
43
+			<artifactId>database</artifactId>
44
+			<version>1.0</version>
45
+		</dependency>
41 46
 	</dependencies>
42 47
 	
43 48
 	<build>

+ 46 - 0
src/main/java/org/develop/officialjournal/controllers/LawyerController.java

@@ -0,0 +1,46 @@
1
+package org.develop.officialjournal.controllers;
2
+
3
+import org.develop.officialjournal.services.Database;
4
+import org.springframework.web.bind.annotation.PathVariable;
5
+import org.springframework.web.bind.annotation.RequestMapping;
6
+import org.springframework.web.bind.annotation.RequestMethod;
7
+import org.springframework.web.bind.annotation.RequestParam;
8
+import org.springframework.web.bind.annotation.RestController;
9
+
10
+import dao.DAOEntity;
11
+import dao.DAOJudge;
12
+import dao.DAOLawyer;
13
+import dao.DAOSearch;
14
+import entity.Entity;
15
+import entity.Judge;
16
+import entity.Lawyer;
17
+
18
+@RestController
19
+public class LawyerController {
20
+
21
+	private DAOLawyer daoLawyer;
22
+
23
+	public LawyerController() {
24
+
25
+		daoLawyer =  Database.get().getDaoLawyer();
26
+		
27
+	}
28
+
29
+
30
+	/**returns lawyer by id*/
31
+
32
+	@RequestMapping("/lawyer/{id}")
33
+	public Lawyer getById(@PathVariable Integer id ) {
34
+
35
+		Lawyer lawyer = this.daoLawyer.get(id);
36
+		return lawyer;
37
+
38
+	}
39
+
40
+	@RequestMapping("/lawyer/")
41
+	public Lawyer getByName(@RequestParam (required = true) String name ) {
42
+
43
+		Lawyer lawyer = new Lawyer(name);
44
+		return daoLawyer.get(lawyer);
45
+	}
46
+}

+ 60 - 0
src/main/java/org/develop/officialjournal/controllers/ProcessController.java

@@ -0,0 +1,60 @@
1
+package org.develop.officialjournal.controllers;
2
+
3
+import java.util.List;
4
+
5
+import org.develop.officialjournal.services.Database;
6
+import org.springframework.web.bind.annotation.PathVariable;
7
+import org.springframework.web.bind.annotation.RequestMapping;
8
+import org.springframework.web.bind.annotation.RequestMethod;
9
+import org.springframework.web.bind.annotation.RequestParam;
10
+import org.springframework.web.bind.annotation.RestController;
11
+
12
+import dao.DAOLawyer;
13
+import dao.DAOProcess;
14
+import dao.DAOSearch;
15
+import entity.DOProcess;
16
+import entity.Entity;
17
+import entity.Lawyer;
18
+
19
+@RestController
20
+public class ProcessController {
21
+
22
+	private DAOSearch daoSearch;
23
+	private DAOProcess daoProcess;
24
+
25
+
26
+	public ProcessController() {
27
+
28
+		daoSearch =  Database.get().getDaoSearch();
29
+		daoProcess = Database.get().getDaoProcess();
30
+
31
+	}
32
+
33
+
34
+	/**returns lawyer by id*/
35
+
36
+	@RequestMapping("/process/{id}")
37
+	public DOProcess getById(@PathVariable Integer id ) {
38
+
39
+		DOProcess process = this.daoProcess.get(id);
40
+		return process;
41
+
42
+	}
43
+
44
+	@RequestMapping("/process/entity")
45
+	public List<DOProcess> getProcessByEntity(@RequestParam (required = true) Integer entityId,@RequestParam (required = true) String type ) 
46
+	{
47
+		Entity entity = new Entity();
48
+		entity.setId(entityId);
49
+		entity.setType(type);
50
+		return daoSearch.search(entity, true);
51
+
52
+	}
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+}

+ 74 - 0
src/main/java/org/develop/officialjournal/controllers/SearchController.java

@@ -0,0 +1,74 @@
1
+package org.develop.officialjournal.controllers;
2
+
3
+import org.develop.officialjournal.services.Database;
4
+import org.springframework.web.bind.annotation.PathVariable;
5
+import org.springframework.web.bind.annotation.RequestMapping;
6
+import org.springframework.web.bind.annotation.RequestMethod;
7
+import org.springframework.web.bind.annotation.RequestParam;
8
+import org.springframework.web.bind.annotation.RestController;
9
+
10
+import dao.DAOEntity;
11
+import dao.DAOJudge;
12
+import dao.DAOLawyer;
13
+import dao.DAOProcess;
14
+import dao.DAOSearch;
15
+import entity.Entity;
16
+import entity.Judge;
17
+import entity.Lawyer;
18
+
19
+@RestController
20
+public class SearchController {
21
+
22
+	private DAOLawyer daoLawyer;
23
+	private DAOJudge daoJudge;
24
+	private DAOEntity daoEntity;
25
+	private DAOSearch daoSearch;
26
+	private DAOProcess daoProcess;
27
+	
28
+	
29
+	public SearchController() {
30
+		
31
+		daoLawyer =  Database.get().getDaoLawyer();
32
+		daoJudge =  Database.get().getDaoJudge();
33
+		daoEntity =  Database.get().getDaoEntity();
34
+		daoSearch = Database.get().getDaoSearch();
35
+		daoProcess = Database.get().getDaoProcess();
36
+		
37
+	}
38
+	
39
+	
40
+	/**returns lawyer by id*/
41
+	@RequestMapping("/search")
42
+	public Entity getEntity(@RequestParam String text ) {
43
+		Lawyer lawyer = new Lawyer(text);
44
+		Judge judge = new Judge(text);
45
+		Entity entity = new Entity();
46
+		entity.setName(text);
47
+
48
+		if(daoLawyer.contains(lawyer))
49
+		{
50
+			lawyer = daoLawyer.get(lawyer);
51
+			return lawyer;
52
+		}
53
+		
54
+		if(daoJudge.contains(judge))
55
+		{
56
+			judge = daoJudge.get(judge);
57
+			return judge;
58
+		}
59
+		if(daoEntity.contains(entity))
60
+		{
61
+			entity = daoEntity.get(entity);
62
+			return entity;
63
+		}
64
+		return new Entity();
65
+	
66
+	}
67
+	
68
+	
69
+	
70
+	
71
+	
72
+
73
+
74
+}

+ 120 - 0
src/main/java/org/develop/officialjournal/services/Database.java

@@ -0,0 +1,120 @@
1
+package org.develop.officialjournal.services;
2
+
3
+import java.sql.Connection;
4
+
5
+import connector.Connector;
6
+import dao.DAOEntity;
7
+import dao.DAOJudge;
8
+import dao.DAOLawyer;
9
+import dao.DAOProcess;
10
+import dao.DAOSearch;
11
+
12
+public class Database {
13
+
14
+	private Connector connector;
15
+	private DAOSearch daoSearch;
16
+	private DAOLawyer daoLawyer;
17
+	private DAOEntity daoEntity;
18
+	private DAOJudge daoJudge;
19
+	private DAOProcess daoProcess;
20
+
21
+	public Database() {
22
+
23
+		this.connector = new Connector();
24
+		Connection connection = connector.getConnection();
25
+		this.setDaoJudge(new DAOJudge(connection));
26
+		this.setDaoLawyer(new DAOLawyer(connection));
27
+		this.setDaoJudge(new DAOJudge(connection));
28
+		this.setDaoSearch(new DAOSearch(connection));
29
+		this.setDaoEntity(new DAOEntity(connection));
30
+		
31
+	}
32
+	
33
+	private static Database database;
34
+	
35
+	public static Database get()
36
+	{
37
+		if(database == null)
38
+			database = new Database();
39
+		
40
+		return database;
41
+		
42
+	}
43
+	
44
+	
45
+
46
+	/**
47
+	 * @return the daoSearch
48
+	 */
49
+	public DAOSearch getDaoSearch() {
50
+		return daoSearch;
51
+	}
52
+
53
+	/**
54
+	 * @param daoSearch the daoSearch to set
55
+	 */
56
+	public void setDaoSearch(DAOSearch daoSearch) {
57
+		this.daoSearch = daoSearch;
58
+	}
59
+
60
+	/**
61
+	 * @return the daoLawyer
62
+	 */
63
+	public DAOLawyer getDaoLawyer() {
64
+		return daoLawyer;
65
+	}
66
+
67
+	/**
68
+	 * @param daoLawyer the daoLawyer to set
69
+	 */
70
+	public void setDaoLawyer(DAOLawyer daoLawyer) {
71
+		this.daoLawyer = daoLawyer;
72
+	}
73
+
74
+	/**
75
+	 * @return the daoJudge
76
+	 */
77
+	public DAOJudge getDaoJudge() {
78
+		return daoJudge;
79
+	}
80
+
81
+	/**
82
+	 * @param daoJudge the daoJudge to set
83
+	 */
84
+	public void setDaoJudge(DAOJudge daoJudge) {
85
+		this.daoJudge = daoJudge;
86
+	}
87
+
88
+	/**
89
+	 * @return the daoProcess
90
+	 */
91
+	public DAOProcess getDaoProcess() {
92
+		return daoProcess;
93
+	}
94
+
95
+	/**
96
+	 * @param daoProcess the daoProcess to set
97
+	 */
98
+	public void setDaoProcess(DAOProcess daoProcess) {
99
+		this.daoProcess = daoProcess;
100
+	}
101
+
102
+
103
+
104
+	/**
105
+	 * @return the daoEntity
106
+	 */
107
+	public DAOEntity getDaoEntity() {
108
+		return daoEntity;
109
+	}
110
+
111
+
112
+
113
+	/**
114
+	 * @param daoEntity the daoEntity to set
115
+	 */
116
+	public void setDaoEntity(DAOEntity daoEntity) {
117
+		this.daoEntity = daoEntity;
118
+	}
119
+
120
+}

+ 18 - 0
src/main/java/org/develop/officialjournal/services/Initializer.java

@@ -0,0 +1,18 @@
1
+package org.develop.officialjournal.services;
2
+
3
+import org.springframework.web.context.AbstractContextLoaderInitializer;
4
+import org.springframework.web.context.WebApplicationContext;
5
+import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
6
+
7
+public class Initializer extends AbstractContextLoaderInitializer {
8
+
9
+	
10
+	
11
+	
12
+	@Override
13
+	protected WebApplicationContext createRootApplicationContext() {
14
+		AnnotationConfigWebApplicationContext applicationContext = new AnnotationConfigWebApplicationContext();
15
+		applicationContext.register(Database.class);
16
+		return applicationContext;
17
+	}
18
+}

+ 110 - 0
src/main/resources/static/index.html

@@ -0,0 +1,110 @@
1
+<html>
2
+
3
+<head>
4
+<title>Angular JS Modules</title>
5
+<script
6
+	src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
7
+<script src="script/module/app.js"></script>
8
+<!-- <script src="script/module/lawyer.js"></script> -->
9
+<script src="script/module/search.js"></script>
10
+<style>
11
+table, th, td {
12
+	border: 1px solid grey;
13
+	border-collapse: collapse;
14
+	padding: 5px;
15
+}
16
+
17
+table tr:nth-child(odd) {
18
+	background-color: #f2f2f2;
19
+}
20
+
21
+table tr:nth-child(even) {
22
+	background-color: #ffffff;
23
+}
24
+</style>
25
+
26
+</head>
27
+
28
+<body>
29
+	<h2>Conhecimento nos diarios</h2>
30
+	<div ng-app="mainApp">
31
+		<div ng-controller="searchController">
32
+
33
+			<input type="text" ng-model="entity.text" size="50">
34
+			<button ng-click="search()">Search</button>
35
+
36
+
37
+			<table border="0">
38
+				<tr>
39
+					<td>Identificador</td>
40
+					<td>Nome</td>
41
+					<td>Tipo</td>
42
+					<td>NumeroOAB</td>
43
+				</tr>
44
+
45
+				<tr>
46
+					<td><input type="text" ng-model="entity.id" /></td>
47
+					<td><input type="text" ng-model="entity.name" size="40" /></td>
48
+					<td><input type="text" ng-model="entity.type"></td>
49
+					<td><input type="text" ng-model="entity.oabnumber"></td>
50
+				</tr>
51
+
52
+			</table>
53
+
54
+
55
+			<br>
56
+			<br>
57
+			<br>
58
+
59
+			<table border="0">
60
+				<tr>
61
+					<td>Identificador</td>
62
+					<td>Numero</td>
63
+					<td>Tipo</td>
64
+					<td>NumeroOAB</td>
65
+
66
+				</tr>
67
+
68
+				<tr>
69
+					<td><input type="text" ng-model="process.id" /></td>
70
+					<td><input type="text" ng-model="process.numberProcess" size="40" /></td>
71
+					<td><input type="text" ng-model="process.typeVerdict"></td>
72
+					<td><input type="text" ng-model="process.oabnumber"></td>
73
+				</tr>
74
+
75
+
76
+			</table>
77
+
78
+
79
+		</div>
80
+		<!-- 		<div ng-controller="processController"> -->
81
+
82
+		<!-- 			<table border="0"> -->
83
+
84
+		<!-- 				<tr> -->
85
+		<!-- 					<td>Id</td> -->
86
+		<!-- 					<td><input type="text" ng-model="student.id"></td> -->
87
+		<!-- 				</tr> -->
88
+
89
+		<!-- 				<tr> -->
90
+		<!-- 					<td>Name:</td> -->
91
+		<!-- 					<td><input type="text" ng-model="student.name"></td> -->
92
+		<!-- 				</tr> -->
93
+
94
+		<!-- 				<tr> -->
95
+		<!-- 					<td>OABNumber:</td> -->
96
+		<!-- 					<td><input type="text" ng-model="student.oabnumber"></td> -->
97
+		<!-- 				</tr> -->
98
+
99
+		<!-- 			</table> -->
100
+
101
+		<!-- 			<button ng-click="update()">Click Me!</button> -->
102
+
103
+		<!-- 		</div> -->
104
+
105
+
106
+	</div>
107
+
108
+
109
+</body>
110
+</html>

文件差异内容过多而无法显示
+ 13 - 0
src/main/resources/static/script/jquery/jquery-ui.js


+ 81 - 0
src/main/resources/static/script/jquery/jquery.browser.js

@@ -0,0 +1,81 @@
1
+/*
2
+
3
+jQuery Browser Plugin
4
+	* Version 2.3
5
+	* 2008-09-17 19:27:05
6
+	* URL: http://jquery.thewikies.com/browser
7
+	* Description: jQuery Browser Plugin extends browser detection capabilities and can assign browser selectors to CSS classes.
8
+	* Author: Nate Cavanaugh, Minhchau Dang, & Jonathan Neal
9
+	* Copyright: Copyright (c) 2008 Jonathan Neal under dual MIT/GPL license.
10
+	* JSLint: This javascript file passes JSLint verification.
11
+*//*jslint
12
+		bitwise: true,
13
+		browser: true,
14
+		eqeqeq: true,
15
+		forin: true,
16
+		nomen: true,
17
+		plusplus: true,
18
+		undef: true,
19
+		white: true
20
+*//*global
21
+		jQuery
22
+*/
23
+
24
+(function ($) {
25
+	$.browserTest = function (a, z) {
26
+		var u = 'unknown', x = 'X', m = function (r, h) {
27
+			for (var i = 0; i < h.length; i = i + 1) {
28
+				r = r.replace(h[i][0], h[i][1]);
29
+			}
30
+
31
+			return r;
32
+		}, c = function (i, a, b, c) {
33
+			var r = {
34
+				name: m((a.exec(i) || [u, u])[1], b)
35
+			};
36
+
37
+			r[r.name] = true;
38
+
39
+			r.version = (c.exec(i) || [x, x, x, x])[3];
40
+
41
+			if (r.name.match(/safari/) && r.version > 400) {
42
+				r.version = '2.0';
43
+			}
44
+
45
+			if (r.name === 'presto') {
46
+				r.version = ($.browser.version > 9.27) ? 'futhark' : 'linear_b';
47
+			}
48
+			r.versionNumber = parseFloat(r.version, 10) || 0;
49
+			r.versionX = (r.version !== x) ? (r.version + '').substr(0, 1) : x;
50
+			r.className = r.name + r.versionX;
51
+
52
+			return r;
53
+		};
54
+
55
+		a = (a.match(/Opera|Navigator|Minefield|KHTML|Chrome/) ? m(a, [
56
+			[/(Firefox|MSIE|KHTML,\slike\sGecko|Konqueror)/, ''],
57
+			['Chrome Safari', 'Chrome'],
58
+			['KHTML', 'Konqueror'],
59
+			['Minefield', 'Firefox'],
60
+			['Navigator', 'Netscape']
61
+		]) : a).toLowerCase();
62
+
63
+		$.browser = $.extend((!z) ? $.browser : {}, c(a, /(camino|chrome|firefox|netscape|konqueror|lynx|msie|opera|safari)/, [], /(camino|chrome|firefox|netscape|netscape6|opera|version|konqueror|lynx|msie|safari)(\/|\s)([a-z0-9\.\+]*?)(\;|dev|rel|\s|$)/));
64
+
65
+		$.layout = c(a, /(gecko|konqueror|msie|opera|webkit)/, [
66
+			['konqueror', 'khtml'],
67
+			['msie', 'trident'],
68
+			['opera', 'presto']
69
+		], /(applewebkit|rv|konqueror|msie)(\:|\/|\s)([a-z0-9\.]*?)(\;|\)|\s)/);
70
+
71
+		$.os = {
72
+			name: (/(win|mac|linux|sunos|solaris|iphone)/.exec(navigator.platform.toLowerCase()) || [u])[0].replace('sunos', 'solaris')
73
+		};
74
+
75
+		if (!z) {
76
+			$('html').addClass([$.os.name, $.browser.name, $.browser.className, $.layout.name, $.layout.className].join(' '));
77
+		}
78
+	};
79
+
80
+	$.browserTest(navigator.userAgent);
81
+})(jQuery);

+ 114 - 0
src/main/resources/static/script/jquery/jquery.cookie.js

@@ -0,0 +1,114 @@
1
+/*!
2
+ * jQuery Cookie Plugin v1.4.1
3
+ * https://github.com/carhartl/jquery-cookie
4
+ *
5
+ * Copyright 2006, 2014 Klaus Hartl
6
+ * Released under the MIT license
7
+ */
8
+(function (factory) {
9
+	if (typeof define === 'function' && define.amd) {
10
+		// AMD (Register as an anonymous module)
11
+		define(['jquery'], factory);
12
+	} else if (typeof exports === 'object') {
13
+		// Node/CommonJS
14
+		module.exports = factory(require('jquery'));
15
+	} else {
16
+		// Browser globals
17
+		factory(jQuery);
18
+	}
19
+}(function ($) {
20
+
21
+	var pluses = /\+/g;
22
+
23
+	function encode(s) {
24
+		return config.raw ? s : encodeURIComponent(s);
25
+	}
26
+
27
+	function decode(s) {
28
+		return config.raw ? s : decodeURIComponent(s);
29
+	}
30
+
31
+	function stringifyCookieValue(value) {
32
+		return encode(config.json ? JSON.stringify(value) : String(value));
33
+	}
34
+
35
+	function parseCookieValue(s) {
36
+		if (s.indexOf('"') === 0) {
37
+			// This is a quoted cookie as according to RFC2068, unescape...
38
+			s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
39
+		}
40
+
41
+		try {
42
+			// Replace server-side written pluses with spaces.
43
+			// If we can't decode the cookie, ignore it, it's unusable.
44
+			// If we can't parse the cookie, ignore it, it's unusable.
45
+			s = decodeURIComponent(s.replace(pluses, ' '));
46
+			return config.json ? JSON.parse(s) : s;
47
+		} catch(e) {}
48
+	}
49
+
50
+	function read(s, converter) {
51
+		var value = config.raw ? s : parseCookieValue(s);
52
+		return $.isFunction(converter) ? converter(value) : value;
53
+	}
54
+
55
+	var config = $.cookie = function (key, value, options) {
56
+
57
+		// Write
58
+
59
+		if (arguments.length > 1 && !$.isFunction(value)) {
60
+			options = $.extend({}, config.defaults, options);
61
+
62
+			if (typeof options.expires === 'number') {
63
+				var days = options.expires, t = options.expires = new Date();
64
+				t.setMilliseconds(t.getMilliseconds() + days * 864e+5);
65
+			}
66
+
67
+			return (document.cookie = [
68
+				encode(key), '=', stringifyCookieValue(value),
69
+				options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
70
+				options.path    ? '; path=' + options.path : '',
71
+				options.domain  ? '; domain=' + options.domain : '',
72
+				options.secure  ? '; secure' : ''
73
+			].join(''));
74
+		}
75
+
76
+		// Read
77
+
78
+		var result = key ? undefined : {},
79
+			// To prevent the for loop in the first place assign an empty array
80
+			// in case there are no cookies at all. Also prevents odd result when
81
+			// calling $.cookie().
82
+			cookies = document.cookie ? document.cookie.split('; ') : [],
83
+			i = 0,
84
+			l = cookies.length;
85
+
86
+		for (; i < l; i++) {
87
+			var parts = cookies[i].split('='),
88
+				name = decode(parts.shift()),
89
+				cookie = parts.join('=');
90
+
91
+			if (key === name) {
92
+				// If second argument (value) is a function it's a converter...
93
+				result = read(cookie, value);
94
+				break;
95
+			}
96
+
97
+			// Prevent storing a cookie that we couldn't decode.
98
+			if (!key && (cookie = read(cookie)) !== undefined) {
99
+				result[name] = cookie;
100
+			}
101
+		}
102
+
103
+		return result;
104
+	};
105
+
106
+	config.defaults = {};
107
+
108
+	$.removeCookie = function (key, options) {
109
+		// Must not alter options, thus extending a fresh object...
110
+		$.cookie(key, '', $.extend({}, options, { expires: -1 }));
111
+		return !$.cookie(key);
112
+	};
113
+
114
+}));

+ 205 - 0
src/main/resources/static/script/jquery/jquery.easing.1.3.js

@@ -0,0 +1,205 @@
1
+/*
2
+ * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
3
+ *
4
+ * Uses the built in easing capabilities added In jQuery 1.1
5
+ * to offer multiple easing options
6
+ *
7
+ * TERMS OF USE - jQuery Easing
8
+ * 
9
+ * Open source under the BSD License. 
10
+ * 
11
+ * Copyright © 2008 George McGinley Smith
12
+ * All rights reserved.
13
+ * 
14
+ * Redistribution and use in source and binary forms, with or without modification, 
15
+ * are permitted provided that the following conditions are met:
16
+ * 
17
+ * Redistributions of source code must retain the above copyright notice, this list of 
18
+ * conditions and the following disclaimer.
19
+ * Redistributions in binary form must reproduce the above copyright notice, this list 
20
+ * of conditions and the following disclaimer in the documentation and/or other materials 
21
+ * provided with the distribution.
22
+ * 
23
+ * Neither the name of the author nor the names of contributors may be used to endorse 
24
+ * or promote products derived from this software without specific prior written permission.
25
+ * 
26
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
27
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
28
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29
+ *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30
+ *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
31
+ *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
32
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
33
+ *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
34
+ * OF THE POSSIBILITY OF SUCH DAMAGE. 
35
+ *
36
+*/
37
+
38
+// t: current time, b: begInnIng value, c: change In value, d: duration
39
+jQuery.easing['jswing'] = jQuery.easing['swing'];
40
+
41
+jQuery.extend( jQuery.easing,
42
+{
43
+	def: 'easeOutQuad',
44
+	swing: function (x, t, b, c, d) {
45
+		//alert(jQuery.easing.default);
46
+		return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
47
+	},
48
+	easeInQuad: function (x, t, b, c, d) {
49
+		return c*(t/=d)*t + b;
50
+	},
51
+	easeOutQuad: function (x, t, b, c, d) {
52
+		return -c *(t/=d)*(t-2) + b;
53
+	},
54
+	easeInOutQuad: function (x, t, b, c, d) {
55
+		if ((t/=d/2) < 1) return c/2*t*t + b;
56
+		return -c/2 * ((--t)*(t-2) - 1) + b;
57
+	},
58
+	easeInCubic: function (x, t, b, c, d) {
59
+		return c*(t/=d)*t*t + b;
60
+	},
61
+	easeOutCubic: function (x, t, b, c, d) {
62
+		return c*((t=t/d-1)*t*t + 1) + b;
63
+	},
64
+	easeInOutCubic: function (x, t, b, c, d) {
65
+		if ((t/=d/2) < 1) return c/2*t*t*t + b;
66
+		return c/2*((t-=2)*t*t + 2) + b;
67
+	},
68
+	easeInQuart: function (x, t, b, c, d) {
69
+		return c*(t/=d)*t*t*t + b;
70
+	},
71
+	easeOutQuart: function (x, t, b, c, d) {
72
+		return -c * ((t=t/d-1)*t*t*t - 1) + b;
73
+	},
74
+	easeInOutQuart: function (x, t, b, c, d) {
75
+		if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
76
+		return -c/2 * ((t-=2)*t*t*t - 2) + b;
77
+	},
78
+	easeInQuint: function (x, t, b, c, d) {
79
+		return c*(t/=d)*t*t*t*t + b;
80
+	},
81
+	easeOutQuint: function (x, t, b, c, d) {
82
+		return c*((t=t/d-1)*t*t*t*t + 1) + b;
83
+	},
84
+	easeInOutQuint: function (x, t, b, c, d) {
85
+		if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
86
+		return c/2*((t-=2)*t*t*t*t + 2) + b;
87
+	},
88
+	easeInSine: function (x, t, b, c, d) {
89
+		return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
90
+	},
91
+	easeOutSine: function (x, t, b, c, d) {
92
+		return c * Math.sin(t/d * (Math.PI/2)) + b;
93
+	},
94
+	easeInOutSine: function (x, t, b, c, d) {
95
+		return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
96
+	},
97
+	easeInExpo: function (x, t, b, c, d) {
98
+		return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
99
+	},
100
+	easeOutExpo: function (x, t, b, c, d) {
101
+		return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
102
+	},
103
+	easeInOutExpo: function (x, t, b, c, d) {
104
+		if (t==0) return b;
105
+		if (t==d) return b+c;
106
+		if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
107
+		return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
108
+	},
109
+	easeInCirc: function (x, t, b, c, d) {
110
+		return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
111
+	},
112
+	easeOutCirc: function (x, t, b, c, d) {
113
+		return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
114
+	},
115
+	easeInOutCirc: function (x, t, b, c, d) {
116
+		if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
117
+		return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
118
+	},
119
+	easeInElastic: function (x, t, b, c, d) {
120
+		var s=1.70158;var p=0;var a=c;
121
+		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
122
+		if (a < Math.abs(c)) { a=c; var s=p/4; }
123
+		else var s = p/(2*Math.PI) * Math.asin (c/a);
124
+		return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
125
+	},
126
+	easeOutElastic: function (x, t, b, c, d) {
127
+		var s=1.70158;var p=0;var a=c;
128
+		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
129
+		if (a < Math.abs(c)) { a=c; var s=p/4; }
130
+		else var s = p/(2*Math.PI) * Math.asin (c/a);
131
+		return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
132
+	},
133
+	easeInOutElastic: function (x, t, b, c, d) {
134
+		var s=1.70158;var p=0;var a=c;
135
+		if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);
136
+		if (a < Math.abs(c)) { a=c; var s=p/4; }
137
+		else var s = p/(2*Math.PI) * Math.asin (c/a);
138
+		if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
139
+		return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
140
+	},
141
+	easeInBack: function (x, t, b, c, d, s) {
142
+		if (s == undefined) s = 1.70158;
143
+		return c*(t/=d)*t*((s+1)*t - s) + b;
144
+	},
145
+	easeOutBack: function (x, t, b, c, d, s) {
146
+		if (s == undefined) s = 1.70158;
147
+		return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
148
+	},
149
+	easeInOutBack: function (x, t, b, c, d, s) {
150
+		if (s == undefined) s = 1.70158; 
151
+		if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
152
+		return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
153
+	},
154
+	easeInBounce: function (x, t, b, c, d) {
155
+		return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
156
+	},
157
+	easeOutBounce: function (x, t, b, c, d) {
158
+		if ((t/=d) < (1/2.75)) {
159
+			return c*(7.5625*t*t) + b;
160
+		} else if (t < (2/2.75)) {
161
+			return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
162
+		} else if (t < (2.5/2.75)) {
163
+			return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
164
+		} else {
165
+			return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
166
+		}
167
+	},
168
+	easeInOutBounce: function (x, t, b, c, d) {
169
+		if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
170
+		return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
171
+	}
172
+});
173
+
174
+/*
175
+ *
176
+ * TERMS OF USE - EASING EQUATIONS
177
+ * 
178
+ * Open source under the BSD License. 
179
+ * 
180
+ * Copyright © 2001 Robert Penner
181
+ * All rights reserved.
182
+ * 
183
+ * Redistribution and use in source and binary forms, with or without modification, 
184
+ * are permitted provided that the following conditions are met:
185
+ * 
186
+ * Redistributions of source code must retain the above copyright notice, this list of 
187
+ * conditions and the following disclaimer.
188
+ * Redistributions in binary form must reproduce the above copyright notice, this list 
189
+ * of conditions and the following disclaimer in the documentation and/or other materials 
190
+ * provided with the distribution.
191
+ * 
192
+ * Neither the name of the author nor the names of contributors may be used to endorse 
193
+ * or promote products derived from this software without specific prior written permission.
194
+ * 
195
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
196
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
197
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
198
+ *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
199
+ *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
200
+ *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
201
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
202
+ *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
203
+ * OF THE POSSIBILITY OF SUCH DAMAGE. 
204
+ *
205
+ */

文件差异内容过多而无法显示
+ 1089 - 0
src/main/resources/static/script/jquery/jquery.form.js


文件差异内容过多而无法显示
+ 4 - 0
src/main/resources/static/script/jquery/jquery.js


文件差异内容过多而无法显示
+ 11 - 0
src/main/resources/static/script/jquery/jquery.mask.min.js


+ 78 - 0
src/main/resources/static/script/jquery/jquery.mousewheel.js

@@ -0,0 +1,78 @@
1
+/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
2
+ * Licensed under the MIT License (LICENSE.txt).
3
+ *
4
+ * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
5
+ * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
6
+ * Thanks to: Seamus Leahy for adding deltaX and deltaY
7
+ *
8
+ * Version: 3.0.4
9
+ * 
10
+ * Requires: 1.2.2+
11
+ */
12
+
13
+(function($) {
14
+
15
+var types = ['DOMMouseScroll', 'mousewheel'];
16
+
17
+$.event.special.mousewheel = {
18
+    setup: function() {
19
+        if ( this.addEventListener ) {
20
+            for ( var i=types.length; i; ) {
21
+                this.addEventListener( types[--i], handler, false );
22
+            }
23
+        } else {
24
+            this.onmousewheel = handler;
25
+        }
26
+    },
27
+    
28
+    teardown: function() {
29
+        if ( this.removeEventListener ) {
30
+            for ( var i=types.length; i; ) {
31
+                this.removeEventListener( types[--i], handler, false );
32
+            }
33
+        } else {
34
+            this.onmousewheel = null;
35
+        }
36
+    }
37
+};
38
+
39
+$.fn.extend({
40
+    mousewheel: function(fn) {
41
+        return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");
42
+    },
43
+    
44
+    unmousewheel: function(fn) {
45
+        return this.unbind("mousewheel", fn);
46
+    }
47
+});
48
+
49
+
50
+function handler(event) {
51
+    var orgEvent = event || window.event, args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true, deltaX = 0, deltaY = 0;
52
+    event = $.event.fix(orgEvent);
53
+    event.type = "mousewheel";
54
+    
55
+    // Old school scrollwheel delta
56
+    if ( event.wheelDelta ) { delta = event.wheelDelta/150; }
57
+    if ( event.detail     ) { delta = -event.detail/3; }
58
+    
59
+    // New school multidimensional scroll (touchpads) deltas
60
+    deltaY = delta;
61
+    
62
+    // Gecko
63
+    if ( orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
64
+        deltaY = 0;
65
+        deltaX = -1*delta;
66
+    }
67
+    
68
+    // Webkit
69
+    if ( orgEvent.wheelDeltaY !== undefined ) { deltaY = orgEvent.wheelDeltaY/140; }
70
+    if ( orgEvent.wheelDeltaX !== undefined ) { deltaX = -1*orgEvent.wheelDeltaX/140; }
71
+    
72
+    // Add event and delta to the front of the arguments
73
+    args.unshift(event, delta, deltaX, deltaY);
74
+    
75
+    return $.event.handle.apply(this, args);
76
+}
77
+
78
+})(jQuery);

文件差异内容过多而无法显示
+ 111 - 0
src/main/resources/static/script/jquery/jquery.nicescroll.js


+ 474 - 0
src/main/resources/static/script/jquery/jquery.translate.js

@@ -0,0 +1,474 @@
1
+/******************************************************************************
2
+ * jquery.i18n.properties
3
+ * 
4
+ * Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and 
5
+ * MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses.
6
+ * 
7
+ * @version     1.0.x
8
+ * @author      Nuno Fernandes
9
+ * @url         www.codingwithcoffee.com
10
+ * @inspiration Localisation assistance for jQuery (http://keith-wood.name/localisation.html)
11
+ *              by Keith Wood (kbwood{at}iinet.com.au) June 2007
12
+ * 
13
+ *****************************************************************************/
14
+
15
+(function($) {
16
+$.i18n = {};
17
+
18
+/** Map holding bundle keys (if mode: 'map') */
19
+$.i18n.map = {};
20
+    
21
+/**
22
+ * Load and parse message bundle files (.properties),
23
+ * making bundles keys available as javascript variables.
24
+ * 
25
+ * i18n files are named <name>.js, or <name>_<language>.js or <name>_<language>_<country>.js
26
+ * Where:
27
+ *      The <language> argument is a valid ISO Language Code. These codes are the lower-case, 
28
+ *      two-letter codes as defined by ISO-639. You can find a full list of these codes at a 
29
+ *      number of sites, such as: http://www.loc.gov/standards/iso639-2/englangn.html
30
+ *      The <country> argument is a valid ISO Country Code. These codes are the upper-case,
31
+ *      two-letter codes as defined by ISO-3166. You can find a full list of these codes at a
32
+ *      number of sites, such as: http://www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html
33
+ * 
34
+ * Sample usage for a bundles/Messages.properties bundle:
35
+ * $.i18n.properties({
36
+ *      name:      'Messages', 
37
+ *      language:  'en_US',
38
+ *      path:      'bundles'
39
+ * });
40
+ * @param  name			(string/string[], optional) names of file to load (eg, 'Messages' or ['Msg1','Msg2']). Defaults to "Messages"
41
+ * @param  language		(string, optional) language/country code (eg, 'en', 'en_US', 'pt_PT'). if not specified, language reported by the browser will be used instead.
42
+ * @param  path			(string, optional) path of directory that contains file to load
43
+ * @param  mode			(string, optional) whether bundles keys are available as JavaScript variables/functions or as a map (eg, 'vars' or 'map')
44
+ * @param  cache        (boolean, optional) whether bundles should be cached by the browser, or forcibly reloaded on each page load. Defaults to false (i.e. forcibly reloaded)
45
+ * @param  encoding 	(string, optional) the encoding to request for bundles. Property file resource bundles are specified to be in ISO-8859-1 format. Defaults to UTF-8 for backward compatibility.
46
+ * @param  callback     (function, optional) callback function to be called after script is terminated
47
+ */
48
+$.i18n.properties = function(settings) {
49
+	// set up settings
50
+    var defaults = {
51
+        name:           'Messages',
52
+        language:       '',
53
+        path:           '',  
54
+        mode:           'vars',
55
+        cache:			false,
56
+        encoding:       'UTF-8',
57
+        callback:       null
58
+    };
59
+    settings = $.extend(defaults, settings);    
60
+    if(settings.language === null || settings.language == '') {
61
+	   settings.language = $.i18n.browserLang();
62
+	}
63
+	if(settings.language === null) {settings.language='';}
64
+	
65
+	// load and parse bundle files
66
+	var files = getFiles(settings.name);
67
+	for(i=0; i<files.length; i++) {
68
+		// 1. load base (eg, Messages.properties)
69
+		loadAndParseFile(settings.path + files[i] + '.properties', settings);
70
+        // 2. with language code (eg, Messages_pt.properties)
71
+		if(settings.language.length >= 2) {
72
+            loadAndParseFile(settings.path + files[i] + '_' + settings.language.substring(0, 2) +'.properties', settings);
73
+		}
74
+		// 3. with language code and country code (eg, Messages_pt_PT.properties)
75
+        if(settings.language.length >= 5) {
76
+            loadAndParseFile(settings.path + files[i] + '_' + settings.language.substring(0, 5) +'.properties', settings);
77
+        }
78
+	}
79
+	
80
+	// call callback
81
+	if(settings.callback){ settings.callback(); }
82
+};
83
+
84
+
85
+/**
86
+ * When configured with mode: 'map', allows access to bundle values by specifying its key.
87
+ * Eg, jQuery.i18n.prop('com.company.bundles.menu_add')
88
+ */
89
+$.i18n.prop = function(key /* Add parameters as function arguments as necessary  */) {
90
+	var value = $.i18n.map[key];
91
+	if (value == null)
92
+		return '[' + key + ']';
93
+	
94
+//	if(arguments.length < 2) // No arguments.
95
+//    //if(key == 'spv.lbl.modified') {alert(value);}
96
+//		return value;
97
+	
98
+//	if (!$.isArray(placeHolderValues)) {
99
+//		// If placeHolderValues is not an array, make it into one.
100
+//		placeHolderValues = [placeHolderValues];
101
+//		for (var i=2; i<arguments.length; i++)
102
+//			placeHolderValues.push(arguments[i]);
103
+//	}
104
+
105
+	// Place holder replacement
106
+	/**
107
+	 * Tested with:
108
+	 *   test.t1=asdf ''{0}''
109
+	 *   test.t2=asdf '{0}' '{1}'{1}'zxcv
110
+	 *   test.t3=This is \"a quote" 'a''{0}''s'd{fgh{ij'
111
+	 *   test.t4="'''{'0}''" {0}{a}
112
+	 *   test.t5="'''{0}'''" {1}
113
+	 *   test.t6=a {1} b {0} c
114
+	 *   test.t7=a 'quoted \\ s\ttringy' \t\t x
115
+	 *
116
+	 * Produces:
117
+	 *   test.t1, p1 ==> asdf 'p1'
118
+	 *   test.t2, p1 ==> asdf {0} {1}{1}zxcv
119
+	 *   test.t3, p1 ==> This is "a quote" a'{0}'sd{fgh{ij
120
+	 *   test.t4, p1 ==> "'{0}'" p1{a}
121
+	 *   test.t5, p1 ==> "'{0}'" {1}
122
+	 *   test.t6, p1 ==> a {1} b p1 c
123
+	 *   test.t6, p1, p2 ==> a p2 b p1 c
124
+	 *   test.t6, p1, p2, p3 ==> a p2 b p1 c
125
+	 *   test.t7 ==> a quoted \ s	tringy 		 x
126
+	 */
127
+	
128
+	var i;
129
+	if (typeof(value) == 'string') {
130
+        // Handle escape characters. Done separately from the tokenizing loop below because escape characters are 
131
+		// active in quoted strings.
132
+        i = 0;
133
+        while ((i = value.indexOf('\\', i)) != -1) {
134
+ 		   if (value[i+1] == 't')
135
+ 			   value = value.substring(0, i) + '\t' + value.substring((i++) + 2); // tab
136
+ 		   else if (value[i+1] == 'r')
137
+ 			   value = value.substring(0, i) + '\r' + value.substring((i++) + 2); // return
138
+ 		   else if (value[i+1] == 'n')
139
+ 			   value = value.substring(0, i) + '\n' + value.substring((i++) + 2); // line feed
140
+ 		   else if (value[i+1] == 'f')
141
+ 			   value = value.substring(0, i) + '\f' + value.substring((i++) + 2); // form feed
142
+ 		   else if (value[i+1] == '\\')
143
+ 			   value = value.substring(0, i) + '\\' + value.substring((i++) + 2); // \
144
+ 		   else
145
+ 			   value = value.substring(0, i) + value.substring(i+1); // Quietly drop the character
146
+        }
147
+		
148
+		// Lazily convert the string to a list of tokens.
149
+		var arr = [], j, index;
150
+		i = 0;
151
+		while (i < value.length) {
152
+			if (value[i] == '\'') {
153
+				// Handle quotes
154
+				if (i == value.length-1)
155
+					value = value.substring(0, i); // Silently drop the trailing quote
156
+				else if (value[i+1] == '\'')
157
+					value = value.substring(0, i) + value.substring(++i); // Escaped quote
158
+				else {
159
+					// Quoted string
160
+					j = i + 2;
161
+					while ((j = value.indexOf('\'', j)) != -1) {
162
+						if (j == value.length-1 || value[j+1] != '\'') {
163
+							// Found start and end quotes. Remove them
164
+							value = value.substring(0,i) + value.substring(i+1, j) + value.substring(j+1);
165
+							i = j - 1;
166
+							break;
167
+						}
168
+						else {
169
+							// Found a double quote, reduce to a single quote.
170
+							value = value.substring(0,j) + value.substring(++j);
171
+						}
172
+					}
173
+					
174
+					if (j == -1) {
175
+						// There is no end quote. Drop the start quote
176
+						value = value.substring(0,i) + value.substring(i+1);
177
+					}
178
+				}
179
+			}
180
+			else if (value[i] == '{') {
181
+				// Beginning of an unquoted place holder.
182
+				j = value.indexOf('}', i+1);
183
+				if (j == -1)
184
+					i++; // No end. Process the rest of the line. Java would throw an exception
185
+				else {
186
+					// Add 1 to the index so that it aligns with the function arguments.
187
+					index = parseInt(value.substring(i+1, j));
188
+					if (!isNaN(index) && index >= 0) {
189
+						// Put the line thus far (if it isn't empty) into the array
190
+						var s = value.substring(0, i);
191
+						if (s != "")
192
+							arr.push(s);
193
+						// Put the parameter reference into the array
194
+						arr.push(index);
195
+						// Start the processing over again starting from the rest of the line.
196
+						i = 0;
197
+						value = value.substring(j+1);
198
+					}
199
+					else
200
+						i = j + 1; // Invalid parameter. Leave as is.
201
+				}
202
+			}
203
+			else
204
+				i++;
205
+		}
206
+		
207
+		// Put the remainder of the no-empty line into the array.
208
+		if (value != "")
209
+			arr.push(value);
210
+		value = arr;
211
+		
212
+		// Make the array the value for the entry.
213
+		$.i18n.map[key] = arr;
214
+	}
215
+	
216
+	if (value.length == 0)
217
+		return "";
218
+	if (value.lengh == 1 && typeof(value[0]) == "string")
219
+		return value[0];
220
+	
221
+	var s = "";
222
+	for (i=0; i<value.length; i++) {
223
+		if (typeof(value[i]) == "string")
224
+			s += value[i];
225
+		// Must be a number
226
+		else if (value[i] + 1 < arguments.length)
227
+			s += arguments[value[i] + 1];
228
+		else
229
+			s += "{"+ value[i] +"}";
230
+	}
231
+	
232
+	return s;
233
+};
234
+
235
+/** Language reported by browser, normalized code */
236
+$.i18n.browserLang = function() {
237
+	return normaliseLanguageCode(navigator.language /* Mozilla */ || navigator.userLanguage /* IE */);
238
+}
239
+
240
+
241
+/** Load and parse .properties files */
242
+function loadAndParseFile(filename, settings) {
243
+	$.ajax({
244
+        url:        filename,
245
+        async:      false,
246
+        cache:		settings.cache,
247
+        contentType:'text/plain;charset='+ settings.encoding,
248
+        dataType:   'text',
249
+        success:    function(data, status) {
250
+        				parseData(data, settings.mode); 
251
+					}
252
+    });
253
+}
254
+
255
+/** Parse .properties files */
256
+function parseData(data, mode) {
257
+   var parsed = '';
258
+   var parameters = data.split( /\n/ );
259
+   var regPlaceHolder = /(\{\d+\})/g;
260
+   var regRepPlaceHolder = /\{(\d+)\}/g;
261
+   var unicodeRE = /(\\u.{4})/ig;
262
+   for(var i=0; i<parameters.length; i++ ) {
263
+       parameters[i] = parameters[i].replace( /^\s\s*/, '' ).replace( /\s\s*$/, '' ); // trim
264
+       if(parameters[i].length > 0 && parameters[i].match("^#")!="#") { // skip comments
265
+           var pair = parameters[i].split('=');
266
+           if(pair.length > 0) {
267
+               /** Process key & value */
268
+               var name = unescape(pair[0]).replace( /^\s\s*/, '' ).replace( /\s\s*$/, '' ); // trim
269
+               var value = pair.length == 1 ? "" : pair[1];
270
+               // process multi-line values
271
+               while(value.match(/\\$/)=="\\") {
272
+               		value = value.substring(0, value.length - 1);
273
+               		value += parameters[++i].replace( /\s\s*$/, '' ); // right trim
274
+               }               
275
+               // Put values with embedded '='s back together
276
+               for(var s=2;s<pair.length;s++){ value +='=' + pair[s]; }
277
+               value = value.replace( /^\s\s*/, '' ).replace( /\s\s*$/, '' ); // trim
278
+               
279
+               /** Mode: bundle keys in a map */
280
+               if(mode == 'map' || mode == 'both') {
281
+                   // handle unicode chars possibly left out
282
+                   var unicodeMatches = value.match(unicodeRE);
283
+                   if(unicodeMatches) {
284
+                     for(var u=0; u<unicodeMatches.length; u++) {
285
+                        value = value.replace( unicodeMatches[u], unescapeUnicode(unicodeMatches[u]));
286
+                     }
287
+                   }
288
+                   // add to map
289
+                   $.i18n.map[name] = value;
290
+               }
291
+               
292
+               /** Mode: bundle keys as vars/functions */
293
+               if(mode == 'vars' || mode == 'both') {
294
+                   value = value.replace( /"/g, '\\"' ); // escape quotation mark (")
295
+                   
296
+                   // make sure namespaced key exists (eg, 'some.key') 
297
+                   checkKeyNamespace(name);
298
+                   
299
+                   // value with variable substitutions
300
+                   if(regPlaceHolder.test(value)) {
301
+                       var parts = value.split(regPlaceHolder);
302
+                       // process function args
303
+                       var first = true;
304
+                       var fnArgs = '';
305
+                       var usedArgs = [];
306
+                       for(var p=0; p<parts.length; p++) {
307
+                           if(regPlaceHolder.test(parts[p]) && (usedArgs.length == 0 || usedArgs.indexOf(parts[p]) == -1)) {
308
+                               if(!first) {fnArgs += ',';}
309
+                               fnArgs += parts[p].replace(regRepPlaceHolder, 'v$1');
310
+                               usedArgs.push(parts[p]);
311
+                               first = false;
312
+                           }
313
+                       }
314
+                       parsed += name + '=function(' + fnArgs + '){';
315
+                       // process function body
316
+                       var fnExpr = '"' + value.replace(regRepPlaceHolder, '"+v$1+"') + '"';
317
+                       parsed += 'return ' + fnExpr + ';' + '};';
318
+                       
319
+                   // simple value
320
+                   }else{
321
+                       parsed += name+'="'+value+'";';
322
+                   }
323
+               } // END: Mode: bundle keys as vars/functions
324
+           } // END: if(pair.length > 0)
325
+       } // END: skip comments
326
+   }
327
+   eval(parsed);
328
+}
329
+
330
+/** Make sure namespace exists (for keys with dots in name) */
331
+// TODO key parts that start with numbers quietly fail. i.e. month.short.1=Jan
332
+function checkKeyNamespace(key) {
333
+	var regDot = /\./;
334
+	if(regDot.test(key)) {
335
+		var fullname = '';
336
+		var names = key.split( /\./ );
337
+		for(var i=0; i<names.length; i++) {
338
+			if(i>0) {fullname += '.';}
339
+			fullname += names[i];
340
+			if(eval('typeof '+fullname+' == "undefined"')) {
341
+				eval(fullname + '={};');
342
+			}
343
+		}
344
+	}
345
+}
346
+
347
+/** Make sure filename is an array */
348
+function getFiles(names) {
349
+	return (names && names.constructor == Array) ? names : [names];
350
+}
351
+
352
+/** Ensure language code is in the format aa_AA. */
353
+function normaliseLanguageCode(lang) {
354
+    lang = lang.toLowerCase();
355
+    if(lang.length > 3) {
356
+        lang = lang.substring(0, 3) + lang.substring(3).toUpperCase();
357
+    }
358
+    return lang;
359
+}
360
+
361
+/** Unescape unicode chars ('\u00e3') */
362
+function unescapeUnicode(str) {
363
+  // unescape unicode codes
364
+  var codes = [];
365
+  var code = parseInt(str.substr(2), 16);
366
+  if (code >= 0 && code < Math.pow(2, 16)) {
367
+     codes.push(code);
368
+  }
369
+  // convert codes to text
370
+  var unescaped = '';
371
+  for (var i = 0; i < codes.length; ++i) {
372
+    unescaped += String.fromCharCode(codes[i]);
373
+  }
374
+  return unescaped;
375
+}
376
+
377
+/* Cross-Browser Split 1.0.1
378
+(c) Steven Levithan <stevenlevithan.com>; MIT License
379
+An ECMA-compliant, uniform cross-browser split method */
380
+var cbSplit;
381
+// avoid running twice, which would break `cbSplit._nativeSplit`'s reference to the native `split`
382
+if (!cbSplit) {    
383
+  cbSplit = function(str, separator, limit) {
384
+      // if `separator` is not a regex, use the native `split`
385
+      if (Object.prototype.toString.call(separator) !== "[object RegExp]") {
386
+        if(typeof cbSplit._nativeSplit == "undefined")
387
+          return str.split(separator, limit);
388
+        else
389
+          return cbSplit._nativeSplit.call(str, separator, limit);
390
+      }
391
+  
392
+      var output = [],
393
+          lastLastIndex = 0,
394
+          flags = (separator.ignoreCase ? "i" : "") +
395
+                  (separator.multiline  ? "m" : "") +
396
+                  (separator.sticky     ? "y" : ""),
397
+          separator = RegExp(separator.source, flags + "g"), // make `global` and avoid `lastIndex` issues by working with a copy
398
+          separator2, match, lastIndex, lastLength;
399
+  
400
+      str = str + ""; // type conversion
401
+      if (!cbSplit._compliantExecNpcg) {
402
+          separator2 = RegExp("^" + separator.source + "$(?!\\s)", flags); // doesn't need /g or /y, but they don't hurt
403
+      }
404
+  
405
+      /* behavior for `limit`: if it's...
406
+      - `undefined`: no limit.
407
+      - `NaN` or zero: return an empty array.
408
+      - a positive number: use `Math.floor(limit)`.
409
+      - a negative number: no limit.
410
+      - other: type-convert, then use the above rules. */
411
+      if (limit === undefined || +limit < 0) {
412
+          limit = Infinity;
413
+      } else {
414
+          limit = Math.floor(+limit);
415
+          if (!limit) {
416
+              return [];
417
+          }
418
+      }
419
+  
420
+      while (match = separator.exec(str)) {
421
+          lastIndex = match.index + match[0].length; // `separator.lastIndex` is not reliable cross-browser
422
+  
423
+          if (lastIndex > lastLastIndex) {
424
+              output.push(str.slice(lastLastIndex, match.index));
425
+  
426
+              // fix browsers whose `exec` methods don't consistently return `undefined` for nonparticipating capturing groups
427
+              if (!cbSplit._compliantExecNpcg && match.length > 1) {
428
+                  match[0].replace(separator2, function () {
429
+                      for (var i = 1; i < arguments.length - 2; i++) {
430
+                          if (arguments[i] === undefined) {
431
+                              match[i] = undefined;
432
+                          }
433
+                      }
434
+                  });
435
+              }
436
+  
437
+              if (match.length > 1 && match.index < str.length) {
438
+                  Array.prototype.push.apply(output, match.slice(1));
439
+              }
440
+  
441
+              lastLength = match[0].length;
442
+              lastLastIndex = lastIndex;
443
+  
444
+              if (output.length >= limit) {
445
+                  break;
446
+              }
447
+          }
448
+  
449
+          if (separator.lastIndex === match.index) {
450
+              separator.lastIndex++; // avoid an infinite loop
451
+          }
452
+      }
453
+  
454
+      if (lastLastIndex === str.length) {
455
+          if (lastLength || !separator.test("")) {
456
+              output.push("");
457
+          }
458
+      } else {
459
+          output.push(str.slice(lastLastIndex));
460
+      }
461
+  
462
+      return output.length > limit ? output.slice(0, limit) : output;
463
+  };
464
+  
465
+  cbSplit._compliantExecNpcg = /()??/.exec("")[1] === undefined; // NPCG: nonparticipating capturing group
466
+  cbSplit._nativeSplit = String.prototype.split;
467
+
468
+} // end `if (!cbSplit)`
469
+String.prototype.split = function (separator, limit) {
470
+    return cbSplit(this, separator, limit);
471
+};
472
+
473
+})(jQuery);
474
+                

+ 64 - 0
src/main/resources/static/script/jquery/jquery.ui.effect-slide.js

@@ -0,0 +1,64 @@
1
+/*!
2
+ * jQuery UI Effects Slide 1.10.3
3
+ * http://jqueryui.com
4
+ *
5
+ * Copyright 2013 jQuery Foundation and other contributors
6
+ * Released under the MIT license.
7
+ * http://jquery.org/license
8
+ *
9
+ * http://api.jqueryui.com/slide-effect/
10
+ *
11
+ * Depends:
12
+ *	jquery.ui.effect.js
13
+ */
14
+(function( $, undefined ) {
15
+
16
+$.effects.effect.slide = function( o, done ) {
17
+
18
+	// Create element
19
+	var el = $( this ),
20
+		props = [ "position", "top", "bottom", "left", "right", "width", "height" ],
21
+		mode = $.effects.setMode( el, o.mode || "show" ),
22
+		show = mode === "show",
23
+		direction = o.direction || "left",
24
+		ref = (direction === "up" || direction === "down") ? "top" : "left",
25
+		positiveMotion = (direction === "up" || direction === "left"),
26
+		distance,
27
+		animation = {};
28
+
29
+	// Adjust
30
+	$.effects.save( el, props );
31
+	el.show();
32
+	distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]( true );
33
+
34
+	$.effects.createWrapper( el ).css({
35
+		overflow: "hidden"
36
+	});
37
+
38
+	if ( show ) {
39
+		el.css( ref, positiveMotion ? (isNaN(distance) ? "-" + distance : -distance) : distance );
40
+	}
41
+
42
+	// Animation
43
+	animation[ ref ] = ( show ?
44
+		( positiveMotion ? "+=" : "-=") :
45
+		( positiveMotion ? "-=" : "+=")) +
46
+		distance;
47
+
48
+	// Animate
49
+	el.animate( animation, {
50
+		queue: false,
51
+		duration: o.duration,
52
+		easing: o.easing,
53
+		complete: function() {
54
+			if ( mode === "hide" ) {
55
+				el.hide();
56
+			}
57
+			$.effects.restore( el, props );
58
+			$.effects.removeWrapper( el );
59
+			done();
60
+		}
61
+	});
62
+};
63
+
64
+})(jQuery);

+ 415 - 0
src/main/resources/static/script/jquery/jquery.vaccordion.js

@@ -0,0 +1,415 @@
1
+(function ($) {
2
+
3
+	// cache some values
4
+	var cache	= {
5
+			idx_expanded	: -1, // the index of the current expanded slice
6
+			sliceH			: 0,  // the default slice's height	
7
+			current			: 0,  // controls the current slider position
8
+			totalSlices		: 0	  // total number of slices
9
+		},
10
+		aux		= {
11
+			// triggered when we click a slice. If the slice is expanded,
12
+			// we close it, otherwise we open it..
13
+			selectSlice		: function( $el, $slices, $navNext, $navPrev, settings ) {
14
+				
15
+				return $.Deferred(
16
+					function( dfd ) {
17
+					
18
+						var	expanded	= $el.data('expanded'),
19
+							pos			= $el.data('position'),
20
+							
21
+							itemHeight, othersHeight,
22
+							
23
+							$others		= $slices.not( $el );
24
+							
25
+						// if it's opened..	
26
+						if( expanded ) {
27
+							$el.data( 'expanded', false );
28
+							cache.idx_expanded	= -1;
29
+							
30
+							// the default values of each slices's height
31
+							itemHeight	= cache.sliceH;
32
+							othersHeight= cache.sliceH;
33
+							
34
+							// hide the content div
35
+							//$el.find('.va-content').hide();
36
+							
37
+							// control the navigation buttons visibility
38
+							if( aux.canSlideUp( $slices, settings ) )
39
+								$navPrev.fadeIn();
40
+							else
41
+								$navPrev.fadeOut();
42
+								
43
+							if( aux.canSlideDown( $slices, settings ) )
44
+								$navNext.fadeIn();
45
+							else
46
+								$navNext.fadeOut();
47
+						}
48
+						// if it's closed..
49
+						else {
50
+							$el.data( 'expanded', true );
51
+							cache.idx_expanded	= $el.index();
52
+							$others.data( 'expanded', false );
53
+							// the current slice's height
54
+							itemHeight	= settings.expandedHeight;
55
+							// the height the other slices will have
56
+							othersHeight= Math.ceil( ( settings.accordionH - settings.expandedHeight ) / ( settings.visibleSlices - 1 ) );
57
+							
58
+							// control the navigation buttons visibility
59
+							if( cache.idx_expanded > 0 )
60
+								$navPrev.fadeIn();
61
+							else	
62
+								$navPrev.fadeOut();
63
+							
64
+							if( cache.idx_expanded < cache.totalSlices - 1 )
65
+								$navNext.fadeIn();	
66
+							else
67
+								$navNext.fadeOut();
68
+						}
69
+						
70
+						// the animation parameters for the clicked slice
71
+						var	animParam	= { 
72
+											height	: itemHeight + 'px', 
73
+											opacity : 1,
74
+											top		: ( pos - 1 ) * othersHeight + 'px'
75
+										  };
76
+						
77
+						// animate the clicked slice and also its title (<h3>)
78
+						$el.stop()
79
+						   .animate( animParam, settings.animSpeed, settings.animEasing, function() {
80
+								if( !expanded )
81
+									$el.find('.va-content').fadeIn( settings.contentAnimSpeed );
82
+						   })
83
+						   .find('.va-title')
84
+						   .stop()
85
+						   .animate({
86
+								lineHeight	: cache.sliceH + 'px'
87
+						   }, settings.animSpeed, settings.animEasing );	
88
+						   
89
+						// animate all the others
90
+						$others.each(function(i){
91
+							var $other	= $(this),
92
+								posother= $other.data('position'),
93
+								t;
94
+							
95
+							if( expanded )
96
+								t	= ( posother - 1 ) * othersHeight ;
97
+							else {
98
+								if( posother < pos )
99
+									t	= ( posother - 1 ) * othersHeight ;
100
+								else
101
+									t	= ( ( posother - 2 ) * othersHeight ) + settings.expandedHeight;
102
+							}
103
+							
104
+							$other.stop()
105
+								  .animate( {
106
+										top		: t + 'px',
107
+										height	: othersHeight + 'px',
108
+										opacity	: ( expanded ) ? 1 : settings.animOpacity
109
+								  }, settings.animSpeed, settings.animEasing, dfd.resolve )
110
+								  .find('.va-title')
111
+								  .stop()
112
+								  .animate({
113
+										lineHeight	: othersHeight + 'px'
114
+								  }, settings.animSpeed, settings.animEasing )
115
+								  .end()
116
+								  .find('.va-content');
117
+								  //.hide();
118
+						});
119
+					}
120
+				).promise();
121
+				
122
+			},
123
+			// triggered when clicking the navigation buttons / mouse scrolling
124
+			navigate		: function( dir, $slices, $navNext, $navPrev, settings ) {
125
+				// if animating return
126
+				if( $slices.is(':animated') ) 
127
+					return false;
128
+				
129
+				// all move up / down one position
130
+				// if settings.savePositions is false, then we need to close any expanded slice before sliding
131
+				// otherwise we slide, and the next one will open automatically
132
+				var $el;
133
+				
134
+				if( cache.idx_expanded != -1 && !settings.savePositions ) {
135
+					$el	= $slices.eq( cache.idx_expanded );
136
+					
137
+					$.when( aux.selectSlice( $el, $slices, $navNext, $navPrev, settings ) ).done(function(){
138
+						setTimeout(function() {
139
+						aux.slide( dir, $slices, $navNext, $navPrev, settings );
140
+						}, 10);
141
+					});
142
+				}
143
+				else {
144
+					aux.slide( dir, $slices, $navNext, $navPrev, settings );
145
+				}	
146
+			},
147
+			slide			: function( dir, $slices, $navNext, $navPrev, settings ) {
148
+				// control if we can navigate.
149
+				// control the navigation buttons visibility.
150
+				// the navigation will behave differently for the cases we have all the slices closed, 
151
+				// and when one is opened. It will also depend on settings.savePositions 
152
+				if( cache.idx_expanded === -1 || !settings.savePositions ) {
153
+				if( dir === 1 && cache.current + settings.visibleSlices >= cache.totalSlices )
154
+					return false;
155
+				else if( dir === -1 && cache.current === 0 )
156
+					return false;
157
+				
158
+				if( dir === -1 && cache.current === 1 )
159
+					$navPrev.fadeOut();
160
+				else
161
+					$navPrev.fadeIn();
162
+					
163
+					if( dir === 1 && cache.current + settings.visibleSlices === cache.totalSlices - 1 )
164
+					$navNext.fadeOut();
165
+				else
166
+					$navNext.fadeIn();
167
+				}
168
+				else {
169
+					if( dir === 1 && cache.idx_expanded === cache.totalSlices - 1 )
170
+						return false;
171
+					else if( dir === -1 && cache.idx_expanded === 0 )
172
+						return false;
173
+						
174
+					if( dir === -1 && cache.idx_expanded === 1 )
175
+						$navPrev.fadeOut();
176
+					else
177
+						$navPrev.fadeIn();
178
+						
179
+					if( dir === 1 && cache.idx_expanded === cache.totalSlices - 2 )
180
+						$navNext.fadeOut();
181
+					else
182
+						$navNext.fadeIn();
183
+				}
184
+				
185
+				var $currentSlice	= $slices.eq( cache.idx_expanded ),
186
+					$nextSlice,
187
+					t;
188
+				
189
+				( dir === 1 ) ? $nextSlice = $currentSlice.next() : $nextSlice = $currentSlice.prev();
190
+				
191
+				// if we cannot slide up / down, then we just call the selectSlice for the previous / next slice
192
+				if( ( dir === 1 && !aux.canSlideDown( $slices, settings ) ) || 
193
+					( dir === -1 && !aux.canSlideUp( $slices, settings ) ) ) {
194
+					aux.selectSlice( $nextSlice, $slices, $navNext, $navPrev, settings );
195
+					return false;
196
+				}
197
+					
198
+				// if we slide down, the top and position of each slice will decrease
199
+				if( dir === 1 ) {
200
+					cache.current++;
201
+					t = '-=' + cache.sliceH;
202
+					pos_increment	= -1;
203
+				}
204
+				else {
205
+					cache.current--;
206
+					t = '+=' + cache.sliceH;
207
+					pos_increment	= 1;
208
+				}
209
+				
210
+				$slices.each(function(i) {
211
+					var $slice		= $(this),
212
+						pos			= $slice.data('position');
213
+					
214
+					// all closed or savePositions is false
215
+					if( !settings.savePositions || cache.idx_expanded === -1 )
216
+						$slice.stop().animate({top : t}, settings.animSpeed, settings.animEasing);
217
+					else {
218
+						var itemHeight, othersHeight;
219
+						
220
+						// if the slice is the one we should open..
221
+						if( i === $nextSlice.index() ) {
222
+							$slice.data( 'expanded', true );
223
+							cache.idx_expanded	= $slice.index();
224
+							itemHeight			= settings.expandedHeight;
225
+							othersHeight		= ( settings.accordionH - settings.expandedHeight ) / ( settings.visibleSlices - 1 );
226
+							
227
+							$slice.stop()
228
+						          .animate({
229
+										height		: itemHeight + 'px', 
230
+										opacity 	: 1,
231
+										top			: ( dir === 1 ) ? ( pos - 2 ) * othersHeight + 'px' : pos * othersHeight + 'px'
232
+								  }, settings.animSpeed, settings.animEasing, function() {
233
+										$slice.find('.va-content').fadeIn( settings.contentAnimSpeed );
234
+								  })
235
+								  .find('.va-title')
236
+								  .stop()
237
+								  .animate({
238
+										lineHeight	: cache.sliceH + 'px'
239
+								  }, settings.animSpeed, settings.animEasing );
240
+						}
241
+						// if the slice is the one opened, lets close it
242
+						else if( $slice.data('expanded') ){
243
+							// collapse
244
+							
245
+							$slice.data( 'expanded', false );
246
+							othersHeight		= ( settings.accordionH - settings.expandedHeight ) / ( settings.visibleSlices - 1 );
247
+							
248
+							$slice.stop()
249
+						          .animate({ 
250
+										height	: othersHeight + 'px', 
251
+										opacity : settings.animOpacity,
252
+										top		: ( dir === 1 ) ? '-=' + othersHeight : '+=' + settings.expandedHeight
253
+								  }, settings.animSpeed, settings.animEasing )
254
+								  .find('.va-title')
255
+								  .stop()
256
+								  .animate({
257
+										lineHeight	: othersHeight + 'px'
258
+								  }, settings.animSpeed, settings.animEasing )
259
+								  .end()
260
+								  .find('.va-content');
261
+								  //.hide();		  
262
+						}
263
+						// all the others..
264
+						else {
265
+							$slice.data( 'expanded', false );
266
+							othersHeight		= ( settings.accordionH - settings.expandedHeight ) / ( settings.visibleSlices - 1 );
267
+							
268
+							$slice.stop()
269
+						          .animate({ 
270
+										top		: ( dir === 1 ) ? '-=' + othersHeight : '+=' + othersHeight
271
+								  }, settings.animSpeed, settings.animEasing );
272
+						}
273
+					}
274
+					// change the slice's position
275
+					$slice.data().position += pos_increment;
276
+				});
277
+			},
278
+			canSlideUp		: function( $slices, settings ) {
279
+				var $first			= $slices.eq( cache.current );
280
+					
281
+				if( $first.index() !== 0 )
282
+					return true;
283
+			},
284
+			canSlideDown	: function( $slices, settings ) {
285
+				var $last			= $slices.eq( cache.current + settings.visibleSlices - 1 );
286
+					
287
+				if( $last.index() !== cache.totalSlices - 1 )
288
+					return true;
289
+			}
290
+		},
291
+		methods = {
292
+			init 		: function( options ) {
293
+				
294
+				if( this.length ) {
295
+					
296
+					var settings = {
297
+						// the accordion's width
298
+						accordionW		: 350,
299
+						// the accordion's height
300
+						accordionH		: $("#content_dir").height()*0.9,
301
+						// number of visible slices
302
+						visibleSlices	: 3,
303
+						// the height of a opened slice
304
+						// should not be more than accordionH
305
+						expandedHeight	: ($("#content_dir").height())*0.7,
306
+						// speed when opening / closing a slice
307
+						animSpeed		: 250,
308
+						// easing when opening / closing a slice
309
+						animEasing		: 'jswing',
310
+						// opacity value for the collapsed slices
311
+						animOpacity		: 0.2,
312
+						// time to fade in the slice's content
313
+						contentAnimSpeed: 900,
314
+						// if this is set to false, then before
315
+						// sliding we collapse any opened slice
316
+						savePositions	: true
317
+					};
318
+					
319
+					return this.each(function() {
320
+						
321
+						// if options exist, lets merge them with our default settings
322
+						if ( options ) {
323
+							$.extend( settings, options );
324
+						}
325
+						
326
+						var $el 			= $(this),
327
+							// the accordion's slices
328
+							$slices			= $el.find('div.va-slice'),
329
+							// the navigation buttons
330
+							$navNext		= $el.find('span.va-nav-next'),
331
+							$navPrev		= $el.find('span.va-nav-prev');
332
+							
333
+						// each slice's height
334
+						cache.sliceH		= Math.ceil( settings.accordionH / settings.visibleSlices );
335
+						
336
+						// total slices
337
+						cache.totalSlices	= $slices.length;
338
+						
339
+						// control some user config parameters
340
+						if( settings.expandedHeight > settings.accordionH )
341
+							settings.expandedHeight = settings.accordionH;
342
+						else if( settings.expandedHeight <= cache.sliceH )
343
+							settings.expandedHeight = cache.sliceH + 50; // give it a minimum
344
+							
345
+						// set the accordion's width & height
346
+						$el.css({
347
+							width	: settings.accordionW + 'px',
348
+							height	: settings.accordionH + 'px'
349
+						});
350
+						
351
+						// show / hide $navNext 
352
+						if( settings.visibleSlices < cache.totalSlices  )
353
+							$navNext.show();
354
+						
355
+						// set the top & height for each slice.
356
+						// also save the position of each one.
357
+						// as we navigate, the first one in the accordion
358
+						// will have position 1 and the last settings.visibleSlices.
359
+						// finally set line-height of the title (<h3>)
360
+						$slices.each(function(i){
361
+							var $slice	= $(this);
362
+							$slice.css({
363
+								top		: i * cache.sliceH + 'px',
364
+								height	: cache.sliceH + 'px'
365
+							}).data( 'position', (i + 1) );
366
+						})
367
+						.children('.va-title')
368
+						.css( 'line-height', cache.sliceH + 'px' );
369
+						
370
+						// click event
371
+						$slices.bind('click.vaccordion', function(e) {
372
+							// only if we have more than 1 visible slice. 
373
+							// otherwise we will just be able to slide.
374
+							if( settings.visibleSlices > 1 ) {
375
+								var $el			= $(this);
376
+								aux.selectSlice( $el, $slices, $navNext, $navPrev, settings );
377
+							}
378
+						});
379
+						
380
+						// navigation events
381
+						$navNext.bind('click.vaccordion', function(e){
382
+							aux.navigate( 1, $slices, $navNext, $navPrev, settings );
383
+						});
384
+						
385
+						$navPrev.bind('click.vaccordion', function(e){
386
+							aux.navigate( -1, $slices, $navNext, $navPrev, settings );
387
+						});
388
+						
389
+						// adds events to the mouse
390
+						$el.bind('mousewheel.vaccordion', function(e, delta) {
391
+							if(delta > 0) {
392
+								aux.navigate( -1, $slices, $navNext, $navPrev, settings );
393
+							}	
394
+							else {
395
+								aux.navigate( 1, $slices, $navNext, $navPrev, settings );
396
+							}	
397
+							return false;
398
+						});
399
+						
400
+					});
401
+				}
402
+			}
403
+		};
404
+	
405
+	$.fn.vaccordion = function(method) {
406
+		if ( methods[method] ) {
407
+			return methods[method].apply( this, Array.prototype.slice.call( arguments, 1 ));
408
+		} else if ( typeof method === 'object' || ! method ) {
409
+			return methods.init.apply( this, arguments );
410
+		} else {
411
+			$.error( 'Method ' +  method + ' does not exist on jQuery.vaccordion' );
412
+		}
413
+	};
414
+	
415
+})(jQuery);

+ 85 - 0
src/main/resources/static/script/module/ajax.js

@@ -0,0 +1,85 @@
1
+/** *Classe RADIALIZE */
2
+function SERVLET(servlet) {
3
+
4
+	var dataType = "json";
5
+	var urlServlet = servlet;
6
+
7
+	this.getDataType = function() {
8
+		return dataType;
9
+	};
10
+
11
+	this.setDataType = function(newDataType) {
12
+		dataType = newDataType;
13
+	};
14
+
15
+	this.getUrlServlet = function() {
16
+		return urlServlet;
17
+	};
18
+
19
+	this.setUrlServlet = function(url) {
20
+		urlServlet = url;
21
+	};
22
+
23
+	
24
+	this.lawyer = new LAWYER();
25
+	this.process = new PROCESS();
26
+
27
+}
28
+
29
+function LAWYER(){
30
+	
31
+	this.get = function(lawyerId, responseFunction) {
32
+		var urlAjax = SERVER.getUrlServlet() + "/lawyer/" + radioId;
33
+		callAjax(urlAjax, "GET", responseFunction);
34
+	}
35
+	
36
+	
37
+}
38
+function PROCESS(){
39
+	
40
+	this.search = function(text, responseFunction) {
41
+		var urlAjax = SERVER.getUrlServlet() + "/search?" + "text="+text;
42
+		callAjax(urlAjax, "GET", responseFunction);
43
+	}
44
+	
45
+	
46
+}
47
+
48
+
49
+
50
+
51
+
52
+
53
+
54
+function callAjax(urlAjax, type, responseFunction, asyncResponse) {
55
+
56
+	var header = "application/x-www-form-urlencoded;charset=utf-8;dataType=json";
57
+
58
+	if (asyncResponse == undefined)
59
+		asyncResponse = true;
60
+
61
+		$.ajax({
62
+		url : urlAjax,
63
+		type : type,
64
+		dataType : RD.getDataType(),
65
+		contentType : header,
66
+		async : asyncResponse,
67
+		encoding : "utf-8",
68
+		error : function(data, status, jqx) {
69
+
70
+			responseFunction(data);
71
+		},
72
+		success : function(data, status, jqx) {
73
+
74
+			responseFunction(data);
75
+
76
+
77
+		}
78
+	});
79
+}
80
+
81
+
82
+
83
+
84
+
85
+

+ 5 - 0
src/main/resources/static/script/module/app.js

@@ -0,0 +1,5 @@
1
+var mainApp = angular.module("mainApp", []);
2
+
3
+
4
+
5
+

+ 25 - 0
src/main/resources/static/script/module/lawyer.js

@@ -0,0 +1,25 @@
1
+mainApp.controller("studentController", function($scope, $http) {
2
+   
3
+	
4
+  if($scope.student!=undefined && !$scope.student.id != undefined)
5
+		var url = "http://localhost:8080/lawyer/"+$scope.student.id;
6
+	else
7
+		var url = "http://localhost:8080/lawyer/1";
8
+  
9
+  $http.get(url) .then(function(response) {
10
+  	 $scope.student =  response.data;
11
+   });
12
+   
13
+  $scope.update = function(){
14
+	   
15
+	   var url = "http://localhost:8080/lawyer/"+$scope.student.id;
16
+	   $http.get(url) .then(function(response) {
17
+		  	 $scope.student =  response.data;
18
+		});
19
+		   
20
+   }
21
+	
22
+});
23
+
24
+
25
+

+ 38 - 0
src/main/resources/static/script/module/search.js

@@ -0,0 +1,38 @@
1
+mainApp.controller("searchController", function($scope, $http) {
2
+
3
+	var urlBase = "http://localhost:8080"
4
+
5
+
6
+		$scope.search = function(){
7
+			var url ="/search"+urlBase+"?text="+$scope.entity.text;
8
+			$http.get(url) .then(function(response) {
9
+				$scope.entity =  response.data;
10
+		});
11
+			
12
+			
13
+		$scope.getProcess = function(){
14
+			var url ="/search"+urlBase+"?text="+$scope.entity.text;
15
+			$http.get(url) .then(function(response) {
16
+			$scope.entity =  response.data;
17
+		});
18
+		
19
+
20
+	}
21
+
22
+});
23
+
24
+//mainApp.controller("processController", function($scope, $http) {
25
+//
26
+//	var urlBase = "http://localhost:8080/search"
27
+//
28
+//
29
+//		$scope.search = function(){
30
+//
31
+//		var url =urlBase+"?text="+$scope.entity.text;
32
+//		$http.get(url) .then(function(response) {
33
+//			$scope.entity =  response.data;
34
+//		});
35
+//
36
+//	}
37
+//
38
+//});