@ -0,0 +1,5 @@
|
||||
.classpath
|
||||
.project
|
||||
.metadata
|
||||
.settings
|
||||
build/
|
@ -0,0 +1,203 @@
|
||||
Eclipse Public License - v 1.0
|
||||
|
||||
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
|
||||
LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
|
||||
CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
|
||||
|
||||
1. DEFINITIONS
|
||||
|
||||
"Contribution" means:
|
||||
|
||||
a) in the case of the initial Contributor, the initial code and documentation
|
||||
distributed under this Agreement, and
|
||||
b) in the case of each subsequent Contributor:
|
||||
i) changes to the Program, and
|
||||
ii) additions to the Program;
|
||||
|
||||
where such changes and/or additions to the Program originate from and are
|
||||
distributed by that particular Contributor. A Contribution 'originates'
|
||||
from a Contributor if it was added to the Program by such Contributor
|
||||
itself or anyone acting on such Contributor's behalf. Contributions do not
|
||||
include additions to the Program which: (i) are separate modules of
|
||||
software distributed in conjunction with the Program under their own
|
||||
license agreement, and (ii) are not derivative works of the Program.
|
||||
|
||||
"Contributor" means any person or entity that distributes the Program.
|
||||
|
||||
"Licensed Patents" mean patent claims licensable by a Contributor which are
|
||||
necessarily infringed by the use or sale of its Contribution alone or when
|
||||
combined with the Program.
|
||||
|
||||
"Program" means the Contributions distributed in accordance with this
|
||||
Agreement.
|
||||
|
||||
"Recipient" means anyone who receives the Program under this Agreement,
|
||||
including all Contributors.
|
||||
|
||||
2. GRANT OF RIGHTS
|
||||
a) Subject to the terms of this Agreement, each Contributor hereby grants
|
||||
Recipient a non-exclusive, worldwide, royalty-free copyright license to
|
||||
reproduce, prepare derivative works of, publicly display, publicly
|
||||
perform, distribute and sublicense the Contribution of such Contributor,
|
||||
if any, and such derivative works, in source code and object code form.
|
||||
b) Subject to the terms of this Agreement, each Contributor hereby grants
|
||||
Recipient a non-exclusive, worldwide, royalty-free patent license under
|
||||
Licensed Patents to make, use, sell, offer to sell, import and otherwise
|
||||
transfer the Contribution of such Contributor, if any, in source code and
|
||||
object code form. This patent license shall apply to the combination of
|
||||
the Contribution and the Program if, at the time the Contribution is
|
||||
added by the Contributor, such addition of the Contribution causes such
|
||||
combination to be covered by the Licensed Patents. The patent license
|
||||
shall not apply to any other combinations which include the Contribution.
|
||||
No hardware per se is licensed hereunder.
|
||||
c) Recipient understands that although each Contributor grants the licenses
|
||||
to its Contributions set forth herein, no assurances are provided by any
|
||||
Contributor that the Program does not infringe the patent or other
|
||||
intellectual property rights of any other entity. Each Contributor
|
||||
disclaims any liability to Recipient for claims brought by any other
|
||||
entity based on infringement of intellectual property rights or
|
||||
otherwise. As a condition to exercising the rights and licenses granted
|
||||
hereunder, each Recipient hereby assumes sole responsibility to secure
|
||||
any other intellectual property rights needed, if any. For example, if a
|
||||
third party patent license is required to allow Recipient to distribute
|
||||
the Program, it is Recipient's responsibility to acquire that license
|
||||
before distributing the Program.
|
||||
d) Each Contributor represents that to its knowledge it has sufficient
|
||||
copyright rights in its Contribution, if any, to grant the copyright
|
||||
license set forth in this Agreement.
|
||||
|
||||
3. REQUIREMENTS
|
||||
|
||||
A Contributor may choose to distribute the Program in object code form under
|
||||
its own license agreement, provided that:
|
||||
|
||||
a) it complies with the terms and conditions of this Agreement; and
|
||||
b) its license agreement:
|
||||
i) effectively disclaims on behalf of all Contributors all warranties
|
||||
and conditions, express and implied, including warranties or
|
||||
conditions of title and non-infringement, and implied warranties or
|
||||
conditions of merchantability and fitness for a particular purpose;
|
||||
ii) effectively excludes on behalf of all Contributors all liability for
|
||||
damages, including direct, indirect, special, incidental and
|
||||
consequential damages, such as lost profits;
|
||||
iii) states that any provisions which differ from this Agreement are
|
||||
offered by that Contributor alone and not by any other party; and
|
||||
iv) states that source code for the Program is available from such
|
||||
Contributor, and informs licensees how to obtain it in a reasonable
|
||||
manner on or through a medium customarily used for software exchange.
|
||||
|
||||
When the Program is made available in source code form:
|
||||
|
||||
a) it must be made available under this Agreement; and
|
||||
b) a copy of this Agreement must be included with each copy of the Program.
|
||||
Contributors may not remove or alter any copyright notices contained
|
||||
within the Program.
|
||||
|
||||
Each Contributor must identify itself as the originator of its Contribution,
|
||||
if
|
||||
any, in a manner that reasonably allows subsequent Recipients to identify the
|
||||
originator of the Contribution.
|
||||
|
||||
4. COMMERCIAL DISTRIBUTION
|
||||
|
||||
Commercial distributors of software may accept certain responsibilities with
|
||||
respect to end users, business partners and the like. While this license is
|
||||
intended to facilitate the commercial use of the Program, the Contributor who
|
||||
includes the Program in a commercial product offering should do so in a manner
|
||||
which does not create potential liability for other Contributors. Therefore,
|
||||
if a Contributor includes the Program in a commercial product offering, such
|
||||
Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
|
||||
every other Contributor ("Indemnified Contributor") against any losses,
|
||||
damages and costs (collectively "Losses") arising from claims, lawsuits and
|
||||
other legal actions brought by a third party against the Indemnified
|
||||
Contributor to the extent caused by the acts or omissions of such Commercial
|
||||
Contributor in connection with its distribution of the Program in a commercial
|
||||
product offering. The obligations in this section do not apply to any claims
|
||||
or Losses relating to any actual or alleged intellectual property
|
||||
infringement. In order to qualify, an Indemnified Contributor must:
|
||||
a) promptly notify the Commercial Contributor in writing of such claim, and
|
||||
b) allow the Commercial Contributor to control, and cooperate with the
|
||||
Commercial Contributor in, the defense and any related settlement
|
||||
negotiations. The Indemnified Contributor may participate in any such claim at
|
||||
its own expense.
|
||||
|
||||
For example, a Contributor might include the Program in a commercial product
|
||||
offering, Product X. That Contributor is then a Commercial Contributor. If
|
||||
that Commercial Contributor then makes performance claims, or offers
|
||||
warranties related to Product X, those performance claims and warranties are
|
||||
such Commercial Contributor's responsibility alone. Under this section, the
|
||||
Commercial Contributor would have to defend claims against the other
|
||||
Contributors related to those performance claims and warranties, and if a
|
||||
court requires any other Contributor to pay any damages as a result, the
|
||||
Commercial Contributor must pay those damages.
|
||||
|
||||
5. NO WARRANTY
|
||||
|
||||
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
|
||||
IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
|
||||
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
|
||||
Recipient is solely responsible for determining the appropriateness of using
|
||||
and distributing the Program and assumes all risks associated with its
|
||||
exercise of rights under this Agreement , including but not limited to the
|
||||
risks and costs of program errors, compliance with applicable laws, damage to
|
||||
or loss of data, programs or equipment, and unavailability or interruption of
|
||||
operations.
|
||||
|
||||
6. DISCLAIMER OF LIABILITY
|
||||
|
||||
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
|
||||
CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION
|
||||
LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
|
||||
EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
OF SUCH DAMAGES.
|
||||
|
||||
7. GENERAL
|
||||
|
||||
If any provision of this Agreement is invalid or unenforceable under
|
||||
applicable law, it shall not affect the validity or enforceability of the
|
||||
remainder of the terms of this Agreement, and without further action by the
|
||||
parties hereto, such provision shall be reformed to the minimum extent
|
||||
necessary to make such provision valid and enforceable.
|
||||
|
||||
If Recipient institutes patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Program itself
|
||||
(excluding combinations of the Program with other software or hardware)
|
||||
infringes such Recipient's patent(s), then such Recipient's rights granted
|
||||
under Section 2(b) shall terminate as of the date such litigation is filed.
|
||||
|
||||
All Recipient's rights under this Agreement shall terminate if it fails to
|
||||
comply with any of the material terms or conditions of this Agreement and does
|
||||
not cure such failure in a reasonable period of time after becoming aware of
|
||||
such noncompliance. If all Recipient's rights under this Agreement terminate,
|
||||
Recipient agrees to cease use and distribution of the Program as soon as
|
||||
reasonably practicable. However, Recipient's obligations under this Agreement
|
||||
and any licenses granted by Recipient relating to the Program shall continue
|
||||
and survive.
|
||||
|
||||
Everyone is permitted to copy and distribute copies of this Agreement, but in
|
||||
order to avoid inconsistency the Agreement is copyrighted and may only be
|
||||
modified in the following manner. The Agreement Steward reserves the right to
|
||||
publish new versions (including revisions) of this Agreement from time to
|
||||
time. No one other than the Agreement Steward has the right to modify this
|
||||
Agreement. The Eclipse Foundation is the initial Agreement Steward. The
|
||||
Eclipse Foundation may assign the responsibility to serve as the Agreement
|
||||
Steward to a suitable separate entity. Each new version of the Agreement will
|
||||
be given a distinguishing version number. The Program (including
|
||||
Contributions) may always be distributed subject to the version of the
|
||||
Agreement under which it was received. In addition, after a new version of the
|
||||
Agreement is published, Contributor may elect to distribute the Program
|
||||
(including its Contributions) under the new version. Except as expressly
|
||||
stated in Sections 2(a) and 2(b) above, Recipient receives no rights or
|
||||
licenses to the intellectual property of any Contributor under this Agreement,
|
||||
whether expressly, by implication, estoppel or otherwise. All rights in the
|
||||
Program not expressly granted under this Agreement are reserved.
|
||||
|
||||
This Agreement is governed by the laws of the State of New York and the
|
||||
intellectual property laws of the United States of America. No party to this
|
||||
Agreement will bring a legal action under this Agreement more than one year
|
||||
after the cause of action arose. Each party waives its rights to a jury trial in
|
||||
any resulting litigation.
|
@ -0,0 +1,3 @@
|
||||
Manifest-Version: 1.0
|
||||
Class-Path:
|
||||
|
@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
|
||||
<filter>
|
||||
<filter-name>CharacterEncodingFilter</filter-name>
|
||||
<filter-class>filter.CharacterEncodingFilter</filter-class>
|
||||
</filter>
|
||||
<filter-mapping>
|
||||
<filter-name>CharacterEncodingFilter</filter-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
</filter-mapping>
|
||||
<filter>
|
||||
<filter-name>XSSFilter</filter-name>
|
||||
<filter-class>filter.XSSFilter</filter-class>
|
||||
</filter>
|
||||
<filter-mapping>
|
||||
<filter-name>XSSFilter</filter-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
</filter-mapping>
|
||||
<filter>
|
||||
<filter-name>AdminFilter</filter-name>
|
||||
<filter-class>filter.AdminFilter</filter-class>
|
||||
</filter>
|
||||
<filter-mapping>
|
||||
<filter-name>AdminFilter</filter-name>
|
||||
<url-pattern>/admin/*</url-pattern>
|
||||
</filter-mapping>
|
||||
<filter>
|
||||
<filter-name>ManagerFilter</filter-name>
|
||||
<filter-class>filter.ManagerFilter</filter-class>
|
||||
</filter>
|
||||
<filter-mapping>
|
||||
<filter-name>ManagerFilter</filter-name>
|
||||
<url-pattern>/manager/*</url-pattern>
|
||||
</filter-mapping>
|
||||
</web-app>
|
@ -0,0 +1,83 @@
|
||||
<%@page import="javabean.Util"%>
|
||||
<%@page import="javabean.Base"%>
|
||||
<%@page import="java.sql.ResultSet"%>
|
||||
<%@page import="java.sql.PreparedStatement"%>
|
||||
<%@page import="java.sql.Connection"%>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>书籍借阅历史</title>
|
||||
<link rel="stylesheet" href="../public/layui/css/layui.css" media="all">
|
||||
<script src="../public/layui/layui.js" charset="utf-8"></script>
|
||||
<style>
|
||||
.layui-table, .layui-table-view{
|
||||
margin-top: 0px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<%
|
||||
String id = request.getParameter("id");
|
||||
String name = request.getParameter("name");
|
||||
Connection connection = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet resultSet = null;
|
||||
String sql = "select * from borrow_books,borrow_card where book_id=? and card_id=borrow_card.id order by borrow_books.id desc";
|
||||
connection = (Connection)Base.getConnection();
|
||||
pstmt = connection.prepareStatement(sql);
|
||||
pstmt.setString(1,id);
|
||||
resultSet = pstmt.executeQuery();
|
||||
/* while(resultSet.next()){
|
||||
out.print(resultSet.getString("id"));
|
||||
}*/
|
||||
%>
|
||||
<div class="layui-form">
|
||||
<table class="layui-table">
|
||||
<colgroup>
|
||||
<col width="150">
|
||||
<col width="150">
|
||||
<col width="200">
|
||||
<col width="200">
|
||||
<col width="200">
|
||||
<col width="200">
|
||||
<col width="220">
|
||||
<col width="200">
|
||||
<col width="200">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>书籍ID</th>
|
||||
<th>书籍名</th>
|
||||
<th>借阅证</th>
|
||||
<th>借阅者</th>
|
||||
<th>借阅时间</th>
|
||||
<th>归还时间</th>
|
||||
<th>违规信息</th>
|
||||
<th>处理人</th>
|
||||
</tr>
|
||||
<%while(resultSet.next()){ %>
|
||||
<tr>
|
||||
<td><%=resultSet.getString("id") %></td>
|
||||
<td><%=id %></td>
|
||||
<td><%=name %></td>
|
||||
<td><%=resultSet.getString("borrow_card.id") %></td>
|
||||
<td><%=resultSet.getString("reader") %></td>
|
||||
<td><%=Util.getFormatDateTime(resultSet.getString("borrow_date")) %></td>
|
||||
<td><%=resultSet.getString("return_date") != null? Util.getFormatDateTime(resultSet.getString("return_date")) : "" %></td>
|
||||
<td><%=resultSet.getString("illegal") != null? resultSet.getString("illegal") : "" %></td>
|
||||
<td><%=resultSet.getString("manager_id") != null? resultSet.getString("manager_id") : "" %></td>
|
||||
</tr>
|
||||
<%} %>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,92 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>借阅记录</title>
|
||||
<link rel="stylesheet" href="../public/layui/css/layui.css" media="all">
|
||||
<style>
|
||||
.layui-table,.layui-table-view{
|
||||
margin: 0 0px;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<script src="../public/layui/layui.js" charset="utf-8"></script>
|
||||
<!-- 表单 -->
|
||||
<table class="layui-hide" id="history" lay-filter="formFilter"></table>
|
||||
|
||||
<!-- 头部工具栏 -->
|
||||
<script type="text/html" id="headBar">
|
||||
条件搜索:
|
||||
<div class="layui-inline">
|
||||
<select id="condition" name="condition" lay-verify="required">
|
||||
<option value=""></option>
|
||||
<option value="other">超期未还</option>
|
||||
<option value="id">ID</option>
|
||||
<option value="card_id">借阅证号</option>
|
||||
<option value="book_id">书籍ID</option>
|
||||
<option value="borrow_date">借阅日期</option>
|
||||
<option value="end_date">限制日期</option>
|
||||
<option value="return_date">返还日期</option>
|
||||
<option value="illegal">违章信息</option>
|
||||
<option value="manager_id">处理人</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<input class="layui-input" id="conditionValue" name="conditionValue" id="demoReload" autocomplete="off">
|
||||
</div>
|
||||
<button class="layui-btn" name="condition" data-type="reload" lay-event="search">搜索</button>
|
||||
</script>
|
||||
<script>
|
||||
layui.use(['table','jquery'], function(){
|
||||
$ = layui.jquery;
|
||||
var table = layui.table;
|
||||
// 进行渲染
|
||||
var tableIns = table.render({
|
||||
elem: '#history'
|
||||
,url:'./borrowList'
|
||||
,toolbar: '#headBar'
|
||||
,cols: [[
|
||||
{field:'id', width:80, title: 'ID', sort: true}
|
||||
,{field:'card_id', width:180, title: '借阅证号'}
|
||||
,{field:'book_id', width:100, title: '书籍ID', sort: true}
|
||||
,{field:'borrow_date', width:180, title: '借阅时间'}
|
||||
,{field:'end_date', title: '限定时间', width: 180}
|
||||
,{field:'return_date', width:180, title: '归还时间', sort: true}
|
||||
,{field:'illegal', minWidth:280, title: '违章信息', sort: true}
|
||||
,{field:'manager_id', width:80, title: '处理人'}
|
||||
]]
|
||||
,page: true
|
||||
});
|
||||
|
||||
// 头部工具栏事件
|
||||
table.on('toolbar(formFilter)', function(obj){
|
||||
var checkStatus = table.checkStatus(obj.config.id);
|
||||
switch(obj.event){
|
||||
// 条件查找图书证
|
||||
case 'search':
|
||||
var conditionValue = $('#conditionValue');
|
||||
var condition = $('#condition');
|
||||
// 进行搜索,重新渲染
|
||||
tableIns.reload({
|
||||
where: { //设定异步数据接口的额外参数,任意设
|
||||
"condition": condition.val(),
|
||||
"conditionValue": conditionValue.val()
|
||||
}
|
||||
,page: {
|
||||
curr: 1 //重新从第 1 页开始
|
||||
}
|
||||
});
|
||||
break;
|
||||
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,117 @@
|
||||
<%@page import="javabean.Base"%>
|
||||
<%@page import="java.sql.ResultSet"%>
|
||||
<%@page import="java.sql.PreparedStatement"%>
|
||||
<%@page import="java.sql.Connection"%>
|
||||
<%@page import="net.sf.json.JSONObject"%>
|
||||
<%@page import="net.sf.json.JSONArray"%>
|
||||
<%@page import="javabean.Admin"%>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>图书证修改</title>
|
||||
<link rel="stylesheet" href="../public/layui/css/layui.css" media="all">
|
||||
<script src="../public/layui/layui.js" charset="utf-8"></script>
|
||||
<style>
|
||||
.layui-form{
|
||||
margin: 10px 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<%
|
||||
Connection connection = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet ruleSet = null;
|
||||
String sql = "select * from rules";
|
||||
String result = "";
|
||||
connection = (Connection)Base.getConnection();
|
||||
pstmt = connection.prepareStatement(sql);
|
||||
ruleSet = pstmt.executeQuery();
|
||||
%>
|
||||
<form class="layui-form layui-form-pane" action="" lay-filter="cardFilter">
|
||||
<!-- 姓名 -->
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">姓名</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="reader" lay-verify="required" autocomplete="off" placeholder="请输入姓名" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 密码 -->
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">密码</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="password" name="password" placeholder="请输入密码" autocomplete="off" class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 借阅规则 -->
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">规则</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="rule_id" lay-filter="rule_id" lay-verify="required">
|
||||
<% while(ruleSet.next()){ %>
|
||||
<option value=<%=ruleSet.getString("id") %>><%=ruleSet.getString("id") %></option>
|
||||
<%} %>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">状态</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="status" value="1" title="可用" checked="">
|
||||
<input type="radio" name="status" value="0" title="挂失">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="submitForm">立即提交</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
layui.use(['form', 'jquery'], function(){
|
||||
var form = layui.form
|
||||
,layer = layui.layer;
|
||||
$ = layui.jquery;
|
||||
// 提交表单
|
||||
form.on('submit(submitForm)', function(data){
|
||||
$.ajax({
|
||||
url: './cardAdd',
|
||||
method: 'post',
|
||||
data: data.field,
|
||||
dataType: 'json',
|
||||
success: function(data){
|
||||
if(data.code == "0"){
|
||||
parent.layer.open({
|
||||
title: '注册账号为',
|
||||
content: data.data['id'],
|
||||
end: function(){
|
||||
//parent.location.reload();
|
||||
var index = parent.layer.getFrameIndex(window.name); //操作父页面
|
||||
parent.layer.close(index);
|
||||
}
|
||||
});
|
||||
/*setTimeout(function(){
|
||||
|
||||
}, 500);*/
|
||||
}else{
|
||||
leyer.msg("添加失败");
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
return false;
|
||||
})
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,83 @@
|
||||
<%@page import="javabean.Util"%>
|
||||
<%@page import="java.sql.PreparedStatement"%>
|
||||
<%@page import="java.sql.Connection"%>
|
||||
<%@page import="javabean.Base"%>
|
||||
<%@page import="java.sql.ResultSet"%>
|
||||
<%@page import="javabean.JDBCBean"%>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>借阅证借阅记录</title>
|
||||
<link rel="stylesheet" href="../public/layui/css/layui.css" media="all">
|
||||
<script src="../public/layui/layui.js" charset="utf-8"></script>
|
||||
<style>
|
||||
.layui-table,.layui-table-view{
|
||||
margin: 0 0px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<%
|
||||
String id = request.getParameter("id");
|
||||
Connection connection = (Connection)Base.getConnection();
|
||||
String sql = "select * from borrow_books,books where card_id=? and borrow_books.book_id = books.id";
|
||||
PreparedStatement pstmt = connection.prepareStatement(sql);
|
||||
pstmt.setString(1, id);
|
||||
ResultSet resultSet = null;
|
||||
resultSet = pstmt.executeQuery();
|
||||
|
||||
%>
|
||||
<div class="layui-form">
|
||||
<table class="layui-table">
|
||||
<colgroup>
|
||||
<col width="150">
|
||||
<col width="150">
|
||||
<col width="200">
|
||||
<col width="200">
|
||||
<col width="200">
|
||||
<col width="200">
|
||||
<col width="220">
|
||||
<col width="200">
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>书籍ID</th>
|
||||
<th>书籍名</th>
|
||||
<th>借阅时间</th>
|
||||
<th>截止时间</th>
|
||||
<th>归还时间</th>
|
||||
<th>违规信息</th>
|
||||
<th>处理人</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<%
|
||||
System.out.println(Util.getCurrentTimeString());
|
||||
%>
|
||||
<% while(resultSet.next()){ %>
|
||||
<%-- 图书超期 --%>
|
||||
<%if(Util.getFormatDateTime(resultSet.getString("end_date")).compareTo(Util.getCurrentTimeString()) < 0 && resultSet.getString("return_date") == null){ %>
|
||||
<tr style="color:#FF5722;">
|
||||
<%} else{ %>
|
||||
<tr>
|
||||
<%} %>
|
||||
<td><%=resultSet.getString("card_id") %></td>
|
||||
<td><%=resultSet.getString("book_id") %></td>
|
||||
<td><%=resultSet.getString("books.name") %></td>
|
||||
<td><%=Util.getFormatDateTime(resultSet.getString("borrow_date")) %></td>
|
||||
<td><%=Util.getFormatDateTime(resultSet.getString("end_date"))%></td>
|
||||
<td><%=resultSet.getString("return_date")!=null?Util.getFormatDateTime(resultSet.getString("return_date")) : "未归还" %></td>
|
||||
<td><%=resultSet.getString("illegal")!=null?resultSet.getString("illegal"):""%></td>
|
||||
<td><%=resultSet.getString("manager_id")!=null?resultSet.getString("manager_id"):"" %></td>
|
||||
</tr>
|
||||
<%} %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,144 @@
|
||||
<%@page import="javabean.Base"%>
|
||||
<%@page import="java.sql.ResultSet"%>
|
||||
<%@page import="java.sql.PreparedStatement"%>
|
||||
<%@page import="java.sql.Connection"%>
|
||||
<%@page import="net.sf.json.JSONObject"%>
|
||||
<%@page import="net.sf.json.JSONArray"%>
|
||||
<%@page import="javabean.Admin"%>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>图书证修改</title>
|
||||
<link rel="stylesheet" href="../public/layui/css/layui.css" media="all">
|
||||
<script src="../public/layui/layui.js" charset="utf-8"></script>
|
||||
<style>
|
||||
.layui-form{
|
||||
margin: 10px 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<%
|
||||
// 获取借阅证信息
|
||||
String id = request.getParameter("id");
|
||||
|
||||
|
||||
// 获取rule
|
||||
Connection connection = null;
|
||||
PreparedStatement pstmt = null;
|
||||
PreparedStatement infoPstmt = null;
|
||||
ResultSet ruleSet = null;
|
||||
ResultSet infoSet = null;
|
||||
String sql = "select * from rules";
|
||||
String infoSql = "select * from borrow_card where id=?";
|
||||
String result = "";
|
||||
// 公用连接
|
||||
connection = (Connection)Base.getConnection();
|
||||
pstmt = connection.prepareStatement(sql);
|
||||
infoPstmt = connection.prepareStatement(infoSql);
|
||||
infoPstmt.setString(1,id);
|
||||
infoSet = infoPstmt.executeQuery();
|
||||
infoSet.next();
|
||||
ruleSet = pstmt.executeQuery();
|
||||
%>
|
||||
<form class="layui-form layui-form-pane" action="" lay-filter="cardFilter">
|
||||
|
||||
<!-- 账号 -->
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">账号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="id" value=<%=id %> class="layui-input" disabled>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 姓名 -->
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">姓名</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="reader" value=<%=infoSet.getString("reader") %> lay-verify="required" autocomplete="off" placeholder="请输入姓名" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 密码 -->
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">密码</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="password" name="password" value=<%=infoSet.getString("password") %> placeholder="请输入密码" autocomplete="off" class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 借阅规则 -->
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">规则</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="rule_id" lay-filter="rule_id" lay-verify="required">
|
||||
<% while(ruleSet.next()){ %>
|
||||
<option value=<%=ruleSet.getString("id") %> <%if(ruleSet.getString("id").equals(infoSet.getString("rule_id"))) out.print("selected"); %>><%=ruleSet.getString("id") %></option>
|
||||
<%} %>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">状态</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="status" value="1" title="可用" <%if(infoSet.getString("status").equals("1")) out.print("checked"); %>>
|
||||
<input type="radio" name="status" value="0" title="挂失" <%if(infoSet.getString("status").equals("0")) out.print("checked"); %>>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="submitForm">立即提交</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
layui.use(['form', 'jquery'], function(){
|
||||
var form = layui.form
|
||||
,layer = layui.layer;
|
||||
$ = layui.jquery;
|
||||
// 提交表单
|
||||
form.on('submit(submitForm)', function(data){
|
||||
$.ajax({
|
||||
url: './cardEdit',
|
||||
type: 'post',
|
||||
data: data.field,
|
||||
dataType: 'json',
|
||||
timeout : 3000,
|
||||
success: function(data){
|
||||
if(data.code == "0"){
|
||||
layer.msg("修改成功", {
|
||||
icon: 6,
|
||||
anim: 5,
|
||||
time: 500,
|
||||
});
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
|
||||
parent.layer.close(index); //再执行关闭
|
||||
}, 500)
|
||||
}else{
|
||||
leyer.msg("修改失败");
|
||||
}
|
||||
},
|
||||
error: function(){
|
||||
layer.msg("获取超时");
|
||||
}
|
||||
|
||||
});
|
||||
return false;
|
||||
})
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<%
|
||||
Base.closeResource(connection, pstmt, ruleSet);
|
||||
%>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,181 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>借阅卡</title>
|
||||
<link rel="stylesheet" href="../public/layui/css/layui.css" media="all">
|
||||
<style>
|
||||
.layui-table,.layui-table-view{
|
||||
margin: 0 0px;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<!-- 表单 -->
|
||||
<table class="layui-hide" id="cardTable" lay-filter="formFilter"></table>
|
||||
<script src="../public/layui/layui.js" charset="utf-8"></script>
|
||||
<!-- 头部工具栏 -->
|
||||
<script type="text/html" id="headBar">
|
||||
条件搜索:
|
||||
<div class="layui-inline">
|
||||
<select id="condition" name="condition" lay-verify="required">
|
||||
<option value=""></option>
|
||||
<option value="id">ID</option>
|
||||
<option value="reader">姓名</option>
|
||||
<option value="rule_id">借阅规则</option>
|
||||
<option value="status">状态</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<input class="layui-input" id="conditionValue" name="conditionValue" id="demoReload" autocomplete="off" placeholder="请输入搜索内容">
|
||||
</div>
|
||||
<button class="layui-btn" name="condition" data-type="reload" lay-event="search">搜索</button>
|
||||
<button type="button" class="layui-btn layui-btn-sm" lay-event="add"><i class="layui-icon">添加借阅证</i></button>
|
||||
</script>
|
||||
|
||||
<!-- 表格侧边栏的操作 -->
|
||||
<script type="text/html" id="operateBar">
|
||||
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="cardBorrow">查看借阅</a>
|
||||
<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
|
||||
</script>
|
||||
<!-- 状态模板 -->
|
||||
<script type="text/html" id="statusTpl">
|
||||
{{# if(d.status == 0){ }}
|
||||
<span style="color:red">挂失<span>
|
||||
{{# } else { }}
|
||||
可用
|
||||
{{# } }}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
layui.use(['table','jquery'], function(){
|
||||
$ = layui.jquery;
|
||||
var table = layui.table;
|
||||
// 进行渲染
|
||||
var tableIns = table.render({
|
||||
elem: '#cardTable'
|
||||
,url:'./cardList'
|
||||
,toolbar: '#headBar'
|
||||
,height: 600
|
||||
,cols: [[
|
||||
{field:'id', width:180, title: 'ID', sort: true}
|
||||
,{field:'reader', width:180, title: '用户名', sort: true}
|
||||
,{field:'rule_id', width:180, title: '借阅规则', sort: true}
|
||||
,{field:'status', width:180, title: '状态', templet: '#statusTpl'}
|
||||
,{fixed: 'right', title:'操作', toolbar: '#operateBar', align: 'center', width:250}
|
||||
]]
|
||||
,page: true
|
||||
});
|
||||
|
||||
// 头部工具栏事件
|
||||
table.on('toolbar(formFilter)', function(obj){
|
||||
var checkStatus = table.checkStatus(obj.config.id);
|
||||
switch(obj.event){
|
||||
// 条件查找图书证
|
||||
case 'search':
|
||||
var conditionValue = $('#conditionValue');
|
||||
var condition = $('#condition');
|
||||
// 进行搜索,重新渲染
|
||||
tableIns.reload({
|
||||
where: { //设定异步数据接口的额外参数,任意设
|
||||
"condition": condition.val(),
|
||||
"conditionValue": conditionValue.val()
|
||||
}
|
||||
,page: {
|
||||
curr: 1 //重新从第 1 页开始
|
||||
}
|
||||
});
|
||||
break;
|
||||
// 添加借书证
|
||||
case 'add':
|
||||
var addCardLayer = layer.open({
|
||||
type: 2,
|
||||
title: '添加借书证',
|
||||
area: ['800px', '500px'],
|
||||
maxmin: true,
|
||||
shadeClose: true,
|
||||
content: 'cardadd.jsp',
|
||||
end: function(){
|
||||
$('.layui-laypage-btn').click();
|
||||
}
|
||||
});
|
||||
|
||||
//layer.full(addCardLayer);
|
||||
};
|
||||
});
|
||||
|
||||
// 侧边工具栏事件
|
||||
table.on(('tool(formFilter)'), function(obj){
|
||||
var data = obj.data;
|
||||
var layEvent = obj.event;
|
||||
var tr = obj.tr;
|
||||
var id = data.id;
|
||||
switch(obj.event){
|
||||
case 'edit':
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '更改信息',
|
||||
area: ['800px', '600px'],
|
||||
maxmin: true,
|
||||
shadeClose: true,
|
||||
content: 'cardedit.jsp?id=' +id,
|
||||
end: function(){
|
||||
$(".layui-laypage-btn").click();
|
||||
}
|
||||
})
|
||||
|
||||
break;
|
||||
case 'del':
|
||||
layer.confirm('确认删除么?<br><span style="color:red;">这将删除该借阅证的所有记录</span>',function(index){
|
||||
layer.close(index);
|
||||
$.ajax({
|
||||
url: './cardDel',
|
||||
type: 'get',
|
||||
data: 'id=' +id,
|
||||
dataType: 'json',
|
||||
timeout: 3000,
|
||||
success: function(data){
|
||||
if(data.code == 0){
|
||||
console.log(data);
|
||||
layer.msg(data.msg,{
|
||||
icon: 6,
|
||||
time: 1500
|
||||
})
|
||||
// 还是本页数据
|
||||
$(".layui-laypage-btn").click();
|
||||
}else{
|
||||
layer.open({
|
||||
title: '失败',
|
||||
content: data.msg
|
||||
})
|
||||
}
|
||||
},
|
||||
error: function(){
|
||||
layer.msg("连接超时");
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
break;
|
||||
case 'cardBorrow':
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '借阅历史',
|
||||
area: ['800px', '600px'],
|
||||
maxmin: true,
|
||||
shadeClose: true,
|
||||
content: 'cardborrow.jsp?id=' +id,
|
||||
end: function(){
|
||||
//$(".layui-laypage-btn").click();
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1 @@
|
||||
{"code":0,"msg":"","data":[{"id":10020,"username":"user-20","sex":"男","city":"城市-20","sign":"签名-20","experience":770,"logins":24,"wealth":92420248,"classify":"诗人","score":87},{"id":10021,"username":"user-21","sex":"男","city":"城市-21","sign":"签名-21","experience":184,"logins":131,"wealth":71566045,"classify":"词人","score":99},{"id":10022,"username":"user-22","sex":"男","city":"城市-22","sign":"签名-22","experience":739,"logins":152,"wealth":60907929,"classify":"作家","score":18},{"id":10023,"username":"user-23","sex":"女","city":"城市-23","sign":"签名-23","experience":127,"logins":82,"wealth":14765943,"classify":"作家","score":30},{"id":10024,"username":"user-24","sex":"女","city":"城市-24","sign":"签名-24","experience":212,"logins":133,"wealth":59011052,"classify":"词人","score":76},{"id":10025,"username":"user-25","sex":"女","city":"城市-25","sign":"签名-25","experience":938,"logins":182,"wealth":91183097,"classify":"作家","score":69},{"id":10026,"username":"user-26","sex":"男","city":"城市-26","sign":"签名-26","experience":978,"logins":7,"wealth":48008413,"classify":"作家","score":65},{"id":10027,"username":"user-27","sex":"女","city":"城市-27","sign":"签名-27","experience":371,"logins":44,"wealth":64419691,"classify":"诗人","score":60},{"id":10028,"username":"user-28","sex":"女","city":"城市-28","sign":"签名-28","experience":977,"logins":21,"wealth":75935022,"classify":"作家","score":37},{"id":10029,"username":"user-29","sex":"男","city":"城市-29","sign":"签名-29","experience":647,"logins":107,"wealth":97450636,"classify":"酱油","score":27},{"id":10029,"username":"user-29","sex":"男","city":"城市-29","sign":"签名-29","experience":647,"logins":107,"wealth":97450636,"classify":"酱油","score":27},{"id":10029,"username":"user-29","sex":"男","city":"城市-29","sign":"签名-29","experience":647,"logins":107,"wealth":97450636,"classify":"酱油","score":27},{"id":10029,"username":"user-29","sex":"男","city":"城市-29","sign":"签名-29","experience":647,"logins":107,"wealth":97450636,"classify":"酱油","score":27},{"id":10029,"username":"user-29","sex":"男","city":"城市-29","sign":"签名-29","experience":647,"logins":107,"wealth":97450636,"classify":"酱油","score":27},{"id":10029,"username":"user-29","sex":"男","city":"城市-29","sign":"签名-29","experience":647,"logins":107,"wealth":97450636,"classify":"酱油","score":27},{"id":10029,"username":"user-29","sex":"男","city":"城市-29","sign":"签名-29","experience":647,"logins":107,"wealth":97450636,"classify":"酱油","score":27},{"id":10029,"username":"user-29","sex":"男","city":"城市-29","sign":"签名-29","experience":647,"logins":107,"wealth":97450636,"classify":"酱油","score":27}]}
|
@ -0,0 +1 @@
|
||||
{"data":[1,1,2,3,4,5],"days":["3号","4号","5号","前天","昨天","今天"]}
|
@ -0,0 +1,90 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>管理员添加</title>
|
||||
<!-- layui -->
|
||||
<link rel="stylesheet" href="../public/layui/css/layui.css">
|
||||
<script src="../public/layui/layui.js"></script>
|
||||
<style>
|
||||
.layui-form{
|
||||
margin: 10px 20px;
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
</head>
|
||||
<body>
|
||||
<form class="layui-form layui-form-pane" action="" lay-filter="formFilter">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">姓名</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="name" lay-verify="required" required autocomplete="off" placeholder="请输入姓名" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">账号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="account" lay-verify="required" placeholder="请输入账号" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">密码</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="password" name="password" lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">邮箱</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="email" lay-verify="required" placeholder="请输入邮箱" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button type="submit" class="layui-btn" lay-submit="" lay-filter="submitButton">立即提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
|
||||
|
||||
layui.use(['form', 'jquery'], function(){
|
||||
$ = layui.jquery;
|
||||
var form = layui.form
|
||||
,layer = layui.layer
|
||||
//监听提交
|
||||
form.on('submit(submitButton)', function(data){
|
||||
$.ajax({
|
||||
url: './managerAdd',
|
||||
method: 'post',
|
||||
data: data.field,
|
||||
dataType: 'json',
|
||||
success: function(data){
|
||||
if(data.code == "0"){
|
||||
parent.layer.msg("添加成功",{
|
||||
icon: 6,
|
||||
time: 500
|
||||
});
|
||||
setTimeout(function(){
|
||||
parent.location.reload();
|
||||
}, 500);
|
||||
}else{
|
||||
layer.msg(data.msg);
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,103 @@
|
||||
<%@page import="java.sql.ResultSet"%>
|
||||
<%@page import="java.sql.PreparedStatement"%>
|
||||
<%@page import="java.sql.Connection"%>
|
||||
<%@page import="javabean.Base"%>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>管理员修改</title>
|
||||
<!-- layui -->
|
||||
<link rel="stylesheet" href="../public/layui/css/layui.css">
|
||||
<script src="../public/layui/layui.js"></script>
|
||||
<style>
|
||||
.layui-form{
|
||||
margin: 10px 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
</head>
|
||||
<body>
|
||||
<%
|
||||
String id = request.getParameter("id");
|
||||
Connection connection = (Connection)Base.getConnection();
|
||||
String sql = "select * from manager where id=?";
|
||||
PreparedStatement pstmt = connection.prepareCall(sql);
|
||||
pstmt.setString(1,id);
|
||||
ResultSet resultSet = pstmt.executeQuery();
|
||||
resultSet.next();
|
||||
|
||||
%>
|
||||
<form class="layui-form layui-form-pane" action="" lay-filter="formFilter">
|
||||
<input type="text" name="id" value=<%=id %> lay-verify="required" required autocomplete="off" placeholder="请输入姓名" class="layui-input layui-hide">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">姓名</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="name" value=<%=resultSet.getString("name") %> lay-verify="required" required autocomplete="off" placeholder="请输入姓名" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">账号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="account" value=<%=resultSet.getString("account") %> disabled lay-verify="required" placeholder="请输入账号" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">密码</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="password" name="password" value=<%=resultSet.getString("password") %> lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">邮箱</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="email" value=<%=resultSet.getString("email") %> lay-verify="required" placeholder="请输入邮箱" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button type="submit" class="layui-btn" lay-submit="" lay-filter="submitButton">立即提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
|
||||
|
||||
layui.use(['form', 'jquery'], function(){
|
||||
$ = layui.jquery;
|
||||
var form = layui.form
|
||||
,layer = layui.layer
|
||||
//监听提交
|
||||
form.on('submit(submitButton)', function(data){
|
||||
$.ajax({
|
||||
url: './managerEdit',
|
||||
method: 'post',
|
||||
data: data.field,
|
||||
dataType: 'json',
|
||||
success: function(data){
|
||||
if(data.code == "0"){
|
||||
parent.layer.msg("添加成功",{
|
||||
icon: 6,
|
||||
time: 500
|
||||
});
|
||||
setTimeout(function(){
|
||||
parent.location.reload();
|
||||
}, 500);
|
||||
}else{
|
||||
layer.msg(data.msg);
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,118 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>借阅卡</title>
|
||||
<link rel="stylesheet" href="../public/layui/css/layui.css" media="all">
|
||||
<style>
|
||||
.layui-table,.layui-table-view{
|
||||
margin: 0 0px;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<!-- 表单 -->
|
||||
<table class="layui-hide" id="managerTable" lay-filter="formFilter"></table>
|
||||
<script src="../public/layui/layui.js" charset="utf-8"></script>
|
||||
<!-- 头部工具栏 -->
|
||||
<script type="text/html" id="headBar">
|
||||
<button type="button" class="layui-btn layui-btn-sm" lay-event="add"><i class="layui-icon">添加管理员</i></button>
|
||||
</script>
|
||||
|
||||
<!-- 表格侧边栏 -->
|
||||
<script type="text/html" id="operateBar">
|
||||
<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
|
||||
</script>
|
||||
<script>
|
||||
layui.use(['table','jquery'], function(){
|
||||
$ = layui.jquery;
|
||||
var table = layui.table;
|
||||
// 进行渲染
|
||||
var tableIns = table.render({
|
||||
elem: '#managerTable'
|
||||
,url:'./managerList'
|
||||
,toolbar: '#headBar'
|
||||
,height: 600
|
||||
,cols: [[
|
||||
{field:'id', width:80, title: 'ID', sort: true}
|
||||
,{field:'account', width:80, title: '账号', sort: true}
|
||||
,{field:'name', width:80, title: '姓名'}
|
||||
,{field:'email', title: '邮箱', minWidth: 150}
|
||||
,{fixed: 'right', title:'操作', toolbar: '#operateBar', align: 'center', width:150}
|
||||
]]
|
||||
});
|
||||
|
||||
// 头部工具栏事件
|
||||
table.on('toolbar(formFilter)', function(obj){
|
||||
var checkStatus = table.checkStatus(obj.config.id);
|
||||
switch(obj.event){
|
||||
// 添加管理员
|
||||
case 'add':
|
||||
var addCardLayer = layer.open({
|
||||
type: 2,
|
||||
title: '添加管理员',
|
||||
area: ['800px', '500px'],
|
||||
maxmin: true,
|
||||
shadeClose: true,
|
||||
content: 'manageradd.jsp',
|
||||
});
|
||||
//layer.full(addCardLayer);
|
||||
};
|
||||
});
|
||||
|
||||
// 侧边工具栏事件
|
||||
table.on(('tool(formFilter)'), function(obj){
|
||||
var data = obj.data;
|
||||
var layEvent = obj.event;
|
||||
var id = data.id;
|
||||
var tr = obj.tr;
|
||||
switch(obj.event){
|
||||
case 'edit':
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '更改信息',
|
||||
area: ['800px', '600px'],
|
||||
maxmin: true,
|
||||
shadeClose: true,
|
||||
content: 'manageredit.jsp?id=' +id,
|
||||
})
|
||||
break;
|
||||
case 'del':
|
||||
layer.confirm('确定要删除么?',function(){
|
||||
layer.msg("ok");
|
||||
$.ajax({
|
||||
url: './managerDel',
|
||||
data: 'id=' +id,
|
||||
type: 'get',
|
||||
dataType: 'json',
|
||||
timeout: 3000,
|
||||
success: function(data){
|
||||
layer.msg("???");
|
||||
if(data.code == 0){
|
||||
layer.msg(data.msg,{
|
||||
icon: 6,
|
||||
anim: 5,
|
||||
time: 500
|
||||
});
|
||||
setTimeout(function(){
|
||||
parent.location.reload();
|
||||
},500);
|
||||
}else{
|
||||
layer.msg(data.code);
|
||||
}
|
||||
},
|
||||
error: function(){
|
||||
layer.msg("连接超时");
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,119 @@
|
||||
<%@page import="javabean.Common"%>
|
||||
<%@page import="java.util.TreeMap"%>
|
||||
<%@page import="java.util.HashMap"%>
|
||||
<%@page import="java.util.Map"%>
|
||||
<%@page import="java.util.ArrayList"%>
|
||||
<%@page import="java.sql.ResultSet"%>
|
||||
<%@page import="java.sql.PreparedStatement"%>
|
||||
<%@page import="java.sql.Connection"%>
|
||||
<%@page import="javabean.Base"%>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>规则添加</title>
|
||||
<!-- layui -->
|
||||
<link rel="stylesheet" href="../public/layui/css/layui.css">
|
||||
<script src="../public/layui/layui.js"></script>
|
||||
<style>
|
||||
.layui-form{
|
||||
margin: 10px 20px;
|
||||
|
||||
}
|
||||
.layui-form-pane .layui-form-label{
|
||||
width: 120px;
|
||||
}
|
||||
.layui-form-pane .layui-input-block{
|
||||
margin-left: 120px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<%
|
||||
// 获取图书馆map
|
||||
Map<String, String> libraryMap = Common.getLibraryMap();
|
||||
%>
|
||||
<form class="layui-form layui-form-pane" action="">
|
||||
<input type="id" name="id" value="3" class="layui-hide">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">限制天数</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="limit_day" required lay-verify="required" placeholder="请输入限制天数" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<!-- 作者 -->
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">限制数量</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="borrow_num" required lay-verify="required" placeholder="请输入限制数量" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">限制图书馆</label>
|
||||
<div class="layui-input-block" >
|
||||
<%
|
||||
for(String key : libraryMap.keySet()){
|
||||
%>
|
||||
<input type="checkbox" name=<%="borrow_library[" +key +"]" %> title=<%=libraryMap.get(key) %> checked>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">逾期每天费用</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="overtime_fee" required lay-verify="required" placeholder="请输入逾期每天费用" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="submitButton">立即提交</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
|
||||
|
||||
layui.use(['form', 'jquery'], function(){
|
||||
$ = layui.jquery;
|
||||
var form = layui.form
|
||||
,layer = layui.layer
|
||||
//监听提交
|
||||
form.on('submit(submitButton)', function(data){
|
||||
$.ajax({
|
||||
url: './ruleAdd',
|
||||
method: 'post',
|
||||
data: data.field,
|
||||
dataType: 'json',
|
||||
success: function(data){
|
||||
if(data.code == "0"){
|
||||
parent.layer.msg("添加成功",{
|
||||
icon: 6,
|
||||
time: 500
|
||||
});
|
||||
setTimeout(function(){
|
||||
parent.location.reload();
|
||||
}, 500);
|
||||
}else{
|
||||
leyer.msg("添加失败");
|
||||
}
|
||||
|
||||
//parent.layer.msg('您将标记 [ sdf ] 成功传送给了父窗口');
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,148 @@
|
||||
<%@page import="javabean.Common"%>
|
||||
<%@page import="java.util.TreeMap"%>
|
||||
<%@page import="java.util.HashMap"%>
|
||||
<%@page import="java.util.Map"%>
|
||||
<%@page import="java.util.ArrayList"%>
|
||||
<%@page import="java.sql.ResultSet"%>
|
||||
<%@page import="java.sql.PreparedStatement"%>
|
||||
<%@page import="java.sql.Connection"%>
|
||||
<%@page import="javabean.Base"%>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>规则添加</title>
|
||||
<!-- layui -->
|
||||
<link rel="stylesheet" href="../public/layui/css/layui.css">
|
||||
<script src="../public/layui/layui.js"></script>
|
||||
<style>
|
||||
.layui-form{
|
||||
margin: 10px 20px;
|
||||
|
||||
}
|
||||
.layui-form-pane .layui-form-label{
|
||||
width: 120px;
|
||||
}
|
||||
.layui-form-pane .layui-input-block{
|
||||
margin-left: 120px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<%
|
||||
String id = request.getParameter("id");
|
||||
Connection connection = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet resultSet = null;
|
||||
String sql = "";
|
||||
|
||||
connection = (Connection)Base.getConnection();
|
||||
sql = "select * from rules where id = ?";
|
||||
pstmt = connection.prepareStatement(sql);
|
||||
pstmt.setString(1, id);
|
||||
resultSet = pstmt.executeQuery();
|
||||
resultSet.next();
|
||||
|
||||
String[] libraryList = resultSet.getString("borrow_library").split("、");
|
||||
// 获取图书馆map
|
||||
Map<String, String> libraryMap = Common.getLibraryMap();
|
||||
%>
|
||||
<form class="layui-form layui-form-pane" action="">
|
||||
<input type="text" name="id" value=<%=id %> class="layui-hide">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">限制天数</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="limit_day" value=<%=resultSet.getString("limit_day") %> required lay-verify="required" placeholder="请输入限制天数" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<!-- 作者 -->
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">限制数量</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="borrow_num" value=<%=resultSet.getString("borrow_num") %> required lay-verify="required" placeholder="请输入限制数量" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">限制图书馆</label>
|
||||
<div class="layui-input-block" >
|
||||
<%
|
||||
for(String key : libraryMap.keySet()){
|
||||
boolean flag = false;
|
||||
%>
|
||||
<input type="checkbox" name=<%="borrow_library[" +key +"]" %> title=<%=libraryMap.get(key) %>
|
||||
<% for(String key0 : libraryList){
|
||||
flag = false;
|
||||
if(key0.equals(key)){
|
||||
flag = true;
|
||||
}
|
||||
if(flag == true)
|
||||
out.print("checked");
|
||||
}
|
||||
%>>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">逾期每天费用</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="overtime_fee" value=<%=resultSet.getString("overtime_fee") %> required lay-verify="required" placeholder="请输入逾期每天费用" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="bookForm">立即提交</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
|
||||
|
||||
layui.use(['form', 'jquery'], function(){
|
||||
//layer.closeAll();
|
||||
$ = layui.jquery;
|
||||
var form = layui.form
|
||||
,layer = layui.layer
|
||||
//监听提交
|
||||
form.on('submit(bookForm)', function(data){
|
||||
$.ajax({
|
||||
url: './ruleEdit',
|
||||
method: 'post',
|
||||
data: data.field,
|
||||
dataType: 'json',
|
||||
success: function(data){
|
||||
if(data.code == "0"){
|
||||
parent.layer.msg("修改成功",{
|
||||
icon: 6,
|
||||
time: 500
|
||||
});
|
||||
setTimeout(function(){
|
||||
parent.location.reload();
|
||||
}, 500);
|
||||
}else{
|
||||
leyer.msg("修改失败");
|
||||
}
|
||||
|
||||
//parent.layer.msg('您将标记 [ sdf ] 成功传送给了父窗口');
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<%
|
||||
Base.closeResource(connection, pstmt, resultSet);
|
||||
%>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,119 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>规则列表</title>
|
||||
<link rel="stylesheet" href="../public/layui/css/layui.css" media="all">
|
||||
<style>
|
||||
.layui-table,.layui-table-view{
|
||||
margin: 0 0px;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<!-- 表单 -->
|
||||
<table class="layui-hide" id="ruleTable" lay-filter="formFilter"></table>
|
||||
<script src="../public/layui/layui.js" charset="utf-8"></script>
|
||||
<!-- 头部工具栏 -->
|
||||
<script type="text/html" id="headBar">
|
||||
<button type="button" class="layui-btn layui-btn-sm" lay-event="add"><i class="layui-icon">添加</i></button>
|
||||
</script>
|
||||
|
||||
<!-- 表格后面的操作 -->
|
||||
<script type="text/html" id="operateBar">
|
||||
<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
|
||||
</script>
|
||||
<script>
|
||||
layui.use(['table','jquery'], function(){
|
||||
$ = layui.jquery;
|
||||
var table = layui.table;
|
||||
// 进行渲染
|
||||
var tableIns = table.render({
|
||||
elem: '#ruleTable'
|
||||
,url:'./ruleList'
|
||||
,toolbar: '#headBar'
|
||||
,height: '600'
|
||||
,cols: [[
|
||||
{fixed: 'left',field:'id', width:140, title: 'ID', sort: true}
|
||||
,{field:'limit_day', width:180, title: '限制天数', sort: true}
|
||||
,{field:'borrow_num', width:180, title: '限制本数', sort: true}
|
||||
,{field:'borrow_library', width:180, title: '限制图书馆'}
|
||||
,{field:'overtime_fee', title: '逾期每天费用', width: 150}
|
||||
,{fixed: 'right', title:'操作', toolbar: '#operateBar', align: 'center', width:150}
|
||||
]]
|
||||
});
|
||||
|
||||
// 头部工具栏事件
|
||||
table.on('toolbar(formFilter)', function(obj){
|
||||
var checkStatus = table.checkStatus(obj.config.id);
|
||||
switch(obj.event){
|
||||
// 添加规则
|
||||
case 'add':
|
||||
var addCardLayer = layer.open({
|
||||
type: 2,
|
||||
title: '添加规则',
|
||||
area: ['800px', '500px'],
|
||||
maxmin: true,
|
||||
content: 'ruleadd.jsp',
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
// 侧边工具栏事件
|
||||
table.on(('tool(formFilter)'), function(obj){
|
||||
var data = obj.data;
|
||||
var layEvent = obj.event;
|
||||
var tr = obj.tr;
|
||||
var id = data.id;
|
||||
switch(obj.event){
|
||||
case 'edit':
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '更改信息',
|
||||
area: ['800px', '600px'],
|
||||
maxmin: true,
|
||||
shadeClose: true,
|
||||
content: 'ruleedit.jsp?id=' +id,
|
||||
})
|
||||
break;
|
||||
case 'del':
|
||||
layer.confirm("确认要删除么,非必要请勿删除",function(){
|
||||
$.ajax({
|
||||
url: './ruleDel',
|
||||
data: "id=" +id,
|
||||
type: 'get',
|
||||
dataType: 'json',
|
||||
timout: 3000,
|
||||
success: function(data){
|
||||
if(data.code == 0){
|
||||
layer.msg(data.msg,{
|
||||
icon: 6,
|
||||
anim: 5,
|
||||
time: 500
|
||||
})
|
||||
setTimeout(function(){
|
||||
parent.location.reload();
|
||||
}, 500)
|
||||
|
||||
}else{
|
||||
layer.msg(data.msg,{
|
||||
icon:5,
|
||||
anim:6
|
||||
})
|
||||
}
|
||||
},
|
||||
error: function(){
|
||||
layer.msg("连接超时");
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,79 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>分类添加</title>
|
||||
<!-- layui -->
|
||||
<link rel="stylesheet" href="../public/layui/css/layui.css">
|
||||
<script src="../public/layui/layui.js"></script>
|
||||
<style>
|
||||
.layui-form{
|
||||
margin: 10px 20px;
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
</head>
|
||||
<body>
|
||||
<form class="layui-form layui-form-pane" action="" lay-filter="formFilter">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">分类名</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="name" lay-verify="required" required autocomplete="off" placeholder="请输入分类名" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">分类描述</label>
|
||||
<div class="layui-input-block">
|
||||
<textarea name="description" placeholder="请输入内容" class="layui-textarea" style="height:300px"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button type="submit" class="layui-btn" lay-submit="" lay-filter="submitButton">立即提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
|
||||
|
||||
layui.use(['form', 'jquery'], function(){
|
||||
$ = layui.jquery;
|
||||
var form = layui.form
|
||||
,layer = layui.layer
|
||||
//监听提交
|
||||
form.on('submit(submitButton)', function(data){
|
||||
$.ajax({
|
||||
url: './sortAdd',
|
||||
method: 'post',
|
||||
data: data.field,
|
||||
dataType: 'json',
|
||||
success: function(data){
|
||||
if(data.code == "0"){
|
||||
parent.layer.msg("添加成功",{
|
||||
icon: 6,
|
||||
time: 500
|
||||
});
|
||||
setTimeout(function(){
|
||||
parent.location.reload();
|
||||
}, 500);
|
||||
}else{
|
||||
layer.msg(data.msg);
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,101 @@
|
||||
<%@page import="javabean.Base"%>
|
||||
<%@page import="java.sql.ResultSet"%>
|
||||
<%@page import="java.sql.PreparedStatement"%>
|
||||
<%@page import="java.sql.Connection"%>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>分类编辑</title>
|
||||
<!-- layui -->
|
||||
<link rel="stylesheet" href="../public/layui/css/layui.css">
|
||||
<script src="../public/layui/layui.js"></script>
|
||||
<style>
|
||||
.layui-form{
|
||||
margin: 10px 20px;
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
</head>
|
||||
<%
|
||||
String id = request.getParameter("id");
|
||||
Connection connection = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet resultSet = null;
|
||||
String sql = "";
|
||||
|
||||
connection = (Connection)Base.getConnection();
|
||||
sql = "select * from book_sort where id = ?";
|
||||
pstmt = connection.prepareStatement(sql);
|
||||
pstmt.setString(1, id);
|
||||
resultSet = pstmt.executeQuery();
|
||||
resultSet.next();
|
||||
%>
|
||||
<body>
|
||||
<form class="layui-form layui-form-pane" action="" lay-filter="formFilter">
|
||||
<input type="text" name="id" value=<%=id %> lay-verify="required" required autocomplete="off" class="layui-input layui-hide">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">分类名</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="name" value=<%=resultSet.getString("name") %> lay-verify="required" required autocomplete="off" placeholder="请输入分类名" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">分类描述</label>
|
||||
<div class="layui-input-block">
|
||||
<textarea name="description" placeholder="请输入内容" class="layui-textarea" style="height:300px"><%=resultSet.getString("description") != null ? resultSet.getString("description") : "" %></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button type="submit" class="layui-btn" lay-submit="" lay-filter="submitButton">立即提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
|
||||
|
||||
layui.use(['form', 'jquery'], function(){
|
||||
$ = layui.jquery;
|
||||
var form = layui.form
|
||||
,layer = layui.layer
|
||||
//监听提交
|
||||
form.on('submit(submitButton)', function(data){
|
||||
$.ajax({
|
||||
url: './sortEdit',
|
||||
method: 'post',
|
||||
data: data.field,
|
||||
dataType: 'json',
|
||||
success: function(data){
|
||||
if(data.code == "0"){
|
||||
parent.layer.msg(data.msg,{
|
||||
icon: 6,
|
||||
time: 500
|
||||
});
|
||||
setTimeout(function(){
|
||||
parent.location.reload();
|
||||
}, 500);
|
||||
}else{
|
||||
layer.msg(data.msg);
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
<%
|
||||
Base.closeResource(connection, pstmt, resultSet);
|
||||
%>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,108 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>借阅卡</title>
|
||||
<link rel="stylesheet" href="../public/layui/css/layui.css" media="all">
|
||||
<style>
|
||||
.layui-table,.layui-table-view{
|
||||
margin: 0 0px;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<!-- 表单 -->
|
||||
<table class="layui-hide" id="cardTable" lay-filter="formFilter"></table>
|
||||
<script src="../public/layui/layui.js" charset="utf-8"></script>
|
||||
<!-- 头部工具栏 -->
|
||||
<script type="text/html" id="headBar">
|
||||
<button type="button" class="layui-btn layui-btn-sm" lay-event="add"><i class="layui-icon">添加分类</i></button>
|
||||
</script>
|
||||
|
||||
<!-- 表格后面的操作 -->
|
||||
<script type="text/html" id="operateBar">
|
||||
<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
|
||||
</script>
|
||||
<script>
|
||||
layui.use(['table','jquery'], function(){
|
||||
$ = layui.jquery;
|
||||
var table = layui.table;
|
||||
// 进行渲染
|
||||
var tableIns = table.render({
|
||||
elem: '#cardTable'
|
||||
,url:'./sortList'
|
||||
,toolbar: '#headBar'
|
||||
,height: 600
|
||||
,cols: [[
|
||||
{field:'id', width:80, title: 'ID', sort: true}
|
||||
,{field:'name', width:180, title: '分类名', sort: true}
|
||||
,{field:'description', width:480, title: '描述', sort: true}
|
||||
,{fixed: 'right', title:'操作', toolbar: '#operateBar', align: 'center', width:150}
|
||||
]]
|
||||
});
|
||||
|
||||
// 头部工具栏事件
|
||||
table.on('toolbar(formFilter)', function(obj){
|
||||
var checkStatus = table.checkStatus(obj.config.id);
|
||||
switch(obj.event){
|
||||
// 添加分类
|
||||
case 'add':
|
||||
var addCardLayer = layer.open({
|
||||
type: 2,
|
||||
title: '添加借书证',
|
||||
area: ['800px', '500px'],
|
||||
maxmin: true,
|
||||
shadeClose: true,
|
||||
content: 'sortadd.jsp',
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
// 侧边工具栏事件
|
||||
table.on(('tool(formFilter)'), function(obj){
|
||||
var data = obj.data;
|
||||
var layEvent = obj.event;
|
||||
var tr = obj.tr;
|
||||
var id = data.id;
|
||||
switch(obj.event){
|
||||
case 'edit':
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '更改信息',
|
||||
area: ['800px', '600px'],
|
||||
maxmin: true,
|
||||
shadeClose: true,
|
||||
content: 'sortedit.jsp?id=' +id,
|
||||
})
|
||||
break;
|
||||
case 'del':
|
||||
layer.confirm('确认删除么?<br><span style="color:red;">这将会将该分类下的书籍归为未分类</span>', function(){
|
||||
$.ajax({
|
||||
url: './sortDel',
|
||||
type: 'get',
|
||||
data: 'id=' +id,
|
||||
success: function(data){
|
||||
if(data.code == 0){
|
||||
parent.layer.msg(data.msg,{
|
||||
icon: 6,
|
||||
time: 500
|
||||
});
|
||||
setTimeout(function(){
|
||||
parent.location.reload();
|
||||
}, 500);
|
||||
}else{
|
||||
layer.msg(data.msg);
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,3 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
system.html
|
@ -0,0 +1 @@
|
||||
index
|
@ -0,0 +1,89 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>修改密码</title>
|
||||
<!-- layui -->
|
||||
<link rel="stylesheet" href="../public/layui/css/layui.css">
|
||||
<script src="../public/layui/layui.js"></script>
|
||||
<style>
|
||||
.layui-form{
|
||||
margin: 10px 20px;
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
</head>
|
||||
<body>
|
||||
<form class="layui-form layui-form-pane" action="" lay-filter="formFilter">
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">旧密码</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="password" name="oldPassword" lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">新密码</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="password" name="newPassword" lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">确认密码</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="password" name="conPassword" lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button type="submit" class="layui-btn" lay-submit="" lay-filter="submitButton">确认修改</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
|
||||
|
||||
layui.use(['form', 'jquery'], function(){
|
||||
$ = layui.jquery;
|
||||
var form = layui.form
|
||||
,layer = layui.layer
|
||||
//监听提交
|
||||
form.on('submit(submitButton)', function(data){
|
||||
$.ajax({
|
||||
url: './updatePassword',
|
||||
method: 'post',
|
||||
data: data.field,
|
||||
dataType: 'json',
|
||||
success: function(data){
|
||||
if(data.code == "0"){
|
||||
parent.layer.msg("修改成功",{
|
||||
icon: 6,
|
||||
time: 500
|
||||
});
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name); //操作父页面
|
||||
parent.layer.close(index);
|
||||
}, 500);
|
||||
}else{
|
||||
layer.msg(data.msg);
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,67 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>登录页面</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
|
||||
<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
||||
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
|
||||
<!-- 可选的 Bootstrap 主题文件(一般不用引入) -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="./public/css/animate.css">
|
||||
<link rel="stylesheet" href="./public/css/login.css" />
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="container main">
|
||||
<div id="login" class="contain animated fadeInDown">
|
||||
<h1>系统管理员登录</h1>
|
||||
<form method="post">
|
||||
<input type="text" name="username" class="form-control my_input" placeholder="请输入账号" required="required">
|
||||
<input type="password" name="password" class="form-control my_input" placeholder="请输入密码" required="required">
|
||||
<input type="submit" class="form-control" value="登录" onclick="javascript:void(0);">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div style="position:fixed; bottom:0; right:0;">
|
||||
<a href="loginReader.html" target="_blank"><img src="public/image/reader.png" width="50px" height="50px"></a><br>
|
||||
<a href="loginManager.html" target="_blank"><img src="public/image/manager.png" width="50px" height="50px"></a>
|
||||
</div>
|
||||
<script src="./public/js/layer/layer.js"></script>
|
||||
<script>
|
||||
$(function(){
|
||||
//登录
|
||||
$("input[type=submit]").click(function(){
|
||||
|
||||
$.ajax({
|
||||
url: "./adminLogin",
|
||||
type: "post",
|
||||
data: $("form").serialize(),
|
||||
dataType: "json",
|
||||
success: function( data ){
|
||||
if(data.code == 0){
|
||||
layer.msg("登录成功", {
|
||||
icon: 6,
|
||||
time: 1000
|
||||
}, function(){
|
||||
location.href = data.url;
|
||||
})
|
||||
}else{
|
||||
layer.open({
|
||||
title: "登录失败",
|
||||
content: data.msg,
|
||||
icon: 5,
|
||||
anim: 6
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
return false;
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,352 @@
|
||||
/**
|
||||
* @author zhixin wen <wenzhixin2010@gmail.com>
|
||||
* version: 1.16.0
|
||||
* https://github.com/wenzhixin/bootstrap-table/
|
||||
*/
|
||||
.bootstrap-table .fixed-table-toolbar::after {
|
||||
content: "";
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-toolbar .bs-bars,
|
||||
.bootstrap-table .fixed-table-toolbar .search,
|
||||
.bootstrap-table .fixed-table-toolbar .columns {
|
||||
position: relative;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-toolbar .columns .btn-group > .btn-group {
|
||||
display: inline-block;
|
||||
margin-left: -1px !important;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-toolbar .columns .btn-group > .btn-group > .btn {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-toolbar .columns .btn-group > .btn-group:first-child > .btn {
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-toolbar .columns .btn-group > .btn-group:last-child > .btn {
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-toolbar .columns .dropdown-menu {
|
||||
text-align: left;
|
||||
max-height: 300px;
|
||||
overflow: auto;
|
||||
-ms-overflow-style: scrollbar;
|
||||
z-index: 1001;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-toolbar .columns label {
|
||||
display: block;
|
||||
padding: 3px 20px;
|
||||
clear: both;
|
||||
font-weight: normal;
|
||||
line-height: 1.428571429;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-toolbar .columns-left {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-toolbar .columns-right {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-toolbar .pull-right .dropdown-menu {
|
||||
right: 0;
|
||||
left: auto;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container {
|
||||
position: relative;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container .table {
|
||||
width: 100%;
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container .table th,
|
||||
.bootstrap-table .fixed-table-container .table td {
|
||||
vertical-align: middle;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container .table thead th {
|
||||
vertical-align: bottom;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container .table thead th:focus {
|
||||
outline: 0 solid transparent;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container .table thead th.detail {
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container .table thead th .th-inner {
|
||||
padding: 0.75rem;
|
||||
vertical-align: bottom;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container .table thead th .sortable {
|
||||
cursor: pointer;
|
||||
background-position: right;
|
||||
background-repeat: no-repeat;
|
||||
padding-right: 30px !important;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container .table thead th .both {
|
||||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAkElEQVQoz7X QMQ5AQBCF4dWQSJxC5wwax1Cq1e7BAdxD5SL+Tq/QCM1oNiJidwox0355mXnG/DrEtIQ6azioNZQxI0ykPhTQIwhCR+BmBYtlK7kLJYwWCcJA9M4qdrZrd8pPjZWPtOqdRQy320YSV17OatFC4euts6z39GYMKRPCTKY9UnPQ6P+GtMRfGtPnBCiqhAeJPmkqAAAAAElFTkSuQmCC");
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container .table thead th .asc {
|
||||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS/gDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM+wTENuQahAvEO9DMwiGdwAxOymGJQLxTyD+jgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg==");
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container .table thead th .desc {
|
||||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZUlEQVQ4y2NgGAWjYBSggaqGu5FA/BOIv2PBIPFEUgxjB+IdQPwfC94HxLykus4GiD+hGfQOiB3J8SojEE9EM2wuSJzcsFMG4ttQgx4DsRalkZENxL+AuJQaMcsGxBOAmGvopk8AVz1sLZgg0bsAAAAASUVORK5CYII= ");
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container .table tbody tr.selected td {
|
||||
background-color: rgba(0, 0, 0, 0.075);
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container .table tbody tr.no-records-found td {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container .table tbody tr .card-view {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container .table tbody tr .card-view .card-view-title {
|
||||
font-weight: bold;
|
||||
display: inline-block;
|
||||
min-width: 30%;
|
||||
text-align: left !important;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container .table .bs-checkbox {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container .table .bs-checkbox label {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container .table .bs-checkbox label input[type="radio"],
|
||||
.bootstrap-table .fixed-table-container .table .bs-checkbox label input[type="checkbox"] {
|
||||
margin: 0 auto !important;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container .table.table-sm .th-inner {
|
||||
padding: 0.3rem;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container.fixed-height:not(.has-footer) {
|
||||
border-bottom: 1px solid #dee2e6;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container.fixed-height.has-card-view {
|
||||
border-top: 1px solid #dee2e6;
|
||||
border-bottom: 1px solid #dee2e6;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container.fixed-height .fixed-table-border {
|
||||
border-left: 1px solid #dee2e6;
|
||||
border-right: 1px solid #dee2e6;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container.fixed-height .table thead th {
|
||||
border-bottom: 1px solid #dee2e6;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container.fixed-height .table-dark thead th {
|
||||
border-bottom: 1px solid #32383e;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container .fixed-table-header {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container .fixed-table-body {
|
||||
overflow-x: auto;
|
||||
overflow-y: auto;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading {
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
display: none;
|
||||
justify-content: center;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap {
|
||||
align-items: baseline;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .loading-text {
|
||||
font-size: 2rem;
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-dot,
|
||||
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap::after,
|
||||
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap::before {
|
||||
content: "";
|
||||
animation-duration: 1.5s;
|
||||
animation-iteration-count: infinite;
|
||||
animation-name: LOADING;
|
||||
background: #212529;
|
||||
border-radius: 50%;
|
||||
display: block;
|
||||
height: 5px;
|
||||
margin: 0 4px;
|
||||
opacity: 0;
|
||||
width: 5px;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-dot {
|
||||
animation-delay: 0.3s;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap::after {
|
||||
animation-delay: 0.6s;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.table-dark {
|
||||
background: #212529;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.table-dark .animation-dot,
|
||||
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.table-dark .animation-wrap::after,
|
||||
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.table-dark .animation-wrap::before {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-container .fixed-table-footer {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-pagination::after {
|
||||
content: "";
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-pagination > .pagination-detail,
|
||||
.bootstrap-table .fixed-table-pagination > .pagination {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-pagination > .pagination-detail .pagination-info {
|
||||
line-height: 34px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-pagination > .pagination-detail .page-list {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-pagination > .pagination-detail .page-list .btn-group {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-pagination > .pagination-detail .page-list .btn-group .dropdown-menu {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-pagination > .pagination ul.pagination {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-pagination > .pagination ul.pagination a {
|
||||
padding: 6px 12px;
|
||||
line-height: 1.428571429;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-pagination > .pagination ul.pagination li.page-intermediate a {
|
||||
color: #c8c8c8;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-pagination > .pagination ul.pagination li.page-intermediate a::before {
|
||||
content: '\2B05';
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-pagination > .pagination ul.pagination li.page-intermediate a::after {
|
||||
content: '\27A1';
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-pagination > .pagination ul.pagination li.disabled a {
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.bootstrap-table.fullscreen {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 1050;
|
||||
width: 100% !important;
|
||||
background: #fff;
|
||||
height: calc(100vh);
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
/* calculate scrollbar width */
|
||||
div.fixed-table-scroll-inner {
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
div.fixed-table-scroll-outer {
|
||||
top: 0;
|
||||
left: 0;
|
||||
visibility: hidden;
|
||||
width: 200px;
|
||||
height: 150px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@keyframes LOADING {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
50% {
|
||||
opacity: 1;
|
||||
}
|
||||
to {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,587 @@
|
||||
/*!
|
||||
* Bootstrap v3.3.7 (http://getbootstrap.com)
|
||||
* Copyright 2011-2016 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
.btn-default,
|
||||
.btn-primary,
|
||||
.btn-success,
|
||||
.btn-info,
|
||||
.btn-warning,
|
||||
.btn-danger {
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, .2);
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
|
||||
}
|
||||
.btn-default:active,
|
||||
.btn-primary:active,
|
||||
.btn-success:active,
|
||||
.btn-info:active,
|
||||
.btn-warning:active,
|
||||
.btn-danger:active,
|
||||
.btn-default.active,
|
||||
.btn-primary.active,
|
||||
.btn-success.active,
|
||||
.btn-info.active,
|
||||
.btn-warning.active,
|
||||
.btn-danger.active {
|
||||
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
|
||||
box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
|
||||
}
|
||||
.btn-default.disabled,
|
||||
.btn-primary.disabled,
|
||||
.btn-success.disabled,
|
||||
.btn-info.disabled,
|
||||
.btn-warning.disabled,
|
||||
.btn-danger.disabled,
|
||||
.btn-default[disabled],
|
||||
.btn-primary[disabled],
|
||||
.btn-success[disabled],
|
||||
.btn-info[disabled],
|
||||
.btn-warning[disabled],
|
||||
.btn-danger[disabled],
|
||||
fieldset[disabled] .btn-default,
|
||||
fieldset[disabled] .btn-primary,
|
||||
fieldset[disabled] .btn-success,
|
||||
fieldset[disabled] .btn-info,
|
||||
fieldset[disabled] .btn-warning,
|
||||
fieldset[disabled] .btn-danger {
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
.btn-default .badge,
|
||||
.btn-primary .badge,
|
||||
.btn-success .badge,
|
||||
.btn-info .badge,
|
||||
.btn-warning .badge,
|
||||
.btn-danger .badge {
|
||||
text-shadow: none;
|
||||
}
|
||||
.btn:active,
|
||||
.btn.active {
|
||||
background-image: none;
|
||||
}
|
||||
.btn-default {
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%);
|
||||
background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0));
|
||||
background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #dbdbdb;
|
||||
border-color: #ccc;
|
||||
}
|
||||
.btn-default:hover,
|
||||
.btn-default:focus {
|
||||
background-color: #e0e0e0;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
.btn-default:active,
|
||||
.btn-default.active {
|
||||
background-color: #e0e0e0;
|
||||
border-color: #dbdbdb;
|
||||
}
|
||||
.btn-default.disabled,
|
||||
.btn-default[disabled],
|
||||
fieldset[disabled] .btn-default,
|
||||
.btn-default.disabled:hover,
|
||||
.btn-default[disabled]:hover,
|
||||
fieldset[disabled] .btn-default:hover,
|
||||
.btn-default.disabled:focus,
|
||||
.btn-default[disabled]:focus,
|
||||
fieldset[disabled] .btn-default:focus,
|
||||
.btn-default.disabled.focus,
|
||||
.btn-default[disabled].focus,
|
||||
fieldset[disabled] .btn-default.focus,
|
||||
.btn-default.disabled:active,
|
||||
.btn-default[disabled]:active,
|
||||
fieldset[disabled] .btn-default:active,
|
||||
.btn-default.disabled.active,
|
||||
.btn-default[disabled].active,
|
||||
fieldset[disabled] .btn-default.active {
|
||||
background-color: #e0e0e0;
|
||||
background-image: none;
|
||||
}
|
||||
.btn-primary {
|
||||
background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%);
|
||||
background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#265a88));
|
||||
background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #245580;
|
||||
}
|
||||
.btn-primary:hover,
|
||||
.btn-primary:focus {
|
||||
background-color: #265a88;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
.btn-primary:active,
|
||||
.btn-primary.active {
|
||||
background-color: #265a88;
|
||||
border-color: #245580;
|
||||
}
|
||||
.btn-primary.disabled,
|
||||
.btn-primary[disabled],
|
||||
fieldset[disabled] .btn-primary,
|
||||
.btn-primary.disabled:hover,
|
||||
.btn-primary[disabled]:hover,
|
||||
fieldset[disabled] .btn-primary:hover,
|
||||
.btn-primary.disabled:focus,
|
||||
.btn-primary[disabled]:focus,
|
||||
fieldset[disabled] .btn-primary:focus,
|
||||
.btn-primary.disabled.focus,
|
||||
.btn-primary[disabled].focus,
|
||||
fieldset[disabled] .btn-primary.focus,
|
||||
.btn-primary.disabled:active,
|
||||
.btn-primary[disabled]:active,
|
||||
fieldset[disabled] .btn-primary:active,
|
||||
.btn-primary.disabled.active,
|
||||
.btn-primary[disabled].active,
|
||||
fieldset[disabled] .btn-primary.active {
|
||||
background-color: #265a88;
|
||||
background-image: none;
|
||||
}
|
||||
.btn-success {
|
||||
background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);
|
||||
background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641));
|
||||
background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #3e8f3e;
|
||||
}
|
||||
.btn-success:hover,
|
||||
.btn-success:focus {
|
||||
background-color: #419641;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
.btn-success:active,
|
||||
.btn-success.active {
|
||||
background-color: #419641;
|
||||
border-color: #3e8f3e;
|
||||
}
|
||||
.btn-success.disabled,
|
||||
.btn-success[disabled],
|
||||
fieldset[disabled] .btn-success,
|
||||
.btn-success.disabled:hover,
|
||||
.btn-success[disabled]:hover,
|
||||
fieldset[disabled] .btn-success:hover,
|
||||
.btn-success.disabled:focus,
|
||||
.btn-success[disabled]:focus,
|
||||
fieldset[disabled] .btn-success:focus,
|
||||
.btn-success.disabled.focus,
|
||||
.btn-success[disabled].focus,
|
||||
fieldset[disabled] .btn-success.focus,
|
||||
.btn-success.disabled:active,
|
||||
.btn-success[disabled]:active,
|
||||
fieldset[disabled] .btn-success:active,
|
||||
.btn-success.disabled.active,
|
||||
.btn-success[disabled].active,
|
||||
fieldset[disabled] .btn-success.active {
|
||||
background-color: #419641;
|
||||
background-image: none;
|
||||
}
|
||||
.btn-info {
|
||||
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
|
||||
background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2));
|
||||
background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #28a4c9;
|
||||
}
|
||||
.btn-info:hover,
|
||||
.btn-info:focus {
|
||||
background-color: #2aabd2;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
.btn-info:active,
|
||||
.btn-info.active {
|
||||
background-color: #2aabd2;
|
||||
border-color: #28a4c9;
|
||||
}
|
||||
.btn-info.disabled,
|
||||
.btn-info[disabled],
|
||||
fieldset[disabled] .btn-info,
|
||||
.btn-info.disabled:hover,
|
||||
.btn-info[disabled]:hover,
|
||||
fieldset[disabled] .btn-info:hover,
|
||||
.btn-info.disabled:focus,
|
||||
.btn-info[disabled]:focus,
|
||||
fieldset[disabled] .btn-info:focus,
|
||||
.btn-info.disabled.focus,
|
||||
.btn-info[disabled].focus,
|
||||
fieldset[disabled] .btn-info.focus,
|
||||
.btn-info.disabled:active,
|
||||
.btn-info[disabled]:active,
|
||||
fieldset[disabled] .btn-info:active,
|
||||
.btn-info.disabled.active,
|
||||
.btn-info[disabled].active,
|
||||
fieldset[disabled] .btn-info.active {
|
||||
background-color: #2aabd2;
|
||||
background-image: none;
|
||||
}
|
||||
.btn-warning {
|
||||
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
|
||||
background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316));
|
||||
background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #e38d13;
|
||||
}
|
||||
.btn-warning:hover,
|
||||
.btn-warning:focus {
|
||||
background-color: #eb9316;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
.btn-warning:active,
|
||||
.btn-warning.active {
|
||||
background-color: #eb9316;
|
||||
border-color: #e38d13;
|
||||
}
|
||||
.btn-warning.disabled,
|
||||
.btn-warning[disabled],
|
||||
fieldset[disabled] .btn-warning,
|
||||
.btn-warning.disabled:hover,
|
||||
.btn-warning[disabled]:hover,
|
||||
fieldset[disabled] .btn-warning:hover,
|
||||
.btn-warning.disabled:focus,
|
||||
.btn-warning[disabled]:focus,
|
||||
fieldset[disabled] .btn-warning:focus,
|
||||
.btn-warning.disabled.focus,
|
||||
.btn-warning[disabled].focus,
|
||||
fieldset[disabled] .btn-warning.focus,
|
||||
.btn-warning.disabled:active,
|
||||
.btn-warning[disabled]:active,
|
||||
fieldset[disabled] .btn-warning:active,
|
||||
.btn-warning.disabled.active,
|
||||
.btn-warning[disabled].active,
|
||||
fieldset[disabled] .btn-warning.active {
|
||||
background-color: #eb9316;
|
||||
background-image: none;
|
||||
}
|
||||
.btn-danger {
|
||||
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
|
||||
background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a));
|
||||
background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #b92c28;
|
||||
}
|
||||
.btn-danger:hover,
|
||||
.btn-danger:focus {
|
||||
background-color: #c12e2a;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
.btn-danger:active,
|
||||
.btn-danger.active {
|
||||
background-color: #c12e2a;
|
||||
border-color: #b92c28;
|
||||
}
|
||||
.btn-danger.disabled,
|
||||
.btn-danger[disabled],
|
||||
fieldset[disabled] .btn-danger,
|
||||
.btn-danger.disabled:hover,
|
||||
.btn-danger[disabled]:hover,
|
||||
fieldset[disabled] .btn-danger:hover,
|
||||
.btn-danger.disabled:focus,
|
||||
.btn-danger[disabled]:focus,
|
||||
fieldset[disabled] .btn-danger:focus,
|
||||
.btn-danger.disabled.focus,
|
||||
.btn-danger[disabled].focus,
|
||||
fieldset[disabled] .btn-danger.focus,
|
||||
.btn-danger.disabled:active,
|
||||
.btn-danger[disabled]:active,
|
||||
fieldset[disabled] .btn-danger:active,
|
||||
.btn-danger.disabled.active,
|
||||
.btn-danger[disabled].active,
|
||||
fieldset[disabled] .btn-danger.active {
|
||||
background-color: #c12e2a;
|
||||
background-image: none;
|
||||
}
|
||||
.thumbnail,
|
||||
.img-thumbnail {
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
|
||||
}
|
||||
.dropdown-menu > li > a:hover,
|
||||
.dropdown-menu > li > a:focus {
|
||||
background-color: #e8e8e8;
|
||||
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
||||
background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
|
||||
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.dropdown-menu > .active > a,
|
||||
.dropdown-menu > .active > a:hover,
|
||||
.dropdown-menu > .active > a:focus {
|
||||
background-color: #2e6da4;
|
||||
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
|
||||
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.navbar-default {
|
||||
background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%);
|
||||
background-image: -o-linear-gradient(top, #fff 0%, #f8f8f8 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f8f8f8));
|
||||
background-image: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
background-repeat: repeat-x;
|
||||
border-radius: 4px;
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
|
||||
}
|
||||
.navbar-default .navbar-nav > .open > a,
|
||||
.navbar-default .navbar-nav > .active > a {
|
||||
background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
|
||||
background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2));
|
||||
background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
|
||||
box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
|
||||
}
|
||||
.navbar-brand,
|
||||
.navbar-nav > li > a {
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, .25);
|
||||
}
|
||||
.navbar-inverse {
|
||||
background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%);
|
||||
background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222));
|
||||
background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
background-repeat: repeat-x;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.navbar-inverse .navbar-nav > .open > a,
|
||||
.navbar-inverse .navbar-nav > .active > a {
|
||||
background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%);
|
||||
background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#080808), to(#0f0f0f));
|
||||
background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
|
||||
box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
|
||||
}
|
||||
.navbar-inverse .navbar-brand,
|
||||
.navbar-inverse .navbar-nav > li > a {
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, .25);
|
||||
}
|
||||
.navbar-static-top,
|
||||
.navbar-fixed-top,
|
||||
.navbar-fixed-bottom {
|
||||
border-radius: 0;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.navbar .navbar-nav .open .dropdown-menu > .active > a,
|
||||
.navbar .navbar-nav .open .dropdown-menu > .active > a:hover,
|
||||
.navbar .navbar-nav .open .dropdown-menu > .active > a:focus {
|
||||
color: #fff;
|
||||
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
|
||||
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
}
|
||||
.alert {
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, .2);
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
|
||||
}
|
||||
.alert-success {
|
||||
background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
|
||||
background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc));
|
||||
background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #b2dba1;
|
||||
}
|
||||
.alert-info {
|
||||
background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
|
||||
background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0));
|
||||
background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #9acfea;
|
||||
}
|
||||
.alert-warning {
|
||||
background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
|
||||
background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0));
|
||||
background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #f5e79e;
|
||||
}
|
||||
.alert-danger {
|
||||
background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
|
||||
background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3));
|
||||
background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #dca7a7;
|
||||
}
|
||||
.progress {
|
||||
background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
|
||||
background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5));
|
||||
background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.progress-bar {
|
||||
background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%);
|
||||
background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#286090));
|
||||
background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.progress-bar-success {
|
||||
background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);
|
||||
background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44));
|
||||
background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.progress-bar-info {
|
||||
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
|
||||
background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5));
|
||||
background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.progress-bar-warning {
|
||||
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
|
||||
background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f));
|
||||
background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.progress-bar-danger {
|
||||
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);
|
||||
background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c));
|
||||
background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.progress-bar-striped {
|
||||
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
|
||||
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
|
||||
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
|
||||
}
|
||||
.list-group {
|
||||
border-radius: 4px;
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
|
||||
}
|
||||
.list-group-item.active,
|
||||
.list-group-item.active:hover,
|
||||
.list-group-item.active:focus {
|
||||
text-shadow: 0 -1px 0 #286090;
|
||||
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%);
|
||||
background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2b669a));
|
||||
background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #2b669a;
|
||||
}
|
||||
.list-group-item.active .badge,
|
||||
.list-group-item.active:hover .badge,
|
||||
.list-group-item.active:focus .badge {
|
||||
text-shadow: none;
|
||||
}
|
||||
.panel {
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
|
||||
}
|
||||
.panel-default > .panel-heading {
|
||||
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
||||
background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
|
||||
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.panel-primary > .panel-heading {
|
||||
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
|
||||
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.panel-success > .panel-heading {
|
||||
background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
|
||||
background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6));
|
||||
background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.panel-info > .panel-heading {
|
||||
background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
|
||||
background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3));
|
||||
background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.panel-warning > .panel-heading {
|
||||
background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
|
||||
background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc));
|
||||
background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.panel-danger > .panel-heading {
|
||||
background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
|
||||
background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc));
|
||||
background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.well {
|
||||
background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
|
||||
background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5));
|
||||
background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #dcdcdc;
|
||||
-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
|
||||
box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
|
||||
}
|
||||
/*# sourceMappingURL=bootstrap-theme.css.map */
|
After Width: | Height: | Size: 106 KiB |
@ -0,0 +1,14 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Insert title here</title>
|
||||
</head>
|
||||
<body>
|
||||
<%
|
||||
response.sendRedirect("./reader/04readerFrame.jsp");
|
||||
%>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,762 @@
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
|
||||
(global = global || self, factory(global.jQuery));
|
||||
}(this, (function ($) { 'use strict';
|
||||
|
||||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
|
||||
|
||||
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
||||
|
||||
function createCommonjsModule(fn, module) {
|
||||
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
||||
}
|
||||
|
||||
var check = function (it) {
|
||||
return it && it.Math == Math && it;
|
||||
};
|
||||
|
||||
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
||||
var global_1 =
|
||||
// eslint-disable-next-line no-undef
|
||||
check(typeof globalThis == 'object' && globalThis) ||
|
||||
check(typeof window == 'object' && window) ||
|
||||
check(typeof self == 'object' && self) ||
|
||||
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
||||
// eslint-disable-next-line no-new-func
|
||||
Function('return this')();
|
||||
|
||||
var fails = function (exec) {
|
||||
try {
|
||||
return !!exec();
|
||||
} catch (error) {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
// Thank's IE8 for his funny defineProperty
|
||||
var descriptors = !fails(function () {
|
||||
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
|
||||
});
|
||||
|
||||
var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
|
||||
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
||||
|
||||
// Nashorn ~ JDK8 bug
|
||||
var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
|
||||
|
||||
// `Object.prototype.propertyIsEnumerable` method implementation
|
||||
// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
|
||||
var f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
||||
var descriptor = getOwnPropertyDescriptor(this, V);
|
||||
return !!descriptor && descriptor.enumerable;
|
||||
} : nativePropertyIsEnumerable;
|
||||
|
||||
var objectPropertyIsEnumerable = {
|
||||
f: f
|
||||
};
|
||||
|
||||
var createPropertyDescriptor = function (bitmap, value) {
|
||||
return {
|
||||
enumerable: !(bitmap & 1),
|
||||
configurable: !(bitmap & 2),
|
||||
writable: !(bitmap & 4),
|
||||
value: value
|
||||
};
|
||||
};
|
||||
|
||||
var toString = {}.toString;
|
||||
|
||||
var classofRaw = function (it) {
|
||||
return toString.call(it).slice(8, -1);
|
||||
};
|
||||
|
||||
var split = ''.split;
|
||||
|
||||
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
||||
var indexedObject = fails(function () {
|
||||
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
||||
// eslint-disable-next-line no-prototype-builtins
|
||||
return !Object('z').propertyIsEnumerable(0);
|
||||
}) ? function (it) {
|
||||
return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
|
||||
} : Object;
|
||||
|
||||
// `RequireObjectCoercible` abstract operation
|
||||
// https://tc39.github.io/ecma262/#sec-requireobjectcoercible
|
||||
var requireObjectCoercible = function (it) {
|
||||
if (it == undefined) throw TypeError("Can't call method on " + it);
|
||||
return it;
|
||||
};
|
||||
|
||||
// toObject with fallback for non-array-like ES3 strings
|
||||
|
||||
|
||||
|
||||
var toIndexedObject = function (it) {
|
||||
return indexedObject(requireObjectCoercible(it));
|
||||
};
|
||||
|
||||
var isObject = function (it) {
|
||||
return typeof it === 'object' ? it !== null : typeof it === 'function';
|
||||
};
|
||||
|
||||
// `ToPrimitive` abstract operation
|
||||
// https://tc39.github.io/ecma262/#sec-toprimitive
|
||||
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
||||
// and the second argument - flag - preferred type is a string
|
||||
var toPrimitive = function (input, PREFERRED_STRING) {
|
||||
if (!isObject(input)) return input;
|
||||
var fn, val;
|
||||
if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
|
||||
if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
|
||||
if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
|
||||
throw TypeError("Can't convert object to primitive value");
|
||||
};
|
||||
|
||||
var hasOwnProperty = {}.hasOwnProperty;
|
||||
|
||||
var has = function (it, key) {
|
||||
return hasOwnProperty.call(it, key);
|
||||
};
|
||||
|
||||
var document = global_1.document;
|
||||
// typeof document.createElement is 'object' in old IE
|
||||
var EXISTS = isObject(document) && isObject(document.createElement);
|
||||
|
||||
var documentCreateElement = function (it) {
|
||||
return EXISTS ? document.createElement(it) : {};
|
||||
};
|
||||
|
||||
// Thank's IE8 for his funny defineProperty
|
||||
var ie8DomDefine = !descriptors && !fails(function () {
|
||||
return Object.defineProperty(documentCreateElement('div'), 'a', {
|
||||
get: function () { return 7; }
|
||||
}).a != 7;
|
||||
});
|
||||
|
||||
var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
||||
|
||||
// `Object.getOwnPropertyDescriptor` method
|
||||
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
|
||||
var f$1 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
||||
O = toIndexedObject(O);
|
||||
P = toPrimitive(P, true);
|
||||
if (ie8DomDefine) try {
|
||||
return nativeGetOwnPropertyDescriptor(O, P);
|
||||
} catch (error) { /* empty */ }
|
||||
if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
|
||||
};
|
||||
|
||||
var objectGetOwnPropertyDescriptor = {
|
||||
f: f$1
|
||||
};
|
||||
|
||||
var anObject = function (it) {
|
||||
if (!isObject(it)) {
|
||||
throw TypeError(String(it) + ' is not an object');
|
||||
} return it;
|
||||
};
|
||||
|
||||
var nativeDefineProperty = Object.defineProperty;
|
||||
|
||||
// `Object.defineProperty` method
|
||||
// https://tc39.github.io/ecma262/#sec-object.defineproperty
|
||||
var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
|
||||
anObject(O);
|
||||
P = toPrimitive(P, true);
|
||||
anObject(Attributes);
|
||||
if (ie8DomDefine) try {
|
||||
return nativeDefineProperty(O, P, Attributes);
|
||||
} catch (error) { /* empty */ }
|
||||
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
|
||||
if ('value' in Attributes) O[P] = Attributes.value;
|
||||
return O;
|
||||
};
|
||||
|
||||
var objectDefineProperty = {
|
||||
f: f$2
|
||||
};
|
||||
|
||||
var createNonEnumerableProperty = descriptors ? function (object, key, value) {
|
||||
return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
|
||||
} : function (object, key, value) {
|
||||
object[key] = value;
|
||||
return object;
|
||||
};
|
||||
|
||||
var setGlobal = function (key, value) {
|
||||
try {
|
||||
createNonEnumerableProperty(global_1, key, value);
|
||||
} catch (error) {
|
||||
global_1[key] = value;
|
||||
} return value;
|
||||
};
|
||||
|
||||
var SHARED = '__core-js_shared__';
|
||||
var store = global_1[SHARED] || setGlobal(SHARED, {});
|
||||
|
||||
var sharedStore = store;
|
||||
|
||||
var functionToString = Function.toString;
|
||||
|
||||
// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
|
||||
if (typeof sharedStore.inspectSource != 'function') {
|
||||
sharedStore.inspectSource = function (it) {
|
||||
return functionToString.call(it);
|
||||
};
|
||||
}
|
||||
|
||||
var inspectSource = sharedStore.inspectSource;
|
||||
|
||||
var WeakMap = global_1.WeakMap;
|
||||
|
||||
var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
|
||||
|
||||
var shared = createCommonjsModule(function (module) {
|
||||
(module.exports = function (key, value) {
|
||||
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
||||
})('versions', []).push({
|
||||
version: '3.6.0',
|
||||
mode: 'global',
|
||||
copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
|
||||
});
|
||||
});
|
||||
|
||||
var id = 0;
|
||||
var postfix = Math.random();
|
||||
|
||||
var uid = function (key) {
|
||||
return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
|
||||
};
|
||||
|
||||
var keys = shared('keys');
|
||||
|
||||
var sharedKey = function (key) {
|
||||
return keys[key] || (keys[key] = uid(key));
|
||||
};
|
||||
|
||||
var hiddenKeys = {};
|
||||
|
||||
var WeakMap$1 = global_1.WeakMap;
|
||||
var set, get, has$1;
|
||||
|
||||
var enforce = function (it) {
|
||||
return has$1(it) ? get(it) : set(it, {});
|
||||
};
|
||||
|
||||
var getterFor = function (TYPE) {
|
||||
return function (it) {
|
||||
var state;
|
||||
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
||||
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
|
||||
} return state;
|
||||
};
|
||||
};
|
||||
|
||||
if (nativeWeakMap) {
|
||||
var store$1 = new WeakMap$1();
|
||||
var wmget = store$1.get;
|
||||
var wmhas = store$1.has;
|
||||
var wmset = store$1.set;
|
||||
set = function (it, metadata) {
|
||||
wmset.call(store$1, it, metadata);
|
||||
return metadata;
|
||||
};
|
||||
get = function (it) {
|
||||
return wmget.call(store$1, it) || {};
|
||||
};
|
||||
has$1 = function (it) {
|
||||
return wmhas.call(store$1, it);
|
||||
};
|
||||
} else {
|
||||
var STATE = sharedKey('state');
|
||||
hiddenKeys[STATE] = true;
|
||||
set = function (it, metadata) {
|
||||
createNonEnumerableProperty(it, STATE, metadata);
|
||||
return metadata;
|
||||
};
|
||||
get = function (it) {
|
||||
return has(it, STATE) ? it[STATE] : {};
|
||||
};
|
||||
has$1 = function (it) {
|
||||
return has(it, STATE);
|
||||
};
|
||||
}
|
||||
|
||||
var internalState = {
|
||||
set: set,
|
||||
get: get,
|
||||
has: has$1,
|
||||
enforce: enforce,
|
||||
getterFor: getterFor
|
||||
};
|
||||
|
||||
var redefine = createCommonjsModule(function (module) {
|
||||
var getInternalState = internalState.get;
|
||||
var enforceInternalState = internalState.enforce;
|
||||
var TEMPLATE = String(String).split('String');
|
||||
|
||||
(module.exports = function (O, key, value, options) {
|
||||
var unsafe = options ? !!options.unsafe : false;
|
||||
var simple = options ? !!options.enumerable : false;
|
||||
var noTargetGet = options ? !!options.noTargetGet : false;
|
||||
if (typeof value == 'function') {
|
||||
if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);
|
||||
enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
|
||||
}
|
||||
if (O === global_1) {
|
||||
if (simple) O[key] = value;
|
||||
else setGlobal(key, value);
|
||||
return;
|
||||
} else if (!unsafe) {
|
||||
delete O[key];
|
||||
} else if (!noTargetGet && O[key]) {
|
||||
simple = true;
|
||||
}
|
||||
if (simple) O[key] = value;
|
||||
else createNonEnumerableProperty(O, key, value);
|
||||
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
||||
})(Function.prototype, 'toString', function toString() {
|
||||
return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
|
||||
});
|
||||
});
|
||||
|
||||
var path = global_1;
|
||||
|
||||
var aFunction = function (variable) {
|
||||
return typeof variable == 'function' ? variable : undefined;
|
||||
};
|
||||
|
||||
var getBuiltIn = function (namespace, method) {
|
||||
return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace])
|
||||
: path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];
|
||||
};
|
||||
|
||||
var ceil = Math.ceil;
|
||||
var floor = Math.floor;
|
||||
|
||||
// `ToInteger` abstract operation
|
||||
// https://tc39.github.io/ecma262/#sec-tointeger
|
||||
var toInteger = function (argument) {
|
||||
return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
|
||||
};
|
||||
|
||||
var min = Math.min;
|
||||
|
||||
// `ToLength` abstract operation
|
||||
// https://tc39.github.io/ecma262/#sec-tolength
|
||||
var toLength = function (argument) {
|
||||
return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
||||
};
|
||||
|
||||
var max = Math.max;
|
||||
var min$1 = Math.min;
|
||||
|
||||
// Helper for a popular repeating case of the spec:
|
||||
// Let integer be ? ToInteger(index).
|
||||
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
||||
var toAbsoluteIndex = function (index, length) {
|
||||
var integer = toInteger(index);
|
||||
return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
|
||||
};
|
||||
|
||||
// `Array.prototype.{ indexOf, includes }` methods implementation
|
||||
var createMethod = function (IS_INCLUDES) {
|
||||
return function ($this, el, fromIndex) {
|
||||
var O = toIndexedObject($this);
|
||||
var length = toLength(O.length);
|
||||
var index = toAbsoluteIndex(fromIndex, length);
|
||||
var value;
|
||||
// Array#includes uses SameValueZero equality algorithm
|
||||
// eslint-disable-next-line no-self-compare
|
||||
if (IS_INCLUDES && el != el) while (length > index) {
|
||||
value = O[index++];
|
||||
// eslint-disable-next-line no-self-compare
|
||||
if (value != value) return true;
|
||||
// Array#indexOf ignores holes, Array#includes - not
|
||||
} else for (;length > index; index++) {
|
||||
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
||||
} return !IS_INCLUDES && -1;
|
||||
};
|
||||
};
|
||||
|
||||
var arrayIncludes = {
|
||||
// `Array.prototype.includes` method
|
||||
// https://tc39.github.io/ecma262/#sec-array.prototype.includes
|
||||
includes: createMethod(true),
|
||||
// `Array.prototype.indexOf` method
|
||||
// https://tc39.github.io/ecma262/#sec-array.prototype.indexof
|
||||
indexOf: createMethod(false)
|
||||
};
|
||||
|
||||
var indexOf = arrayIncludes.indexOf;
|
||||
|
||||
|
||||
var objectKeysInternal = function (object, names) {
|
||||
var O = toIndexedObject(object);
|
||||
var i = 0;
|
||||
var result = [];
|
||||
var key;
|
||||
for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
|
||||
// Don't enum bug & hidden keys
|
||||
while (names.length > i) if (has(O, key = names[i++])) {
|
||||
~indexOf(result, key) || result.push(key);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
// IE8- don't enum bug keys
|
||||
var enumBugKeys = [
|
||||
'constructor',
|
||||
'hasOwnProperty',
|
||||
'isPrototypeOf',
|
||||
'propertyIsEnumerable',
|
||||
'toLocaleString',
|
||||
'toString',
|
||||
'valueOf'
|
||||
];
|
||||
|
||||
var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
|
||||
|
||||
// `Object.getOwnPropertyNames` method
|
||||
// https://tc39.github.io/ecma262/#sec-object.getownpropertynames
|
||||
var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
||||
return objectKeysInternal(O, hiddenKeys$1);
|
||||
};
|
||||
|
||||
var objectGetOwnPropertyNames = {
|
||||
f: f$3
|
||||
};
|
||||
|
||||
var f$4 = Object.getOwnPropertySymbols;
|
||||
|
||||
var objectGetOwnPropertySymbols = {
|
||||
f: f$4
|
||||
};
|
||||
|
||||
// all object keys, includes non-enumerable and symbols
|
||||
var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
||||
var keys = objectGetOwnPropertyNames.f(anObject(it));
|
||||
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
|
||||
return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
|
||||
};
|
||||
|
||||
var copyConstructorProperties = function (target, source) {
|
||||
var keys = ownKeys(source);
|
||||
var defineProperty = objectDefineProperty.f;
|
||||
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
var key = keys[i];
|
||||
if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
||||
}
|
||||
};
|
||||
|
||||
var replacement = /#|\.prototype\./;
|
||||
|
||||
var isForced = function (feature, detection) {
|
||||
var value = data[normalize(feature)];
|
||||
return value == POLYFILL ? true
|
||||
: value == NATIVE ? false
|
||||
: typeof detection == 'function' ? fails(detection)
|
||||
: !!detection;
|
||||
};
|
||||
|
||||
var normalize = isForced.normalize = function (string) {
|
||||
return String(string).replace(replacement, '.').toLowerCase();
|
||||
};
|
||||
|
||||
var data = isForced.data = {};
|
||||
var NATIVE = isForced.NATIVE = 'N';
|
||||
var POLYFILL = isForced.POLYFILL = 'P';
|
||||
|
||||
var isForced_1 = isForced;
|
||||
|
||||
var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
options.target - name of the target object
|
||||
options.global - target is the global object
|
||||
options.stat - export as static methods of target
|
||||
options.proto - export as prototype methods of target
|
||||
options.real - real prototype method for the `pure` version
|
||||
options.forced - export even if the native feature is available
|
||||
options.bind - bind methods to the target, required for the `pure` version
|
||||
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
||||
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
||||
options.sham - add a flag to not completely full polyfills
|
||||
options.enumerable - export as enumerable property
|
||||
options.noTargetGet - prevent calling a getter on target
|
||||
*/
|
||||
var _export = function (options, source) {
|
||||
var TARGET = options.target;
|
||||
var GLOBAL = options.global;
|
||||
var STATIC = options.stat;
|
||||
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
||||
if (GLOBAL) {
|
||||
target = global_1;
|
||||
} else if (STATIC) {
|
||||
target = global_1[TARGET] || setGlobal(TARGET, {});
|
||||
} else {
|
||||
target = (global_1[TARGET] || {}).prototype;
|
||||
}
|
||||
if (target) for (key in source) {
|
||||
sourceProperty = source[key];
|
||||
if (options.noTargetGet) {
|
||||
descriptor = getOwnPropertyDescriptor$1(target, key);
|
||||
targetProperty = descriptor && descriptor.value;
|
||||
} else targetProperty = target[key];
|
||||
FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
||||
// contained in target
|
||||
if (!FORCED && targetProperty !== undefined) {
|
||||
if (typeof sourceProperty === typeof targetProperty) continue;
|
||||
copyConstructorProperties(sourceProperty, targetProperty);
|
||||
}
|
||||
// add a flag to not completely full polyfills
|
||||
if (options.sham || (targetProperty && targetProperty.sham)) {
|
||||
createNonEnumerableProperty(sourceProperty, 'sham', true);
|
||||
}
|
||||
// extend global
|
||||
redefine(target, key, sourceProperty, options);
|
||||
}
|
||||
};
|
||||
|
||||
// `IsArray` abstract operation
|
||||
// https://tc39.github.io/ecma262/#sec-isarray
|
||||
var isArray = Array.isArray || function isArray(arg) {
|
||||
return classofRaw(arg) == 'Array';
|
||||
};
|
||||
|
||||
// `ToObject` abstract operation
|
||||
// https://tc39.github.io/ecma262/#sec-toobject
|
||||
var toObject = function (argument) {
|
||||
return Object(requireObjectCoercible(argument));
|
||||
};
|
||||
|
||||
var createProperty = function (object, key, value) {
|
||||
var propertyKey = toPrimitive(key);
|
||||
if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
|
||||
else object[propertyKey] = value;
|
||||
};
|
||||
|
||||
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
||||
// Chrome 38 Symbol has incorrect toString conversion
|
||||
// eslint-disable-next-line no-undef
|
||||
return !String(Symbol());
|
||||
});
|
||||
|
||||
var useSymbolAsUid = nativeSymbol
|
||||
// eslint-disable-next-line no-undef
|
||||
&& !Symbol.sham
|
||||
// eslint-disable-next-line no-undef
|
||||
&& typeof Symbol() == 'symbol';
|
||||
|
||||
var WellKnownSymbolsStore = shared('wks');
|
||||
var Symbol$1 = global_1.Symbol;
|
||||
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : uid;
|
||||
|
||||
var wellKnownSymbol = function (name) {
|
||||
if (!has(WellKnownSymbolsStore, name)) {
|
||||
if (nativeSymbol && has(Symbol$1, name)) WellKnownSymbolsStore[name] = Symbol$1[name];
|
||||
else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
|
||||
} return WellKnownSymbolsStore[name];
|
||||
};
|
||||
|
||||
var SPECIES = wellKnownSymbol('species');
|
||||
|
||||
// `ArraySpeciesCreate` abstract operation
|
||||
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
|
||||
var arraySpeciesCreate = function (originalArray, length) {
|
||||
var C;
|
||||
if (isArray(originalArray)) {
|
||||
C = originalArray.constructor;
|
||||
// cross-realm fallback
|
||||
if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
|
||||
else if (isObject(C)) {
|
||||
C = C[SPECIES];
|
||||
if (C === null) C = undefined;
|
||||
}
|
||||
} return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
|
||||
};
|
||||
|
||||
var userAgent = getBuiltIn('navigator', 'userAgent') || '';
|
||||
|
||||
var process = global_1.process;
|
||||
var versions = process && process.versions;
|
||||
var v8 = versions && versions.v8;
|
||||
var match, version;
|
||||
|
||||
if (v8) {
|
||||
match = v8.split('.');
|
||||
version = match[0] + match[1];
|
||||
} else if (userAgent) {
|
||||
match = userAgent.match(/Edge\/(\d+)/);
|
||||
if (!match || match[1] >= 74) {
|
||||
match = userAgent.match(/Chrome\/(\d+)/);
|
||||
if (match) version = match[1];
|
||||
}
|
||||
}
|
||||
|
||||
var v8Version = version && +version;
|
||||
|
||||
var SPECIES$1 = wellKnownSymbol('species');
|
||||
|
||||
var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
|
||||
// We can't use this feature detection in V8 since it causes
|
||||
// deoptimization and serious performance degradation
|
||||
// https://github.com/zloirock/core-js/issues/677
|
||||
return v8Version >= 51 || !fails(function () {
|
||||
var array = [];
|
||||
var constructor = array.constructor = {};
|
||||
constructor[SPECIES$1] = function () {
|
||||
return { foo: 1 };
|
||||
};
|
||||
return array[METHOD_NAME](Boolean).foo !== 1;
|
||||
});
|
||||
};
|
||||
|
||||
var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
|
||||
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
|
||||
var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
|
||||
|
||||
// We can't use this feature detection in V8 since it causes
|
||||
// deoptimization and serious performance degradation
|
||||
// https://github.com/zloirock/core-js/issues/679
|
||||
var IS_CONCAT_SPREADABLE_SUPPORT = v8Version >= 51 || !fails(function () {
|
||||
var array = [];
|
||||
array[IS_CONCAT_SPREADABLE] = false;
|
||||
return array.concat()[0] !== array;
|
||||
});
|
||||
|
||||
var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
|
||||
|
||||
var isConcatSpreadable = function (O) {
|
||||
if (!isObject(O)) return false;
|
||||
var spreadable = O[IS_CONCAT_SPREADABLE];
|
||||
return spreadable !== undefined ? !!spreadable : isArray(O);
|
||||
};
|
||||
|
||||
var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
|
||||
|
||||
// `Array.prototype.concat` method
|
||||
// https://tc39.github.io/ecma262/#sec-array.prototype.concat
|
||||
// with adding support of @@isConcatSpreadable and @@species
|
||||
_export({ target: 'Array', proto: true, forced: FORCED }, {
|
||||
concat: function concat(arg) { // eslint-disable-line no-unused-vars
|
||||
var O = toObject(this);
|
||||
var A = arraySpeciesCreate(O, 0);
|
||||
var n = 0;
|
||||
var i, k, length, len, E;
|
||||
for (i = -1, length = arguments.length; i < length; i++) {
|
||||
E = i === -1 ? O : arguments[i];
|
||||
if (isConcatSpreadable(E)) {
|
||||
len = toLength(E.length);
|
||||
if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
||||
for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
|
||||
} else {
|
||||
if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
||||
createProperty(A, n++, E);
|
||||
}
|
||||
}
|
||||
A.length = n;
|
||||
return A;
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Bootstrap Table Chinese translation
|
||||
* Author: Zhixin Wen<wenzhixin2010@gmail.com>
|
||||
*/
|
||||
|
||||
$.fn.bootstrapTable.locales['zh-CN'] = {
|
||||
formatLoadingMessage: function formatLoadingMessage() {
|
||||
return '正在努力地加载数据中,请稍候';
|
||||
},
|
||||
formatRecordsPerPage: function formatRecordsPerPage(pageNumber) {
|
||||
return "\u6BCF\u9875\u663E\u793A ".concat(pageNumber, " \u6761\u8BB0\u5F55");
|
||||
},
|
||||
formatShowingRows: function formatShowingRows(pageFrom, pageTo, totalRows, totalNotFiltered) {
|
||||
if (totalNotFiltered !== undefined && totalNotFiltered > 0 && totalNotFiltered > totalRows) {
|
||||
return "\u663E\u793A\u7B2C ".concat(pageFrom, " \u5230\u7B2C ").concat(pageTo, " \u6761\u8BB0\u5F55\uFF0C\u603B\u5171 ").concat(totalRows, " \u6761\u8BB0\u5F55\uFF08\u4ECE ").concat(totalNotFiltered, " \u603B\u8BB0\u5F55\u4E2D\u8FC7\u6EE4\uFF09");
|
||||
}
|
||||
|
||||
return "\u663E\u793A\u7B2C ".concat(pageFrom, " \u5230\u7B2C ").concat(pageTo, " \u6761\u8BB0\u5F55\uFF0C\u603B\u5171 ").concat(totalRows, " \u6761\u8BB0\u5F55");
|
||||
},
|
||||
formatSRPaginationPreText: function formatSRPaginationPreText() {
|
||||
return '上一页';
|
||||
},
|
||||
formatSRPaginationPageText: function formatSRPaginationPageText(page) {
|
||||
return "\u7B2C".concat(page, "\u9875");
|
||||
},
|
||||
formatSRPaginationNextText: function formatSRPaginationNextText() {
|
||||
return '下一页';
|
||||
},
|
||||
formatDetailPagination: function formatDetailPagination(totalRows) {
|
||||
return "\u603B\u5171 ".concat(totalRows, " \u6761\u8BB0\u5F55");
|
||||
},
|
||||
formatClearSearch: function formatClearSearch() {
|
||||
return '清空过滤';
|
||||
},
|
||||
formatSearch: function formatSearch() {
|
||||
return '搜索';
|
||||
},
|
||||
formatNoMatches: function formatNoMatches() {
|
||||
return '没有找到匹配的记录';
|
||||
},
|
||||
formatPaginationSwitch: function formatPaginationSwitch() {
|
||||
return '隐藏/显示分页';
|
||||
},
|
||||
formatPaginationSwitchDown: function formatPaginationSwitchDown() {
|
||||
return '显示分页';
|
||||
},
|
||||
formatPaginationSwitchUp: function formatPaginationSwitchUp() {
|
||||
return '隐藏分页';
|
||||
},
|
||||
formatRefresh: function formatRefresh() {
|
||||
return '刷新';
|
||||
},
|
||||
formatToggle: function formatToggle() {
|
||||
return '切换';
|
||||
},
|
||||
formatToggleOn: function formatToggleOn() {
|
||||
return '显示卡片视图';
|
||||
},
|
||||
formatToggleOff: function formatToggleOff() {
|
||||
return '隐藏卡片视图';
|
||||
},
|
||||
formatColumns: function formatColumns() {
|
||||
return '列';
|
||||
},
|
||||
formatColumnsToggleAll: function formatColumnsToggleAll() {
|
||||
return '切换所有';
|
||||
},
|
||||
formatFullscreen: function formatFullscreen() {
|
||||
return '全屏';
|
||||
},
|
||||
formatAllRows: function formatAllRows() {
|
||||
return '所有';
|
||||
},
|
||||
formatAutoRefresh: function formatAutoRefresh() {
|
||||
return '自动刷新';
|
||||
},
|
||||
formatExport: function formatExport() {
|
||||
return '导出数据';
|
||||
},
|
||||
formatJumpTo: function formatJumpTo() {
|
||||
return '跳转';
|
||||
},
|
||||
formatAdvancedSearch: function formatAdvancedSearch() {
|
||||
return '高级搜索';
|
||||
},
|
||||
formatAdvancedCloseButton: function formatAdvancedCloseButton() {
|
||||
return '关闭';
|
||||
}
|
||||
};
|
||||
$.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['zh-CN']);
|
||||
|
||||
})));
|
@ -0,0 +1,13 @@
|
||||
// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
|
||||
require('../../js/transition.js')
|
||||
require('../../js/alert.js')
|
||||
require('../../js/button.js')
|
||||
require('../../js/carousel.js')
|
||||
require('../../js/collapse.js')
|
||||
require('../../js/dropdown.js')
|
||||
require('../../js/modal.js')
|
||||
require('../../js/tooltip.js')
|
||||
require('../../js/popover.js')
|
||||
require('../../js/scrollspy.js')
|
||||
require('../../js/tab.js')
|
||||
require('../../js/affix.js')
|
@ -0,0 +1,67 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>图书管理员登录页面</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
|
||||
<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
||||
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
|
||||
<!-- 可选的 Bootstrap 主题文件(一般不用引入) -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="./public/css/animate.css">
|
||||
<link rel="stylesheet" href="./public/css/login.css" />
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="container main">
|
||||
<div id="login" class="contain animated fadeInDown">
|
||||
<h1>工作人员登录</h1>
|
||||
<form method="post">
|
||||
<input type="text" name="user" class="form-control my_input" placeholder="请输入账号" required="required">
|
||||
<input type="password" name="psw" class="form-control my_input" placeholder="请输入密码" required="required">
|
||||
<input type="submit" class="form-control" value="登录" onclick="javascript:void(0);">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div style="position:fixed; bottom:0; right:0;">
|
||||
<a href="reader/04readerFrame.jsp" target="_blank"><img src="public/image/reader.png" width="50px" height="50px"></a><br>
|
||||
<a href="adminLogin.html" target="_blank"><img src="public/image/admin.png" width="50px" height="50px"></a>
|
||||
</div>
|
||||
<script src="./public/js/layer/layer.js"></script>
|
||||
<script>
|
||||
$(function(){
|
||||
//登录
|
||||
$("input[type=submit]").click(function(){
|
||||
|
||||
$.ajax({
|
||||
url: "./managerLogin",
|
||||
type: "post",
|
||||
data: $("form").serialize(),
|
||||
dataType: "json",
|
||||
success: function( data ){
|
||||
if(data.code == 0){
|
||||
layer.msg("登录成功", {
|
||||
icon: 6,
|
||||
time: 1000
|
||||
}, function(){
|
||||
location.href = data.url;
|
||||
})
|
||||
}else{
|
||||
layer.open({
|
||||
title: "登录失败",
|
||||
content: data.msg,
|
||||
icon: 5,
|
||||
anim: 6
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
return false;
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,72 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>借阅者登录页面</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
|
||||
<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
||||
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
|
||||
<!-- 可选的 Bootstrap 主题文件(一般不用引入) -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="./public/css/animate.css">
|
||||
<link rel="stylesheet" href="./public/css/login.css" />
|
||||
<style>
|
||||
button:hover{
|
||||
background-color:#ffd6e7;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container main">
|
||||
<div id="login" class="contain animated fadeInDown">
|
||||
<h1>借阅者登录</h1>
|
||||
<form method="post">
|
||||
<input type="text" name="user" class="form-control my_input" placeholder="请输入账号" required="required">
|
||||
<input type="password" name="psw" class="form-control my_input" placeholder="请输入密码" required="required">
|
||||
<input type="submit" class="form-control" value="登录" onclick="javascript:void(0);">
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div style="position:fixed; bottom:0; right:0;">
|
||||
<a href="loginManager.html" target="_blank"><img src="public/image/manager.png" width="50px" height="50px"></a><br>
|
||||
<a href="adminLogin.html" target="_blank"><img src="public/image/admin.png" width="50px" height="50px"></a>
|
||||
</div>
|
||||
<script src="./public/js/layer/layer.js"></script>
|
||||
<script>
|
||||
$(function(){
|
||||
//登录
|
||||
$("input[type=submit]").click(function(){
|
||||
|
||||
$.ajax({
|
||||
url: "./readerLogin",
|
||||
type: "post",
|
||||
data: $("form").serialize(),
|
||||
dataType: "json",
|
||||
success: function( data ){
|
||||
if(data.code == 0){
|
||||
layer.msg("登录成功", {
|
||||
icon: 6,
|
||||
time: 1000
|
||||
}, function(){
|
||||
location.href = data.url;
|
||||
})
|
||||
}else{
|
||||
layer.open({
|
||||
title: "登录失败",
|
||||
content: data.msg,
|
||||
icon: 5,
|
||||
anim: 6
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
return false;
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,114 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Insert title here</title>
|
||||
<link rel="stylesheet" href="../public/layui/css/layui.css" media="all">
|
||||
<script src="../public/layui/layui.js"></script>
|
||||
<style>
|
||||
.layui-form-label{
|
||||
margin-left:20%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div align="center" style=" margin-top: 2%;"><h1>借阅图书</h1></div>
|
||||
<div align="center"
|
||||
style="margin-left:30%; margin-top: 5%; width: 40%;">
|
||||
|
||||
<form class="layui-form layui-form-pane" action="03borrowSus.jsp">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">借阅证号</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="userid" lay-verify="required"
|
||||
placeholder="请输入借阅证号" autocomplete="off" class="layui-input"><br>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">图书编号</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="bookid" lay-verify="required"
|
||||
placeholder="请输入图书编号" autocomplete="off" class="layui-input"><br>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">借阅日期</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="date1" id="date1" autocomplete="off"
|
||||
class="layui-input"><br>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="layui-form-item" align="center">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="demo2">借阅</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<script>
|
||||
layui
|
||||
.use(
|
||||
[ 'form', 'layedit', 'laydate' ],
|
||||
function() {
|
||||
var form = layui.form, layer = layui.layer, layedit = layui.layedit, laydate = layui.laydate;
|
||||
//日期
|
||||
laydate.render({
|
||||
elem : '#date1',
|
||||
type : 'datetime',
|
||||
format : 'yyyy-M-d H:m:s',
|
||||
value: new Date()
|
||||
});
|
||||
laydate.render({
|
||||
elem : '#date2',
|
||||
type : 'datetime',
|
||||
format : 'yyyy-M-d H:m:s'
|
||||
});
|
||||
|
||||
//创建一个编辑器
|
||||
var editIndex = layedit
|
||||
.build('LAY_demo_editor');
|
||||
|
||||
|
||||
//监听提交
|
||||
form.on('submit(demo1)', function(data) {
|
||||
layer.alert(JSON.stringify(data.field), {
|
||||
title : '最终的提交信息'
|
||||
})
|
||||
return false;
|
||||
});
|
||||
|
||||
//表单赋值
|
||||
layui.$('#LAY-component-form-setval').on(
|
||||
'click', function() {
|
||||
form.val('example', {
|
||||
"username" : "贤心" // "name": "value"
|
||||
,
|
||||
"password" : "123456",
|
||||
"interest" : 1,
|
||||
"like[write]" : true //复选框选中状态
|
||||
,
|
||||
"close" : true //开关状态
|
||||
,
|
||||
"sex" : "女",
|
||||
"desc" : "我爱 layui"
|
||||
});
|
||||
});
|
||||
|
||||
//表单取值
|
||||
layui.$('#LAY-component-form-getval').on(
|
||||
'click', function() {
|
||||
var data = form.val('example');
|
||||
alert(JSON.stringify(data));
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,163 @@
|
||||
<%@ page import="java.sql.*"%>
|
||||
<%@ page import="javabean.EndTime"%>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Insert title here</title>
|
||||
</head>
|
||||
<body>
|
||||
<jsp:useBean id="borrow" scope="session" class="javabean.JDBCBean"></jsp:useBean>
|
||||
<%
|
||||
String user = request.getParameter("userid");
|
||||
String book = request.getParameter("bookid");
|
||||
String date1 = request.getParameter("date1");
|
||||
|
||||
|
||||
//String date2 = request.getParameter("date2");
|
||||
String sql1 = "select * from borrow_card where ID =" + user;
|
||||
|
||||
ResultSet rs1 = borrow.executeQuery(sql1);
|
||||
|
||||
|
||||
if(session.getAttribute("manager")!=null){
|
||||
if (rs1.next()) {
|
||||
|
||||
String rule = rs1.getString("rule_id");
|
||||
int cardstatus = Integer.parseInt(rs1.getString("STATUS"));
|
||||
|
||||
String sql4="select*from rules where id = "+rule;
|
||||
ResultSet rs4 = borrow.executeQuery(sql4);
|
||||
int n =0;
|
||||
String library = "";
|
||||
String[] libraryArray = {};
|
||||
int num = 0;
|
||||
while(rs4.next()){
|
||||
n=rs4.getInt("limit_day");
|
||||
library = rs4.getString("borrow_library");
|
||||
libraryArray=library.split("、");
|
||||
num = rs4.getInt("borrow_num");
|
||||
}
|
||||
|
||||
EndTime endtime = new EndTime();
|
||||
String end = endtime.show(n);
|
||||
|
||||
if(cardstatus!=0){
|
||||
String sql2 = "select * from books where ID =" + book;
|
||||
ResultSet rs2 = borrow.executeQuery(sql2);
|
||||
|
||||
if(rs2.next()){
|
||||
|
||||
int status=Integer.parseInt(rs2.getString("STATUS"));
|
||||
String lib = Integer.toString(rs2.getInt("library_id"));
|
||||
for(int z=0;z<libraryArray.length;z++){
|
||||
//out.println(lib);
|
||||
//out.println(libraryArray[z]);
|
||||
if(libraryArray[z].equals(lib)){
|
||||
String countSql = "select count(*) as count from borrow_books where manager_id is null and card_id ="+ user;
|
||||
|
||||
ResultSet rsSql = borrow.executeQuery(countSql);
|
||||
int count=0;
|
||||
while(rsSql.next()){
|
||||
count = rsSql.getInt("count");
|
||||
}
|
||||
//out.println(count);
|
||||
if(count<num){
|
||||
if(status==1){
|
||||
String sql = "insert borrow_books(CARD_ID,BOOK_ID,BORROW_DATE,END_DATE)values('" + user + "','" + book
|
||||
+ "','" + date1 + "','" + end + "');";
|
||||
try {
|
||||
int i = borrow.executeUpdate(sql);
|
||||
if (i == 1) {
|
||||
%>
|
||||
<script>
|
||||
alert('借阅成功!');
|
||||
window.location.href = "02borrow.jsp";
|
||||
</script>
|
||||
|
||||
<%
|
||||
String sql3="update books set STATUS=0 where ID="+book;
|
||||
borrow.executeUpdate(sql3);
|
||||
|
||||
} else {
|
||||
%>
|
||||
<script>
|
||||
alert('借阅未成功!');
|
||||
window.location.href = "02borrow.jsp";
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
} catch (Exception e) {
|
||||
%>
|
||||
<script>
|
||||
alert('借阅未成功!');
|
||||
window.location.href = "02borrow.jsp";
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
}else{
|
||||
%>
|
||||
<script>
|
||||
alert('该图书已借出!');
|
||||
window.location.href = "02borrow.jsp";
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
}else{
|
||||
%>
|
||||
<script>
|
||||
alert('该用户已达到可借阅数量!若需还借书,请先还书!');
|
||||
window.location.href = "02borrow.jsp";
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
}
|
||||
if(z==libraryArray.length-1 && !libraryArray[z].equals(lib)){
|
||||
%>
|
||||
<script>
|
||||
alert('该图书未在可借阅的图书馆内!');
|
||||
window.location.href = "02borrow.jsp";
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
}
|
||||
|
||||
}else{
|
||||
%>
|
||||
<script>
|
||||
alert('该图书不存在!');
|
||||
window.location.href = "02borrow.jsp";
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
}else{
|
||||
%>
|
||||
<script>
|
||||
alert('借阅证已挂失!');
|
||||
window.location.href = "02borrow.jsp";
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
} else {
|
||||
%>
|
||||
<script>
|
||||
alert('用户不存在!');
|
||||
window.location.href = "02borrow.jsp";
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
}else{
|
||||
%>
|
||||
<script>
|
||||
alert('请先登录!');
|
||||
window.parent.location.href = "../loginManager.html";
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,95 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Insert title here</title>
|
||||
<link rel="stylesheet" href="../public/layui/css/layui.css" media="all">
|
||||
<script src="../public/layui/layui.js"></script>
|
||||
<style>
|
||||
.layui-form-label{
|
||||
margin-left:20%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div align="center" style=" margin-top: 2%;"><h1>查询图书是否逾期</h1></div>
|
||||
<div align="center"
|
||||
style="margin-left:30%; margin-top: 5%; width: 40%;">
|
||||
|
||||
<form class="layui-form layui-form-pane" action="04judgeSus.jsp">
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">图书编号</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="bookid" lay-verify="required"
|
||||
placeholder="请输入图书编号" autocomplete="off" class="layui-input"><br>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="layui-form-item" align="center">
|
||||
<button class="layui-btn layui-btn-warm" lay-submit="" lay-filter="demo2">查询</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<script>
|
||||
layui
|
||||
.use(
|
||||
[ 'form', 'layedit', 'laydate' ],
|
||||
function() {
|
||||
var form = layui.form, layer = layui.layer, layedit = layui.layedit, laydate = layui.laydate;
|
||||
//日期
|
||||
laydate.render({
|
||||
elem : '#date1',
|
||||
type : 'datetime',
|
||||
format : 'yyyy-M-d H:m:s',
|
||||
min:0,
|
||||
max:0,
|
||||
value: new Date()
|
||||
});
|
||||
|
||||
//创建一个编辑器
|
||||
var editIndex = layedit
|
||||
.build('LAY_demo_editor');
|
||||
|
||||
|
||||
//监听提交
|
||||
form.on('submit(demo1)', function(data) {
|
||||
layer.alert(JSON.stringify(data.field), {
|
||||
title : '最终的提交信息'
|
||||
})
|
||||
return false;
|
||||
});
|
||||
|
||||
//表单赋值
|
||||
layui.$('#LAY-component-form-setval').on(
|
||||
'click', function() {
|
||||
form.val('example', {
|
||||
"username" : "贤心" // "name": "value"
|
||||
,
|
||||
"password" : "123456",
|
||||
"interest" : 1,
|
||||
"like[write]" : true //复选框选中状态
|
||||
,
|
||||
"close" : true //开关状态
|
||||
,
|
||||
"sex" : "女",
|
||||
"desc" : "我爱 layui"
|
||||
});
|
||||
});
|
||||
|
||||
//表单取值
|
||||
layui.$('#LAY-component-form-getval').on(
|
||||
'click', function() {
|
||||
var data = form.val('example');
|
||||
alert(JSON.stringify(data));
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,80 @@
|
||||
<%@ page import="javabean.DateTime" %>
|
||||
<%@ page import="javabean.CompareDate" %>
|
||||
<%@ page import="java.sql.*" %>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Insert title here</title>
|
||||
</head>
|
||||
<body>
|
||||
<jsp:useBean id="judge" scope="session" class="javabean.JDBCBean"></jsp:useBean>
|
||||
<%
|
||||
|
||||
String book = request.getParameter("bookid");
|
||||
session.setAttribute("book", book);
|
||||
if(session.getAttribute("manager")!=null){
|
||||
DateTime date = new DateTime();
|
||||
String now = date.show();
|
||||
String bookid = request.getParameter("bookid");
|
||||
|
||||
String sql="select*from borrow_books where book_id = "+bookid;
|
||||
ResultSet rs = judge.executeQuery(sql);
|
||||
String end = "";
|
||||
String ret = "";
|
||||
String card = "";
|
||||
while (rs.next()) {
|
||||
end = rs.getString("end_date");
|
||||
ret = rs.getString("return_date");
|
||||
card = rs.getString("card_id");
|
||||
}
|
||||
if(ret==null){
|
||||
//CompareDate cd = new CompareDate();
|
||||
long n = CompareDate.show(now,end);
|
||||
//out.println(sql);
|
||||
//out.println(n);
|
||||
//out.println(end);
|
||||
//out.println(now);
|
||||
session.setAttribute("days", n);
|
||||
|
||||
String sql1="select*from borrow_card where id = "+card;
|
||||
ResultSet rs1 = judge.executeQuery(sql1);
|
||||
String rule = "";
|
||||
while (rs1.next()) {
|
||||
rule = rs1.getString("rule_id");
|
||||
}
|
||||
|
||||
String sql2="select*from rules where id = "+rule;
|
||||
ResultSet rs2 = judge.executeQuery(sql2);
|
||||
String fee = "";
|
||||
while (rs2.next()) {
|
||||
fee = rs2.getString("overtime_fee");
|
||||
}
|
||||
session.setAttribute("fee", fee);
|
||||
%>
|
||||
<script>
|
||||
window.location.href = "04return.jsp";
|
||||
</script>
|
||||
<%
|
||||
}else{
|
||||
%>
|
||||
<script>
|
||||
alert("该书未借出或不存在!");
|
||||
window.location.href = "04judge.jsp";
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
}else{
|
||||
%>
|
||||
<script>
|
||||
alert('请先登录!');
|
||||
window.parent.location.href = "../loginManager.html";
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
|
||||
%>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,168 @@
|
||||
<%@ page import="java.sql.*" %>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Insert title here</title>
|
||||
<link rel="stylesheet" href="../public/layui/css/layui.css" media="all">
|
||||
<script src="../public/layui/layui.js"></script>
|
||||
<style>
|
||||
.layui-form-label{
|
||||
margin-left:20%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<jsp:useBean id="judge" scope="session" class="javabean.JDBCBean"></jsp:useBean>
|
||||
<div align="center" style=" margin-top: 2%;"><h1>归还图书</h1></div>
|
||||
<div align="center"
|
||||
style="margin-left:30%; margin-top: 5%; width: 40%;">
|
||||
|
||||
<%
|
||||
Object days = session.getAttribute("days");
|
||||
Object fee = session.getAttribute("fee");
|
||||
int d = Integer.parseInt(days.toString());
|
||||
float f = Float.parseFloat(fee.toString());
|
||||
String book = session.getAttribute("book").toString();
|
||||
String mes = "";
|
||||
String mes2 = "";
|
||||
float sum = 0;
|
||||
if(d<0){
|
||||
mes = "已逾期"+(-d)+"天";
|
||||
sum = d*f*(-1);
|
||||
mes2 = "罚款"+sum;
|
||||
}
|
||||
else{
|
||||
mes = "还剩"+d+"天";
|
||||
//mes2 = "无需罚款";
|
||||
}
|
||||
session.setAttribute("mes",mes);
|
||||
session.setAttribute("mes2",mes2);
|
||||
%>
|
||||
|
||||
<form class="layui-form layui-form-pane" action="05returnSus.jsp">
|
||||
<div><blockquote class="layui-elem-quote layui-quote-nm">
|
||||
|
||||
<%=session.getAttribute("mes") %><br>
|
||||
<%=session.getAttribute("mes2") %>
|
||||
</blockquote>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">图书编号</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="bookid" lay-verify="required"
|
||||
value=<%=session.getAttribute("book") %> autocomplete="off" class="layui-input"><br>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%
|
||||
|
||||
String sql2="select*from borrow_books where return_date is null and book_id = "+book;
|
||||
ResultSet rs2 = judge.executeQuery(sql2);
|
||||
String end = "";
|
||||
while (rs2.next()) {
|
||||
|
||||
|
||||
%>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">截止日期</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="end" autocomplete="off"
|
||||
class="layui-input" value=<%=rs2.getString("end_date") %>><br>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<%} %>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">归还日期</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="date1" id="date1" autocomplete="off"
|
||||
class="layui-input"><br>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">违规信息</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="ill"
|
||||
placeholder="若无违规信息,则不填" autocomplete="off" class="layui-input"><br>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">管理员编号</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="managerid" readonly="readonly"
|
||||
class="layui-input" value="<%=session.getAttribute("manager")%>"><br>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item" align="center">
|
||||
<button class="layui-btn layui-btn-warm" lay-submit="" lay-filter="demo2">归还</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<script>
|
||||
layui
|
||||
.use(
|
||||
[ 'form', 'layedit', 'laydate' ],
|
||||
function() {
|
||||
var form = layui.form, layer = layui.layer, layedit = layui.layedit, laydate = layui.laydate;
|
||||
//日期
|
||||
laydate.render({
|
||||
elem : '#date1',
|
||||
type : 'datetime',
|
||||
format : 'yyyy-MM-dd H:m:s',
|
||||
min:0,
|
||||
max:0,
|
||||
value: new Date()
|
||||
});
|
||||
|
||||
//创建一个编辑器
|
||||
var editIndex = layedit
|
||||
.build('LAY_demo_editor');
|
||||
|
||||
|
||||
//监听提交
|
||||
form.on('submit(demo1)', function(data) {
|
||||
layer.alert(JSON.stringify(data.field), {
|
||||
title : '最终的提交信息'
|
||||
})
|
||||
return false;
|
||||
});
|
||||
|
||||
//表单赋值
|
||||
layui.$('#LAY-component-form-setval').on(
|
||||
'click', function() {
|
||||
form.val('example', {
|
||||
"username" : "贤心" // "name": "value"
|
||||
,
|
||||
"password" : "123456",
|
||||
"interest" : 1,
|
||||
"like[write]" : true //复选框选中状态
|
||||
,
|
||||
"close" : true //开关状态
|
||||
,
|
||||
"sex" : "女",
|
||||
"desc" : "我爱 layui"
|
||||
});
|
||||
});
|
||||
|
||||
//表单取值
|
||||
layui.$('#LAY-component-form-getval').on(
|
||||
'click', function() {
|
||||
var data = form.val('example');
|
||||
alert(JSON.stringify(data));
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,78 @@
|
||||
<%@ page import="java.sql.*"%>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Insert title here</title>
|
||||
</head>
|
||||
<body>
|
||||
<jsp:useBean id="ret" scope="session" class="javabean.JDBCBean"></jsp:useBean>
|
||||
<%
|
||||
|
||||
String book = request.getParameter("bookid");
|
||||
String date1 = request.getParameter("date1");
|
||||
String ill = request.getParameter("ill");
|
||||
//out.println(ill);
|
||||
String managerid = request.getParameter("managerid");
|
||||
|
||||
if(session.getAttribute("manager")!=null){
|
||||
|
||||
String sql2 = "select * from books where ID =" + book;
|
||||
ResultSet rs2 = ret.executeQuery(sql2);
|
||||
|
||||
if(rs2.next()){
|
||||
//out.println(psw1 + " " + psw2);
|
||||
//String id = session.getAttribute("manager").toString();
|
||||
int status=Integer.parseInt(rs2.getString("STATUS"));
|
||||
if(status==0){
|
||||
String sql = "update borrow_books set RETURN_DATE='" + date1 + "',ILLEGAL='" + ill + "',MANAGER_ID='" + managerid + "' where manager_id is null and BOOK_ID="+ book;
|
||||
|
||||
//out.println(sql);
|
||||
try {
|
||||
int i = ret.executeUpdate(sql);
|
||||
|
||||
|
||||
//String sql1 = "update borrow_books set RETURN_DATE='" + date1 + "',ILLEGAL='" + ill + "',MANAGER_ID='" + managerid + "' order by BORROW_DATE desc limit 1 ";
|
||||
//int k = ret.executeUpdate(sql1);
|
||||
|
||||
String sql3="update books set STATUS=1 where ID="+book;
|
||||
ret.executeUpdate(sql3);
|
||||
%>
|
||||
<script>
|
||||
alert('归还成功!');
|
||||
window.location.href = "04judge.jsp";
|
||||
</script>
|
||||
|
||||
<%
|
||||
|
||||
} catch (Exception e) {
|
||||
%>
|
||||
<script>
|
||||
alert('归还未成功!');
|
||||
window.location.href = "04judge.jsp";
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
}else{
|
||||
%>
|
||||
<script>
|
||||
alert('该图书未借出!');
|
||||
window.location.href = "04judge.jsp";
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
}
|
||||
|
||||
}else{
|
||||
%>
|
||||
<script>
|
||||
alert('请先登录!');
|
||||
window.parent.location.href = "../loginManager.html";
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,120 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>借阅记录</title>
|
||||
<link rel="stylesheet" href="../public/layui/css/layui.css" media="all">
|
||||
<style>
|
||||
.layui-table,.layui-table-view{
|
||||
margin: 0 0px;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<script src="../public/layui/layui.js" charset="utf-8"></script>
|
||||
<!-- 表单 -->
|
||||
<table class="layui-hide" id="cardTable" lay-filter="formFilter"></table>
|
||||
|
||||
<!-- 头部工具栏 -->
|
||||
<script type="text/html" id="headBar">
|
||||
条件搜索:
|
||||
<div class="layui-inline">
|
||||
<select id="condition" name="condition" lay-verify="required">
|
||||
<option value=""></option>
|
||||
<option value="card_id">借阅证号</option>
|
||||
<option value="book_id">图书编号</option>
|
||||
<option value="borrow_date">借阅日期</option>
|
||||
<option value="end_date">截止日期</option>
|
||||
<option value="return_date">归还日期</option>
|
||||
<option value="illegal">违章信息</option>
|
||||
<option value="manager_id">处理人</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<input class="layui-input" id="conditionValue" name="conditionValue" id="demoReload" autocomplete="off">
|
||||
</div>
|
||||
<button class="layui-btn" name="condition" data-type="reload" lay-event="search">搜索</button>
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
layui.use(['table','jquery'], function(){
|
||||
$ = layui.jquery;
|
||||
var table = layui.table;
|
||||
// 进行渲染
|
||||
var tableIns = table.render({
|
||||
elem: '#cardTable'
|
||||
,url:'./borrowTable'
|
||||
,toolbar: '#headBar'
|
||||
,cols: [[
|
||||
{field:'card_id', width:180, title: '借阅证号', sort: true}
|
||||
,{field:'book_id', width:130, title: '图书编号', sort: true}
|
||||
,{field:'borrow_date', width:250, title: '借阅日期', sort: true}
|
||||
,{field:'end_date', title: '截止日期', width: 250, sort: true}
|
||||
,{field:'return_date', width:250, title: '归还时间', sort: true}
|
||||
,{field:'illegal', width:180, title: '违章信息', sort: true,style:'color: red;'}
|
||||
,{field:'manager_id', minWidth:80, title: '处理人'}
|
||||
|
||||
]]
|
||||
,page: true
|
||||
});
|
||||
|
||||
// 头部工具栏事件
|
||||
table.on('toolbar(formFilter)', function(obj){
|
||||
var checkStatus = table.checkStatus(obj.config.id);
|
||||
switch(obj.event){
|
||||
// 条件查找图书证
|
||||
case 'search':
|
||||
var conditionValue = $('#conditionValue');
|
||||
var condition = $('#condition');
|
||||
// 进行搜索,重新渲染
|
||||
tableIns.reload({
|
||||
where: { //设定异步数据接口的额外参数,任意设
|
||||
"condition": condition.val(),
|
||||
"conditionValue": conditionValue.val()
|
||||
}
|
||||
,page: {
|
||||
curr: 1 //重新从第 1 页开始
|
||||
}
|
||||
});
|
||||
break;
|
||||
|
||||
case 'add':
|
||||
var addCardLayer = layer.open({
|
||||
type: 2,
|
||||
title: '添加借书证',
|
||||
area: ['800px', '500px'],
|
||||
maxmin: true,
|
||||
shadeClose: true,
|
||||
content: 'cardadd.jsp',
|
||||
});
|
||||
//layer.full(addCardLayer);
|
||||
};
|
||||
});
|
||||
|
||||
// 侧边工具栏事件
|
||||
table.on(('tool(formFilter)'), function(obj){
|
||||
var data = obj.data;
|
||||
var layEvent = obj.event;
|
||||
var tr = obj.tr;
|
||||
switch(obj.event){
|
||||
case 'edit':
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '更改信息',
|
||||
area: ['800px', '600px'],
|
||||
maxmin: true,
|
||||
shadeClose: true,
|
||||
content: '',
|
||||
})
|
||||
break;
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,114 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Insert title here</title>
|
||||
<link rel="stylesheet" href="../public/layui/css/layui.css" media="all">
|
||||
<script src="../public/layui/layui.js" charset="utf-8"></script>
|
||||
<style>
|
||||
.layui-table,.layui-table-view{
|
||||
margin: 0 0px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- 表单 -->
|
||||
<table class="layui-hide" id="cardTable" lay-filter="formFilter"></table>
|
||||
|
||||
<!-- 头部工具栏 -->
|
||||
<script type="text/html" id="headBar">
|
||||
条件搜索:
|
||||
<div class="layui-inline">
|
||||
<select id="condition" name="condition" lay-verify="required">
|
||||
<option value=""></option>
|
||||
<option value="card_id">借阅证号</option>
|
||||
<option value="book_id">图书编号</option>
|
||||
<option value="borrow_date">借阅日期</option>
|
||||
<option value="end_date">截止日期</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<input class="layui-input" id="conditionValue" name="conditionValue" id="demoReload" autocomplete="off">
|
||||
</div>
|
||||
<button class="layui-btn" name="condition" data-type="reload" lay-event="search">搜索</button>
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
layui.use(['table','jquery'], function(){
|
||||
$ = layui.jquery;
|
||||
var table = layui.table;
|
||||
// 进行渲染
|
||||
var tableIns = table.render({
|
||||
elem: '#cardTable'
|
||||
,url:'./returnTable'
|
||||
,toolbar: '#headBar'
|
||||
,cols: [[
|
||||
{field:'card_id', width:180, title: '借阅证号', sort: true}
|
||||
,{field:'book_id', width:130, title: '图书编号', sort: true}
|
||||
,{field:'borrow_date', width:250, title: '借阅日期', sort: true}
|
||||
,{field:'end_date', title: '截止日期',width: 250, sort: true}
|
||||
|
||||
]]
|
||||
,page: true
|
||||
});
|
||||
|
||||
// 头部工具栏事件
|
||||
table.on('toolbar(formFilter)', function(obj){
|
||||
var checkStatus = table.checkStatus(obj.config.id);
|
||||
switch(obj.event){
|
||||
// 条件查找图书证
|
||||
case 'search':
|
||||
var conditionValue = $('#conditionValue');
|
||||
var condition = $('#condition');
|
||||
// 进行搜索,重新渲染
|
||||
tableIns.reload({
|
||||
where: { //设定异步数据接口的额外参数,任意设
|
||||
"condition": condition.val(),
|
||||
"conditionValue": conditionValue.val()
|
||||
}
|
||||
,page: {
|
||||
curr: 1 //重新从第 1 页开始
|
||||
}
|
||||
});
|
||||
break;
|
||||
|
||||
case 'add':
|
||||
var addCardLayer = layer.open({
|
||||
type: 2,
|
||||
title: '添加借书证',
|
||||
area: ['800px', '500px'],
|
||||
maxmin: true,
|
||||
shadeClose: true,
|
||||
content: 'cardadd.jsp',
|
||||
});
|
||||
//layer.full(addCardLayer);
|
||||
};
|
||||
});
|
||||
|
||||
// 侧边工具栏事件
|
||||
table.on(('tool(formFilter)'), function(obj){
|
||||
var data = obj.data;
|
||||
var layEvent = obj.event;
|
||||
var tr = obj.tr;
|
||||
switch(obj.event){
|
||||
case 'edit':
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '更改信息',
|
||||
area: ['800px', '600px'],
|
||||
maxmin: true,
|
||||
shadeClose: true,
|
||||
content: '',
|
||||
})
|
||||
break;
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,69 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Insert title here</title>
|
||||
<link rel="stylesheet" href="../public/layui/css/layui.css">
|
||||
<script src="../public/layui/layui.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<form class="layui-form layui-form-pane" action="" lay-filter="formFilter">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">标题</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="title" lay-verify="required" required autocomplete="off" placeholder="请输入标题" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" style="height:50%;">
|
||||
<label class="layui-form-label">公告</label>
|
||||
<div class="layui-input-block">
|
||||
<textarea name="detail" lay-verify="required" placeholder="请输入公告" autocomplete="off" class="layui-input" style="height:300px;"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button type="submit" class="layui-btn" lay-submit="" lay-filter="submitButton"><i class="layui-icon layui-icon-release" style="font-size: 20px; color: yellow;"></i> 发布</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
|
||||
|
||||
layui.use(['form', 'jquery'], function(){
|
||||
$ = layui.jquery;
|
||||
var form = layui.form
|
||||
,layer = layui.layer
|
||||
//监听提交
|
||||
form.on('submit(submitButton)', function(data){
|
||||
$.ajax({
|
||||
url: './announcementAdd',
|
||||
method: 'post',
|
||||
data: data.field,
|
||||
dataType: 'json',
|
||||
success: function(data){
|
||||
if(data.code == "0"){
|
||||
parent.layer.msg("添加成功",{
|
||||
icon: 6,
|
||||
time: 500
|
||||
});
|
||||
setTimeout(function(){
|
||||
parent.location.reload();
|
||||
}, 500);
|
||||
}else{
|
||||
layer.msg(data.msg);
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,109 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link rel="stylesheet" href="../public/layui/css/layui.css" media="all">
|
||||
<script src="../public/layui/layui.js"></script>
|
||||
<title>Insert title here</title>
|
||||
</head>
|
||||
<body>
|
||||
<table class="layui-hide" id="annTable" lay-filter="formFilter"></table>
|
||||
|
||||
<script type="text/html" id="headBar">
|
||||
<button type="button" class="layui-btn layui-btn-sm" lay-event="add"><i class="layui-icon"><i class="layui-icon layui-icon-release" style="font-size: 20px; color: yellow;"></i> 发布新公告</i></button>
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="rightBar">
|
||||
<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
|
||||
</script>
|
||||
<script>
|
||||
layui.use(['table','jquery'], function(){
|
||||
$ = layui.jquery;
|
||||
var table = layui.table;
|
||||
// 进行渲染
|
||||
var tableIns = table.render({
|
||||
elem: '#annTable'
|
||||
,url:'./announcement'
|
||||
,toolbar: '#headBar'
|
||||
,height: 600
|
||||
,cols: [[
|
||||
{field:'id', width:80, title: 'ID', sort: true}
|
||||
,{field:'title', width:230, title: '标题'}
|
||||
,{field:'detail', width:580, title: '公告'}
|
||||
,{field:'publish_date', title: '发布日期', minWidth: 100, sort: true}
|
||||
,{fixed: 'right', title:'操作', toolbar: '#rightBar', align: 'center', width:150}
|
||||
]]
|
||||
});
|
||||
|
||||
// 头部工具栏事件
|
||||
table.on('toolbar(formFilter)', function(obj){
|
||||
var checkStatus = table.checkStatus(obj.config.id);
|
||||
switch(obj.event){
|
||||
// 添加公告
|
||||
case 'add':
|
||||
var addCardLayer = layer.open({
|
||||
type: 2,
|
||||
title: '发布公告',
|
||||
area: ['800px', '500px'],
|
||||
maxmin: true,
|
||||
shadeClose: true,
|
||||
content: '08add.jsp',
|
||||
});
|
||||
//layer.full(addCardLayer);
|
||||
};
|
||||
});
|
||||
|
||||
// 侧边工具栏事件
|
||||
table.on(('tool(formFilter)'), function(obj){
|
||||
var data = obj.data;
|
||||
var layEvent = obj.event;
|
||||
var id = data.id;
|
||||
var tr = obj.tr;
|
||||
switch(obj.event){
|
||||
case 'edit':
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '更改信息',
|
||||
area: ['800px', '600px'],
|
||||
maxmin: true,
|
||||
shadeClose: true,
|
||||
content: '08edit.jsp?id=' +id,
|
||||
})
|
||||
break;
|
||||
case 'del':
|
||||
layer.confirm('确定要删除么?',function(){
|
||||
layer.msg("ok");
|
||||
$.ajax({
|
||||
url: './announcementDel',
|
||||
data: 'id=' +id,
|
||||
type: 'get',
|
||||
dataType: 'json',
|
||||
timeout: 3000,
|
||||
success: function(data){
|
||||
if(data.code == 0){
|
||||
layer.msg(data.msg,{
|
||||
icon: 6,
|
||||
anim: 5,
|
||||
time: 500
|
||||
});
|
||||
setTimeout(function(){
|
||||
parent.location.reload();
|
||||
},500);
|
||||
}else{
|
||||
layer.msg(data.code);
|
||||
}
|
||||
},
|
||||
error: function(){
|
||||
layer.msg("连接超时");
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,83 @@
|
||||
<%@page import="java.sql.*"%>
|
||||
<%@page import="javabean.Base"%>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link rel="stylesheet" href="../public/layui/css/layui.css">
|
||||
<script src="../public/layui/layui.js"></script>
|
||||
<title>Insert title here</title>
|
||||
</head>
|
||||
<body>
|
||||
<jsp:useBean id="check" scope="session" class="javabean.JDBCBean"></jsp:useBean>
|
||||
<%
|
||||
String id = request.getParameter("id");
|
||||
Connection connection = (Connection)Base.getConnection();
|
||||
String sql = "select * from announcement where id=?";
|
||||
PreparedStatement pstmt = connection.prepareCall(sql);
|
||||
pstmt.setString(1,id);
|
||||
ResultSet resultSet = pstmt.executeQuery();
|
||||
resultSet.next();
|
||||
|
||||
%>
|
||||
<form class="layui-form layui-form-pane" action="" lay-filter="formFilter">
|
||||
<input type="text" name="id" value=<%=id %> lay-verify="required" required autocomplete="off" placeholder="请输入姓名" class="layui-input layui-hide">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">标题</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="title" value=<%=resultSet.getString("title") %> lay-verify="required" required autocomplete="off" placeholder="请输入标题" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">公告</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="detail" value=<%=resultSet.getString("detail") %> lay-verify="required" placeholder="请输入公告" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button type="submit" class="layui-btn" lay-submit="" lay-filter="submitButton">立即提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
|
||||
|
||||
layui.use(['form', 'jquery'], function(){
|
||||
$ = layui.jquery;
|
||||
var form = layui.form
|
||||
,layer = layui.layer
|
||||
//监听提交
|
||||
form.on('submit(submitButton)', function(data){
|
||||
$.ajax({
|
||||
url: './announcementEdit',
|
||||
method: 'post',
|
||||
data: data.field,
|
||||
dataType: 'json',
|
||||
success: function(data){
|
||||
if(data.code == "0"){
|
||||
parent.layer.msg("添加成功",{
|
||||
icon: 6,
|
||||
time: 500
|
||||
});
|
||||
setTimeout(function(){
|
||||
parent.location.reload();
|
||||
}, 500);
|
||||
}else{
|
||||
layer.msg(data.msg);
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,149 @@
|
||||
<%@ page import="java.sql.*"%>
|
||||
<%@ page import="java.util.*"%>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Insert title here</title>
|
||||
</head>
|
||||
<body>
|
||||
<jsp:useBean id="check" scope="session" class="javabean.JDBCBean"></jsp:useBean>
|
||||
<%
|
||||
String psw1 = request.getParameter("psw1");
|
||||
String psw2 = request.getParameter("psw2");
|
||||
String email1 = request.getParameter("email1");
|
||||
String email2 = request.getParameter("email2");
|
||||
String name1 = request.getParameter("name1");
|
||||
String name2 = request.getParameter("name2");
|
||||
|
||||
//out.println(psw1 + " " + psw2);
|
||||
String id = session.getAttribute("manager").toString();
|
||||
|
||||
if(psw1!=null && psw2!=null){
|
||||
if (psw1.equals(psw2) && psw1 != null && psw2 != null && !psw1.trim().equals("")
|
||||
&& !psw2.trim().equals("")) {
|
||||
String sql = "update manager set PASSWORD ='" + psw1 + "' where ACCOUNT='" + id +"'";
|
||||
try {
|
||||
int i = check.executeUpdate(sql);
|
||||
if (i == 1) {
|
||||
%>
|
||||
<script>
|
||||
alert('修改成功!');
|
||||
window.location.href = "09managerSelf.jsp";
|
||||
</script>
|
||||
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
<script>
|
||||
alert('修改未成功!');
|
||||
window.location.href = "09managerSelf.jsp";
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
} catch (Exception e) {
|
||||
%>
|
||||
<script>
|
||||
alert('修改未成功!');
|
||||
window.location.href = "09managerSelf.jsp";
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
} else {
|
||||
%>
|
||||
<script>
|
||||
alert('修改未成功!');
|
||||
window.location.href = "09managerSelf.jsp";
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
|
||||
|
||||
}else if(email1!=null && email2!=null){
|
||||
//out.println(psw1 + " " + psw2);
|
||||
|
||||
if (email1.equals(email2) && email1 != null && email2 != null && !email1.trim().equals("")
|
||||
&& !email2.trim().equals("")) {
|
||||
String sql = "update manager set EMAIL ='" + email1 + "' where ACCOUNT='" + id +"'";
|
||||
try {
|
||||
int i = check.executeUpdate(sql);
|
||||
if (i == 1) {
|
||||
%>
|
||||
<script>
|
||||
alert('修改成功!');
|
||||
window.location.href = "09managerSelf.jsp";
|
||||
</script>
|
||||
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
<script>
|
||||
alert('修改未成功!');
|
||||
window.location.href = "09managerSelf.jsp";
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
} catch (Exception e) {
|
||||
%>
|
||||
<script>
|
||||
alert('修改未成功!');
|
||||
window.location.href = "09managerSelf.jsp";
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
} else {
|
||||
%>
|
||||
<script>
|
||||
alert('修改未成功!');
|
||||
window.location.href = "09managerSelf.jsp";
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
|
||||
|
||||
}else if(name1!=null && name2!=null){
|
||||
//out.println(psw1 + " " + psw2);
|
||||
|
||||
if (name1.equals(name2) && name1 != null && name2 != null && !name1.trim().equals("")
|
||||
&& !name2.trim().equals("")) {
|
||||
String sql = "update manager set NAME ='" + name1 + "' where ACCOUNT='" + id +"'";
|
||||
try {
|
||||
int i = check.executeUpdate(sql);
|
||||
if (i == 1) {
|
||||
%>
|
||||
<script>
|
||||
alert('修改成功!');
|
||||
window.location.href = "09managerSelf.jsp";
|
||||
</script>
|
||||
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
<script>
|
||||
alert('修改未成功!');
|
||||
window.location.href = "09managerSelf.jsp";
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
} catch (Exception e) {
|
||||
%>
|
||||
<script>
|
||||
alert('修改未成功!');
|
||||
window.location.href = "09managerSelf.jsp";
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
} else {
|
||||
%>
|
||||
<script>
|
||||
alert('修改未成功!');
|
||||
window.location.href = "09managerSelf.jsp";
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,156 @@
|
||||
/* General styles for the modal */
|
||||
|
||||
/*
|
||||
Styles for the html/body for special modal where we want 3d effects
|
||||
Note that we need a container wrapping all content on the page for the
|
||||
perspective effects (not including the modals and the overlay).
|
||||
*/
|
||||
.md-perspective,
|
||||
.md-perspective body {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
.container {
|
||||
background: steelblue;
|
||||
min-height: 100%;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.md-modal {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 50%;
|
||||
max-width: 630px;
|
||||
min-width: 320px;
|
||||
height: auto;
|
||||
z-index: 2000;
|
||||
visibility: hidden;
|
||||
-webkit-backface-visibility: hidden;
|
||||
-moz-backface-visibility: hidden;
|
||||
backface-visibility: hidden;
|
||||
-webkit-transform: translateX(-50%) translateY(-50%);
|
||||
-moz-transform: translateX(-50%) translateY(-50%);
|
||||
-ms-transform: translateX(-50%) translateY(-50%);
|
||||
transform: translateX(-50%) translateY(-50%);
|
||||
}
|
||||
|
||||
.md-show {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.md-overlay {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
visibility: hidden;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 1000;
|
||||
opacity: 0;
|
||||
background: rgba(232, 232, 232, 0.5);
|
||||
-webkit-transition: all 0.3s;
|
||||
-moz-transition: all 0.3s;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.md-show ~ .md-overlay {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
/* Content styles */
|
||||
.md-content {
|
||||
color: black;
|
||||
background: lightblue;
|
||||
position: relative;
|
||||
border-radius: 3px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.md-content h3 {
|
||||
margin: 0;
|
||||
padding: 0.4em;
|
||||
text-align: center;
|
||||
font-size: 2.4em;
|
||||
font-weight: 300;
|
||||
opacity: 0.8;
|
||||
background: rgba(0,0,0,0.1);
|
||||
border-radius: 3px 3px 0 0;
|
||||
}
|
||||
|
||||
.md-content > div {
|
||||
padding: 15px 40px 30px;
|
||||
margin: 0;
|
||||
font-weight: 300;
|
||||
font-size: 1.15em;
|
||||
}
|
||||
|
||||
.md-content > div p {
|
||||
margin: 0;
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.md-content > div ul {
|
||||
margin: 0;
|
||||
padding: 0 0 30px 20px;
|
||||
}
|
||||
|
||||
.md-content > div ul li {
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
.md-content button {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
/* Individual modal styles with animations/transitions */
|
||||
|
||||
|
||||
/* Effect 13: 3D slit */
|
||||
.md-effect-13.md-modal {
|
||||
-webkit-perspective: 1300px;
|
||||
-moz-perspective: 1300px;
|
||||
perspective: 1300px;
|
||||
}
|
||||
|
||||
.md-effect-13 .md-content {
|
||||
-webkit-transform-style: preserve-3d;
|
||||
-moz-transform-style: preserve-3d;
|
||||
transform-style: preserve-3d;
|
||||
-webkit-transform: translateZ(-3000px) rotateY(90deg);
|
||||
-moz-transform: translateZ(-3000px) rotateY(90deg);
|
||||
-ms-transform: translateZ(-3000px) rotateY(90deg);
|
||||
transform: translateZ(-3000px) rotateY(90deg);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.md-show.md-effect-13 .md-content {
|
||||
-webkit-animation: slit .7s forwards ease-out;
|
||||
-moz-animation: slit .7s forwards ease-out;
|
||||
animation: slit .7s forwards ease-out;
|
||||
}
|
||||
|
||||
@-webkit-keyframes slit {
|
||||
50% { -webkit-transform: translateZ(-250px) rotateY(89deg); opacity: .5; -webkit-animation-timing-function: ease-out;}
|
||||
100% { -webkit-transform: translateZ(0) rotateY(0deg); opacity: 1; }
|
||||
}
|
||||
|
||||
@-moz-keyframes slit {
|
||||
50% { -moz-transform: translateZ(-250px) rotateY(89deg); opacity: .5; -moz-animation-timing-function: ease-out;}
|
||||
100% { -moz-transform: translateZ(0) rotateY(0deg); opacity: 1; }
|
||||
}
|
||||
|
||||
@keyframes slit {
|
||||
50% { transform: translateZ(-250px) rotateY(89deg); opacity: 1; animation-timing-function: ease-in;}
|
||||
100% { transform: translateZ(0) rotateY(0deg); opacity: 1; }
|
||||
}
|
||||
|
||||
|
||||
@media screen and (max-width: 32em) {
|
||||
body { font-size: 75%; }
|
||||
}
|
@ -0,0 +1,130 @@
|
||||
/* General Demo Style */
|
||||
@import url(http://fonts.googleapis.com/css?family=Lato:300,400,700);
|
||||
|
||||
@font-face {
|
||||
font-family: 'codropsicons';
|
||||
src:url('../fonts/codropsicons/codropsicons.eot');
|
||||
src:url('../fonts/codropsicons/codropsicons.eot?#iefix') format('embedded-opentype'),
|
||||
url('../fonts/codropsicons/codropsicons.woff') format('woff'),
|
||||
url('../fonts/codropsicons/codropsicons.ttf') format('truetype'),
|
||||
url('../fonts/codropsicons/codropsicons.svg#codropsicons') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
*, *:after, *:before { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; }
|
||||
body, html { font-size: 100%; padding: 0; margin: 0; }
|
||||
|
||||
/* Clearfix hack by Nicolas Gallagher: http://nicolasgallagher.com/micro-clearfix-hack/ */
|
||||
.clearfix:before, .clearfix:after { content: " "; display: table; }
|
||||
.clearfix:after { clear: both; }
|
||||
|
||||
body {
|
||||
font-family: 'Lato', Calibri, Arial, sans-serif;
|
||||
color: #fff;
|
||||
background: lightblue;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Header Style */
|
||||
.main,
|
||||
.container > header {
|
||||
margin: 0 auto;
|
||||
padding: 2em;
|
||||
}
|
||||
|
||||
.container > header {
|
||||
text-align: center;
|
||||
background: lightblue;
|
||||
padding: 3em;
|
||||
}
|
||||
|
||||
.container > header h1 {
|
||||
font-size: 2.625em;
|
||||
line-height: 1.3;
|
||||
margin: 0;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.container > header span {
|
||||
display: block;
|
||||
opacity: 0.7;
|
||||
padding: 0 0 0.6em 0.1em;
|
||||
}
|
||||
|
||||
/* Main Content */
|
||||
.main {
|
||||
max-width: 69em;
|
||||
}
|
||||
|
||||
.column {
|
||||
float: left;
|
||||
width: 50%;
|
||||
padding: 0 2em;
|
||||
min-height: 300px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.column:nth-child(2) {
|
||||
box-shadow: -1px 0 0 rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.column p {
|
||||
font-weight: 300;
|
||||
font-size: 2em;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
text-align: right;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
/* To Navigation Style */
|
||||
|
||||
|
||||
|
||||
|
||||
button {
|
||||
border: none;
|
||||
padding: 0.6em 1.2em;
|
||||
background: deepskyblue;
|
||||
color: #fff;
|
||||
font-family: 'Lato', Calibri, Arial, sans-serif;
|
||||
font-size: 1em;
|
||||
letter-spacing: 1px;
|
||||
text-transform: uppercase;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
margin: 3px 2px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background: cornflowerblue;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 46.0625em) {
|
||||
.column {
|
||||
width: 100%;
|
||||
min-width: auto;
|
||||
min-height: auto;
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
.column p {
|
||||
text-align: left;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
.column:nth-child(2) {
|
||||
box-shadow: 0 -1px 0 rgba(0,0,0,0.1);
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 25em) {
|
||||
|
||||
.codrops-icon span {
|
||||
display: none;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
body{
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.main{
|
||||
margin-top: 150px;
|
||||
font-family: system-ui,cursive,sans-serif;
|
||||
}
|
||||
#login{
|
||||
max-width: 500px;
|
||||
margin: 0 auto;
|
||||
padding:25px 45px 45px 45px;
|
||||
box-shadow: 8px 8px #b3e5fc;
|
||||
border-radius: 15px;
|
||||
background-image: -webkit-linear-gradient(top left, #ffd6e7, #cdfcf9);
|
||||
background-image: -o-linear-gradient(top left, #ffd6e7, #cdfcf9);
|
||||
background-image: linear-gradient(to bottom right, #ffd6e7, #cdfcf9);
|
||||
font-size: 16px;
|
||||
}
|
||||
#login h1{
|
||||
color: #4dd0e1;
|
||||
text-align: center;
|
||||
font-size: 30px;
|
||||
}
|
||||
#login .my_input{
|
||||
margin-top: 25px;
|
||||
border: none;
|
||||
background-color: rgba(0,0,0,0);
|
||||
box-shadow: none;
|
||||
border-bottom: 2px solid white;
|
||||
border-radius: 0px;
|
||||
font-size: 20px;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
#login .my_input:hover{
|
||||
border-bottom: 2px solid #ff9c6e;
|
||||
|
||||
}
|
||||
#login input[type=submit]{
|
||||
margin-top: 45px;
|
||||
background-color: #fce4ec;
|
||||
font-size: 18px;
|
||||
transition: all 0.5s;
|
||||
border-radius: 15px;
|
||||
}
|
||||
#login input[type=submit]:hover{
|
||||
background-color: #ffd6e7;
|
||||
|
||||
}
|
@ -0,0 +1,133 @@
|
||||
body{
|
||||
background: white;
|
||||
color: #DDD;
|
||||
font-family: 'Helvetica', 'Lucida Grande', 'Arial', sans-serif;
|
||||
}
|
||||
.border{
|
||||
height: 99%;
|
||||
width: 30%;
|
||||
}
|
||||
.rain{
|
||||
height: 400px;
|
||||
width: 35%;
|
||||
}
|
||||
/* Layout with mask */
|
||||
.rain{
|
||||
padding: 10px 12px 12px 10px;
|
||||
-moz-box-shadow: 10px 10px 10px rgba(255,255,255,1) inset, -9px -9px 8px rgba(255,255,255,1) inset;
|
||||
-webkit-box-shadow: 8px 8px 8px rgba(255,255,255,1) inset, -9px -9px 8px rgba(255,255,255,1) inset;
|
||||
box-shadow: 8px 8px 8px rgba(255,255,255,1) inset, -9px -9px 8px rgba(255,255,255,1) inset;
|
||||
margin: 100px auto;
|
||||
}
|
||||
/* Artifical "border" to clear border to bypass mask */
|
||||
.border{
|
||||
padding: 1px;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.border,
|
||||
.rain,
|
||||
.border.start,
|
||||
.rain.start{
|
||||
background-repeat: repeat-x, repeat-x, repeat-x, repeat-x;
|
||||
background-position: 0 0, 0 0, 0 0, 0 0;
|
||||
/* Blue-ish Green Fallback for Mozilla */
|
||||
background-image: -moz-linear-gradient(left, #09BA5E 0%, #00C7CE 15%, #3472CF 26%, #00C7CE 48%, #0CCF91 91%, #09BA5E 100%);
|
||||
/* Add "Highlight" Texture to the Animation */
|
||||
background-image: -webkit-gradient(linear, left top, right top, color-stop(1%,rgba(0,0,0,.3)), color-stop(23%,rgba(0,0,0,.1)), color-stop(40%,rgba(255,231,87,.1)), color-stop(61%,rgba(255,231,87,.2)), color-stop(70%,rgba(255,231,87,.1)), color-stop(80%,rgba(0,0,0,.1)), color-stop(100%,rgba(0,0,0,.25)));
|
||||
/* Starting Color */
|
||||
background-color: #39f;
|
||||
/* Just do something for IE-suck */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00BA1B', endColorstr='#00BA1B',GradientType=1 );
|
||||
}
|
||||
|
||||
/* Non-keyframe fallback animation */
|
||||
.border.end,
|
||||
.rain.end{
|
||||
-moz-transition-property: background-position;
|
||||
-moz-transition-duration: 30s;
|
||||
-moz-transition-timing-function: linear;
|
||||
-webkit-transition-property: background-position;
|
||||
-webkit-transition-duration: 30s;
|
||||
-webkit-transition-timing-function: linear;
|
||||
-o-transition-property: background-position;
|
||||
-o-transition-duration: 30s;
|
||||
-o-transition-timing-function: linear;
|
||||
transition-property: background-position;
|
||||
transition-duration: 30s;
|
||||
transition-timing-function: linear;
|
||||
background-position: -5400px 0, -4600px 0, -3800px 0, -3000px 0;
|
||||
}
|
||||
|
||||
/* Keyfram-licious animation */
|
||||
@-webkit-keyframes colors {
|
||||
0% {background-color: pink;}
|
||||
15% {background-color: hotpink;}
|
||||
30% {background-color: rosybrown;}
|
||||
45% {background-color: steelblue;}
|
||||
60% {background-color: black;}
|
||||
75% {background-color: #c9c0d3;}
|
||||
90% {background-color: darkgreen;}
|
||||
100% {background-color: orange;}
|
||||
}
|
||||
.border,.rain{
|
||||
-webkit-animation-direction: normal;
|
||||
-webkit-animation-duration: 20s;
|
||||
-webkit-animation-iteration-count: infinite;
|
||||
-webkit-animation-name: colors;
|
||||
-webkit-animation-timing-function: ease;
|
||||
}
|
||||
|
||||
/* In-Active State Style */
|
||||
.border.unfocus{
|
||||
background: #333 !important;
|
||||
-moz-box-shadow: 0px 0px 15px rgba(255,255,255,.2);
|
||||
-webkit-box-shadow: 0px 0px 15px rgba(255,255,255,.2);
|
||||
box-shadow: 0px 0px 15px rgba(255,255,255,.2);
|
||||
-webkit-animation-name: none;
|
||||
}
|
||||
.rain.unfocus{
|
||||
background: #000 !important;
|
||||
-webkit-animation-name: none;
|
||||
}
|
||||
|
||||
/* Regular Form Styles */
|
||||
form{
|
||||
background: darkred;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
height: 100%;
|
||||
width: 335%;
|
||||
background: -moz-radial-gradient(50% 46% 90deg,circle closest-corner, white, lightblue);
|
||||
background: -webkit-gradient(radial, 50% 50%, 0, 50% 50%, 150, from(lightcyan), to(lightblue));
|
||||
}
|
||||
form label{
|
||||
display: block;
|
||||
padding: 10px 10px 5px 15px;
|
||||
font-size: 20px;
|
||||
color: hotpink;
|
||||
}
|
||||
|
||||
form textarea{
|
||||
display: block;
|
||||
margin: 5px 10px 10px 15px;
|
||||
width: 85%;
|
||||
background: #f0f8ff;
|
||||
-moz-box-shadow: 0px 0px 4px grey inset;
|
||||
-webkit-box-shadow: 0px 0px 4px grey inset;
|
||||
box-shadow: 0px 0px 4px grey inset;
|
||||
outline: 1px solid black;
|
||||
border: 1px solid grey;
|
||||
padding: 5px;
|
||||
color: black;
|
||||
font-size: 16px;
|
||||
}
|
||||
form textarea:focus{
|
||||
outline: 2px solid white;
|
||||
color: #c0c0c0;
|
||||
background-color: white;
|
||||
}
|
||||
|
@ -0,0 +1,4 @@
|
||||
@CHARSET "UTF-8";
|
||||
.tab{
|
||||
width:30%;
|
||||
}
|
After Width: | Height: | Size: 89 KiB |
After Width: | Height: | Size: 98 KiB |
After Width: | Height: | Size: 554 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 15 KiB |
@ -0,0 +1,80 @@
|
||||
/*!
|
||||
* classie - class helper functions
|
||||
* from bonzo https://github.com/ded/bonzo
|
||||
*
|
||||
* classie.has( elem, 'my-class' ) -> true/false
|
||||
* classie.add( elem, 'my-new-class' )
|
||||
* classie.remove( elem, 'my-unwanted-class' )
|
||||
* classie.toggle( elem, 'my-class' )
|
||||
*/
|
||||
|
||||
/*jshint browser: true, strict: true, undef: true */
|
||||
/*global define: false */
|
||||
|
||||
( function( window ) {
|
||||
|
||||
'use strict';
|
||||
|
||||
// class helper functions from bonzo https://github.com/ded/bonzo
|
||||
|
||||
function classReg( className ) {
|
||||
return new RegExp("(^|\\s+)" + className + "(\\s+|$)");
|
||||
}
|
||||
|
||||
// classList support for class management
|
||||
// altho to be fair, the api sucks because it won't accept multiple classes at once
|
||||
var hasClass, addClass, removeClass;
|
||||
|
||||
if ( 'classList' in document.documentElement ) {
|
||||
hasClass = function( elem, c ) {
|
||||
return elem.classList.contains( c );
|
||||
};
|
||||
addClass = function( elem, c ) {
|
||||
elem.classList.add( c );
|
||||
};
|
||||
removeClass = function( elem, c ) {
|
||||
elem.classList.remove( c );
|
||||
};
|
||||
}
|
||||
else {
|
||||
hasClass = function( elem, c ) {
|
||||
return classReg( c ).test( elem.className );
|
||||
};
|
||||
addClass = function( elem, c ) {
|
||||
if ( !hasClass( elem, c ) ) {
|
||||
elem.className = elem.className + ' ' + c;
|
||||
}
|
||||
};
|
||||
removeClass = function( elem, c ) {
|
||||
elem.className = elem.className.replace( classReg( c ), ' ' );
|
||||
};
|
||||
}
|
||||
|
||||
function toggleClass( elem, c ) {
|
||||
var fn = hasClass( elem, c ) ? removeClass : addClass;
|
||||
fn( elem, c );
|
||||
}
|
||||
|
||||
var classie = {
|
||||
// full names
|
||||
hasClass: hasClass,
|
||||
addClass: addClass,
|
||||
removeClass: removeClass,
|
||||
toggleClass: toggleClass,
|
||||
// short names
|
||||
has: hasClass,
|
||||
add: addClass,
|
||||
remove: removeClass,
|
||||
toggle: toggleClass
|
||||
};
|
||||
|
||||
// transport
|
||||
if ( typeof define === 'function' && define.amd ) {
|
||||
// AMD
|
||||
define( classie );
|
||||
} else {
|
||||
// browser global
|
||||
window.classie = classie;
|
||||
}
|
||||
|
||||
})( window );
|
@ -0,0 +1,786 @@
|
||||
/*!
|
||||
* css-filters-polyfill.js
|
||||
*
|
||||
* Author: Christian Schepp Schaefer
|
||||
* Summary: A polyfill for CSS filter effects
|
||||
* License: MIT
|
||||
* Version: 0.22
|
||||
*
|
||||
* URL:
|
||||
* https://github.com/Schepp/
|
||||
*
|
||||
*/
|
||||
;(function(window){
|
||||
var polyfilter = {
|
||||
// Detect if we are dealing with IE <= 9
|
||||
// http://james.padolsey.com/javascript/detect-_ie-in-js-using-conditional-comments/
|
||||
_ie: (function(){
|
||||
var undef,
|
||||
v = 3,
|
||||
div = document.createElement('div'),
|
||||
all = div.getElementsByTagName('i');
|
||||
|
||||
while(
|
||||
div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->',
|
||||
all[0]
|
||||
);
|
||||
|
||||
return v > 4 ? v : undef;
|
||||
}()),
|
||||
|
||||
_svg_cache: {},
|
||||
|
||||
_create_svg_element: function(tagname,attributes){
|
||||
var xmlns = 'http://www.w3.org/2000/svg';
|
||||
var elem = document.createElementNS(xmlns,tagname);
|
||||
for(key in attributes){
|
||||
elem.setAttributeNS(null,key,attributes[key]);
|
||||
}
|
||||
|
||||
return elem;
|
||||
},
|
||||
|
||||
_create_svg: function(id,filterelements){
|
||||
var xmlns = 'http://www.w3.org/2000/svg';
|
||||
var svg = document.createElementNS(xmlns,'svg');
|
||||
svg.setAttributeNS(null,'width','0');
|
||||
svg.setAttributeNS(null,'height','0');
|
||||
svg.setAttributeNS(null,'style','position:absolute');
|
||||
|
||||
var svg_filter = document.createElementNS(xmlns,'filter');
|
||||
svg_filter.setAttributeNS(null,'id',id);
|
||||
svg.appendChild(svg_filter);
|
||||
|
||||
for(var i = 0; i < filterelements.length; i++){
|
||||
svg_filter.appendChild(filterelements[i]);
|
||||
}
|
||||
|
||||
return svg;
|
||||
},
|
||||
|
||||
_pending_stylesheets: 0,
|
||||
|
||||
_stylesheets: [],
|
||||
|
||||
_development_mode: (function(){
|
||||
if(location.hostname === 'localhost' || location.hostname.search(/.local$/) !== -1 || location.hostname.search(/\d+\.\d+\.\d+\.\d+/) !== -1){
|
||||
if(window.console) console.log('Detected localhost or IP address. Assuming you are a developer. Caching of stylesheets is disabled.');
|
||||
return true;
|
||||
}
|
||||
if(window.console) console.log('Caching of stylesheets is enabled. You need to refresh twice to see any changes.');
|
||||
return false;
|
||||
})(),
|
||||
|
||||
process_stylesheets: function(){
|
||||
var xmlHttp = [];
|
||||
|
||||
// Check if path to library is correct, do that 2 secs. after this to not disturb initial processing
|
||||
window.setTimeout(function(){
|
||||
if (window.XMLHttpRequest) {
|
||||
var xmlHttpCheck = new XMLHttpRequest();
|
||||
} else if (window.ActiveXObject) {
|
||||
var xmlHttpCheck = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
xmlHttpCheck.open('GET', window.polyfilter_scriptpath + 'htc/sepia.htc', true);
|
||||
xmlHttpCheck.onreadystatechange = function(){
|
||||
if(xmlHttp.readyState == 4 && xmlHttp.status != 200){
|
||||
alert('The configured path \r\rvar polyfilter_scriptpath = "' + window.polyfilter_scriptpath + '"\r\rseems wrong!\r\rConfigure the polyfill\'s correct absolute(!) script path before referencing the css-filters-polyfill.js, like so:\r\rvar polyfilter_scriptpath = "/js/css-filters-polyfill/";\r\rLeaving IE dead in the water is no option. You damn Mac user... ;)');
|
||||
}
|
||||
};
|
||||
try{
|
||||
xmlHttpCheck.send(null);
|
||||
} catch(e){}
|
||||
},2000);
|
||||
|
||||
|
||||
var stylesheets = document.querySelectorAll ? document.querySelectorAll('style,link[rel="stylesheet"]') : document.getElementsByTagName('*');
|
||||
|
||||
for(var i = 0; i < stylesheets.length; i++){
|
||||
(function(i){
|
||||
switch(stylesheets[i].nodeName){
|
||||
default:
|
||||
break;
|
||||
|
||||
case 'STYLE':
|
||||
polyfilter._stylesheets.push({
|
||||
media: stylesheets[i].media || 'all',
|
||||
content: stylesheets[i].innerHTML
|
||||
});
|
||||
break;
|
||||
|
||||
case 'LINK':
|
||||
if(stylesheets[i].rel === 'stylesheet'){
|
||||
var index = polyfilter._stylesheets.length;
|
||||
|
||||
polyfilter._stylesheets.push({
|
||||
media: stylesheets[i].media || 'all'
|
||||
});
|
||||
|
||||
polyfilter._pending_stylesheets++;
|
||||
|
||||
// Fetch external stylesheet
|
||||
var href = stylesheets[i].href;
|
||||
|
||||
// Use localStorage as cache for stylesheets, if available
|
||||
if(!polyfilter._development_mode && window.localStorage && window.localStorage.getItem('polyfilter_' + href)){
|
||||
polyfilter._pending_stylesheets--;
|
||||
polyfilter._stylesheets[index].content = localStorage.getItem('polyfilter_' + href);
|
||||
if(polyfilter._pending_stylesheets === 0){
|
||||
polyfilter.process();
|
||||
}
|
||||
}
|
||||
|
||||
// Always fetch stylesheets to reflect possible changes
|
||||
try{
|
||||
if(window.XMLHttpRequest) {
|
||||
var xmlHttp = new XMLHttpRequest();
|
||||
} else if(window.ActiveXObject) {
|
||||
var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
xmlHttp.open('GET', href, true);
|
||||
xmlHttp.onreadystatechange = function(){
|
||||
if(xmlHttp.readyState === 4){
|
||||
if(xmlHttp.status === 0){
|
||||
if(window.console) console.log('Could not fetch external CSS via HTTP-Request ' + href + '. Probably because of cross origin.');
|
||||
if(!polyfilter._stylesheets[index].content){
|
||||
polyfilter._pending_stylesheets--;
|
||||
polyfilter._stylesheets[index].content = xmlHttp.responseText;
|
||||
if(polyfilter._pending_stylesheets === 0){
|
||||
polyfilter.process();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(!polyfilter._stylesheets[index].content){
|
||||
polyfilter._pending_stylesheets--;
|
||||
polyfilter._stylesheets[index].content = xmlHttp.responseText;
|
||||
if(polyfilter._pending_stylesheets === 0){
|
||||
polyfilter.process();
|
||||
}
|
||||
}
|
||||
// Cache stylesheet in localStorage, if available
|
||||
if(!polyfilter._development_mode && window.localStorage){
|
||||
try{
|
||||
window.localStorage.setItem('polyfilter_' + href,polyfilter._stylesheets[index].content)
|
||||
}
|
||||
catch(e){
|
||||
if(window.console) console.log('Local storage quota have been exceeded. Caching of stylesheet ' + href + ' is not possible');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
try{
|
||||
xmlHttp.send(null);
|
||||
} catch(e){
|
||||
if(window.console) console.log('Could not fetch external CSS via HTTP-Request ' + href + '. Are you maybe testing using the file://-protocol?');
|
||||
if(!polyfilter._stylesheets[index].content){
|
||||
polyfilter._pending_stylesheets--;
|
||||
if(polyfilter._pending_stylesheets === 0){
|
||||
polyfilter.process();
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch(e){}
|
||||
}
|
||||
break;
|
||||
}
|
||||
})(i);
|
||||
}
|
||||
if(this._pending_stylesheets === 0){
|
||||
this.process();
|
||||
}
|
||||
},
|
||||
|
||||
_processDeclarations: function(rule){
|
||||
var newstyles = '';
|
||||
for(var k in rule.declarations){
|
||||
var declaration = rule.declarations[k];
|
||||
|
||||
if(declaration.property === 'filter'){
|
||||
|
||||
if(document.querySelectorAll){
|
||||
var elems = document.querySelectorAll(rule.mSelectorText);
|
||||
for(var k = 0; k < elems.length; k++){
|
||||
elems[k].style.polyfilterStore = declaration.valueText;
|
||||
}
|
||||
}
|
||||
|
||||
var gluedvalues = declaration.valueText;
|
||||
var values = gluedvalues.split(/\)\s+/),
|
||||
properties = {
|
||||
filtersW3C: [],
|
||||
filtersWebKit: [],
|
||||
filtersSVG: [],
|
||||
filtersIE: [],
|
||||
behaviorsIE: []
|
||||
};
|
||||
|
||||
for(idx in values){
|
||||
var value = values[idx] + ')';
|
||||
|
||||
currentproperties = polyfilter.convert(value);
|
||||
|
||||
for(key in currentproperties){
|
||||
if(typeof properties[key] !== 'undefined'){
|
||||
properties[key] = properties[key].concat(currentproperties[key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
newstyles += rule.mSelectorText + '{';
|
||||
if(properties['filtersW3C'].length > 0){
|
||||
var filter =
|
||||
webkitFilter =
|
||||
mozFilter =
|
||||
oFilter =
|
||||
msFilter =
|
||||
properties['filtersW3C'].join(' ');
|
||||
|
||||
if(properties['filtersWebKit'] && properties['filtersWebKit'].length > 0){
|
||||
webkitFilter = properties['filtersWebKit'].join(' ');
|
||||
}
|
||||
|
||||
if(typeof this._ie === 'undefined'){
|
||||
newstyles += '-ms-filter:' + msFilter + ';';
|
||||
}
|
||||
|
||||
newstyles += '-webkit-filter:' + webkitFilter + ';';
|
||||
newstyles += '-moz-filter:' + mozFilter + ';';
|
||||
newstyles += '-o-filter:' + oFilter + ';';
|
||||
}
|
||||
if(properties['filtersSVG'].length > 0){
|
||||
if(properties['filtersSVG'][0] != 'none'){
|
||||
var id = gluedvalues.replace(/[^a-z0-9]/g,'');
|
||||
|
||||
if(typeof this._svg_cache[id] === 'undefined'){
|
||||
this._svg_cache[id] = this._create_svg(id,properties['filtersSVG']);
|
||||
|
||||
if(typeof XMLSerializer === 'undefined'){
|
||||
document.body.appendChild(this._svg_cache[id]);
|
||||
}
|
||||
else {
|
||||
var s = new XMLSerializer();
|
||||
var svgString = s.serializeToString(this._svg_cache[id]);
|
||||
if(svgString.search('SourceGraphic') != -1){
|
||||
document.body.appendChild(this._svg_cache[id]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(typeof XMLSerializer === 'undefined'){
|
||||
newstyles += 'filter: url(#' + id + ')';
|
||||
}
|
||||
else {
|
||||
var s = new XMLSerializer();
|
||||
var svgString = s.serializeToString(this._svg_cache[id]);
|
||||
|
||||
if(svgString.search('SourceGraphic') != -1){
|
||||
newstyles += 'filter: url(#' + id + ')';
|
||||
}
|
||||
else {
|
||||
newstyles += 'filter: url(\'data:image/svg+xml;utf8,' + svgString + '#' + id + '\')';
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
newstyles += 'filter: none;';
|
||||
}
|
||||
}
|
||||
if(typeof this._ie !== 'undefined'){
|
||||
if(properties['filtersIE'].length > 0){
|
||||
var filtersIE = properties['filtersIE'].join(' ');
|
||||
|
||||
newstyles += 'filter:' + filtersIE + ';';
|
||||
}
|
||||
if(properties['behaviorsIE'].length > 0){
|
||||
var behaviorsIE = properties['behaviorsIE'].join(' ');
|
||||
|
||||
newstyles += 'behavior:' + behaviorsIE + ';';
|
||||
}
|
||||
}
|
||||
newstyles += '}\r\n';
|
||||
}
|
||||
}
|
||||
return newstyles;
|
||||
},
|
||||
|
||||
// Absolute path to the .htc-files
|
||||
scriptpath:
|
||||
window.polyfilter_scriptpath ? window.polyfilter_scriptpath : (function(){
|
||||
alert('Please configure the polyfill\'s absolute(!) script path before referencing the css-filters-polyfill.js, like so:\r\nvar polyfilter_scriptpath = "/js/css-filters-polyfill/";');
|
||||
return './'
|
||||
})(),
|
||||
|
||||
// process stylesheets
|
||||
process: function(){
|
||||
var parser = new CSSParser();
|
||||
|
||||
for(var i = 0; i < this._stylesheets.length; i++){
|
||||
var newstyles = '';
|
||||
var sheet = parser.parse(this._stylesheets[i].content, false, true);
|
||||
if(sheet !== null) for(var j in sheet.cssRules){
|
||||
var rule = sheet.cssRules[j];
|
||||
|
||||
switch(rule.type){
|
||||
default:
|
||||
break;
|
||||
|
||||
case 1:
|
||||
newstyles += this._processDeclarations(rule);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
newstyles += '@media ' + rule.media.join(',') + '{';
|
||||
for(var k in rule.cssRules){
|
||||
var mediarule = rule.cssRules[k];
|
||||
|
||||
newstyles += this._processDeclarations(mediarule);
|
||||
}
|
||||
newstyles += '}';
|
||||
break;
|
||||
}
|
||||
}
|
||||
var newstylesheet = document.createElement('style');
|
||||
newstylesheet.setAttribute('media',this._stylesheets[i].media);
|
||||
|
||||
if(typeof polyfilter._ie === 'undefined'){
|
||||
newstylesheet.innerHTML = newstyles;
|
||||
document.getElementsByTagName('head')[0].appendChild(newstylesheet);
|
||||
}
|
||||
else {
|
||||
document.getElementsByTagName('head')[0].appendChild(newstylesheet);
|
||||
newstylesheet.styleSheet.cssText = newstyles;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
init: function(){
|
||||
if(Object.defineProperty){
|
||||
Object.defineProperty(CSSStyleDeclaration.prototype, 'polyfilter', {
|
||||
get: function(){
|
||||
return this.polyfilterStore;
|
||||
},
|
||||
set: function(gluedvalues){
|
||||
values = gluedvalues.split(/\)\s+/);
|
||||
var properties = {
|
||||
filtersW3C: [],
|
||||
filtersWebKit: [],
|
||||
filtersSVG: [],
|
||||
filtersIE: [],
|
||||
behaviorsIE: []
|
||||
}
|
||||
|
||||
for(idx in values){
|
||||
var value = values[idx] + ')';
|
||||
|
||||
currentproperties = polyfilter.convert(value);
|
||||
|
||||
for(key in currentproperties){
|
||||
if(typeof properties[key] !== 'undefined'){
|
||||
properties[key] = properties[key].concat(currentproperties[key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(properties['filtersW3C'].length > 0){
|
||||
if(typeof polyfilter._ie === 'undefined'){
|
||||
this.msFilter =
|
||||
properties['filtersW3C'].join(' ');
|
||||
}
|
||||
|
||||
this.webkitFilter =
|
||||
this.mozFilter =
|
||||
this.oFilter =
|
||||
properties['filtersW3C'].join(' ');
|
||||
}
|
||||
if(properties['filtersWebKit'].length > 0){
|
||||
this.webkitFilter = properties['filtersWebKit'].join(' ');
|
||||
}
|
||||
if(properties['filtersSVG'].length > 0){
|
||||
if(properties['filtersSVG'][0] != 'none'){
|
||||
var id = gluedvalues.replace(/[^a-z0-9]/g,'');
|
||||
|
||||
if(typeof polyfilter._svg_cache[id] === 'undefined'){
|
||||
polyfilter._svg_cache[id] = polyfilter._create_svg(id,properties['filtersSVG']);
|
||||
|
||||
if(typeof XMLSerializer === 'undefined'){
|
||||
document.body.appendChild(polyfilter._svg_cache[id]);
|
||||
}
|
||||
else {
|
||||
var s = new XMLSerializer();
|
||||
var svgString = s.serializeToString(polyfilter._svg_cache[id]);
|
||||
if(svgString.search('SourceGraphic') != -1){
|
||||
document.body.appendChild(polyfilter._svg_cache[id]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(typeof XMLSerializer === 'undefined'){
|
||||
this.filter = 'url(#' + id + ')';
|
||||
}
|
||||
else {
|
||||
var s = new XMLSerializer();
|
||||
var svgString = s.serializeToString(polyfilter._svg_cache[id]);
|
||||
if(svgString.search('SourceGraphic') != -1){
|
||||
this.filter = 'url(#' + id + ')';
|
||||
}
|
||||
else {
|
||||
this.filter = 'url(\'data:image/svg+xml;utf8,' + svgString + '#' + id + '\')';
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.filter = 'none';
|
||||
}
|
||||
}
|
||||
if(typeof polyfilter._ie !== 'undefined'){
|
||||
if(properties['filtersIE'].length > 0){
|
||||
this.filter =
|
||||
properties['filtersIE'].join(' ');
|
||||
}
|
||||
else {
|
||||
this.filter = '';
|
||||
}
|
||||
if(properties['behaviorsIE'].length > 0){
|
||||
this.behavior =
|
||||
properties['behaviorsIE'].join(' ');
|
||||
}
|
||||
else {
|
||||
this.behavior = '';
|
||||
}
|
||||
}
|
||||
this.polyfilterStore = gluedvalues;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
convert: function(value){
|
||||
// None
|
||||
var fmatch = value.match(/none/i);
|
||||
if(fmatch !== null){
|
||||
var properties = this.filters.none();
|
||||
}
|
||||
// Grayscale
|
||||
var fmatch = value.match(/(grayscale)\(([0-9\.]+)\)/i);
|
||||
if(fmatch !== null){
|
||||
var amount = parseFloat(fmatch[2],10),
|
||||
properties = this.filters.grayscale(amount);
|
||||
}
|
||||
// Sepia
|
||||
var fmatch = value.match(/(sepia)\(([0-9\.]+)\)/i);
|
||||
if(fmatch !== null){
|
||||
var amount = parseFloat(fmatch[2],10),
|
||||
properties = this.filters.sepia(amount);
|
||||
}
|
||||
// Blur
|
||||
var fmatch = value.match(/(blur)\(([0-9]+)[px]*\)/i);
|
||||
if(fmatch !== null){
|
||||
var amount = parseInt(fmatch[2],10),
|
||||
properties = this.filters.blur(amount);
|
||||
}
|
||||
// Invert
|
||||
var fmatch = value.match(/(invert)\(([0-9\.]+)\)/i);
|
||||
if(fmatch !== null){
|
||||
var amount = parseFloat(fmatch[2],10),
|
||||
properties = this.filters.invert(amount);
|
||||
}
|
||||
// Brightness
|
||||
var fmatch = value.match(/(brightness)\(([0-9\.]+)%\)/i);
|
||||
if(fmatch !== null){
|
||||
var amount = parseFloat(fmatch[2],10),
|
||||
properties = this.filters.brightness(amount);
|
||||
}
|
||||
// Drop Shadow
|
||||
var fmatch = value.match(/(drop\-shadow)\(([0-9]+)[px]*\s+([0-9]+)[px]*\s+([0-9]+)[px]*\s+([#0-9]+)\)/i);
|
||||
if(fmatch !== null){
|
||||
var offsetX = parseInt(fmatch[2],10),
|
||||
offsetY = parseInt(fmatch[3],10),
|
||||
radius = parseInt(fmatch[4],10),
|
||||
color = fmatch[5],
|
||||
properties = this.filters.dropShadow(offsetX,offsetY,radius,color);
|
||||
}
|
||||
|
||||
return properties;
|
||||
},
|
||||
|
||||
// EFFECTS SECTION -------------------------------------------------------------------------------------------------------------
|
||||
|
||||
filters: {
|
||||
// None
|
||||
none: function(){
|
||||
var properties = {};
|
||||
|
||||
if(typeof polyfilter._ie === 'undefined'){
|
||||
// Proposed spec
|
||||
properties['filtersW3C'] = ['none'];
|
||||
|
||||
// Firefox
|
||||
properties['filtersSVG'] = ['none'];
|
||||
}
|
||||
else {
|
||||
// IE
|
||||
properties['filtersIE'] = ['none'];
|
||||
}
|
||||
|
||||
return properties;
|
||||
},
|
||||
|
||||
// Grayscale
|
||||
grayscale: function(amount){
|
||||
amount = amount || 0;
|
||||
|
||||
var properties = {};
|
||||
|
||||
if(typeof polyfilter._ie === 'undefined'){
|
||||
// Proposed spec
|
||||
properties['filtersW3C'] = ['grayscale(' + amount + ')'];
|
||||
|
||||
// Firefox
|
||||
// https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html
|
||||
var svg_fe1 = polyfilter._create_svg_element('feColorMatrix',{
|
||||
type: 'matrix',
|
||||
values: (0.2126 + 0.7874 * (1 - amount)) + ' '
|
||||
+ (0.7152 - 0.7152 * (1 - amount)) + ' '
|
||||
+ (0.0722 - 0.0722 * (1 - amount)) + ' 0 0 '
|
||||
+ (0.2126 - 0.2126 * (1 - amount)) + ' '
|
||||
+ (0.7152 + 0.2848 * (1 - amount)) + ' '
|
||||
+ (0.0722 - 0.0722 * (1 - amount)) + ' 0 0 '
|
||||
+ (0.2126 - 0.2126 * (1 - amount)) + ' '
|
||||
+ (0.7152 - 0.7152 * (1 - amount)) + ' '
|
||||
+ (0.0722 + 0.9278 * (1 - amount)) + ' 0 0 0 0 0 1 0'
|
||||
});
|
||||
properties['filtersSVG'] = [svg_fe1];
|
||||
}
|
||||
else {
|
||||
// IE
|
||||
properties['filtersIE'] = amount >= 0.5 ? ['gray'] : [];
|
||||
}
|
||||
|
||||
return properties;
|
||||
},
|
||||
|
||||
// Sepia
|
||||
sepia: function(amount){
|
||||
amount = amount || 0;
|
||||
|
||||
var properties = {};
|
||||
|
||||
if(typeof polyfilter._ie === 'undefined'){
|
||||
|
||||
// Proposed spec
|
||||
properties['filtersW3C'] = ['sepia(' + amount + ')'];
|
||||
|
||||
// Firefox
|
||||
// https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html
|
||||
var svg_fe1 = polyfilter._create_svg_element('feColorMatrix',{
|
||||
type: 'matrix',
|
||||
values: (0.393 + 0.607 * (1 - amount)) + ' '
|
||||
+ (0.769 - 0.769 * (1 - amount)) + ' '
|
||||
+ (0.189 - 0.189 * (1 - amount)) + ' 0 0 '
|
||||
+ (0.349 - 0.349 * (1 - amount)) + ' '
|
||||
+ (0.686 + 0.314 * (1 - amount)) + ' '
|
||||
+ (0.168 - 0.168 * (1 - amount)) + ' 0 0 '
|
||||
+ (0.272 - 0.272 * (1 - amount)) + ' '
|
||||
+ (0.534 - 0.534 * (1 - amount)) + ' '
|
||||
+ (0.131 + 0.869 * (1 - amount)) + ' 0 0 0 0 0 1 0'
|
||||
});
|
||||
properties['filtersSVG'] = [svg_fe1];
|
||||
}
|
||||
else {
|
||||
// IE
|
||||
properties['filtersIE'] = amount >= 0.5 ? ['gray','progid:DXImageTransform.Microsoft.Light()'] : [];
|
||||
properties['behaviorsIE'] = amount >= 0.5 ? ['url("' + polyfilter.scriptpath + 'htc/sepia.htc")'] : [];
|
||||
}
|
||||
|
||||
return properties;
|
||||
},
|
||||
|
||||
// Blur
|
||||
blur: function(amount){
|
||||
amount = Math.round(amount) || 0;
|
||||
|
||||
var properties = {};
|
||||
|
||||
if(typeof polyfilter._ie === 'undefined'){
|
||||
// Proposed spec
|
||||
properties['filtersW3C'] = ['blur(' + amount + 'px)'];
|
||||
|
||||
// Firefox
|
||||
// https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html
|
||||
var svg_fe1 = polyfilter._create_svg_element('feGaussianBlur',{
|
||||
'in': 'SourceGraphic',
|
||||
stdDeviation: amount
|
||||
});
|
||||
properties['filtersSVG'] = [svg_fe1];
|
||||
}
|
||||
else {
|
||||
// IE
|
||||
properties['filtersIE'] = ['progid:DXImageTransform.Microsoft.Blur(pixelradius=' + amount + ')'];
|
||||
}
|
||||
|
||||
return properties;
|
||||
},
|
||||
|
||||
// Invert
|
||||
invert: function(amount){
|
||||
amount = amount || 0;
|
||||
|
||||
var properties = {};
|
||||
|
||||
if(typeof polyfilter._ie === 'undefined'){
|
||||
// Proposed spec
|
||||
properties['filtersW3C'] = ['invert(' + amount + ')'];
|
||||
|
||||
// Firefox
|
||||
// https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html
|
||||
var svg_fe1 = polyfilter._create_svg_element('feComponentTransfer',{});
|
||||
var svg_fe1sub = polyfilter._create_svg_element('feFuncR',{
|
||||
type: 'table',
|
||||
tableValues: amount + ' ' + (1 - amount)
|
||||
});
|
||||
svg_fe1.appendChild(svg_fe1sub);
|
||||
var svg_fe1sub = polyfilter._create_svg_element('feFuncG',{
|
||||
type: 'table',
|
||||
tableValues: amount + ' ' + (1 - amount)
|
||||
});
|
||||
svg_fe1.appendChild(svg_fe1sub);
|
||||
var svg_fe1sub = polyfilter._create_svg_element('feFuncB',{
|
||||
type: 'table',
|
||||
tableValues: amount + ' ' + (1 - amount)
|
||||
});
|
||||
svg_fe1.appendChild(svg_fe1sub);
|
||||
properties['filtersSVG'] = [svg_fe1];
|
||||
}
|
||||
else {
|
||||
// IE
|
||||
properties['filtersIE'] = amount >= 0.5 ? ['invert'] : [];
|
||||
}
|
||||
|
||||
return properties;
|
||||
},
|
||||
|
||||
// Brightness
|
||||
brightness: function(amount){
|
||||
amount = amount || 0;
|
||||
|
||||
var properties = {};
|
||||
|
||||
if(typeof polyfilter._ie === 'undefined'){
|
||||
// Proposed spec
|
||||
properties['filtersW3C'] = ['brightness(' + amount + '%)'];
|
||||
|
||||
// WebKit "specialty"
|
||||
properties['filtersWebKit'] = ['brightness(' + (amount - 100) + '%)'];
|
||||
|
||||
// Firefox
|
||||
// https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html
|
||||
var svg_fe1 = polyfilter._create_svg_element('feComponentTransfer',{});
|
||||
var svg_fe1sub = polyfilter._create_svg_element('feFuncR',{
|
||||
type: 'linear',
|
||||
slope: amount / 100
|
||||
});
|
||||
svg_fe1.appendChild(svg_fe1sub);
|
||||
var svg_fe1sub = polyfilter._create_svg_element('feFuncG',{
|
||||
type: 'linear',
|
||||
slope: amount / 100
|
||||
});
|
||||
svg_fe1.appendChild(svg_fe1sub);
|
||||
var svg_fe1sub = polyfilter._create_svg_element('feFuncB',{
|
||||
type: 'linear',
|
||||
slope: amount / 100
|
||||
});
|
||||
svg_fe1.appendChild(svg_fe1sub);
|
||||
properties['filtersSVG'] = [svg_fe1];
|
||||
}
|
||||
else {
|
||||
// IE
|
||||
properties['filtersIE'] = ['progid:DXImageTransform.Microsoft.Light()'];
|
||||
properties['behaviorsIE'] = ['url("' + polyfilter.scriptpath + 'htc/brightness.htc")'];
|
||||
}
|
||||
|
||||
return properties;
|
||||
},
|
||||
|
||||
// Drop Shadow
|
||||
dropShadow: function(offsetX,offsetY,radius,color){
|
||||
offsetX = Math.round(offsetX) || 0;
|
||||
offsetY = Math.round(offsetY) || 0;
|
||||
radius = Math.round(radius) || 0;
|
||||
color = color || '#000000';
|
||||
|
||||
var properties = {};
|
||||
|
||||
if(typeof polyfilter._ie === 'undefined'){
|
||||
// Proposed spec
|
||||
properties['filtersW3C'] = ['drop-shadow(' + offsetX + 'px ' + offsetY + 'px ' + radius + 'px ' + color + ')'];
|
||||
|
||||
// Firefox
|
||||
// https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html
|
||||
var svg_fe1 = polyfilter._create_svg_element('feGaussianBlur',{
|
||||
'in': 'SourceAlpha',
|
||||
stdDeviation: radius
|
||||
});
|
||||
var svg_fe2 = polyfilter._create_svg_element('feOffset',{
|
||||
dx: offsetX + 1,
|
||||
dy: offsetY + 1,
|
||||
result: 'offsetblur'
|
||||
});
|
||||
var svg_fe3 = polyfilter._create_svg_element('feFlood',{
|
||||
'flood-color': color
|
||||
});
|
||||
var svg_fe4 = polyfilter._create_svg_element('feComposite',{
|
||||
in2: 'offsetblur',
|
||||
operator: 'in'
|
||||
});
|
||||
var svg_fe5 = polyfilter._create_svg_element('feMerge',{});
|
||||
var svg_fe5sub = polyfilter._create_svg_element('feMergeNode',{});
|
||||
svg_fe5.appendChild(svg_fe5sub);
|
||||
var svg_fe5sub = polyfilter._create_svg_element('feMergeNode',{
|
||||
'in': 'SourceGraphic'
|
||||
});
|
||||
svg_fe5.appendChild(svg_fe5sub);
|
||||
properties['filtersSVG'] = [svg_fe1,svg_fe2,svg_fe3,svg_fe4,svg_fe5];
|
||||
}
|
||||
else {
|
||||
// IE
|
||||
properties['filtersIE'] = ['progid:DXImageTransform.Microsoft.Glow(color=' + color + ',strength=0)','progid:DXImageTransform.Microsoft.Shadow(color=' + color + ',strength=0)'];
|
||||
properties['behaviorsIE'] = ['url("' + polyfilter.scriptpath + 'htc/drop-shadow.htc")'];
|
||||
}
|
||||
|
||||
return properties;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Inialize, either via jQuery...
|
||||
if(window.jQuery){
|
||||
window.jQuery(document).ready(function(e) {
|
||||
polyfilter.process_stylesheets();
|
||||
});
|
||||
}
|
||||
// or via contentLoaded...
|
||||
else if(window.contentLoaded){
|
||||
contentLoaded(window,function(){
|
||||
polyfilter.process_stylesheets();
|
||||
});
|
||||
}
|
||||
// or on DOM ready / load
|
||||
else {
|
||||
if(window.addEventListener) // W3C standard
|
||||
{
|
||||
document.addEventListener('DOMContentLoaded', function(){
|
||||
polyfilter.process_stylesheets();
|
||||
}, false);
|
||||
}
|
||||
else if(window.attachEvent) // Microsoft
|
||||
{
|
||||
window.attachEvent('onload', function(){
|
||||
polyfilter.process_stylesheets();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Install style setters and getters
|
||||
polyfilter.init();
|
||||
})(window);
|