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);
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() {
......@@ -75,7 +84,7 @@ public class EmployeeController {
System.out.println("Create Employee "+ employee.getUsername());
employeeBusiness.save(employee);
HttpHeaders httpHeaders = new HttpHeaders();
httpHeaders.setLocation(uriComponentsBuilder.path("/employee/{id}").buildAndExpand(employee.getId()).toUri());
httpHeaders.setLocation(uriComponentsBuilder.path("/employee/{id}").buildAndExpand(employee.getId()).toUri());
return new ResponseEntity<Void>( httpHeaders ,HttpStatus.CREATED);
}
//Delete a Employee
......
......@@ -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 source diff could not be displayed because it is too large. You can view the blob instead.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
......@@ -8,11 +8,11 @@
(function (factory) {
if (typeof define === "function" && define.amd) {
define(['static/admin/js/jquery'], function ($) {
define(['jquery'], function ($) {
return factory($);
});
} else if (typeof module === "object" && typeof module.exports === "object") {
exports = factory(require('static/admin/js/jquery'));
exports = factory(require('jquery'));
} else {
factory(jQuery);
}
......
(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
......@@ -7106,7 +7106,7 @@ function Animation( elem, properties, options ) {
deferred.notifyWith( elem, [ animation, 1, 0 ] );
}
// Resolve the animation and manager its conclusion
// Resolve the animation and report its conclusion
deferred.resolveWith( elem, [ animation ] );
return false;
},
......
......@@ -4,8 +4,8 @@
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('static/admin/js/jquery')) :
typeof define === 'function' && define.amd ? define(['exports', 'static/admin/js/jquery'], factory) :
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jquery')) :
typeof define === 'function' && define.amd ? define(['exports', 'jquery'], factory) :
(factory((global.bootstrap = {}),global.jQuery));
}(this, (function (exports,$) { 'use strict';
......
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
/*------------------------------------------------------------------
Project: MagNews
Version:
Last change:
Version:
Last change:
Assigned to: Le Xuan Bach
Primary use: Company
-------------------------------------------------------------------*/
......@@ -19,10 +19,10 @@ Primary use: Company
/*------------------------------------------------------------------
[COLOR CODES]
# Text Color :
# Primary Color 01:
# Primary Color 02:
# Primary Color 03:
# Text Color :
# Primary Color 01:
# Primary Color 02:
# Primary Color 03:
------------------------------------------------------------------*/
/*------------------------------------------------------------------
......@@ -43,29 +43,29 @@ Input, textarea : 14px/1.6 '', Arial, sans-serif;
[ 1 ]*/
@font-face {
font-family: Roboto-Regular;
src: url('../fonts/Roboto/Roboto-Regular.ttf');
src: url('../fonts/Roboto/Roboto-Regular.ttf');
}
@font-face {
font-family: Roboto-Medium;
src: url('../fonts/Roboto/Roboto-Medium.ttf');
src: url('../fonts/Roboto/Roboto-Medium.ttf');
}
@font-face {
font-family: Roboto-Bold;
src: url('../fonts/Roboto/Roboto-Bold.ttf');
src: url('../fonts/Roboto/Roboto-Bold.ttf');
}
@font-face {
font-family: Roboto-Black;
src: url('../fonts/Roboto/Roboto-Black.ttf');
src: url('../fonts/Roboto/Roboto-Black.ttf');
}
/*------------------------------------------------------------------
[ 2 ]*/
@font-face {
font-family: Lato-Regular;
src: url('../fonts/Lato/Lato-Regular.ttf');
src: url('../fonts/Lato/Lato-Regular.ttf');
}
......@@ -109,7 +109,7 @@ Input, textarea : 14px/1.6 '', Arial, sans-serif;
opacity: 1; }
100% {
transform: scale(1);
opacity: 0; }
opacity: 0; }
}
......@@ -405,7 +405,7 @@ a.left-topbar-item:hover {
font-size: 16px;
line-height: 1.5;
color: #222;
position: relative;
display: -webkit-box;
display: -webkit-flex;
......@@ -504,8 +504,8 @@ li.main-menu-active > a::before {
-moz-transition: all 0.3s;
visibility: hidden;
opacity: 0;
opacity: 0;
border: 1px solid #f2f2f2;
box-shadow: 0 5px 10px 0px rgba(0,0,0,0.2);
-moz-box-shadow: 0 5px 10px 0px rgba(0,0,0,0.2);
......@@ -543,7 +543,7 @@ li.respon-sub-menu > .sub-menu .sub-menu {
color: #222;
display: block;
padding: 8px 30px;
padding: 8px 30px;
width: 100%;
transition: all 0.3s;
......@@ -581,7 +581,7 @@ li.respon-sub-menu > .sub-menu .sub-menu {
.sub-menu li:hover > .sub-menu {
visibility: visible;
opacity: 1;
}
}
.sub-menu li:hover {
background-color: transparent;
......@@ -607,7 +607,7 @@ li.respon-sub-menu > .sub-menu .sub-menu {
background-color: #fff;
width: 100%;
display: none;
border: 1px solid #f2f2f2;
box-shadow: 0 5px 10px 0px rgba(0,0,0,0.2);
-moz-box-shadow: 0 5px 10px 0px rgba(0,0,0,0.2);
......@@ -644,7 +644,7 @@ li.respon-sub-menu > .sub-menu .sub-menu {
padding: 8px 20px 8px 33px;
}
.sub-mega-menu .nav-pills .nav-link.active,
.sub-mega-menu .nav-pills .nav-link.active,
.sub-mega-menu .show>.nav-pills .nav-link {
color: #fff;
background-color: #17b978;
......@@ -729,8 +729,8 @@ li.respon-sub-menu > .sub-menu .sub-menu {
max-width: calc(100% - 35px);
max-height: 60%;
position:absolute;
top: 0;
left: 0;
top: 0;
left: 0;
bottom: 0;
margin: auto;
}
......@@ -752,8 +752,8 @@ li.respon-sub-menu > .sub-menu .sub-menu {
transform: scale(0.6);
}
.hamburger-inner,
.hamburger-inner:after,
.hamburger-inner,
.hamburger-inner:after,
.hamburger-inner:before {
border-radius: 0;
}
......@@ -869,7 +869,7 @@ li.respon-sub-menu > .sub-menu .sub-menu {
height: auto;
}
.banner-header {
.banner-header {
width: 100%;
justify-content: center;
}
......@@ -909,7 +909,7 @@ li.respon-sub-menu > .sub-menu .sub-menu {
font-size: 14px;
color: #555;
line-height: 1.7;
display: -webkit-box;
display: -webkit-flex;
display: -moz-box;
......@@ -939,7 +939,7 @@ li.respon-sub-menu > .sub-menu .sub-menu {
border-bottom: 1px solid #d5d5d5;
left: calc(50% - 5px);
bottom: -5px;
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
......@@ -1008,7 +1008,7 @@ body {padding-right: 0px !important;}
#modal-video-01 {
background-color: rgba(0,0,0,0.8);
z-index: 1250;
}
#modal-video-01 .modal-dialog {
......@@ -1857,7 +1857,7 @@ a.breadcrumb-item:hover {
==================================================================*/
@media (max-width: 1199px) {
}
......@@ -1872,10 +1872,10 @@ a.breadcrumb-item:hover {
@media (max-width: 575px) {
}
@media (max-width: 480px) {
}
This diff is collapsed.
src/main/resources/public/images/icons/logo-01.png

3.07 KB | W: 0px | H: 0px

src/main/resources/public/images/icons/logo-01.png

4.2 KB | W: 0px | H: 0px

src/main/resources/public/images/icons/logo-01.png
src/main/resources/public/images/icons/logo-01.png
src/main/resources/public/images/icons/logo-01.png
src/main/resources/public/images/icons/logo-01.png
  • 2-up
  • Swipe
  • Onion skin
src/main/resources/public/images/icons/logohome.png

4.2 KB

src/main/resources/public/images/logoHome.png

4.12 KB

src/main/resources/public/images/logo_1.png

17 KB

<<<<<<< HEAD
<<<<<<< HEAD
<!DOCTYPE html>
<html>
<!doctype html>
<html lang="en">
<head>
<meta charset="ISO-8859-1">
<title>Homepage</title>
<!--===============================================================================================-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title>News</title>
<link href="common/css/all.min.css" rel="stylesheet"
type="text/css">
<link rel="stylesheet" href="css/bootstrap-combined.min.css">
<!-- Custom styles for this template-->
<link href="common/css/sb-admin.css" rel="stylesheet">
<!--==============================News=================================================================-->
<link rel="icon" type="image/png" href="images/icons/favicon.png"/>
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="vendor/bootstrap/css/bootstrap.css/">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="fonts/fontawesome-5.0.8/css/fontawesome-all.css">
<link rel="stylesheet" href="vendor/bootstrap/css/bootstrap.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="fonts/iconic/css/material-design-iconic-font.css">
<link rel="stylesheet" href="fonts/fontawesome-5.0.8/css/fontawesome-all.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="vendor/animate/animate.css">
<link rel="stylesheet" href="fonts/iconic/css/material-design-iconic-font.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="vendor/css-hamburgers/hamburgers.css">
<link rel="stylesheet" href="vendor/animate/animate.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="vendor/animsition/css/animsition.css">
<link rel="stylesheet" href="vendor/css-hamburgers/hamburgers.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="css/util.css">
<link rel="stylesheet" href="vendor/animsition/css/animsition.min.css">
<!--==============================================================S=================================-->
<link rel="stylesheet" href="css/util.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="css/main.css">
<link rel="stylesheet" href="css/main.css">
<script src="vendor/jquery/jquery-3.2.1.min.js"></script>
<script src="vendor/bootstrap/js/popper.js"></script>
<script src="vendor/animsition/js/animsition.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
<!--===============================================================================================-->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<script src="//unpkg.com/@uirouter/angularjs/release/angular-ui-router.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular-route.js"></script>
<script data-semver="1.5.0" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.0/angular-resource.js"></script>
<script data-require="angular.js@1.1.5" data-semver="1.1.5" src="js/angular.js"></script>
<script src="js/angular-ui-router.min.js"></script>
<script src="js/angular-resource.js"></script>
<script data-require="angular-ui-bootstrap@0.3.0" data-semver="0.3.0" src="js/ui-bootstrap-tpls-0.3.0.min.js"></script>
</head>
<body data-ng-app="homepageApp">
<body ng-app="myApp">
<div data-ui-view></div>
<div ui-view="layout">
<!--===============================================================================================-->
<script src="vendor/jquery/jquery-3.2.1.min.js"></script>
<!--===============================================================================================-->
<script src="vendor/animsition/js/animsition.js"></script>
<!--===============================================================================================-->
<script src="vendor/bootstrap/js/popper.js"></script>
<script src="vendor/bootstrap/js/bootstrap.js"></script>
<!--===============================================================================================-->
<script src="js/main.js"></script>
<script>
//Router
angular.module('homepageApp', ['ui.router', 'ngResource', 'homeApp.controllers', 'newsApp.services','catagoriApp.services']).config(function ($stateProvider) {
$stateProvider.state('home', {
url: '/',
templateUrl: 'homepage.html',
controller: 'homeCtrlr'
});
}).run(function ($state) {
$state.go('home');
});
//controller
angular.module('homeApp.controllers', []).controller('homeCtrlr', function ($scope, $state, $window, News,Catagories) {
$scope.news = News.query();
$scope.catagories = Catagories.query();
});
//Service
angular.module('newsApp.services', []).factory('News', function ($resource) {
return $resource('http://localhost:8080/api/news/:id', {id: '@myNewsId'});
});
angular.module('catagoriApp.services', []).factory('Catagories', function ($resource) {
return $resource('http://localhost:8080/api/catalogies/:id', {id: '@myCatagoriesId'});
});
</script>
=======
<!DOCTYPE HTML>
<html>
=======
<!doctype html>
<html lang="en">
>>>>>>> 325eb2b85c51c2d288ca750be64d8d0657ba397a
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<!-- <meta http-equiv="X-UA-Compatible" content="ie=edge">-->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Document</title>
<link href="css/bootstrap.css" rel='stylesheet' type='text/css'/>
<!-- Custom Theme files -->
<!-- <link href="https://fonts.googleapis.com/css?family=Roboto+Condensed:400,700" rel='stylesheet' type='text/css'>-->
<!-- <link href="https://fonts.googleapis.com/css?family=Open+Sans" type='text/css'>-->
<link href="css/style.css" rel='stylesheet' type='text/css'/>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<script src="js/jquery-3.2.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/angular.js"></script>
<script src="js/angular-ui-router.min.js"></script>
<script src="js/app.js"></script>
<script src="pages/employee/employeeController.js"></script>
<script src="pages/project/projectController.js"></script>
<script src="pages/homepage/homeController.js"></script>
<script src="pages/homepage/HomeService.js"></script>
<script src="js/app.js"></script>
<script src="pages/employee/employeeController.js"></script>
<script src="pages/project/projectController.js"></script>
<script src="pages/testlayout/testlayoutController.js"></script>
<!--===============================================================================================-->
<script src="common/js/jquery.easing.min.js"></script>
</head>
<body ng-app="myApp">
<!-- Page level plugin JavaScript-->
<script src="common/js/Chart.min.js"></script>
<script src="common/js/jquery.dataTables.js"></script>
<script src="common/js/dataTables.bootstrap4.js"></script>
<div ui-view="layout">
<!-- Custom scripts for all pages-->
<script src="common/js/sb-admin.min.js"></script>
</div>
</div>
>>>>>>> 480f4a721c4ab000d936ea6b072027187579b926
</body>
</html>
\ No newline at end of file
This diff is collapsed.
/**
*
*/
angular.module("myApp", ["ui.router"]).config(function ($stateProvider, $urlRouterProvider, $locationProvider) {
angular.module("myApp", ["ui.router","ngResource","ui.bootstrap"]).config(function ($stateProvider, $urlRouterProvider, $locationProvider) {
$locationProvider.hashPrefix('');
$urlRouterProvider.otherwise("/employees");
$urlRouterProvider.otherwise("/news");
$stateProvider
.state("layout1", {
abstract: true,
views: {
......@@ -21,21 +16,71 @@ angular.module("myApp", ["ui.router"]).config(function ($stateProvider, $urlRout
abstract: true,
views: {
"layout": {
templateUrl: "layout/layout2.html"
templateUrl: "layout/layout2.html",
controller: "homeController"
}
}
})
.state("layout3", {
abstract: true,
views: {
"layout": {
templateUrl: "layout/layout3.html"
}
}
})
.state("news", {
parent: 'layout2',
url: "/news",
views: {
"content": {
templateUrl: "pages/homepage/homepage.html",
controller: "homeController"
}
}
})
.state("newsDetail",{
parent:'layout2',
url:"/news/:Id1",
views:{
"content":{
templateUrl: "pages/homepage/newsDetail.html",
controller: "homeController"
}
}
})
.state("NewsByCatalogi",{
parent:'layout2',
url:"/news/catagori/:catagoriId",
views:{
"content":{
templateUrl: "pages/homepage/newsDetailByCatalogi.html",
controller: "homeController"
}
}
})
.state("CatagoriManagement",{
parent:'layout3',
url:"/management/catagori",
views:{
"content":{
templateUrl: "pages/homepage/catagoriManagements.html",
controller: "homeController"
// .state('app', {
// abstract: true,
// views: {
// 'main_layout': {
// templateUrl: 'main_layout.html',
// }
// }
// })
}
}
})
.state("newsManagement",{
parent:'layout3',
url:"/management/catagori/:myCatagoriId",
views:{
"content":{
templateUrl: "pages/homepage/newsManagements.html",
controller: "homeController"
}
}
})
.state("employees", {
parent: 'layout1',
url: "/employees",
......@@ -67,30 +112,5 @@ angular.module("myApp", ["ui.router"]).config(function ($stateProvider, $urlRout
}
})
.state("testlayout2", {
parent: 'layout2',
url: "/testttt",
views: {
"content": {
templateUrl: "pages/testlayout/testlayout.html",
controller: "testlayoutController"
}
}
})
});
// myApp.directive('ngConfirmClick', [ function() {
// return {
// link : function(scope, element, attr) {
// var msg = attr.ngConfirmClick || "Are you sure?";
// var clickAction = attr.confirmedClick;
// element.bind('click', function(event) {
// if (window.confirm(msg)) {
// scope.$eval(clickAction)
// }
// });
// }
// };
// } ])
\ No newline at end of file
......@@ -255,7 +255,7 @@
count++;
}
console.log($(data[count]).text());
// console.log($(data[count]).text());
$(slideTxt).append($(data[count]).clone());
$(slideTxt).find('.slide100-txt-item.clone').addClass(animIn + ' visible-true');
......
This diff is collapsed.
<div>
layout1
<a ui-sref="employees">Employee</a>
<a ui-sref="report">Report</a>
<a ui-sref="project">Project</a>
......
<div>
<div ui-view="content"></div>
</div>
\ No newline at end of file
angular.module("myApp").factory('News', function ($resource) {
return $resource('http://localhost:8080/api/news/:id', {id: '@myNewsId'},{
'get': {
method: 'GET',
isArray: false
}
});
});
angular.module('myApp').factory('Catagories', function ($resource) {
return $resource('http://localhost:8080/api/catalogies/:id', {id: '@myCatagoriesId'});
});
angular.module('myApp').factory('LatestNews', function ($resource) {
return $resource('http://localhost:8080/api/catalogi/:id/latestNews', {id: '@CatagoriesId'},{
'get': {
method: 'GET',
isArray: true
}
});
});
angular.module('myApp').factory('NewsByCatagori', function ($resource) {
return $resource('http://localhost:8080/api/catalogi/:id/news', {id: '@catagoriesId'},{
'get': {
method: 'GET',
isArray: true
}
});
});
<!--<link rel="stylesheet" href="../../css/bootstrap-combined.min.css">-->
<div class="container">
<div class="row">
<div class="col-md-8">
<div>
<table class="table">
<thead>
<tr>
<tr>
<td colspan="12">LIST OF CATAGORIES</td>
</tr>
<th>ID</th>
<th>Catagori Name</th>
<th>Number of News</th>
<th>Detail</th>
<th>Edit</th>
</tr>
</thead>
<tbody>
<tr class="vide" ng-repeat="cata in catagories">
<td>{{$index + 1}}</td>
<td>{{cata.name}}</td>
<td>{{cata.news.length}}</td>
<td><a href="http://localhost:8080/#/management/catagori/{{cata.id}}" ng-click="detailNews(emp);">Detail</a> </td>
<td><a href="#" ng-click="update(emp);">Edit</a> </td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
angular.module("myApp").controller('homeController', function ($scope,$http, $state,News, $window,$stateParams,Catagories,LatestNews,NewsByCatagori) {
$scope.catagories = Catagories.query();
$scope.currentPage = 1
,$scope.numPerPage = 6
,$scope.maxSize = 5;
$scope.catagoriDetail = Catagories.get({}, {myCatagoriesId: $stateParams.catagoriId}).$promise.then(
function (value) {
$scope.todos = value.news;
$scope.catagori = value;
$scope.numPages = function () {
return Math.ceil($scope.todos.length / $scope.numPerPage);
};
console.log( $scope.todos.length);
$scope.$watch('currentPage + numPerPage', function () {
var begin = (($scope.currentPage - 1) * $scope.numPerPage)
, end = begin + $scope.numPerPage;
$scope.myNews = $scope.todos.slice(begin, end);
});
},
function (error) {
console.log()
}
);
$scope.newsById = News.get({}, {myNewsId: $stateParams.Id1});
$scope.show = function(id){
$scope.newestNews = LatestNews.get({}, {CatagoriesId: id});
};
$scope.catagoriById = Catagories.get({}, {myCatagoriesId: $stateParams.myCatagoriId});
//Delete News
$scope.deleteNews = function(newsId,catagoriId) {
if(confirm("Delete?")) {
$http({
method: 'DELETE',
url: 'http://localhost:8080/api/HR/catagori/' + catagoriId + '/news/' + newsId,
headers: {
'Content-Type': 'application/json'
}
}).then(function (response) {
}, function (data, status) {
});
}
};
});
\ No newline at end of file
<!-- Post -->
<section class="bg0 p-t-70">
<div class="container">
<div >
<div class="p-b-20">
<!-- Entertainment -->
<div class="tab01 p-b-20" data-ng-repeat="catagori in catagories">
<div class="tab01-head how2 how2-cl1 bocl12 flex-s-c m-r-10 m-r-0-sr991" >
<!-- Brand tab -->
<h3 class="f1-m-2 cl12 tab01-title">
{{catagori.name}}
</h3>
<a href="http://localhost:8080/index.html#/news/catagori/{{catagori.id}}" class="tab01-link f1-s-1 cl9 hov-cl10 trans-03">
View all
<i class="fs-12 m-l-5 fa fa-caret-right"></i>
</a>
</div>
<!-- Tab panes -->
<div class="tab-content p-t-35">
<!-- - -->
<div class="tab-pane fade show active" id="tab1-1" role="tabpanel">
<div class="row">
<div class="col-sm-6 p-r-25 p-r-15-sr991" data-ng-repeat="new in catagori.news| limitTo: 6">
<!-- Item post -->
<div class="flex-wr-sb-s m-b-30">
<a href="#" class="size-w-1 wrap-pic-w hov1 trans-03">
<img src="{{new.thumbnail}}" alt="IMG">
</a>
<div class="size-w-2">
<h5 class="p-b-5">
<a href="http://localhost:8080/index.html#/news/{{new.id}}" class="f1-s-5 cl3 hov-cl10 trans-03">
{{new.content}}
</a>
</h5>
<span class="cl8">
<a href="http://localhost:8080/index.html#/news/{{new.id}}" class="f1-s-6 cl8 hov-cl10 trans-03">
Detail >>
</a>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Content -->
<section class="bg0 p-b-140 p-t-10">
<div class="container">
<div class="row justify-content-center">
<div class="col-md-10 col-lg-8 p-b-30">
<div class="p-r-10 p-r-0-sr991">
<!-- Blog Detail -->
<div class="p-b-70">
<h3 class="f1-l-3 cl2 p-b-16 p-t-33 respon2">
{{newsById.content}}
</h3>
<div class="wrap-pic-max-w p-b-30">
<img src="{{newsById.thumbnail}}" alt="IMG">
</div>
<p class="f1-s-11 cl6 p-b-25">
Curabitur volutpat bibendum molestie. Vestibulum ornare gravida semper. Aliquam a dui suscipit, fringilla metus id, maximus leo. Vivamus sapien arcu, mollis eu pharetra vitae, condimentum in orci. Integer eu sodales dolor. Maecenas elementum arcu eu convallis rhoncus. Donec tortor sapien, euismod a faucibus eget, porttitor quis libero.
</p>
<p class="f1-s-11 cl6 p-b-25">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc sit amet est vel orci luctus sollicitudin. Duis eleifend vestibulum justo, varius semper lacus condimentum dictum. Donec pulvinar a magna ut malesuada. In posuere felis diam, vel sodales metus accumsan in. Duis viverra dui eu pharetra pellentesque. Donec a eros leo. Quisque sed ligula vitae lorem efficitur faucibus. Praesent sit amet imperdiet ante. Nulla id tellus auctor, dictum libero a, malesuada nisi. Nulla in porta nibh, id vestibulum ipsum. Praesent dapibus tempus erat quis aliquet. Donec ac purus id sapien condimentum feugiat.
</p>
<p class="f1-s-11 cl6 p-b-25">
Praesent vel mi bibendum, finibus leo ac, condimentum arcu. Pellentesque sem ex, tristique sit amet suscipit in, mattis imperdiet enim. Integer tempus justo nec velit fringilla, eget eleifend neque blandit. Sed tempor magna sed congue auctor. Mauris eu turpis eget tortor ultricies elementum. Phasellus vel placerat orci, a venenatis justo. Phasellus faucibus venenatis nisl vitae vestibulum. Praesent id nibh arcu. Vivamus sagittis accumsan felis, quis vulputate
</p>
<!-- Tag -->
<div class="flex-s-s p-t-12 p-b-15">
<span class="f1-s-12 cl5 m-r-8">
Tags:
</span>
<div class="flex-wr-s-s size-w-0">
<a href="#" class="f1-s-12 cl8 hov-link1 m-r-15">
Streetstyle
</a>
<a href="#" class="f1-s-12 cl8 hov-link1 m-r-15">
Crafts
</a>
</div>
</div>
<!-- Share -->
<div class="flex-s-s">
<span class="f1-s-12 cl5 p-t-1 m-r-15">
Share:
</span>
<div class="flex-wr-s-s size-w-0">
<a href="#" class="dis-block f1-s-13 cl0 bg-facebook borad-3 p-tb-4 p-rl-18 hov-btn1 m-r-3 m-b-3 trans-03">
<i class="fab fa-facebook-f m-r-7"></i>
Facebook
</a>
<a href="#" class="dis-block f1-s-13 cl0 bg-twitter borad-3 p-tb-4 p-rl-18 hov-btn1 m-r-3 m-b-3 trans-03">
<i class="fab fa-twitter m-r-7"></i>
Twitter
</a>
<a href="#" class="dis-block f1-s-13 cl0 bg-google borad-3 p-tb-4 p-rl-18 hov-btn1 m-r-3 m-b-3 trans-03">
<i class="fab fa-google-plus-g m-r-7"></i>
Google+
</a>
<a href="#" class="dis-block f1-s-13 cl0 bg-pinterest borad-3 p-tb-4 p-rl-18 hov-btn1 m-r-3 m-b-3 trans-03">
<i class="fab fa-pinterest-p m-r-7"></i>
Pinterest
</a>
</div>
</div>
</div>
<!-- Leave a comment -->
<div>
<h4 class="f1-l-4 cl3 p-b-12">
Leave a Comment
</h4>
<p class="f1-s-13 cl8 p-b-40">
Your email address will not be published. Required fields are marked *
</p>
<form>
<textarea class="bo-1-rad-3 bocl13 size-a-15 f1-s-13 cl5 plh6 p-rl-18 p-tb-14 m-b-20" name="msg" placeholder="Comment..."></textarea>
<input class="bo-1-rad-3 bocl13 size-a-16 f1-s-13 cl5 plh6 p-rl-18 m-b-20" type="text" name="name" placeholder="Name*">
<input class="bo-1-rad-3 bocl13 size-a-16 f1-s-13 cl5 plh6 p-rl-18 m-b-20" type="text" name="email" placeholder="Email*">
<input class="bo-1-rad-3 bocl13 size-a-16 f1-s-13 cl5 plh6 p-rl-18 m-b-20" type="text" name="website" placeholder="Website">
<button class="size-a-17 bg2 borad-3 f1-s-12 cl0 hov-btn1 trans-03 p-rl-15 m-t-10">
Post Comment
</button>
</form>
</div>
</div>
</div>
<!-- Sidebar -->
<div class="col-md-10 col-lg-4 p-b-30">
<div class="p-l-10 p-rl-0-sr991 p-t-70">
<!-- Category -->
<div class="p-b-60">
<div class="how2 how2-cl4 flex-s-c">
<h3 class="f1-m-2 cl3 tab01-title">
Category
</h3>
</div>
<ul class="p-t-35">
<li class="how-bor3 p-rl-4" data-ng-repeat="catagori in catagories">
<a href="#" class="dis-block f1-s-10 text-uppercase cl2 hov-cl10 trans-03 p-tb-13">
{{catagori.name}}
</a>
</li>
</ul>
</div>
<!-- Tag -->
<div>
<div class="how2 how2-cl4 flex-s-c m-b-30">
<h3 class="f1-m-2 cl3 tab01-title">
Tags
</h3>
</div>
<div class="flex-wr-s-s m-rl--5">
<a href="#" class="flex-c-c size-h-2 bo-1-rad-20 bocl12 f1-s-1 cl8 hov-btn2 trans-03 p-rl-20 p-tb-5 m-all-5" data-ng-repeat="catagori in catagories">
{{catagori.name}}
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
\ No newline at end of file
<section class="bg0 p-t-70">
<div class="container">
<div >
<div class="p-b-20">
<!-- Entertainment -->
<div class="tab01 p-b-20" >
<div class="tab01-head how2 how2-cl1 bocl12 flex-s-c m-r-10 m-r-0-sr991" >
<!-- Brand tab -->
<h3 class="f1-m-2 cl12 tab01-title">
{{catagori.name}}
</h3>
</div>
<!-- Tab panes -->
<div class="tab-content p-t-35" style="overflow: hidden">
<!-- - -->
<div class="tab-pane fade show active" id="tab1-1" role="tabpanel">
<div class="row">
<div class="col-sm-6 p-r-25 p-r-15-sr991" data-ng-repeat="new in myNews">
<!-- Item post -->
<div class="flex-wr-sb-s m-b-30">
<a href="#" class="size-w-1 wrap-pic-w hov1 trans-03">
<img src="{{new.thumbnail}}" alt="IMG">
</a>
<div class="size-w-2">
<h5 class="p-b-5">
<a href="http://localhost:8080/index.html#/news/{{new.id}}" class="f1-s-5 cl3 hov-cl10 trans-03">
{{new.content}}
</a>
</h5>
<span class="cl8">
<a href="http://localhost:8080/index.html#/news/{{new.id}}" class="f1-s-6 cl8 hov-cl10 trans-03">
Detail >>
</a>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div data-pagination="" data-num-pages="numPages()"
data-current-page="currentPage" data-max-size="maxSize"
data-boundary-links="true">
</div>
</div>
</div>
</div>
</div>
</section>
\ No newline at end of file
<!--<link rel="stylesheet" href="../../css/bootstrap-combined.min.css">-->
<div class="container">
<div class="row">
<div class="col-md-8">
<div>
<table class="table">
<thead>
<tr>
<tr>
<td colspan="12"><h1 style="font-size: 30px;text-align: center">{{catagoriById.name}}</h1></td>
</tr>
<th>STT</th>
<th>News title</th>
<th>Create Date</th>
<th>Content</th>
<th>Edit</th>
<th>Delete</th>
</tr>
</thead>
<tbody>
<tr class="vide" ng-repeat="new in catagoriById.news">
<td>{{$index + 1}}</td>
<td>{{new.title}}</td>
<td>{{new.createdAt}}</td>
<td>{{new.content}}</td>
<td><button ng-click="editNews(new,catagoryById.id)">Edit</button> </td>
<td><button ng-click="deleteNews(new.id,catagoryById.id)">Delete</button> </td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="container">
state con của layout2
</div>
/**
*
*/
angular.module("myApp").controller("testlayoutController", function($scope, $http,$window) {
console.log("testlayoutController");
});
\ No newline at end of file
(function(factory){if(typeof define==="function"&&define.amd){define(["static/admin/js/jquery"],function($){return factory($)})}else if(typeof module==="object"&&typeof module.exports==="object"){exports=factory(require("static/admin/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.
/Router
angular.module('ProjectApiModule', ['ui.router', 'ngResource', 'ProjectApiModule.controllers', 'ProjectApiModule.services']).config(function($stateProvider) {
$stateProvider.state('project.State', {
url: '/list-project',
templateUrl: 'project/projectListViews.html',
controller: 'carCtrlr'
}).state('showCar', {
url: '/:Id1',
templateUrl: 'car-detail.html',
controller: 'carDetailCtrl'
}).state('newCar', {
url: '/new',
templateUrl: 'car-create.html',
controller: 'carCreateController'
}).state('editCar', {
url: '/edit/:Id2',
templateUrl: 'car-edit.html',
controller: 'carEditCtrl'
});
}).run(function($state) {
$state.go('project.State');
});
\ No newline at end of file
var app = angular.module('ProjectApiModule', []);
app.controller('showProject',showProject);
app.controller('insertProject',insertProject);
// controlers tạo Get API
function showProject($scope, $http){
$http.get("http://localhost:8081/quan-tri/danh-sach-du-an").then(successCallback, errorCallback);
function successCallback(response){
//success code
console.log(response.data);
{$scope.listProject = response.data}
}
function errorCallback(error){
//error code
console.log("can't get data!!");
}
};
// tạo controllers insert APT
function insertProject($scope, $http) {
$scope.insert_project = function () {
$http({
//khai báo type
method: 'POST',
//đường dẫn API
url: 'http://localhost:8081/quan-tri/them-du-an',
//truyền dữ liệu nhập trên cline vào data
data: angular.toJson($scope.lstProject),
//kiểu dữ liệu API
headers: {
'Content-Type': 'application/json'
}
// kết quả trả về (THEN)
}).then(successCallback,errorCallback);
//tạo funtion nếu thành công!
function successCallback(response){
$window.location.href = 'http://localhost:8081/#!/';
}
//tạo funtion kiểm tra nếu thất bại
function errorCallback(error){
//error code
console.log("can't insert data!!");
}
}
};
//tạo service lấy id của đường dẫn
angular.module('ProjectApiModule.Services', []).factory('Car', function($resource) {
return $resource('http://localhost/car-management/api-web-car/get/:id', { id: '@myCarId' }, {
update: {
method: 'PUT'
}
});
});
\ No newline at end of file
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