Commit dd142872 authored by Nguyen Loc's avatar Nguyen Loc

loc

parent 09be0007
......@@ -24,14 +24,8 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<<<<<<< HEAD
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-security</artifactId>-->
<!-- </dependency>-->
=======
>>>>>>> master
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
......@@ -58,21 +52,13 @@
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<<<<<<< HEAD
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.12</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.springframework.security</groupId>-->
<!-- <artifactId>spring-security-test</artifactId>-->
<!-- <scope>test</scope>-->
<!-- </dependency>-->
=======
>>>>>>> master
</dependencies>
<build>
......
......@@ -13,8 +13,8 @@ public class CatalogiBusiness {
@Autowired
private CatalogiRepository catalogiRepository;
public Optional<Catalogi> findById(int id){
return catalogiRepository.findById(id);
public Catalogi findCatalogiById(int id){
return catalogiRepository.findCatalogiById(id);
}
public List<Catalogi> findAllCatalogi(){
......
......@@ -25,7 +25,14 @@ public class NewsBusiness {
public List<News> findByEmployeeId(int employeeId){
return newsRepository.findByEmployeeId(employeeId);
}
// FInd 4 latest news by câtlogiId
public List<News> findLatestNews(int catalogiId){
return newsRepository.getLatestNews(catalogiId);
}
// Find 4 latest news
public List<News> findAllLatestNews(){
return newsRepository.getAllLatestNews();
}
// Find news By Catalogi
public List<News> findByCatalogiId(int catalogiId){
return newsRepository.findByCatalogiId(catalogiId);
......@@ -54,12 +61,15 @@ public class NewsBusiness {
return updateNews;
}
public String deleteNews(int employeeId,int newsId){
News news = newsRepository.findByIdAndEmployeeId(employeeId,newsId);
//
public String deleteNews(int newsId,int employeeId){
News news = newsRepository.findByIdAndEmployeeId(newsId,employeeId);
if(news == null){
throw new ResourceNotFoundException("News" ,"newsId",newsId);
}
return "Delete Ok";
newsRepository.delete(news);
return "ok";
}
}
......@@ -23,7 +23,11 @@ public class CatalogiController {
@GetMapping("/catalogies/{catalogiId}")
public Catalogi getCatalogiById(@PathVariable(value = "catalogiId") int catalogiId){
return catalogiBusiness.findById(catalogiId).orElseThrow(()-> new ResourceNotFoundException("Catalogi","catalogiId",catalogiId));
Catalogi catalogi = catalogiBusiness.findCatalogiById(catalogiId);
if(catalogi == null) {
throw new ResourceNotFoundException("Catalogi", "catalogiId", catalogiId);
}
return catalogi;
}
@PostMapping("/catalogi")
......
......@@ -4,22 +4,19 @@ import com.itsol.quantrivanphong.access.homepage.business.CatalogiBusiness;
import com.itsol.quantrivanphong.access.homepage.business.NewsBusiness;
import com.itsol.quantrivanphong.exception.ResourceNotFoundException;
import com.itsol.quantrivanphong.manager.employee.business.EmployeeBusiness;
import com.itsol.quantrivanphong.model.Catalogi;
import com.itsol.quantrivanphong.model.Employee;
import com.itsol.quantrivanphong.model.News;
import org.springframework.beans.factory.annotation.Autowired;
<<<<<<< HEAD
<<<<<<< HEAD
=======
>>>>>>> 480f4a721c4ab000d936ea6b072027187579b926
=======
>>>>>>> 325eb2b85c51c2d288ca750be64d8d0657ba397a
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.List;
@RestController
@RequestMapping("/api")
public class NewsController {
......@@ -37,6 +34,11 @@ public class NewsController {
return ResponseEntity.ok(newsBusiness.findAllNews());
}
@GetMapping("/news/{newsId}")
public News getNewsById(@PathVariable(value = "newsId") int newsId){
return newsBusiness.findNewsById(newsId);
}
// get news by employeeId
@GetMapping("/employees/{employeeId}/news")
public List<News> getAllNewsByEmployeeId(@PathVariable(value = "employeeId") int employeeId) {
......@@ -48,16 +50,40 @@ public class NewsController {
return newsBusiness.findByCatalogiId(catalogiId);
}
// create news by employeesId
@PostMapping("/employees/{employeeId}/news")
// get LatestNews by catalogiId
@GetMapping("/catalogi/{catalogiId}/latestNews")
public List<News> getLatestNews(@PathVariable(value="catalogiId") int catalogiId){
return newsBusiness.findLatestNews(catalogiId);
}
//get Latest news
@GetMapping("/catalogi/latestNews")
public List<News> getAllLatestNews(){
return newsBusiness.findAllLatestNews();
}
@GetMapping("/employees/{employeeId}/news/{newsId}")
public News getAllNewsByEmployeeId(@PathVariable(value = "employeeId") int employeeId,
@PathVariable (value = "newsId") int newsId) {
return newsBusiness.findNewsByIdAndEmployeeId(newsId,employeeId);
}
// create news by employeesId, categoriId
@PostMapping("/employees/{employeeId}/catalogies/{catalogiId}/news")
public News createNews(@PathVariable (value = "employeeId") int employeeId,
@PathVariable (value = "catalogiId") int catalogiId,
@Valid @RequestBody News news) {
Employee employee = employeeBusiness.findEmployeeById(employeeId);
Employee employee = employeeBusiness.findById(employeeId);
Catalogi catalogi = catalogiBusiness.findCatalogiById(catalogiId);
if(employee == null){
throw new ResourceNotFoundException("Employee" ,"employeeId",employeeId);
}
Employee employee = employeeBusiness.findById(employeeId);
if(catalogi==null){
throw new ResourceNotFoundException("Catalogi" ,"catalogiId",catalogiId);
}
news.setEmployee(employee);
news.setCatalogi(catalogi);
return newsBusiness.save(news);
}
......@@ -66,7 +92,7 @@ public class NewsController {
public News updateNews(@PathVariable (value = "employeeId") int employeeId,
@PathVariable (value = "newsId") int newsId,
@Valid @RequestBody News newsRequest) {
if(employeeBusiness.findEmployeeById(employeeId)==null) {
if(employeeBusiness.findById(employeeId)==null) {
throw new ResourceNotFoundException("Employee" ,"employeeId",employeeId);
}
if (newsBusiness.findNewsById(newsId)== null) {
......@@ -76,12 +102,12 @@ public class NewsController {
}
//delete news by employeeId and newsId
@DeleteMapping("/employees/{employeeId}/news/{newsId}")
public ResponseEntity<?> deleteNews(@PathVariable (value = "employeeId") int employeeId,
@DeleteMapping("/HR/catagori/{catagoriId}/news/{newsId}")
public ResponseEntity<?> deleteNews(@PathVariable (value = "catagoriId") int catagoriId,
@PathVariable (value = "newsId") int newsId) {
if(newsBusiness.findNewsByIdAndEmployeeId(employeeId,newsId)== null){
if(newsBusiness.findNewsByIdAndAndCatalogiId(newsId,catagoriId)== null){
throw new ResourceNotFoundException("News","newsId",newsId);
}
return ResponseEntity.ok(newsBusiness.deleteNews(employeeId,newsId));
return ResponseEntity.ok(newsBusiness.deleteNews(newsId,catagoriId));
}
}
......@@ -14,6 +14,13 @@ public interface NewsRepository extends JpaRepository<News, Integer> {
List<News> findAllNews();
@Query("SELECT u FROM News u where u.id=:id")
News findNewsById(int id);
@Query(value="select * from News c where c.catalogi_id = ? ORDER BY c.created_at DESC limit 4",nativeQuery = true)
List<News> getLatestNews(int catalogiId);
@Query(value="select * from News c ORDER BY c.created_at DESC limit 4",nativeQuery = true)
List<News> getAllLatestNews();
List<News> findByEmployeeId(int employeeId);
List<News> findByCatalogiId(int catalogiId);
News findByIdAndEmployeeId(int id,int employeeId);
......
package com.itsol.quantrivanphong.manager.employee.controller;
import com.itsol.quantrivanphong.exception.ResourceNotFoundException;
import com.itsol.quantrivanphong.manager.employee.business.EmployeeBusiness;
import com.itsol.quantrivanphong.model.Employee;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -18,17 +19,25 @@ public class EmployeeController {
//Retrieve Employee by id
private EmployeeBusiness employeeBusiness;
@RequestMapping(value = "/employee/{id}", method = RequestMethod.GET)
public ResponseEntity<Employee> getEmployee(@PathVariable("id") int id) {
System.out.println("Fetching employee with id " + id);
Employee employee = employeeBusiness.findById(id);
if (employee == null) {
System.out.println("Employee with id : " + id + " not found");
return new ResponseEntity<Employee>(HttpStatus.NOT_FOUND);
// @RequestMapping(value = "/employee/{id}", method = RequestMethod.GET)
// public ResponseEntity<Employee> getEmployee(@PathVariable("id") int id) {
// System.out.println("Fetching employee with id " + id);
// Employee employee = employeeBusiness.findById(id);
// if (employee == null) {
// System.out.println("Employee with id : " + id + " not found");
// return new ResponseEntity<Employee>(HttpStatus.NOT_FOUND);
// }
// return new ResponseEntity<Employee>( employee ,HttpStatus.OK);
// }
@GetMapping("/employee/{empId}")
public Employee getEmployee(@PathVariable(value = "empId") int empId){
Employee employee = employeeBusiness.findById(empId);
if(employee == null) {
throw new ResourceNotFoundException("Employee", "empId", empId);
}
return new ResponseEntity<Employee>( employee ,HttpStatus.OK);
return employee;
}
//Retrieve all employee
@RequestMapping(value = "/list_employee", method = RequestMethod.GET)
public ResponseEntity<List<Employee>> listAllEmployee() {
......
......@@ -5,6 +5,8 @@ import com.itsol.quantrivanphong.report.issue.common.AbstractEntityManagerDao;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Service;
@Service
public class EmployeeRepositoryImpl extends AbstractEntityManagerDao<Integer, Employee> {
private Logger logger = Logger.getLogger(EmployeeRepositoryImpl.class);
......
......@@ -10,7 +10,9 @@ import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import javax.persistence.*;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@Entity
......@@ -35,6 +37,8 @@ public class Catalogi extends DateAudit {
@Column(name = "descriptions")
private String descriptions;
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "catalogi")
private List<News> news = new ArrayList<>();
}
......@@ -30,6 +30,7 @@ public class Employee {
@Column(name = "password", length = 128, nullable = false)
private String password;
@Column(name = "confirm_password")
@Size(min = 5, max = 20)
private String confirmPassword;
......@@ -79,7 +80,7 @@ public class Employee {
@Column(name = "status", nullable = false)
private boolean status;
@JsonIgnore
// @JsonIgnore
@OneToMany(mappedBy = "employee", fetch = FetchType.LAZY, cascade = CascadeType.ALL)
private List<News> newsList = new ArrayList<>();
......
#server.port=8081
# ===============================
# DATABASE CONNECTION
# ===============================
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3308/quantrivanphong
spring.datasource.username=root
spring.datasource.password= 123456
# ===============================
# JPA / HIBERNATE
# ===============================
spring.jpa.show-sql=true
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
#spring.jpa.properties.hibernate.default_schema=qlns_itsol
## Fix Postgres JPA Error:
## Method org.postgresql.jdbc.PgConnection.createClob() is not yet implemented.
#spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults=false
# ===============================
# SEND EMAIL
# ==============================
spring.mail.host=smtp.gmail.com
spring.mail.port=587
spring.mail.username=
spring.mail.password=
spring.mail.properties.mail.smtp.starttls.enable=true
spring.mail.properties.mail.smtp.starttls.required=true
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.connectiontimeout=5000
spring.mail.properties.mail.smtp.timeout=5000
spring.mail.properties.mail.smtp.writetimeout=5000
## App Properties
app.jwtSecret= JWTSuperSecretKey
app.jwtExpirationInMs = 604800000
## Spring DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.url = jdbc:mysql://localhost:3306/quantrivanphong?useSSL=false
spring.datasource.username = root
spring.datasource.password = vanloc
dataSource.setUsername(System.getProperty("root"));
## Hibernate Properties
# The SQL dialect makes Hibernate generate better SQL for the chosen database
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect
# Hibernate ddl auto (create, create-drop, validate, update)
spring.jpa.hibernate.ddl-auto = update
###### Email Properties ######
spring.mail.host = smtp.gmail.com
spring.mail.port = 587
spring.mail.properties.mail.smtp.starttls.enable = true
spring.mail.username = nguyenlocxtnd@gmail.com
spring.mail.password = Nguyenvanloc19951995
spring.mail.properties.mail.smtp.starttls.required = true
spring.mail.properties.mail.smtp.auth = true
spring.mail.properties.mail.smtp.connectiontimeout = 5000
spring.mail.properties.mail.smtp.timeout = 5000
spring.mail.properties.mail.smtp.writetimeout = 5000
We are using the Gmail SMTP server for this exam
\ No newline at end of file
<!-- Sticky Footer -->
<footer class="sticky-footer">
<div class="container my-auto">
<div class="copyright text-center my-auto">
<span>PS: Phung Van Dung</span>
</div>
</div>
</footer>
\ No newline at end of file
<nav class="navbar navbar-expand navbar-dark bg-dark static-top">
<a class="navbar-brand mr-1" href="index.html">Trang Quản Trị</a>
<!-- Navbar Search -->
<form class="d-none d-md-inline-block form-inline ml-auto mr-0 mr-md-3 my-2 my-md-0">
</form>
<!-- Navbar -->
<ul class="navbar-nav ml-auto ml-md-0">
<li class="nav-item dropdown no-arrow">
<a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<i class="fas fa-user-circle fa-fw"></i>Admin
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="userDropdown">
<a class="dropdown-item" href="#">Profile</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#logoutModal">Logout</a>
</div>
</li>
</ul>
</nav>
\ No newline at end of file
<div id="wrapper">
<!-- Sidebar -->
<ul class="sidebar navbar-nav">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="pagesDropdown" role="button" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<i class="fas fa-fw fa-folder"></i>
<span>Quản Trị Văn Phòng</span>
</a>
<div class="dropdown-menu" aria-labelledby="pagesDropdown">
<h6 class="dropdown-header">Quản Trị</h6>
<a class="dropdown-item" data-ng-href="/project/danh-sach-tat-ca-du-an.html">Dự Án</a>
<a class="dropdown-item" href="#">Nhân Viên</a>
<a class="dropdown-item" href="#">Báo Cáo</a>
<a class="dropdown-item" href="#">Tin Tức</a>
<div class="dropdown-divider">aaa</div>
<h6 class="dropdown-header">Báo Cáo</h6>
<a class="dropdown-item" href="#">Xin Phép</a>
<a class="dropdown-item" href="#">Time Sheet</a>
<a class="dropdown-item" href="#">Quản lý Issuses</a>
</div>
</li>
</ul>
</div>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -8062,7 +8062,7 @@ module.exports = {
var helpers = require(46);
/**
* Namespace to hold static tick generation functions
* Namespace to hold common tick generation functions
* @namespace Chart.Ticks
*/
module.exports = {
......
This diff is collapsed.
This diff is collapsed.
......@@ -13,7 +13,7 @@
(function( factory ){
if ( typeof define === 'function' && define.amd ) {
// AMD
define( ['static/admin/js/jquery', 'datatables.net'], function ($ ) {
define( ['common/common/js/jquery', 'datatables.net'], function ($ ) {
return factory( $, window, document );
} );
}
......
......@@ -2,7 +2,7 @@
DataTables Bootstrap 4 integration
©2011-2017 SpryMedia Ltd - datatables.net/license
*/
(function(b){"function"===typeof define&&define.amd?define(["static/admin/js/jquery","datatables.net"],function(a){return b(a,window,document)}):"object"===typeof exports?module.exports=function(a, d){a||(a=window);if(!d||!d.fn.dataTable)d=require("datatables.net")(a,d).$;return b(d,a,a.document)}:b(jQuery,window,document)})(function(b, a, d, m){var f=b.fn.dataTable;b.extend(!0,f.defaults,{dom:"<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
(function(b){"function"===typeof define&&define.amd?define(["common/common/js/jquery","datatables.net"],function(a){return b(a,window,document)}):"object"===typeof exports?module.exports=function(a, d){a||(a=window);if(!d||!d.fn.dataTable)d=require("datatables.net")(a,d).$;return b(d,a,a.document)}:b(jQuery,window,document)})(function(b, a, d, m){var f=b.fn.dataTable;b.extend(!0,f.defaults,{dom:"<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
renderer:"bootstrap"});b.extend(f.ext.classes,{sWrapper:"dataTables_wrapper dt-bootstrap4",sFilterInput:"form-control form-control-sm",sLengthSelect:"custom-select custom-select-sm form-control form-control-sm",sProcessing:"dataTables_processing card",sPageButton:"paginate_button page-item"});f.ext.renderer.pageButton.bootstrap=function(a,h,r,s,j,n){var o=new f.Api(a),t=a.oClasses,k=a.oLanguage.oPaginate,u=a.oLanguage.oAria.paginate||{},e,g,p=0,q=function(d,f){var l,h,i,c,m=function(a){a.preventDefault();
!b(a.currentTarget).hasClass("disabled")&&o.page()!=a.data.action&&o.page(a.data.action).draw("page")};l=0;for(h=f.length;l<h;l++)if(c=f[l],b.isArray(c))q(d,c);else{g=e="";switch(c){case "ellipsis":e="&#x2026;";g="disabled";break;case "first":e=k.sFirst;g=c+(0<j?"":" disabled");break;case "previous":e=k.sPrevious;g=c+(0<j?"":" disabled");break;case "next":e=k.sNext;g=c+(j<n-1?"":" disabled");break;case "last":e=k.sLast;g=c+(j<n-1?"":" disabled");break;default:e=c+1,g=j===c?"active":""}e&&(i=b("<li>",
{"class":t.sPageButton+" "+g,id:0===r&&"string"===typeof c?a.sTableId+"_"+c:null}).append(b("<a>",{href:"#","aria-controls":a.sTableId,"aria-label":u[c],"data-dt-idx":p,tabindex:a.iTabIndex,"class":"page-link"}).html(e)).appendTo(d),a.oApi._fnBindAction(i,{action:c},m),p++)}},i;try{i=b(h).find(d.activeElement).data("dt-idx")}catch(v){}q(b(h).empty().html('<ul class="pagination"/>').children("ul"),s);i!==m&&b(h).find("[data-dt-idx="+i+"]").focus()};return f});
......@@ -29,7 +29,7 @@
if ( typeof define === 'function' && define.amd ) {
// AMD
define( ['static/admin/js/jquery'], function ($ ) {
define( ['common/common/js/jquery'], function ($ ) {
return factory( $, window, document );
} );
}
......@@ -44,8 +44,8 @@
if ( ! $ ) {
$ = typeof window !== 'undefined' ? // jQuery's factory checks for a global window
require('static/admin/js/jquery') :
require('static/admin/js/jquery')( root );
require('common/common/js/jquery') :
require('common/common/js/jquery')( root );
}
return factory( $, root, root.document );
......@@ -2297,7 +2297,7 @@
/**
* Take the column definitions and static columns arrays and calculate how
* Take the column definitions and common columns arrays and calculate how
* they relate to column indexes. The callback function will then apply the
* definition found for a column to a suitable configuration object.
* @param {object} oSettings dataTables settings object
......@@ -7181,7 +7181,7 @@
_Api.extend = function ( scope, obj, ext )
{
// Only extend API instances and static properties of the API
// Only extend API instances and common properties of the API
if ( ! ext.length || ! obj || ( ! (obj instanceof _Api) && ! obj.__dt_wrapper ) ) {
return;
}
......@@ -9132,7 +9132,7 @@
* @returns {boolean} true if this version of DataTables is greater or equal to
* the required version, or false if this version of DataTales is not
* suitable
* @static
* @common
* @dtopt API-Static
*
* @example
......@@ -9168,7 +9168,7 @@
* selector for the table to test. Note that if more than more than one
* table is passed on, only the first will be checked
* @returns {boolean} true the table given is a DataTable, or false otherwise
* @static
* @common
* @dtopt API-Static
*
* @example
......@@ -9206,7 +9206,7 @@
* or visible tables only.
* @returns {array} Array of `table` nodes (not DataTable instances) which are
* DataTables
* @static
* @common
* @dtopt API-Static
*
* @example
......@@ -11244,7 +11244,7 @@
/**
* Classes that DataTables assigns to the various components and features
* that it adds to the HTML table. This allows classes to be configured
* during initialisation in addition to through the static
* during initialisation in addition to through the common
* {@link DataTable.ext.oStdClasses} object).
* @namespace
* @name DataTable.defaults.classes
......@@ -14127,7 +14127,7 @@
*
* This type of ordering is useful if you want to do ordering based on data
* live from the DOM (for example the contents of an 'input' element) rather
* than just the static string that DataTables knows of.
* than just the common string that DataTables knows of.
*
* The way these plug-ins work is that you create an array of the values you
* wish to be ordering for the column in question and then return that
......
......@@ -2,7 +2,7 @@
DataTables 1.10.19
©2008-2018 SpryMedia Ltd - datatables.net/license
*/
(function(h){"function"===typeof define&&define.amd?define(["static/admin/js/jquery"],function(E){return h(E,window,document)}):"object"===typeof exports?module.exports=function(E, H){E||(E=window);H||(H="undefined"!==typeof window?require("static/admin/js/jquery"):require("static/admin/js/jquery")(E));return h(H,E,E.document)}:h(jQuery,window,document)})(function(h, E, H, k){function Z(a){var b,c,d={};h.each(a,function(e){if((b=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(b[1]+" "))c=e.replace(b[0],b[2].toLowerCase()),
(function(h){"function"===typeof define&&define.amd?define(["common/common/js/jquery"],function(E){return h(E,window,document)}):"object"===typeof exports?module.exports=function(E, H){E||(E=window);H||(H="undefined"!==typeof window?require("common/common/js/jquery"):require("common/common/js/jquery")(E));return h(H,E,E.document)}:h(jQuery,window,document)})(function(h, E, H, k){function Z(a){var b,c,d={};h.each(a,function(e){if((b=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(b[1]+" "))c=e.replace(b[0],b[2].toLowerCase()),
d[c]=e,"o"===b[1]&&Z(a[e])});a._hungarianMap=d}function J(a,b,c){a._hungarianMap||Z(a);var d;h.each(b,function(e){d=a._hungarianMap[e];if(d!==k&&(c||b[d]===k))"o"===d.charAt(0)?(b[d]||(b[d]={}),h.extend(!0,b[d],b[e]),J(a[d],b[d],c)):b[d]=b[e]})}function Ca(a){var b=n.defaults.oLanguage,c=b.sDecimal;c&&Da(c);if(a){var d=a.sZeroRecords;!a.sEmptyTable&&(d&&"No data available in table"===b.sEmptyTable)&&F(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&(d&&"Loading..."===b.sLoadingRecords)&&F(a,
a,"sZeroRecords","sLoadingRecords");a.sInfoThousands&&(a.sThousands=a.sInfoThousands);(a=a.sDecimal)&&c!==a&&Da(a)}}function fb(a){A(a,"ordering","bSort");A(a,"orderMulti","bSortMulti");A(a,"orderClasses","bSortClasses");A(a,"orderCellsTop","bSortCellsTop");A(a,"order","aaSorting");A(a,"orderFixed","aaSortingFixed");A(a,"paging","bPaginate");A(a,"pagingType","sPaginationType");A(a,"pageLength","iDisplayLength");A(a,"searching","bFilter");"boolean"===typeof a.sScrollX&&(a.sScrollX=a.sScrollX?"100%":
"");"boolean"===typeof a.scrollX&&(a.scrollX=a.scrollX?"100%":"");if(a=a.aoSearchCols)for(var b=0,c=a.length;b<c;b++)a[b]&&J(n.models.oSearch,a[b])}function gb(a){A(a,"orderable","bSortable");A(a,"orderData","aDataSort");A(a,"orderSequence","asSorting");A(a,"orderDataType","sortDataType");var b=a.aDataSort;"number"===typeof b&&!h.isArray(b)&&(a.aDataSort=[b])}function hb(a){if(!n.__browser){var b={};n.__browser=b;var c=h("<div/>").css({position:"fixed",top:0,left:-1*h(E).scrollLeft(),height:1,width:1,
......
/*
* jQuery Easing v1.4.1 - http://gsgd.co.uk/sandbox/jquery/easing/
* Open source under the BSD License.
* Copyright © 2008 George McGinley Smith
* All rights reserved.
* https://raw.github.com/gdsmith/jquery-easing/master/LICENSE
*/
(function (factory) {
if (typeof define === "function" && define.amd) {
define(['common/common/js/jquery'], function ($) {
return factory($);
});
} else if (typeof module === "object" && typeof module.exports === "object") {
exports = factory(require('common/common/js/jquery'));
} else {
factory(jQuery);
}
})(function($){
// Preserve the original jQuery "swing" easing as "jswing"
$.easing.jswing = $.easing.swing;
var pow = Math.pow,
sqrt = Math.sqrt,
sin = Math.sin,
cos = Math.cos,
PI = Math.PI,
c1 = 1.70158,
c2 = c1 * 1.525,
c3 = c1 + 1,
c4 = ( 2 * PI ) / 3,
c5 = ( 2 * PI ) / 4.5;
// x is the fraction of animation progress, in the range 0..1
function bounceOut(x) {
var n1 = 7.5625,
d1 = 2.75;
if ( x < 1/d1 ) {
return n1*x*x;
} else if ( x < 2/d1 ) {
return n1*(x-=(1.5/d1))*x + 0.75;
} else if ( x < 2.5/d1 ) {
return n1*(x-=(2.25/d1))*x + 0.9375;
} else {
return n1*(x-=(2.625/d1))*x + 0.984375;
}
}
$.extend( $.easing,
{
def: 'easeOutQuad',
swing: function (x) {
return $.easing[$.easing.def](x);
},
easeInQuad: function (x) {
return x * x;
},
easeOutQuad: function (x) {
return 1 - ( 1 - x ) * ( 1 - x );
},
easeInOutQuad: function (x) {
return x < 0.5 ?
2 * x * x :
1 - pow( -2 * x + 2, 2 ) / 2;
},
easeInCubic: function (x) {
return x * x * x;
},
easeOutCubic: function (x) {
return 1 - pow( 1 - x, 3 );
},
easeInOutCubic: function (x) {
return x < 0.5 ?
4 * x * x * x :
1 - pow( -2 * x + 2, 3 ) / 2;
},
easeInQuart: function (x) {
return x * x * x * x;
},
easeOutQuart: function (x) {
return 1 - pow( 1 - x, 4 );
},
easeInOutQuart: function (x) {
return x < 0.5 ?
8 * x * x * x * x :
1 - pow( -2 * x + 2, 4 ) / 2;
},
easeInQuint: function (x) {
return x * x * x * x * x;
},
easeOutQuint: function (x) {
return 1 - pow( 1 - x, 5 );
},
easeInOutQuint: function (x) {
return x < 0.5 ?
16 * x * x * x * x * x :
1 - pow( -2 * x + 2, 5 ) / 2;
},
easeInSine: function (x) {
return 1 - cos( x * PI/2 );
},
easeOutSine: function (x) {
return sin( x * PI/2 );
},
easeInOutSine: function (x) {
return -( cos( PI * x ) - 1 ) / 2;
},
easeInExpo: function (x) {
return x === 0 ? 0 : pow( 2, 10 * x - 10 );
},
easeOutExpo: function (x) {
return x === 1 ? 1 : 1 - pow( 2, -10 * x );
},
easeInOutExpo: function (x) {
return x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ?
pow( 2, 20 * x - 10 ) / 2 :
( 2 - pow( 2, -20 * x + 10 ) ) / 2;
},
easeInCirc: function (x) {
return 1 - sqrt( 1 - pow( x, 2 ) );
},
easeOutCirc: function (x) {
return sqrt( 1 - pow( x - 1, 2 ) );
},
easeInOutCirc: function (x) {
return x < 0.5 ?
( 1 - sqrt( 1 - pow( 2 * x, 2 ) ) ) / 2 :
( sqrt( 1 - pow( -2 * x + 2, 2 ) ) + 1 ) / 2;
},
easeInElastic: function (x) {
return x === 0 ? 0 : x === 1 ? 1 :
-pow( 2, 10 * x - 10 ) * sin( ( x * 10 - 10.75 ) * c4 );
},
easeOutElastic: function (x) {
return x === 0 ? 0 : x === 1 ? 1 :
pow( 2, -10 * x ) * sin( ( x * 10 - 0.75 ) * c4 ) + 1;
},
easeInOutElastic: function (x) {
return x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ?
-( pow( 2, 20 * x - 10 ) * sin( ( 20 * x - 11.125 ) * c5 )) / 2 :
pow( 2, -20 * x + 10 ) * sin( ( 20 * x - 11.125 ) * c5 ) / 2 + 1;
},
easeInBack: function (x) {
return c3 * x * x * x - c1 * x * x;
},
easeOutBack: function (x) {
return 1 + c3 * pow( x - 1, 3 ) + c1 * pow( x - 1, 2 );
},
easeInOutBack: function (x) {
return x < 0.5 ?
( pow( 2 * x, 2 ) * ( ( c2 + 1 ) * 2 * x - c2 ) ) / 2 :
( pow( 2 * x - 2, 2 ) *( ( c2 + 1 ) * ( x * 2 - 2 ) + c2 ) + 2 ) / 2;
},
easeInBounce: function (x) {
return 1 - bounceOut( 1 - x );
},
easeOutBounce: bounceOut,
easeInOutBounce: function (x) {
return x < 0.5 ?
( 1 - bounceOut( 1 - 2 * x ) ) / 2 :
( 1 + bounceOut( 2 * x - 1 ) ) / 2;
}
});
});
(function(factory){if(typeof define==="function"&&define.amd){define(["common/common/js/jquery"],function($){return factory($)})}else if(typeof module==="object"&&typeof module.exports==="object"){exports=factory(require("common/common/js/jquery"))}else{factory(jQuery)}})(function($){$.easing.jswing=$.easing.swing;var pow=Math.pow,sqrt=Math.sqrt,sin=Math.sin,cos=Math.cos,PI=Math.PI,c1=1.70158,c2=c1*1.525,c3=c1+1,c4=2*PI/3,c5=2*PI/4.5;function bounceOut(x){var n1=7.5625,d1=2.75;if(x<1/d1){return n1*x*x}else if(x<2/d1){return n1*(x-=1.5/d1)*x+.75}else if(x<2.5/d1){return n1*(x-=2.25/d1)*x+.9375}else{return n1*(x-=2.625/d1)*x+.984375}}$.extend($.easing,{def:"easeOutQuad",swing:function(x){return $.easing[$.easing.def](x)},easeInQuad:function(x){return x*x},easeOutQuad:function(x){return 1-(1-x)*(1-x)},easeInOutQuad:function(x){return x<.5?2*x*x:1-pow(-2*x+2,2)/2},easeInCubic:function(x){return x*x*x},easeOutCubic:function(x){return 1-pow(1-x,3)},easeInOutCubic:function(x){return x<.5?4*x*x*x:1-pow(-2*x+2,3)/2},easeInQuart:function(x){return x*x*x*x},easeOutQuart:function(x){return 1-pow(1-x,4)},easeInOutQuart:function(x){return x<.5?8*x*x*x*x:1-pow(-2*x+2,4)/2},easeInQuint:function(x){return x*x*x*x*x},easeOutQuint:function(x){return 1-pow(1-x,5)},easeInOutQuint:function(x){return x<.5?16*x*x*x*x*x:1-pow(-2*x+2,5)/2},easeInSine:function(x){return 1-cos(x*PI/2)},easeOutSine:function(x){return sin(x*PI/2)},easeInOutSine:function(x){return-(cos(PI*x)-1)/2},easeInExpo:function(x){return x===0?0:pow(2,10*x-10)},easeOutExpo:function(x){return x===1?1:1-pow(2,-10*x)},easeInOutExpo:function(x){return x===0?0:x===1?1:x<.5?pow(2,20*x-10)/2:(2-pow(2,-20*x+10))/2},easeInCirc:function(x){return 1-sqrt(1-pow(x,2))},easeOutCirc:function(x){return sqrt(1-pow(x-1,2))},easeInOutCirc:function(x){return x<.5?(1-sqrt(1-pow(2*x,2)))/2:(sqrt(1-pow(-2*x+2,2))+1)/2},easeInElastic:function(x){return x===0?0:x===1?1:-pow(2,10*x-10)*sin((x*10-10.75)*c4)},easeOutElastic:function(x){return x===0?0:x===1?1:pow(2,-10*x)*sin((x*10-.75)*c4)+1},easeInOutElastic:function(x){return x===0?0:x===1?1:x<.5?-(pow(2,20*x-10)*sin((20*x-11.125)*c5))/2:pow(2,-20*x+10)*sin((20*x-11.125)*c5)/2+1},easeInBack:function(x){return c3*x*x*x-c1*x*x},easeOutBack:function(x){return 1+c3*pow(x-1,3)+c1*pow(x-1,2)},easeInOutBack:function(x){return x<.5?pow(2*x,2)*((c2+1)*2*x-c2)/2:(pow(2*x-2,2)*((c2+1)*(x*2-2)+c2)+2)/2},easeInBounce:function(x){return 1-bounceOut(1-x)},easeOutBounce:bounceOut,easeInOutBounce:function(x){return x<.5?(1-bounceOut(1-2*x))/2:(1+bounceOut(2*x-1))/2}})});
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery"],function($){return factory($)})}else if(typeof module==="object"&&typeof module.exports==="object"){exports=factory(require("jquery"))}else{factory(jQuery)}})(function($){$.easing.jswing=$.easing.swing;var pow=Math.pow,sqrt=Math.sqrt,sin=Math.sin,cos=Math.cos,PI=Math.PI,c1=1.70158,c2=c1*1.525,c3=c1+1,c4=2*PI/3,c5=2*PI/4.5;function bounceOut(x){var n1=7.5625,d1=2.75;if(x<1/d1){return n1*x*x}else if(x<2/d1){return n1*(x-=1.5/d1)*x+.75}else if(x<2.5/d1){return n1*(x-=2.25/d1)*x+.9375}else{return n1*(x-=2.625/d1)*x+.984375}}$.extend($.easing,{def:"easeOutQuad",swing:function(x){return $.easing[$.easing.def](x)},easeInQuad:function(x){return x*x},easeOutQuad:function(x){return 1-(1-x)*(1-x)},easeInOutQuad:function(x){return x<.5?2*x*x:1-pow(-2*x+2,2)/2},easeInCubic:function(x){return x*x*x},easeOutCubic:function(x){return 1-pow(1-x,3)},easeInOutCubic:function(x){return x<.5?4*x*x*x:1-pow(-2*x+2,3)/2},easeInQuart:function(x){return x*x*x*x},easeOutQuart:function(x){return 1-pow(1-x,4)},easeInOutQuart:function(x){return x<.5?8*x*x*x*x:1-pow(-2*x+2,4)/2},easeInQuint:function(x){return x*x*x*x*x},easeOutQuint:function(x){return 1-pow(1-x,5)},easeInOutQuint:function(x){return x<.5?16*x*x*x*x*x:1-pow(-2*x+2,5)/2},easeInSine:function(x){return 1-cos(x*PI/2)},easeOutSine:function(x){return sin(x*PI/2)},easeInOutSine:function(x){return-(cos(PI*x)-1)/2},easeInExpo:function(x){return x===0?0:pow(2,10*x-10)},easeOutExpo:function(x){return x===1?1:1-pow(2,-10*x)},easeInOutExpo:function(x){return x===0?0:x===1?1:x<.5?pow(2,20*x-10)/2:(2-pow(2,-20*x+10))/2},easeInCirc:function(x){return 1-sqrt(1-pow(x,2))},easeOutCirc:function(x){return sqrt(1-pow(x-1,2))},easeInOutCirc:function(x){return x<.5?(1-sqrt(1-pow(2*x,2)))/2:(sqrt(1-pow(-2*x+2,2))+1)/2},easeInElastic:function(x){return x===0?0:x===1?1:-pow(2,10*x-10)*sin((x*10-10.75)*c4)},easeOutElastic:function(x){return x===0?0:x===1?1:pow(2,-10*x)*sin((x*10-.75)*c4)+1},easeInOutElastic:function(x){return x===0?0:x===1?1:x<.5?-(pow(2,20*x-10)*sin((20*x-11.125)*c5))/2:pow(2,-20*x+10)*sin((20*x-11.125)*c5)/2+1},easeInBack:function(x){return c3*x*x*x-c1*x*x},easeOutBack:function(x){return 1+c3*pow(x-1,3)+c1*pow(x-1,2)},easeInOutBack:function(x){return x<.5?pow(2*x,2)*((c2+1)*2*x-c2)/2:(pow(2*x-2,2)*((c2+1)*(x*2-2)+c2)+2)/2},easeInBounce:function(x){return 1-bounceOut(1-x)},easeOutBounce:bounceOut,easeInOutBounce:function(x){return x<.5?(1-bounceOut(1-2*x))/2:(1+bounceOut(2*x-1))/2}})});
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment