├── .classpath ├── .gitignore ├── .project ├── .settings ├── .jsdtscope ├── org.eclipse.jdt.core.prefs ├── org.eclipse.wst.common.component ├── org.eclipse.wst.common.project.facet.core.xml ├── org.eclipse.wst.jsdt.ui.superType.container └── org.eclipse.wst.jsdt.ui.superType.name ├── README.md ├── WebContent ├── META-INF │ └── MANIFEST.MF ├── WEB-INF │ ├── lib │ │ └── mysql-connector-java-8.0.17.jar │ └── web.xml ├── admin.jsp ├── admin_book.jsp ├── admin_booktype.jsp ├── admin_borrow.jsp ├── admin_history.jsp ├── admin_user.jsp ├── borrow.jsp ├── history.jsp ├── index.jsp ├── index2.jsp ├── login.jsp ├── register.jsp ├── select.jsp └── static │ ├── arrow_down.gif │ ├── assets │ ├── css │ │ ├── admin.css │ │ ├── amazeui.datatables.min.css │ │ ├── amazeui.min.css │ │ ├── app.css │ │ ├── app.less │ │ ├── fullcalendar.min.css │ │ └── fullcalendar.print.css │ ├── fonts │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 │ ├── i │ │ ├── app-icon72x72@2x.png │ │ ├── examples │ │ │ ├── admin-chrome.png │ │ │ ├── admin-firefox.png │ │ │ ├── admin-ie.png │ │ │ ├── admin-opera.png │ │ │ ├── admin-safari.png │ │ │ ├── adminPage.png │ │ │ ├── blogPage.png │ │ │ ├── landing.png │ │ │ ├── landingPage.png │ │ │ ├── loginPage.png │ │ │ └── sidebarPage.png │ │ ├── favicon.png │ │ └── startup-640x1096.png │ ├── img │ │ ├── a5.png │ │ ├── k.jpg │ │ ├── logo.png │ │ ├── logoa.png │ │ ├── logob.png │ │ ├── user01.png │ │ ├── user02.png │ │ ├── user03.png │ │ ├── user04.png │ │ ├── user05.png │ │ ├── user06.png │ │ └── user07.png │ └── js │ │ ├── amazeui.datatables.min.js │ │ ├── app.js │ │ ├── dataTables.responsive.min.js │ │ ├── fullcalendar.min.js │ │ ├── jquery.min.js │ │ ├── moment.js │ │ └── theme.js │ ├── base64.js.下载 │ ├── bootstrap.css │ ├── css │ ├── bootstrap-admin-theme.css │ ├── bootstrap-theme.css │ ├── bootstrap-theme.css.map │ ├── bootstrap-theme.min.css │ ├── bootstrap-theme.min.css.map │ ├── bootstrap.css │ ├── bootstrap.css.map │ ├── bootstrap.min.css │ ├── bootstrap.min.css.map │ └── dataTables.bootstrap.css │ ├── font-awesome.css │ ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 │ ├── highlighter.js.下载 │ ├── img │ ├── 404.png │ ├── 404view.png │ ├── 500.png │ ├── 500view.jpg │ ├── java46.jpg │ ├── java47.jpg │ ├── java48.jpg │ ├── java49.jpg │ ├── java50.jpg │ ├── java51.jpg │ ├── java52.jpg │ ├── java53.jpg │ ├── java54.jpg │ ├── java55.jpg │ ├── java56.jpg │ ├── java57.jpg │ ├── java58.jpg │ ├── java59.jpg │ ├── java60.jpg │ └── nopass.png │ ├── jQuery │ ├── ajaxfileupload.js │ └── jquery-3.1.1.min.js │ ├── jquery-ui-1.8.13.custom.css │ ├── jquery-ui-1.8.13.custom.min.js.下载 │ ├── jquery.1.7.1.min.js.下载 │ ├── js │ ├── addAdmin.js │ ├── addBook.js │ ├── addBookNum.js │ ├── addBookType.js │ ├── addReader.js │ ├── addReaderType.js │ ├── adminLogin.js │ ├── adminUpdateInfo.js │ ├── adminUpdatePwd.js │ ├── ajax_upload.js │ ├── backBook.js │ ├── batchAddBook.js │ ├── batchAddReader.js │ ├── bootstrap-dropdown.min.js │ ├── bootstrap.js │ ├── bootstrap.min.js │ ├── borrowBook.js │ ├── dataTables.bootstrap.js │ ├── deleteAdmin.js │ ├── deleteBook.js │ ├── deleteBookType.js │ ├── deleteReader.js │ ├── exportBook.js │ ├── exportReader.js │ ├── getAllBookTypes.js │ ├── getAllReaderTypes.js │ ├── getBackInfo.js │ ├── getBookInfo.js │ ├── getBookTypes.js │ ├── getBorrowInfo.js │ ├── getForfeitInfo.js │ ├── getReader.js │ ├── getReaderBackInfo.js │ ├── getReaderBookInfo.js │ ├── getReaderForfeitInfo.js │ ├── jquery.dataTables.zh_CN.js │ ├── login.js │ ├── npm.js │ ├── pay.js │ ├── reader.js │ ├── readerUpdateInfo.js │ ├── readerUpdatePwd.js │ ├── renewBook.js │ ├── updateAdmin.js │ ├── updateAuthorization.js │ ├── updateBook.js │ ├── updateBookType.js │ ├── updateReader.js │ └── updateReaderType.js │ ├── justgage.js.下载 │ ├── libimg.png │ ├── md5.js.下载 │ ├── mylib.css │ ├── raphael.2.1.0.min.js.下载 │ ├── reader-info.css │ └── style.css ├── books.sql └── src └── com └── hry ├── bean ├── AdminBean.java ├── BookBean.java ├── HistoryBean.java └── TypeBean.java ├── dao ├── AdminDao.java ├── BookDao.java └── TypeDao.java ├── dbUtils ├── DbUtil.java └── TestDb.java └── servlet ├── AddBookServlet.java ├── AddBookTypeServlet.java ├── AddUserServlet.java ├── AdminServlet.java ├── BorrowServlet.java ├── DeleteServlet.java ├── DeleteTypeServlet.java ├── DeleteUserServlet.java ├── LoginServlet.java ├── RegisterServlet.java ├── SelectServlet.java ├── UpdateBookServlet.java ├── UpdateBookTypeServlet.java └── UpdateUserServlet.java /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Library_management 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.wst.common.project.facet.core.builder 15 | 16 | 17 | 18 | 19 | org.eclipse.wst.validation.validationbuilder 20 | 21 | 22 | 23 | 24 | 25 | org.eclipse.jem.workbench.JavaEMFNature 26 | org.eclipse.wst.common.modulecore.ModuleCoreNature 27 | org.eclipse.wst.common.project.facet.core.nature 28 | org.eclipse.jdt.core.javanature 29 | org.eclipse.wst.jsdt.core.jsNature 30 | 31 | 32 | -------------------------------------------------------------------------------- /.settings/.jsdtscope: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.compliance=1.8 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.8 8 | -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.common.component: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.jsdt.ui.superType.container: -------------------------------------------------------------------------------- 1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.jsdt.ui.superType.name: -------------------------------------------------------------------------------- 1 | Window -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Library_management- 2 | 基于JavaWeb开发的图书管理系统 3 | ### 运行环境 4 | 数据库用的是8.0.17 5 | Tocat 9.0 6 | JDK1.8 7 | -------------------------------------------------------------------------------- /WebContent/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /WebContent/WEB-INF/lib/mysql-connector-java-8.0.17.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/WEB-INF/lib/mysql-connector-java-8.0.17.jar -------------------------------------------------------------------------------- /WebContent/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Library_management 4 | 5 | index.html 6 | index.htm 7 | index.jsp 8 | login.jsp 9 | default.html 10 | default.htm 11 | default.jsp 12 | 13 | -------------------------------------------------------------------------------- /WebContent/index.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | 图书馆管理系统 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
35 |
36 |
37 | × 38 | 欢迎登录图书馆管理系统 39 |
40 | 41 | 72 |
73 |
74 |
75 | 98 | 99 | -------------------------------------------------------------------------------- /WebContent/login.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> 2 | 3 | 4 | 5 | 6 | 图书馆管理系统 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 |
33 |
34 |
35 |
36 | × 37 | 欢迎登录图书馆管理系统 38 |
39 | 40 | 65 |
66 |
67 |
68 | 86 | 87 | -------------------------------------------------------------------------------- /WebContent/register.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 注册 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 |
29 |
30 |
31 |
32 |
33 | 选择主题 34 |
35 |
36 | 37 | 38 |
39 |
40 |
41 |
42 | 80 |
81 |
82 | 83 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /WebContent/static/arrow_down.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/arrow_down.gif -------------------------------------------------------------------------------- /WebContent/static/assets/css/admin.css: -------------------------------------------------------------------------------- 1 | /** 2 | * admin.css 3 | */ 4 | 5 | 6 | /* 7 | fixed-layout 固定头部和边栏布局 8 | */ 9 | 10 | html, 11 | body { 12 | height: 100%; 13 | overflow: hidden; 14 | } 15 | 16 | ul { 17 | margin-top: 0; 18 | } 19 | 20 | .admin-icon-yellow { 21 | color: #ffbe40; 22 | } 23 | 24 | .admin-header { 25 | position: fixed; 26 | top: 0; 27 | left: 0; 28 | right: 0; 29 | z-index: 1500; 30 | font-size: 1.4rem; 31 | margin-bottom: 0; 32 | } 33 | 34 | .admin-header-list a:hover :after { 35 | content: none; 36 | } 37 | 38 | .admin-main { 39 | position: relative; 40 | height: 100%; 41 | padding-top: 51px; 42 | background: #f3f3f3; 43 | } 44 | 45 | .admin-menu { 46 | position: fixed; 47 | z-index: 10; 48 | bottom: 30px; 49 | right: 20px; 50 | } 51 | 52 | .admin-sidebar { 53 | width: 260px; 54 | min-height: 100%; 55 | float: left; 56 | border-right: 1px solid #cecece; 57 | } 58 | 59 | .admin-sidebar.am-active { 60 | z-index: 1600; 61 | } 62 | 63 | .admin-sidebar-list { 64 | margin-bottom: 0; 65 | } 66 | 67 | .admin-sidebar-list li a { 68 | color: #5c5c5c; 69 | padding-left: 24px; 70 | } 71 | 72 | .admin-sidebar-list li:first-child { 73 | border-top: none; 74 | } 75 | 76 | .admin-sidebar-sub { 77 | margin-top: 0; 78 | margin-bottom: 0; 79 | box-shadow: 0 16px 8px -15px #e2e2e2 inset; 80 | background: #ececec; 81 | padding-left: 24px; 82 | } 83 | 84 | .admin-sidebar-sub li:first-child { 85 | border-top: 1px solid #dedede; 86 | } 87 | 88 | .admin-sidebar-panel { 89 | margin: 10px; 90 | } 91 | 92 | .admin-content { 93 | display: -webkit-box; 94 | display: -webkit-flex; 95 | display: -ms-flexbox; 96 | display: flex; 97 | -webkit-box-orient: vertical; 98 | -webkit-box-direction: normal; 99 | -webkit-flex-direction: column; 100 | -ms-flex-direction: column; 101 | flex-direction: column; 102 | background: #fff; 103 | } 104 | 105 | .admin-content, 106 | .admin-sidebar { 107 | height: 100%; 108 | overflow-x: hidden; 109 | overflow-y: scroll; 110 | -webkit-overflow-scrolling: touch; 111 | } 112 | 113 | .admin-content-body { 114 | -webkit-box-flex: 1; 115 | -webkit-flex: 1 0 auto; 116 | -ms-flex: 1 0 auto; 117 | flex: 1 0 auto; 118 | } 119 | 120 | .admin-content-footer { 121 | font-size: 85%; 122 | color: #777; 123 | } 124 | 125 | .admin-content-list { 126 | border: 1px solid #e9ecf1; 127 | margin-top: 0; 128 | } 129 | 130 | .admin-content-list li { 131 | border: 1px solid #e9ecf1; 132 | border-width: 0 1px; 133 | margin-left: -1px; 134 | } 135 | 136 | .admin-content-list li:first-child { 137 | border-left: none; 138 | } 139 | 140 | .admin-content-list li:last-child { 141 | border-right: none; 142 | } 143 | 144 | .admin-content-table a { 145 | color: #535353; 146 | } 147 | .admin-content-file { 148 | margin-bottom: 0; 149 | color: #666; 150 | } 151 | 152 | .admin-content-file p { 153 | margin: 0 0 5px 0; 154 | font-size: 1.4rem; 155 | } 156 | 157 | .admin-content-file li { 158 | padding: 10px 0; 159 | } 160 | 161 | .admin-content-file li:first-child { 162 | border-top: none; 163 | } 164 | 165 | .admin-content-file li:last-child { 166 | border-bottom: none; 167 | } 168 | 169 | .admin-content-file li .am-progress { 170 | margin-bottom: 4px; 171 | } 172 | 173 | .admin-content-file li .am-progress-bar { 174 | line-height: 14px; 175 | } 176 | 177 | .admin-content-task { 178 | margin-bottom: 0; 179 | } 180 | 181 | .admin-content-task li { 182 | padding: 5px 0; 183 | border-color: #eee; 184 | } 185 | 186 | .admin-content-task li:first-child { 187 | border-top: none; 188 | } 189 | 190 | .admin-content-task li:last-child { 191 | border-bottom: none; 192 | } 193 | 194 | .admin-task-meta { 195 | font-size: 1.2rem; 196 | color: #999; 197 | } 198 | 199 | .admin-task-bd { 200 | font-size: 1.4rem; 201 | margin-bottom: 5px; 202 | } 203 | 204 | .admin-content-comment { 205 | margin-bottom: 0; 206 | } 207 | 208 | .admin-content-comment .am-comment-bd { 209 | font-size: 1.4rem; 210 | } 211 | 212 | .admin-content-pagination { 213 | margin-bottom: 0; 214 | } 215 | .admin-content-pagination li a { 216 | padding: 4px 8px; 217 | } 218 | 219 | @media only screen and (min-width: 641px) { 220 | .admin-sidebar { 221 | display: block; 222 | position: static; 223 | background: none; 224 | } 225 | 226 | .admin-offcanvas-bar { 227 | position: static; 228 | width: auto; 229 | background: none; 230 | -webkit-transform: translate3d(0, 0, 0); 231 | -ms-transform: translate3d(0, 0, 0); 232 | transform: translate3d(0, 0, 0); 233 | overflow-y: visible; 234 | min-height: 100%; 235 | } 236 | .admin-offcanvas-bar:after { 237 | content: none; 238 | } 239 | } 240 | 241 | @media only screen and (max-width: 640px) { 242 | .admin-sidebar { 243 | width: inherit; 244 | } 245 | 246 | .admin-offcanvas-bar { 247 | background: #f3f3f3; 248 | } 249 | 250 | .admin-offcanvas-bar:after { 251 | background: #BABABA; 252 | } 253 | 254 | .admin-sidebar-list a:hover, .admin-sidebar-list a:active{ 255 | -webkit-transition: background-color .3s ease; 256 | -moz-transition: background-color .3s ease; 257 | -ms-transition: background-color .3s ease; 258 | -o-transition: background-color .3s ease; 259 | transition: background-color .3s ease; 260 | background: #E4E4E4; 261 | } 262 | 263 | .admin-content-list li { 264 | padding: 10px; 265 | border-width: 1px 0; 266 | margin-top: -1px; 267 | } 268 | 269 | .admin-content-list li:first-child { 270 | border-top: none; 271 | } 272 | 273 | .admin-content-list li:last-child { 274 | border-bottom: none; 275 | } 276 | 277 | .admin-form-text { 278 | text-align: left !important; 279 | } 280 | 281 | } 282 | 283 | /* 284 | * user.html css 285 | */ 286 | .user-info { 287 | margin-bottom: 15px; 288 | } 289 | 290 | .user-info .am-progress { 291 | margin-bottom: 4px; 292 | } 293 | 294 | .user-info p { 295 | margin: 5px; 296 | } 297 | 298 | .user-info-order { 299 | font-size: 1.4rem; 300 | } 301 | 302 | /* 303 | * errorLog.html css 304 | */ 305 | 306 | .error-log .am-pre-scrollable { 307 | max-height: 40rem; 308 | } 309 | 310 | /* 311 | * table.html css 312 | */ 313 | 314 | .table-main { 315 | font-size: 1.4rem; 316 | padding: .5rem; 317 | } 318 | 319 | .table-main button { 320 | background: #fff; 321 | } 322 | 323 | .table-check { 324 | width: 30px; 325 | } 326 | 327 | .table-id { 328 | width: 50px; 329 | } 330 | 331 | @media only screen and (max-width: 640px) { 332 | .table-select { 333 | margin-top: 10px; 334 | margin-left: 5px; 335 | } 336 | } 337 | 338 | /* 339 | gallery.html css 340 | */ 341 | 342 | .gallery-list li { 343 | padding: 10px; 344 | } 345 | 346 | .gallery-list a { 347 | color: #666; 348 | } 349 | 350 | .gallery-list a:hover { 351 | color: #3bb4f2; 352 | } 353 | 354 | .gallery-title { 355 | margin-top: 6px; 356 | font-size: 1.4rem; 357 | } 358 | 359 | .gallery-desc { 360 | font-size: 1.2rem; 361 | margin-top: 4px; 362 | } 363 | 364 | /* 365 | 404.html css 366 | */ 367 | 368 | .page-404 { 369 | background: #fff; 370 | border: none; 371 | width: 200px; 372 | margin: 0 auto; 373 | } 374 | -------------------------------------------------------------------------------- /WebContent/static/assets/css/fullcalendar.print.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * FullCalendar v0.0.0 Print Stylesheet 3 | * Docs & License: http://fullcalendar.io/ 4 | * (c) 2016 Adam Shaw 5 | */ 6 | 7 | /* 8 | * Include this stylesheet on your page to get a more printer-friendly calendar. 9 | * When including this stylesheet, use the media='print' attribute of the tag. 10 | * Make sure to include this stylesheet IN ADDITION to the regular fullcalendar.css. 11 | */ 12 | 13 | .fc { 14 | max-width: 100% !important; 15 | } 16 | 17 | 18 | /* Global Event Restyling 19 | --------------------------------------------------------------------------------------------------*/ 20 | 21 | .fc-event { 22 | background: #fff !important; 23 | color: #000 !important; 24 | page-break-inside: avoid; 25 | } 26 | 27 | .fc-event .fc-resizer { 28 | display: none; 29 | } 30 | 31 | 32 | /* Table & Day-Row Restyling 33 | --------------------------------------------------------------------------------------------------*/ 34 | 35 | .fc th, 36 | .fc td, 37 | .fc hr, 38 | .fc thead, 39 | .fc tbody, 40 | .fc-row { 41 | border-color: #ccc !important; 42 | background: #fff !important; 43 | } 44 | 45 | /* kill the overlaid, absolutely-positioned components */ 46 | /* common... */ 47 | .fc-bg, 48 | .fc-bgevent-skeleton, 49 | .fc-highlight-skeleton, 50 | .fc-helper-skeleton, 51 | /* for timegrid. within cells within table skeletons... */ 52 | .fc-bgevent-container, 53 | .fc-business-container, 54 | .fc-highlight-container, 55 | .fc-helper-container { 56 | display: none; 57 | } 58 | 59 | /* don't force a min-height on rows (for DayGrid) */ 60 | .fc tbody .fc-row { 61 | height: auto !important; /* undo height that JS set in distributeHeight */ 62 | min-height: 0 !important; /* undo the min-height from each view's specific stylesheet */ 63 | } 64 | 65 | .fc tbody .fc-row .fc-content-skeleton { 66 | position: static; /* undo .fc-rigid */ 67 | padding-bottom: 0 !important; /* use a more border-friendly method for this... */ 68 | } 69 | 70 | .fc tbody .fc-row .fc-content-skeleton tbody tr:last-child td { /* only works in newer browsers */ 71 | padding-bottom: 1em; /* ...gives space within the skeleton. also ensures min height in a way */ 72 | } 73 | 74 | .fc tbody .fc-row .fc-content-skeleton table { 75 | /* provides a min-height for the row, but only effective for IE, which exaggerates this value, 76 | making it look more like 3em. for other browers, it will already be this tall */ 77 | height: 1em; 78 | } 79 | 80 | 81 | /* Undo month-view event limiting. Display all events and hide the "more" links 82 | --------------------------------------------------------------------------------------------------*/ 83 | 84 | .fc-more-cell, 85 | .fc-more { 86 | display: none !important; 87 | } 88 | 89 | .fc tr.fc-limited { 90 | display: table-row !important; 91 | } 92 | 93 | .fc td.fc-limited { 94 | display: table-cell !important; 95 | } 96 | 97 | .fc-popover { 98 | display: none; /* never display the "more.." popover in print mode */ 99 | } 100 | 101 | 102 | /* TimeGrid Restyling 103 | --------------------------------------------------------------------------------------------------*/ 104 | 105 | /* undo the min-height 100% trick used to fill the container's height */ 106 | .fc-time-grid { 107 | min-height: 0 !important; 108 | } 109 | 110 | /* don't display the side axis at all ("all-day" and time cells) */ 111 | .fc-agenda-view .fc-axis { 112 | display: none; 113 | } 114 | 115 | /* don't display the horizontal lines */ 116 | .fc-slats, 117 | .fc-time-grid hr { /* this hr is used when height is underused and needs to be filled */ 118 | display: none !important; /* important overrides inline declaration */ 119 | } 120 | 121 | /* let the container that holds the events be naturally positioned and create real height */ 122 | .fc-time-grid .fc-content-skeleton { 123 | position: static; 124 | } 125 | 126 | /* in case there are no events, we still want some height */ 127 | .fc-time-grid .fc-content-skeleton table { 128 | height: 4em; 129 | } 130 | 131 | /* kill the horizontal spacing made by the event container. event margins will be done below */ 132 | .fc-time-grid .fc-event-container { 133 | margin: 0 !important; 134 | } 135 | 136 | 137 | /* TimeGrid *Event* Restyling 138 | --------------------------------------------------------------------------------------------------*/ 139 | 140 | /* naturally position events, vertically stacking them */ 141 | .fc-time-grid .fc-event { 142 | position: static !important; 143 | margin: 3px 2px !important; 144 | } 145 | 146 | /* for events that continue to a future day, give the bottom border back */ 147 | .fc-time-grid .fc-event.fc-not-end { 148 | border-bottom-width: 1px !important; 149 | } 150 | 151 | /* indicate the event continues via "..." text */ 152 | .fc-time-grid .fc-event.fc-not-end:after { 153 | content: "..."; 154 | } 155 | 156 | /* for events that are continuations from previous days, give the top border back */ 157 | .fc-time-grid .fc-event.fc-not-start { 158 | border-top-width: 1px !important; 159 | } 160 | 161 | /* indicate the event is a continuation via "..." text */ 162 | .fc-time-grid .fc-event.fc-not-start:before { 163 | content: "..."; 164 | } 165 | 166 | /* time */ 167 | 168 | /* undo a previous declaration and let the time text span to a second line */ 169 | .fc-time-grid .fc-event .fc-time { 170 | white-space: normal !important; 171 | } 172 | 173 | /* hide the the time that is normally displayed... */ 174 | .fc-time-grid .fc-event .fc-time span { 175 | display: none; 176 | } 177 | 178 | /* ...replace it with a more verbose version (includes AM/PM) stored in an html attribute */ 179 | .fc-time-grid .fc-event .fc-time:after { 180 | content: attr(data-full); 181 | } 182 | 183 | 184 | /* Vertical Scroller & Containers 185 | --------------------------------------------------------------------------------------------------*/ 186 | 187 | /* kill the scrollbars and allow natural height */ 188 | .fc-scroller, 189 | .fc-day-grid-container, /* these divs might be assigned height, which we need to cleared */ 190 | .fc-time-grid-container { /* */ 191 | overflow: visible !important; 192 | height: auto !important; 193 | } 194 | 195 | /* kill the horizontal border/padding used to compensate for scrollbars */ 196 | .fc-row { 197 | border: 0 !important; 198 | margin: 0 !important; 199 | } 200 | 201 | 202 | /* Button Controls 203 | --------------------------------------------------------------------------------------------------*/ 204 | 205 | .fc-button-group, 206 | .fc button { 207 | display: none; /* don't display any button-related controls */ 208 | } 209 | -------------------------------------------------------------------------------- /WebContent/static/assets/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/assets/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /WebContent/static/assets/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/assets/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /WebContent/static/assets/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/assets/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /WebContent/static/assets/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/assets/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /WebContent/static/assets/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/assets/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /WebContent/static/assets/i/app-icon72x72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/assets/i/app-icon72x72@2x.png -------------------------------------------------------------------------------- /WebContent/static/assets/i/examples/admin-chrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/assets/i/examples/admin-chrome.png -------------------------------------------------------------------------------- /WebContent/static/assets/i/examples/admin-firefox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/assets/i/examples/admin-firefox.png -------------------------------------------------------------------------------- /WebContent/static/assets/i/examples/admin-ie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/assets/i/examples/admin-ie.png -------------------------------------------------------------------------------- /WebContent/static/assets/i/examples/admin-opera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/assets/i/examples/admin-opera.png -------------------------------------------------------------------------------- /WebContent/static/assets/i/examples/admin-safari.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/assets/i/examples/admin-safari.png -------------------------------------------------------------------------------- /WebContent/static/assets/i/examples/adminPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/assets/i/examples/adminPage.png -------------------------------------------------------------------------------- /WebContent/static/assets/i/examples/blogPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/assets/i/examples/blogPage.png -------------------------------------------------------------------------------- /WebContent/static/assets/i/examples/landing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/assets/i/examples/landing.png -------------------------------------------------------------------------------- /WebContent/static/assets/i/examples/landingPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/assets/i/examples/landingPage.png -------------------------------------------------------------------------------- /WebContent/static/assets/i/examples/loginPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/assets/i/examples/loginPage.png -------------------------------------------------------------------------------- /WebContent/static/assets/i/examples/sidebarPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/assets/i/examples/sidebarPage.png -------------------------------------------------------------------------------- /WebContent/static/assets/i/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/assets/i/favicon.png -------------------------------------------------------------------------------- /WebContent/static/assets/i/startup-640x1096.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/assets/i/startup-640x1096.png -------------------------------------------------------------------------------- /WebContent/static/assets/img/a5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/assets/img/a5.png -------------------------------------------------------------------------------- /WebContent/static/assets/img/k.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/assets/img/k.jpg -------------------------------------------------------------------------------- /WebContent/static/assets/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/assets/img/logo.png -------------------------------------------------------------------------------- /WebContent/static/assets/img/logoa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/assets/img/logoa.png -------------------------------------------------------------------------------- /WebContent/static/assets/img/logob.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/assets/img/logob.png -------------------------------------------------------------------------------- /WebContent/static/assets/img/user01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/assets/img/user01.png -------------------------------------------------------------------------------- /WebContent/static/assets/img/user02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/assets/img/user02.png -------------------------------------------------------------------------------- /WebContent/static/assets/img/user03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/assets/img/user03.png -------------------------------------------------------------------------------- /WebContent/static/assets/img/user04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/assets/img/user04.png -------------------------------------------------------------------------------- /WebContent/static/assets/img/user05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/assets/img/user05.png -------------------------------------------------------------------------------- /WebContent/static/assets/img/user06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/assets/img/user06.png -------------------------------------------------------------------------------- /WebContent/static/assets/img/user07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/assets/img/user07.png -------------------------------------------------------------------------------- /WebContent/static/assets/js/theme.js: -------------------------------------------------------------------------------- 1 | var saveSelectColor = { 2 | 'Name': 'SelcetColor', 3 | 'Color': 'theme-white' 4 | } 5 | 6 | 7 | 8 | // 判断用户是否已有自己选择的模板风格 9 | if (storageLoad('SelcetColor')) { 10 | $('body').attr('class', storageLoad('SelcetColor').Color) 11 | } else { 12 | storageSave(saveSelectColor); 13 | $('body').attr('class', 'theme-white') 14 | } 15 | 16 | 17 | // 本地缓存 18 | function storageSave(objectData) { 19 | localStorage.setItem(objectData.Name, JSON.stringify(objectData)); 20 | } 21 | 22 | function storageLoad(objectName) { 23 | if (localStorage.getItem(objectName)) { 24 | return JSON.parse(localStorage.getItem(objectName)) 25 | } else { 26 | return false 27 | } 28 | } -------------------------------------------------------------------------------- /WebContent/static/base64.js.下载: -------------------------------------------------------------------------------- 1 | /* 2 | * $Id: base64.js,v 2.15 2014/04/05 12:58:57 dankogai Exp dankogai $ 3 | * 4 | * Licensed under the BSD 3-Clause License. 5 | * http://opensource.org/licenses/BSD-3-Clause 6 | * 7 | * References: 8 | * http://en.wikipedia.org/wiki/Base64 9 | */ 10 | 11 | (function(global) { 12 | 'use strict'; 13 | // existing version for noConflict() 14 | var _Base64 = global.Base64; 15 | var version = "2.1.9"; 16 | // if node.js, we use Buffer 17 | var buffer; 18 | if (typeof module !== 'undefined' && module.exports) { 19 | try { 20 | buffer = require('buffer').Buffer; 21 | } catch (err) {} 22 | } 23 | // constants 24 | var b64chars 25 | = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; 26 | var b64tab = function(bin) { 27 | var t = {}; 28 | for (var i = 0, l = bin.length; i < l; i++) t[bin.charAt(i)] = i; 29 | return t; 30 | }(b64chars); 31 | var fromCharCode = String.fromCharCode; 32 | // encoder stuff 33 | var cb_utob = function(c) { 34 | if (c.length < 2) { 35 | var cc = c.charCodeAt(0); 36 | return cc < 0x80 ? c 37 | : cc < 0x800 ? (fromCharCode(0xc0 | (cc >>> 6)) 38 | + fromCharCode(0x80 | (cc & 0x3f))) 39 | : (fromCharCode(0xe0 | ((cc >>> 12) & 0x0f)) 40 | + fromCharCode(0x80 | ((cc >>> 6) & 0x3f)) 41 | + fromCharCode(0x80 | ( cc & 0x3f))); 42 | } else { 43 | var cc = 0x10000 44 | + (c.charCodeAt(0) - 0xD800) * 0x400 45 | + (c.charCodeAt(1) - 0xDC00); 46 | return (fromCharCode(0xf0 | ((cc >>> 18) & 0x07)) 47 | + fromCharCode(0x80 | ((cc >>> 12) & 0x3f)) 48 | + fromCharCode(0x80 | ((cc >>> 6) & 0x3f)) 49 | + fromCharCode(0x80 | ( cc & 0x3f))); 50 | } 51 | }; 52 | var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g; 53 | var utob = function(u) { 54 | return u.replace(re_utob, cb_utob); 55 | }; 56 | var cb_encode = function(ccc) { 57 | var padlen = [0, 2, 1][ccc.length % 3], 58 | ord = ccc.charCodeAt(0) << 16 59 | | ((ccc.length > 1 ? ccc.charCodeAt(1) : 0) << 8) 60 | | ((ccc.length > 2 ? ccc.charCodeAt(2) : 0)), 61 | chars = [ 62 | b64chars.charAt( ord >>> 18), 63 | b64chars.charAt((ord >>> 12) & 63), 64 | padlen >= 2 ? '=' : b64chars.charAt((ord >>> 6) & 63), 65 | padlen >= 1 ? '=' : b64chars.charAt(ord & 63) 66 | ]; 67 | return chars.join(''); 68 | }; 69 | var btoa = global.btoa ? function(b) { 70 | return global.btoa(b); 71 | } : function(b) { 72 | return b.replace(/[\s\S]{1,3}/g, cb_encode); 73 | }; 74 | var _encode = buffer ? function (u) { 75 | return (u.constructor === buffer.constructor ? u : new buffer(u)) 76 | .toString('base64') 77 | } 78 | : function (u) { return btoa(utob(u)) } 79 | ; 80 | var encode = function(u, urisafe) { 81 | return !urisafe 82 | ? _encode(String(u)) 83 | : _encode(String(u)).replace(/[+\/]/g, function(m0) { 84 | return m0 == '+' ? '-' : '_'; 85 | }).replace(/=/g, ''); 86 | }; 87 | var encodeURI = function(u) { return encode(u, true) }; 88 | // decoder stuff 89 | var re_btou = new RegExp([ 90 | '[\xC0-\xDF][\x80-\xBF]', 91 | '[\xE0-\xEF][\x80-\xBF]{2}', 92 | '[\xF0-\xF7][\x80-\xBF]{3}' 93 | ].join('|'), 'g'); 94 | var cb_btou = function(cccc) { 95 | switch(cccc.length) { 96 | case 4: 97 | var cp = ((0x07 & cccc.charCodeAt(0)) << 18) 98 | | ((0x3f & cccc.charCodeAt(1)) << 12) 99 | | ((0x3f & cccc.charCodeAt(2)) << 6) 100 | | (0x3f & cccc.charCodeAt(3)), 101 | offset = cp - 0x10000; 102 | return (fromCharCode((offset >>> 10) + 0xD800) 103 | + fromCharCode((offset & 0x3FF) + 0xDC00)); 104 | case 3: 105 | return fromCharCode( 106 | ((0x0f & cccc.charCodeAt(0)) << 12) 107 | | ((0x3f & cccc.charCodeAt(1)) << 6) 108 | | (0x3f & cccc.charCodeAt(2)) 109 | ); 110 | default: 111 | return fromCharCode( 112 | ((0x1f & cccc.charCodeAt(0)) << 6) 113 | | (0x3f & cccc.charCodeAt(1)) 114 | ); 115 | } 116 | }; 117 | var btou = function(b) { 118 | return b.replace(re_btou, cb_btou); 119 | }; 120 | var cb_decode = function(cccc) { 121 | var len = cccc.length, 122 | padlen = len % 4, 123 | n = (len > 0 ? b64tab[cccc.charAt(0)] << 18 : 0) 124 | | (len > 1 ? b64tab[cccc.charAt(1)] << 12 : 0) 125 | | (len > 2 ? b64tab[cccc.charAt(2)] << 6 : 0) 126 | | (len > 3 ? b64tab[cccc.charAt(3)] : 0), 127 | chars = [ 128 | fromCharCode( n >>> 16), 129 | fromCharCode((n >>> 8) & 0xff), 130 | fromCharCode( n & 0xff) 131 | ]; 132 | chars.length -= [0, 0, 2, 1][padlen]; 133 | return chars.join(''); 134 | }; 135 | var atob = global.atob ? function(a) { 136 | return global.atob(a); 137 | } : function(a){ 138 | return a.replace(/[\s\S]{1,4}/g, cb_decode); 139 | }; 140 | var _decode = buffer ? function(a) { 141 | return (a.constructor === buffer.constructor 142 | ? a : new buffer(a, 'base64')).toString(); 143 | } 144 | : function(a) { return btou(atob(a)) }; 145 | var decode = function(a){ 146 | return _decode( 147 | String(a).replace(/[-_]/g, function(m0) { return m0 == '-' ? '+' : '/' }) 148 | .replace(/[^A-Za-z0-9\+\/]/g, '') 149 | ); 150 | }; 151 | var noConflict = function() { 152 | var Base64 = global.Base64; 153 | global.Base64 = _Base64; 154 | return Base64; 155 | }; 156 | // export Base64 157 | global.Base64 = { 158 | VERSION: version, 159 | atob: atob, 160 | btoa: btoa, 161 | fromBase64: decode, 162 | toBase64: encode, 163 | utob: utob, 164 | encode: encode, 165 | encodeURI: encodeURI, 166 | btou: btou, 167 | decode: decode, 168 | noConflict: noConflict 169 | }; 170 | // if ES5 is available, make Base64.extendString() available 171 | if (typeof Object.defineProperty === 'function') { 172 | var noEnum = function(v){ 173 | return {value:v,enumerable:false,writable:true,configurable:true}; 174 | }; 175 | global.Base64.extendString = function () { 176 | Object.defineProperty( 177 | String.prototype, 'fromBase64', noEnum(function () { 178 | return decode(this) 179 | })); 180 | Object.defineProperty( 181 | String.prototype, 'toBase64', noEnum(function (urisafe) { 182 | return encode(this, urisafe) 183 | })); 184 | Object.defineProperty( 185 | String.prototype, 'toBase64URI', noEnum(function () { 186 | return encode(this, true) 187 | })); 188 | }; 189 | } 190 | // that's it! 191 | if (global['Meteor']) { 192 | Base64 = global.Base64; // for normal export in Meteor.js 193 | } 194 | })(this); 195 | -------------------------------------------------------------------------------- /WebContent/static/css/dataTables.bootstrap.css: -------------------------------------------------------------------------------- 1 | table.dataTable { 2 | clear: both; 3 | margin-top: 6px !important; 4 | margin-bottom: 6px !important; 5 | max-width: none !important; 6 | } 7 | table.dataTable td, 8 | table.dataTable th { 9 | -webkit-box-sizing: content-box; 10 | -moz-box-sizing: content-box; 11 | box-sizing: content-box; 12 | } 13 | table.dataTable.nowrap th, 14 | table.dataTable.nowrap td { 15 | white-space: nowrap; 16 | } 17 | 18 | div.dataTables_wrapper div.dataTables_length label { 19 | font-weight: normal; 20 | text-align: left; 21 | white-space: nowrap; 22 | } 23 | div.dataTables_wrapper div.dataTables_length select { 24 | width: 75px; 25 | display: inline-block; 26 | } 27 | div.dataTables_wrapper div.dataTables_filter { 28 | text-align: right; 29 | } 30 | div.dataTables_wrapper div.dataTables_filter label { 31 | font-weight: normal; 32 | white-space: nowrap; 33 | text-align: left; 34 | } 35 | div.dataTables_wrapper div.dataTables_filter input { 36 | margin-left: 0.5em; 37 | display: inline-block; 38 | width: auto; 39 | } 40 | div.dataTables_wrapper div.dataTables_info { 41 | padding-top: 8px; 42 | white-space: nowrap; 43 | } 44 | div.dataTables_wrapper div.dataTables_paginate { 45 | margin: 0; 46 | white-space: nowrap; 47 | text-align: right; 48 | } 49 | div.dataTables_wrapper div.dataTables_paginate ul.pagination { 50 | margin: 2px 0; 51 | white-space: nowrap; 52 | } 53 | 54 | table.dataTable thead > tr > th, 55 | table.dataTable thead > tr > td { 56 | padding-right: 30px; 57 | } 58 | table.dataTable thead > tr > th:active, 59 | table.dataTable thead > tr > td:active { 60 | outline: none; 61 | } 62 | table.dataTable thead .sorting, 63 | table.dataTable thead .sorting_asc, 64 | table.dataTable thead .sorting_desc, 65 | table.dataTable thead .sorting_asc_disabled, 66 | table.dataTable thead .sorting_desc_disabled { 67 | cursor: pointer; 68 | position: relative; 69 | } 70 | table.dataTable thead .sorting:after, 71 | table.dataTable thead .sorting_asc:after, 72 | table.dataTable thead .sorting_desc:after, 73 | table.dataTable thead .sorting_asc_disabled:after, 74 | table.dataTable thead .sorting_desc_disabled:after { 75 | position: absolute; 76 | bottom: 8px; 77 | right: 8px; 78 | display: block; 79 | font-family: 'Glyphicons Halflings'; 80 | opacity: 0.5; 81 | } 82 | table.dataTable thead .sorting:after { 83 | opacity: 0.2; 84 | content: "\e150"; 85 | /* sort */ 86 | } 87 | table.dataTable thead .sorting_asc:after { 88 | content: "\e155"; 89 | /* sort-by-attributes */ 90 | } 91 | table.dataTable thead .sorting_desc:after { 92 | content: "\e156"; 93 | /* sort-by-attributes-alt */ 94 | } 95 | table.dataTable thead .sorting_asc_disabled:after, 96 | table.dataTable thead .sorting_desc_disabled:after { 97 | color: #eee; 98 | } 99 | 100 | div.dataTables_scrollHead table.dataTable { 101 | margin-bottom: 0 !important; 102 | } 103 | 104 | div.dataTables_scrollBody table { 105 | border-top: none; 106 | margin-top: 0 !important; 107 | margin-bottom: 0 !important; 108 | } 109 | div.dataTables_scrollBody table thead .sorting:after, 110 | div.dataTables_scrollBody table thead .sorting_asc:after, 111 | div.dataTables_scrollBody table thead .sorting_desc:after { 112 | display: none; 113 | } 114 | div.dataTables_scrollBody table tbody tr:first-child th, 115 | div.dataTables_scrollBody table tbody tr:first-child td { 116 | border-top: none; 117 | } 118 | 119 | div.dataTables_scrollFoot table { 120 | margin-top: 0 !important; 121 | border-top: none; 122 | } 123 | 124 | @media screen and (max-width: 767px) { 125 | div.dataTables_wrapper div.dataTables_length, 126 | div.dataTables_wrapper div.dataTables_filter, 127 | div.dataTables_wrapper div.dataTables_info, 128 | div.dataTables_wrapper div.dataTables_paginate { 129 | text-align: center; 130 | } 131 | } 132 | table.dataTable.table-condensed > thead > tr > th { 133 | padding-right: 20px; 134 | } 135 | table.dataTable.table-condensed .sorting:after, 136 | table.dataTable.table-condensed .sorting_asc:after, 137 | table.dataTable.table-condensed .sorting_desc:after { 138 | top: 6px; 139 | right: 6px; 140 | } 141 | 142 | table.table-bordered.dataTable { 143 | border-collapse: separate !important; 144 | } 145 | table.table-bordered.dataTable th, 146 | table.table-bordered.dataTable td { 147 | border-left-width: 0; 148 | } 149 | table.table-bordered.dataTable th:last-child, table.table-bordered.dataTable th:last-child, 150 | table.table-bordered.dataTable td:last-child, 151 | table.table-bordered.dataTable td:last-child { 152 | border-right-width: 0; 153 | } 154 | table.table-bordered.dataTable tbody th, 155 | table.table-bordered.dataTable tbody td { 156 | border-bottom-width: 0; 157 | } 158 | 159 | div.dataTables_scrollHead table.table-bordered { 160 | border-bottom-width: 0; 161 | } 162 | -------------------------------------------------------------------------------- /WebContent/static/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /WebContent/static/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /WebContent/static/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /WebContent/static/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /WebContent/static/highlighter.js.下载: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/highlighter.js.下载 -------------------------------------------------------------------------------- /WebContent/static/img/404.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/img/404.png -------------------------------------------------------------------------------- /WebContent/static/img/404view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/img/404view.png -------------------------------------------------------------------------------- /WebContent/static/img/500.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/img/500.png -------------------------------------------------------------------------------- /WebContent/static/img/500view.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/img/500view.jpg -------------------------------------------------------------------------------- /WebContent/static/img/java46.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/img/java46.jpg -------------------------------------------------------------------------------- /WebContent/static/img/java47.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/img/java47.jpg -------------------------------------------------------------------------------- /WebContent/static/img/java48.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/img/java48.jpg -------------------------------------------------------------------------------- /WebContent/static/img/java49.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/img/java49.jpg -------------------------------------------------------------------------------- /WebContent/static/img/java50.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/img/java50.jpg -------------------------------------------------------------------------------- /WebContent/static/img/java51.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/img/java51.jpg -------------------------------------------------------------------------------- /WebContent/static/img/java52.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/img/java52.jpg -------------------------------------------------------------------------------- /WebContent/static/img/java53.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/img/java53.jpg -------------------------------------------------------------------------------- /WebContent/static/img/java54.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/img/java54.jpg -------------------------------------------------------------------------------- /WebContent/static/img/java55.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/img/java55.jpg -------------------------------------------------------------------------------- /WebContent/static/img/java56.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/img/java56.jpg -------------------------------------------------------------------------------- /WebContent/static/img/java57.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/img/java57.jpg -------------------------------------------------------------------------------- /WebContent/static/img/java58.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/img/java58.jpg -------------------------------------------------------------------------------- /WebContent/static/img/java59.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/img/java59.jpg -------------------------------------------------------------------------------- /WebContent/static/img/java60.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/img/java60.jpg -------------------------------------------------------------------------------- /WebContent/static/img/nopass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MakkaPakkaa/Library_management-/f7f0317a7c0a41790ab1e019c747908459bca3da/WebContent/static/img/nopass.png -------------------------------------------------------------------------------- /WebContent/static/js/addAdmin.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * ajax提交添加管理员的信息 4 | * @param {Object} '#addAdmin' 5 | */ 6 | $(function () { 7 | 8 | 9 | 10 | 11 | $('#addAdmin').click(function () { 12 | 13 | if (!validAddAdmin()) { 14 | return; 15 | } 16 | var postdata = "username="+$.trim($("#addUsername").val())+"&name="+$.trim($("#addName").val())+"&phone="+ $.trim($("#addPhone").val()); 17 | ajax( 18 | { 19 | method:'POST', 20 | url:'admin/adminManageAction_addAdmin.action', 21 | params: postdata, 22 | callback:function(data) { 23 | if (data == 1) { 24 | $("#addModal").modal("hide");//关闭模糊框 25 | showInfo("添加成功"); 26 | 27 | }else if (data == -1) { 28 | $("#addModal").modal("hide");//关闭模糊框 29 | showInfo("该管理员已存在"); 30 | }else { 31 | $("#addModal").modal("hide");//关闭模糊框 32 | showInfo("添加失败"); 33 | } 34 | 35 | } 36 | } 37 | 38 | ); 39 | 40 | 41 | }); 42 | 43 | $('#modal_info').on('hide.bs.modal',function() {//提示模糊框隐藏时候触发 44 | location.reload(); //刷新当前页面 45 | }); 46 | 47 | 48 | 49 | }); 50 | 51 | 52 | 53 | function validAddAdmin() { 54 | var flag = true; 55 | 56 | var username = $.trim($("#addUsername").val()); 57 | if (username == "") { 58 | $('#addUsername').parent().addClass("has-error"); 59 | $('#addUsername').next().text("请输入用户名"); 60 | $("#addUsername").next().show(); 61 | flag = false; 62 | } else if (username.length<2 || username.length > 15) { 63 | $("#addUsername").parent().addClass("has-error"); 64 | $("#addUsername").next().text("用户名长度必须在2~15之间"); 65 | $("#addUsername").next().show(); 66 | flag = false; 67 | } else { 68 | $('#addUsername').parent().removeClass("has-error"); 69 | $('#addUsername').next().text(""); 70 | $("#addUsername").next().hide(); 71 | } 72 | 73 | 74 | 75 | var reg = new RegExp("[\\u4E00-\\u9FFF]+","g"); 76 | var name = $.trim($("#addName").val()); 77 | if(name == ""){ 78 | $('#addName').parent().addClass("has-error"); 79 | $('#addName').next().text("请输入真实姓名"); 80 | $("#addName").next().show(); 81 | flag = false; 82 | }else if(!reg.test(name)){ 83 | $('#addName').parent().addClass("has-error"); 84 | $('#addName').next().text("真实姓名必须为中文"); 85 | $("#addName").next().show(); 86 | flag = false; 87 | }else { 88 | $('#addName').parent().removeClass("has-error"); 89 | $('#addName').next().text(""); 90 | $("#addName").next().hide(); 91 | } 92 | 93 | var phone = $.trim($("#addPhone").val()); 94 | if(phone == ""){ 95 | $('#addPhone').parent().addClass("has-error"); 96 | $('#addPhone').next().text("请输入联系号码"); 97 | $("#addPhone").next().show(); 98 | flag = false; 99 | }else if(!(/^1[34578]\d{9}$/.test(phone))){ 100 | //电话号码格式的校验 101 | $('#addPhone').parent().addClass("has-error"); 102 | $('#addPhone').next().text("手机号码有误"); 103 | $("#addPhone").next().show(); 104 | return false; 105 | }else { 106 | $('#addPhone').parent().removeClass("has-error"); 107 | $('#addPhone').next().text(""); 108 | $("#addPhone").next().hide(); 109 | } 110 | 111 | 112 | return flag; 113 | } 114 | 115 | 116 | 117 | 118 | 119 | 120 | function showInfo(msg) { 121 | $("#div_info").text(msg); 122 | $("#modal_info").modal('show'); 123 | } 124 | 125 | 126 | -------------------------------------------------------------------------------- /WebContent/static/js/addBook.js: -------------------------------------------------------------------------------- 1 | 2 | $(function () { 3 | 4 | 5 | $('#addBook').click(function () { 6 | 7 | 8 | if (!validAddBook()) { 9 | return; 10 | } 11 | 12 | var postdata = "bookName="+$.trim($("#addBookName").val())+"&autho="+ $.trim($("#addAutho").val())+"&press="+ $.trim($("#addPress").val())+"&num="+ $.trim($("#addNum").val())+"&price="+ $.trim($("#addPrice").val())+"&description=" 13 | + $.trim($("#addDescription").val())+"&bookTypeId="+ $.trim($("#addBookType").val())+"&ISBN="+ $.trim($("#addISBN").val()); 14 | 15 | ajax( 16 | { 17 | method:'POST', 18 | url:'admin/bookManageAction_addBook.action', 19 | params: postdata, 20 | callback:function(data) { 21 | if (data == 1) { 22 | $("#addModal").modal("hide");//关闭模糊框 23 | showInfo("添加成功"); 24 | 25 | }else { 26 | $("#addModal").modal("hide");//关闭模糊框 27 | showInfo("添加失败"); 28 | } 29 | 30 | } 31 | } 32 | 33 | ); 34 | 35 | 36 | }); 37 | 38 | 39 | 40 | 41 | 42 | 43 | $('#modal_info').on('hide.bs.modal',function() {//提示模糊框隐藏时候触发 44 | location.reload(); //刷新当前页面 45 | }); 46 | 47 | 48 | $('#btn_add').click(function () { 49 | $("#addBookType option[value!=-1]").remove();//移除先前的选项 50 | ajax( 51 | { 52 | url:"admin/bookManageAction_getAllBookTypes.action", 53 | type:"json", 54 | callback:function(data) { 55 | // 循环遍历每个图书分类,每个名称生成一个option对象,添加到中 8 | for(var index in data) { 9 | var op = document.createElement("option");//创建一个指名名称元素 10 | op.value = data[index].readerTypeId;//设置op的实际值为当前的读者分类编号 11 | var textNode = document.createTextNode(data[index].readerTypeName);//创建文本节点 12 | op.appendChild(textNode);//把文本子节点添加到op元素中,指定其显示值 13 | 14 | document.getElementById("addreaderType").appendChild(op); 15 | } 16 | } 17 | } 18 | ); 19 | }; 20 | /** 21 | * ajax提交添加读者的信息 22 | * @param {Object} '#addReader' 23 | */ 24 | $(function () { 25 | 26 | 27 | $('#addReader').click(function () { 28 | 29 | if (!validAddReader()) { 30 | return; 31 | } 32 | 33 | var postdata = "paperNO="+$.trim($("#addPaperNO").val())+"&name="+$.trim($("#addName").val())+"&phone="+ $.trim($("#addPhone").val())+"&readerType="+ $.trim($("#addreaderType").val()) 34 | +"&email="+ $.trim($("#addEmail").val()); 35 | ajax( 36 | { 37 | method:'POST', 38 | url:'admin/readerManageAction_addReader.action', 39 | params: postdata, 40 | callback:function(data) { 41 | if (data == 1) { 42 | $("#addModal").modal("hide");//关闭模糊框 43 | showInfo("添加成功"); 44 | 45 | }else if (data == -1) { 46 | $("#addModal").modal("hide");//关闭模糊框 47 | showInfo("该读者已存在"); 48 | }else { 49 | $("#addModal").modal("hide");//关闭模糊框 50 | showInfo("添加失败"); 51 | } 52 | 53 | } 54 | } 55 | 56 | ); 57 | 58 | 59 | }); 60 | 61 | $('#modal_info').on('hide.bs.modal',function() {//提示模糊框隐藏时候触发 62 | location.reload(); //刷新当前页面 63 | }); 64 | 65 | 66 | 67 | }); 68 | 69 | 70 | 71 | function validAddReader() { 72 | var flag = true; 73 | 74 | var paperNO = $.trim($("#addPaperNO").val()); 75 | if (paperNO == "") { 76 | $('#addPaperNO').parent().addClass("has-error"); 77 | $('#addPaperNO').next().text("请输入读者证件号"); 78 | $("#addPaperNO").next().show(); 79 | flag = false; 80 | }else { 81 | $('#addPaperNO').parent().removeClass("has-error"); 82 | $('#addPaperNO').next().text(""); 83 | $("#addPaperNO").next().hide(); 84 | } 85 | 86 | 87 | 88 | var reg = new RegExp("[\\u4E00-\\u9FFF]+","g"); 89 | var name = $.trim($("#addName").val()); 90 | if(name == ""){ 91 | $('#addName').parent().addClass("has-error"); 92 | $('#addName').next().text("请输入真实姓名"); 93 | $("#addName").next().show(); 94 | flag = false; 95 | }else if(!reg.test(name)){ 96 | $('#addName').parent().addClass("has-error"); 97 | $('#addName').next().text("真实姓名必须为中文"); 98 | $("#addName").next().show(); 99 | flag = false; 100 | }else { 101 | $('#addName').parent().removeClass("has-error"); 102 | $('#addName').next().text(""); 103 | $("#addName").next().hide(); 104 | } 105 | 106 | var phone = $.trim($("#addPhone").val()); 107 | if(phone == ""){ 108 | $('#addPhone').parent().addClass("has-error"); 109 | $('#addPhone').next().text("请输入联系号码"); 110 | $("#addPhone").next().show(); 111 | flag = false; 112 | }else if(!(/^1[34578]\d{9}$/.test(phone))){ 113 | //电话号码格式的校验 114 | $('#addPhone').parent().addClass("has-error"); 115 | $('#addPhone').next().text("手机号码有误"); 116 | $("#addPhone").next().show(); 117 | return false; 118 | }else { 119 | $('#addPhone').parent().removeClass("has-error"); 120 | $('#addPhone').next().text(""); 121 | $("#addPhone").next().hide(); 122 | } 123 | 124 | var reg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/; 125 | var email = $.trim($("#addEmail").val()); 126 | if(email == ""){ 127 | $('#addEmail').parent().addClass("has-error"); 128 | $('#addEmail').next().text("请输入邮箱"); 129 | $("#addEmail").next().show(); 130 | flag = false; 131 | }else if(!reg.test(email)){ 132 | //邮箱格式的校验 133 | $('#addEmail').parent().addClass("has-error"); 134 | $('#addEmail').next().text("邮箱格式有误"); 135 | $("#addEmail").next().show(); 136 | return false; 137 | }else { 138 | $('#addEmail').parent().removeClass("has-error"); 139 | $('#addEmail').next().text(""); 140 | $("#addEmail").next().hide(); 141 | } 142 | 143 | 144 | 145 | var readerType = $.trim($("#addreaderType").val()); 146 | if(readerType == -1){ 147 | $('#addreaderType').parent().addClass("has-error"); 148 | $('#addreaderType').next().text("请选择读者类型"); 149 | $("#addreaderType").next().show(); 150 | flag = false; 151 | }else { 152 | $('#addreaderType').parent().removeClass("has-error"); 153 | $('#addreaderType').next().text(""); 154 | $("#addreaderType").next().hide(); 155 | } 156 | 157 | return flag; 158 | } 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | function showInfo(msg) { 167 | $("#div_info").text(msg); 168 | $("#modal_info").modal('show'); 169 | } 170 | 171 | 172 | -------------------------------------------------------------------------------- /WebContent/static/js/addReaderType.js: -------------------------------------------------------------------------------- 1 | 2 | $(function () { 3 | 4 | 5 | $('#addReaderType').click(function () { 6 | 7 | 8 | if (!validAddReaderType()) { 9 | return; 10 | } 11 | 12 | var postdata = "readerTypeName="+$.trim($("#addType").val())+"&maxNum="+$.trim($("#addMaxNum").val())+"&bday="+ $.trim($("#addBday").val()) 13 | +"&penalty="+ $.trim($("#addPenalty").val())+"&renewDays="+ $.trim($("#addrenewDays").val()); 14 | ajax( 15 | { 16 | method:'POST', 17 | url:'admin/readerTypeManageAction_addReaderType.action', 18 | params: postdata, 19 | callback:function(data) { 20 | if (data == 1) { 21 | $("#addModal").modal("hide");//关闭模糊框 22 | showInfo("添加成功"); 23 | 24 | }else { 25 | $("#addModal").modal("hide");//关闭模糊框 26 | showInfo("添加失败"); 27 | } 28 | 29 | } 30 | } 31 | 32 | ); 33 | 34 | 35 | }); 36 | 37 | $('#modal_info').on('hide.bs.modal',function() {//提示模糊框隐藏时候触发 38 | location.reload(); //刷新当前页面 39 | }); 40 | 41 | 42 | 43 | }); 44 | 45 | 46 | 47 | 48 | function validAddReaderType() { 49 | var flag = true; 50 | 51 | 52 | 53 | var reg = new RegExp("[\\u4E00-\\u9FFF]+","g"); 54 | var typeName = $.trim($("#addType").val()); 55 | if(typeName == ""){ 56 | $('#addType').parent().addClass("has-error"); 57 | $('#addType').next().text("请输入读者类型名称"); 58 | $("#addType").next().show(); 59 | flag = false; 60 | }else if(!reg.test(typeName)){ 61 | $('#addType').parent().addClass("has-error"); 62 | $('#addType').next().text("读者类型名称必须为中文"); 63 | $("#addType").next().show(); 64 | flag = false; 65 | }else { 66 | $('#addType').parent().removeClass("has-error"); 67 | $('#addType').next().text(""); 68 | $("#addType").next().hide(); 69 | } 70 | 71 | var maxNum = $.trim($("#addMaxNum").val()); 72 | if(maxNum == ""){ 73 | $('#addMaxNum').parent().addClass("has-error"); 74 | $('#addMaxNum').next().text("请输入最大借阅数量"); 75 | $("#addMaxNum").next().show(); 76 | flag = false; 77 | }else if(maxNum<=0 || maxNum!=parseInt(maxNum)){ 78 | $('#addMaxNum').parent().addClass("has-error"); 79 | $('#addMaxNum').next().text("最大借阅数量必须为正整数"); 80 | $("#addMaxNum").next().show(); 81 | flag = false; 82 | } else { 83 | $('#addMaxNum').parent().removeClass("has-error"); 84 | $('#addMaxNum').next().text(""); 85 | $("#addMaxNum").next().hide(); 86 | } 87 | 88 | 89 | 90 | var bday = $.trim($("#addBday").val()); 91 | if(bday == ""){ 92 | $('#addBday').parent().addClass("has-error"); 93 | $('#addBday').next().text("请输入最大借阅天数"); 94 | $("#addBday").next().show(); 95 | flag = false; 96 | }else if(bday<=0 || bday!=parseInt(bday)){ 97 | $('#addBday').parent().addClass("has-error"); 98 | $('#addBday').next().text("最大借阅天数必须为正整数"); 99 | $("#addBday").next().show(); 100 | flag = false; 101 | } else { 102 | $('#addBday').parent().removeClass("has-error"); 103 | $('#addBday').next().text(""); 104 | $("#addBday").next().hide(); 105 | } 106 | 107 | 108 | var penalty = $.trim($("#addPenalty").val()); 109 | if(penalty == ""){ 110 | $('#addPenalty').parent().addClass("has-error"); 111 | $('#addPenalty').next().text("请输入逾期每日罚金"); 112 | $("#addPenalty").next().show(); 113 | flag = false; 114 | }else if(penalty<=0 || penalty!=parseInt(penalty)){ 115 | $('#addPenalty').parent().addClass("has-error"); 116 | $('#addPenalty').next().text("逾期每日罚金必须为正整数"); 117 | $("#addPenalty").next().show(); 118 | flag = false; 119 | } else { 120 | $('#addPenalty').parent().removeClass("has-error"); 121 | $('#addPenalty').next().text(""); 122 | $("#addPenalty").next().hide(); 123 | } 124 | 125 | 126 | var renewDays = $.trim($("#addrenewDays").val()); 127 | if(renewDays == ""){ 128 | $('#addrenewDays').parent().addClass("has-error"); 129 | $('#addrenewDays').next().text("请输入续借天数"); 130 | $("#addrenewDays").next().show(); 131 | flag = false; 132 | }else if(renewDays<=0 || renewDays!=parseInt(renewDays)){ 133 | $('#addrenewDays').parent().addClass("has-error"); 134 | $('#addrenewDays').next().text("续借天数必须为正整数"); 135 | $("#addrenewDays").next().show(); 136 | flag = false; 137 | } else { 138 | $('#addrenewDays').parent().removeClass("has-error"); 139 | $('#addrenewDays').next().text(""); 140 | $("#addrenewDays").next().hide(); 141 | } 142 | 143 | 144 | 145 | return flag; 146 | } 147 | 148 | 149 | 150 | 151 | 152 | 153 | function showInfo(msg) { 154 | $("#div_info").text(msg); 155 | $("#modal_info").modal('show'); 156 | } 157 | 158 | 159 | -------------------------------------------------------------------------------- /WebContent/static/js/adminLogin.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | 4 | $('#login_submit').click(function () { 5 | if (!validLogin()) { 6 | return; 7 | } 8 | 9 | 10 | var postdata = "username="+$.trim($("#username").val())+"&pwd="+ $.trim($("#password").val()); 11 | ajax( 12 | { 13 | method:'POST', 14 | url:'adminLoginAction_login.action', 15 | params: postdata, 16 | callback:function(data) { 17 | if (data == 1) { 18 | //管理员 19 | window.location.href = "admin/admin.jsp"; 20 | } else if (data == -1) { 21 | showInfo("账号不存在"); 22 | } else if (data == -2) { 23 | showInfo("密码错误"); 24 | } else { 25 | showInfo("登录失败,请重试"); 26 | } 27 | 28 | } 29 | } 30 | 31 | ); 32 | 33 | 34 | }); 35 | 36 | 37 | 38 | var alert = $('.alert'); 39 | var formWidth = $('.bootstrap-admin-login-form').innerWidth(); 40 | var alertPadding = parseInt($('.alert').css('padding')); 41 | if (isNaN(alertPadding)) { 42 | alertPadding = parseInt($(alert).css('padding-left')); 43 | } 44 | $('.alert').width(formWidth - 2 * alertPadding); 45 | 46 | }); 47 | 48 | function validLogin() { 49 | var flag = true; 50 | 51 | var username = $.trim($("#username").val()); 52 | if (username == "") { 53 | $('#username').parent().addClass("has-error"); 54 | $('#username').next().text("请输入账号"); 55 | $("#username").next().show(); 56 | flag = false; 57 | } else if (username.length<2 || username.length > 15) { 58 | $("#username").parent().addClass("has-error"); 59 | $("#username").next().text("账号长度必须在2~15之间"); 60 | $("#username").next().show(); 61 | flag = false; 62 | } else { 63 | $('#username').parent().removeClass("has-error"); 64 | $('#username').next().text(""); 65 | $("#username").next().hide(); 66 | } 67 | 68 | var password = $.trim($("#password").val()); 69 | if (password == "") { 70 | $('#password').parent().addClass("has-error"); 71 | $('#password').next().text("请输入密码"); 72 | $("#password").next().show(); 73 | flag = false; 74 | } else if (password.length<3 || password.length > 15) { 75 | $("#password").parent().addClass("has-error"); 76 | $("#password").next().text("密码长度必须在3~15之间"); 77 | $("#password").next().show(); 78 | flag = false; 79 | } else { 80 | $('#password').parent().removeClass("has-error"); 81 | $('#password').next().text(""); 82 | $("#password").next().hide(); 83 | } 84 | return flag; 85 | } 86 | 87 | function showInfo(msg) { 88 | $("#div_info").text(msg); 89 | $("#modal_info").modal('show'); 90 | } -------------------------------------------------------------------------------- /WebContent/static/js/adminUpdateInfo.js: -------------------------------------------------------------------------------- 1 | /** 2 | *管理员点击个人资料修改按钮触发进行ajax异步请求 3 | * @param {Object} '#admin_updateInfo' 4 | */ 5 | 6 | $(function () { 7 | 8 | 9 | $('#admin_updateInfo').click(function () { 10 | 11 | 12 | if (!validUpdateAdminInfo()) { 13 | return; 14 | } 15 | 16 | var postdata ="username="+$.trim($("#username").val())+"&name="+$.trim($("#name").val())+"&phone="+ $.trim($("#phone").val()); 17 | ajax( 18 | { 19 | method:'POST', 20 | url:'admin/adminInfoAction_adminInfo.action', 21 | params: postdata, 22 | callback:function(data) { 23 | if (data == 1) { 24 | $("#updateinfo").modal("hide");//关闭模糊框 25 | showInfo("修改成功"); 26 | 27 | }else { 28 | $("#updateinfo").modal("hide");//关闭模糊框 29 | showInfo("修改失败"); 30 | } 31 | 32 | } 33 | } 34 | 35 | ); 36 | 37 | 38 | }); 39 | 40 | $('#modal_info').on('hide.bs.modal',function() {//提示模糊框隐藏时候触发 41 | location.reload(); //刷新当前页面 42 | }); 43 | 44 | 45 | 46 | }); 47 | 48 | 49 | function validUpdateAdminInfo() { 50 | var flag = true; 51 | 52 | var username = $.trim($("#username").val()); 53 | if (username == "") { 54 | $('#username').parent().addClass("has-error"); 55 | $('#username').next().text("请输入用户名"); 56 | $("#username").next().show(); 57 | flag = false; 58 | } else if (username.length<2 || username.length > 15) { 59 | $("#username").parent().addClass("has-error"); 60 | $("#username").next().text("用户名长度必须在2~15之间"); 61 | $("#username").next().show(); 62 | flag = false; 63 | } else { 64 | $('#username').parent().removeClass("has-error"); 65 | $('#username').next().text(""); 66 | $("#username").next().hide(); 67 | } 68 | 69 | 70 | 71 | var reg = new RegExp("[\\u4E00-\\u9FFF]+","g"); 72 | var name = $.trim($("#name").val()); 73 | if(name == ""){ 74 | $('#name').parent().addClass("has-error"); 75 | $('#name').next().text("请输入真实姓名"); 76 | $("#name").next().show(); 77 | flag = false; 78 | }else if(!reg.test(name)){ 79 | $('#name').parent().addClass("has-error"); 80 | $('#name').next().text("真实姓名必须为中文"); 81 | $("#name").next().show(); 82 | flag = false; 83 | }else { 84 | $('#name').parent().removeClass("has-error"); 85 | $('#name').next().text(""); 86 | $("#name").next().hide(); 87 | } 88 | 89 | var phone = $.trim($("#phone").val()); 90 | if(phone == ""){ 91 | $('#phone').parent().addClass("has-error"); 92 | $('#phone').next().text("请输入联系号码"); 93 | $("#phone").next().show(); 94 | flag = false; 95 | }else if(!(/^1[34578]\d{9}$/.test(phone))){ 96 | //电话号码格式的校验 97 | $('#phone').parent().addClass("has-error"); 98 | $('#phone').next().text("手机号码有误"); 99 | $("#phone").next().show(); 100 | return false; 101 | }else { 102 | $('#phone').parent().removeClass("has-error"); 103 | $('#phone').next().text(""); 104 | $("#phone").next().hide(); 105 | } 106 | 107 | 108 | return flag; 109 | } 110 | 111 | 112 | function showInfo(msg) { 113 | $("#div_info").text(msg); 114 | $("#modal_info").modal('show'); 115 | } -------------------------------------------------------------------------------- /WebContent/static/js/adminUpdatePwd.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 点击修改按钮之后ajax提交数据修改密码 3 | * @param {Object} '#update_adminPwd' 4 | */ 5 | $(function () { 6 | 7 | 8 | $('#update_adminPwd').click(function () { 9 | 10 | 11 | if (!validUpdateAdminPwd()) { 12 | return; 13 | } 14 | 15 | var postdata = "oldPwd="+$.trim($("#oldPwd").val())+"&newPwd="+ $.trim($("#newPwd").val())+"&confirmPwd="+ $.trim($("#confirmPwd").val()); 16 | ajax( 17 | { 18 | method:'POST', 19 | url:'admin/adminInfoAction_adminPwd.action', 20 | params: postdata, 21 | callback:function(data) { 22 | if (data == 1) { 23 | $("#updatepwd").modal("hide");//关闭模糊框 24 | showInfo("修改成功"); 25 | 26 | 27 | }else if (data == 0) { 28 | showInfo("确认密码不一致"); 29 | }else if(data == -1){ 30 | showInfo("原密码错误"); 31 | }else{ 32 | showInfo("修改失败"); 33 | } 34 | 35 | 36 | } 37 | } 38 | 39 | ); 40 | 41 | 42 | }); 43 | 44 | $('#modal_info').on('hide.bs.modal',function() {//提示模糊框隐藏时候触发 45 | location.reload(); //刷新当前页面 46 | }); 47 | 48 | 49 | }); 50 | 51 | 52 | 53 | function validUpdateAdminPwd() { 54 | var flag = true; 55 | 56 | 57 | var oldPwd = $.trim($("#oldPwd").val()); 58 | if (oldPwd == "") { 59 | $('#oldPwd').parent().addClass("has-error"); 60 | $('#oldPwd').next().text("请输入密码"); 61 | $("#oldPwd").next().show(); 62 | flag = false; 63 | } else if (oldPwd.length<3 || oldPwd.length > 15) { 64 | $("#oldPwd").parent().addClass("has-error"); 65 | $("#oldPwd").next().text("密码长度必须在3~15之间"); 66 | $("#oldPwd").next().show(); 67 | flag = false; 68 | } else { 69 | $('#oldPwd').parent().removeClass("has-error"); 70 | $('#oldPwd').next().text(""); 71 | $("#oldPwd").next().hide(); 72 | } 73 | 74 | 75 | var newPwd = $.trim($("#newPwd").val()); 76 | if (newPwd == "") { 77 | $('#newPwd').parent().addClass("has-error"); 78 | $('#newPwd').next().text("请输入新密码"); 79 | $("#newPwd").next().show(); 80 | flag = false; 81 | } else if (newPwd.length<3 || newPwd.length > 15) { 82 | $("#newPwd").parent().addClass("has-error"); 83 | $("#newPwd").next().text("新密码长度必须在3~15之间"); 84 | $("#newPwd").next().show(); 85 | flag = false; 86 | } else { 87 | $('#newPwd').parent().removeClass("has-error"); 88 | $('#newPwd').next().text(""); 89 | $("#newPwd").next().hide(); 90 | } 91 | 92 | 93 | var confirmPwd = $.trim($("#confirmPwd").val()); 94 | if (confirmPwd == "") { 95 | $('#confirmPwd').parent().addClass("has-error"); 96 | $('#confirmPwd').next().text("请输入密码"); 97 | $("#confirmPwd").next().show(); 98 | flag = false; 99 | } else if (confirmPwd.length<3 || confirmPwd.length > 15) { 100 | $("#confirmPwd").parent().addClass("has-error"); 101 | $("#confirmPwd").next().text("密码长度必须在3~15之间"); 102 | $("#confirmPwd").next().show(); 103 | flag = false; 104 | }else if (confirmPwd!=newPwd) { 105 | $("#confirmPwd").parent().addClass("has-error"); 106 | $("#confirmPwd").next().text("确认密码不一致"); 107 | $("#confirmPwd").next().show(); 108 | flag = false; 109 | } else { 110 | $('#confirmPwd').parent().removeClass("has-error"); 111 | $('#confirmPwd').next().text(""); 112 | $("#confirmPwd").next().hide(); 113 | } 114 | 115 | 116 | 117 | return flag; 118 | } 119 | 120 | 121 | function showInfo(msg) { 122 | $("#div_info").text(msg); 123 | $("#modal_info").modal('show'); 124 | } -------------------------------------------------------------------------------- /WebContent/static/js/ajax_upload.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | //解决file的change事件只能执行一次的问题 3 | $(document).on('change','#upload',function(){ 4 | ajaxFileUpload(); 5 | }); 6 | }); 7 | //上传图片的方法, 8 | function ajaxFileUpload(){ 9 | //获得basePath 10 | basePath=$('#basePath').val(); 11 | //调用ajaxfileupload.js中的方法 12 | $.ajaxFileUpload({ 13 | url:'admin/fileUploadAction_fileUpload.action',//上传要提交到的action 14 | secureuri:false,//是否用安全提交,默认为false 15 | fileElementId:'upload',//file选择文件的框的id 16 | dataType:'json',//数据返回格式,如果用json,需要修改ajaxfileupload.js中的内容 eval("data = " + data ); -->data = jQuery.parseJSON(jQuery(data).text()); 17 | success: function (data){ 18 | if(data.state=="success"){ 19 | $("#excel").val(data.path); 20 | }else{ 21 | showInfo("上传的格式有误!!"); 22 | } 23 | } 24 | }); 25 | } 26 | 27 | 28 | 29 | function showInfo(msg) { 30 | $("#div_info").text(msg); 31 | $("#modal_info").modal('show'); 32 | } 33 | -------------------------------------------------------------------------------- /WebContent/static/js/backBook.js: -------------------------------------------------------------------------------- 1 | 2 | $(function () { 3 | 4 | 5 | 6 | $('#modal_info').on('hide.bs.modal',function() {//提示模糊框隐藏时候触发 7 | location.reload(); //刷新当前页面 8 | }); 9 | 10 | 11 | 12 | }); 13 | 14 | 15 | function backBook(id){ 16 | var postdata = "borrowId="+id; 17 | ajax( 18 | { 19 | method:'POST', 20 | url:'admin/backManageAction_backBook.action', 21 | params: postdata, 22 | callback:function(data) { 23 | if (data == 1) { 24 | showInfo("还书成功"); 25 | 26 | }else if(data == -1){ 27 | showInfo("该书已经还了"); 28 | }else if(data == 2){ 29 | showInfo("还书成功,请缴纳逾期罚金"); 30 | }else{ 31 | showInfo("还书失败"); 32 | } 33 | 34 | } 35 | } 36 | 37 | ); 38 | 39 | 40 | 41 | } 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | function showInfo(msg) { 50 | $("#div_info").text(msg); 51 | $("#modal_info").modal('show'); 52 | } 53 | 54 | 55 | -------------------------------------------------------------------------------- /WebContent/static/js/batchAddBook.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | 4 | $('#batchAdd').click(function () { 5 | 6 | if (!validBatchAddReader()) { 7 | return; 8 | } 9 | var postdata = "fileName="+$.trim($("#excel").val()); 10 | ajax( 11 | { 12 | method:'POST', 13 | url:'admin/bookManageAction_batchAddBook.action', 14 | type:"json", 15 | params: postdata, 16 | callback:function(data) { 17 | if (data.state==2) { 18 | //获得basePath 19 | basePath=$('#basePath').val(); 20 | $("#batchAddModal").modal("hide");//关闭模糊框 21 | showInfo(data.message + ",未成功的数据:点击下载"); 22 | 23 | }else if(data.state==1){ 24 | $("#batchAddModal").modal("hide");//关闭模糊框 25 | showInfo(data.message); 26 | }else if(data.state==-1){ 27 | $("#batchAddModal").modal("hide");//关闭模糊框 28 | showInfo(data.error); 29 | }else{ 30 | $("#batchAddModal").modal("hide");//关闭模糊框 31 | showInfo("失败,请重试"); 32 | } 33 | 34 | } 35 | } 36 | 37 | ); 38 | 39 | 40 | }); 41 | 42 | $('#modal_info').on('hide.bs.modal',function() {//提示模糊框隐藏时候触发 43 | location.reload(); //刷新当前页面 44 | }); 45 | 46 | 47 | 48 | }); 49 | 50 | 51 | 52 | function validBatchAddReader() { 53 | var flag = true; 54 | var upload = $.trim($("#upload").val()); 55 | if (upload == "") { 56 | alert("请选择excel文件"); 57 | flag = false; 58 | } 59 | 60 | 61 | return flag; 62 | } 63 | 64 | 65 | function checkFileExt(filename) 66 | { 67 | var flag = false; //状态 68 | var arr = ["xls"]; 69 | //取出上传文件的扩展名 70 | var index = filename.lastIndexOf("."); 71 | var ext = filename.substr(index+1); 72 | //循环比较 73 | for(var i=0;i点击下载"); 22 | 23 | }else if(data.state==1){ 24 | $("#batchAddModal").modal("hide");//关闭模糊框 25 | showInfo(data.message); 26 | }else if(data.state==-1){ 27 | $("#batchAddModal").modal("hide");//关闭模糊框 28 | showInfo(data.error); 29 | }else{ 30 | $("#batchAddModal").modal("hide");//关闭模糊框 31 | showInfo("失败,请重试"); 32 | } 33 | 34 | } 35 | } 36 | 37 | ); 38 | 39 | 40 | }); 41 | 42 | $('#modal_info').on('hide.bs.modal',function() {//提示模糊框隐藏时候触发 43 | location.reload(); //刷新当前页面 44 | }); 45 | 46 | 47 | 48 | }); 49 | 50 | 51 | 52 | function validBatchAddReader() { 53 | var flag = true; 54 | var upload = $.trim($("#upload").val()); 55 | if (upload == "") { 56 | alert("请选择excel文件"); 57 | flag = false; 58 | } 59 | 60 | 61 | return flag; 62 | } 63 | 64 | 65 | function checkFileExt(filename) 66 | { 67 | var flag = false; //状态 68 | var arr = ["xls"]; 69 | //取出上传文件的扩展名 70 | var index = filename.lastIndexOf("."); 71 | var ext = filename.substr(index+1); 72 | //循环比较 73 | for(var i=0;i<'col-sm-6'f>>" + 23 | "<'row'<'col-sm-12'tr>>" + 24 | "<'row'<'col-sm-5'i><'col-sm-7'p>>", 25 | renderer: 'bootstrap' 26 | } ); 27 | 28 | 29 | /* Default class modification */ 30 | $.extend( DataTable.ext.classes, { 31 | sWrapper: "dataTables_wrapper form-inline dt-bootstrap", 32 | sFilterInput: "form-control input-sm", 33 | sLengthSelect: "form-control input-sm" 34 | } ); 35 | 36 | 37 | /* Bootstrap paging button renderer */ 38 | DataTable.ext.renderer.pageButton.bootstrap = function ( settings, host, idx, buttons, page, pages ) { 39 | var api = new DataTable.Api( settings ); 40 | var classes = settings.oClasses; 41 | var lang = settings.oLanguage.oPaginate; 42 | var btnDisplay, btnClass, counter=0; 43 | 44 | var attach = function( container, buttons ) { 45 | var i, ien, node, button; 46 | var clickHandler = function ( e ) { 47 | e.preventDefault(); 48 | if ( !$(e.currentTarget).hasClass('disabled') ) { 49 | api.page( e.data.action ).draw( 'page' ); 50 | } 51 | }; 52 | 53 | for ( i=0, ien=buttons.length ; i 0 ? 72 | '' : ' disabled'); 73 | break; 74 | 75 | case 'previous': 76 | btnDisplay = lang.sPrevious; 77 | btnClass = button + (page > 0 ? 78 | '' : ' disabled'); 79 | break; 80 | 81 | case 'next': 82 | btnDisplay = lang.sNext; 83 | btnClass = button + (page < pages-1 ? 84 | '' : ' disabled'); 85 | break; 86 | 87 | case 'last': 88 | btnDisplay = lang.sLast; 89 | btnClass = button + (page < pages-1 ? 90 | '' : ' disabled'); 91 | break; 92 | 93 | default: 94 | btnDisplay = button + 1; 95 | btnClass = page === button ? 96 | 'active' : ''; 97 | break; 98 | } 99 | 100 | if ( btnDisplay ) { 101 | node = $('
  • ', { 102 | 'class': classes.sPageButton+' '+btnClass, 103 | 'id': idx === 0 && typeof button === 'string' ? 104 | settings.sTableId +'_'+ button : 105 | null 106 | } ) 107 | .append( $('', { 108 | 'href': '#', 109 | 'aria-controls': settings.sTableId, 110 | 'data-dt-idx': counter, 111 | 'tabindex': settings.iTabIndex 112 | } ) 113 | .html( btnDisplay ) 114 | ) 115 | .appendTo( container ); 116 | 117 | settings.oApi._fnBindAction( 118 | node, {action: button}, clickHandler 119 | ); 120 | 121 | counter++; 122 | } 123 | } 124 | } 125 | }; 126 | 127 | // IE9 throws an 'unknown error' if document.activeElement is used 128 | // inside an iframe or frame. 129 | var activeEl; 130 | 131 | try { 132 | // Because this approach is destroying and recreating the paging 133 | // elements, focus is lost on the select button which is bad for 134 | // accessibility. So we want to restore focus once the draw has 135 | // completed 136 | activeEl = $(host).find(document.activeElement).data('dt-idx'); 137 | } 138 | catch (e) {} 139 | 140 | attach( 141 | $(host).empty().html('
      ').children('ul'), 142 | buttons 143 | ); 144 | 145 | if ( activeEl ) { 146 | $(host).find( '[data-dt-idx='+activeEl+']' ).focus(); 147 | } 148 | }; 149 | 150 | 151 | /* 152 | * TableTools Bootstrap compatibility 153 | * Required TableTools 2.1+ 154 | */ 155 | if ( DataTable.TableTools ) { 156 | // Set the classes that TableTools uses to something suitable for Bootstrap 157 | $.extend( true, DataTable.TableTools.classes, { 158 | "container": "DTTT btn-group", 159 | "buttons": { 160 | "normal": "btn btn-default", 161 | "disabled": "disabled" 162 | }, 163 | "collection": { 164 | "container": "DTTT_dropdown dropdown-menu", 165 | "buttons": { 166 | "normal": "", 167 | "disabled": "disabled" 168 | } 169 | }, 170 | "print": { 171 | "info": "DTTT_print_info" 172 | }, 173 | "select": { 174 | "row": "active" 175 | } 176 | } ); 177 | 178 | // Have the collection use a bootstrap compatible drop down 179 | $.extend( true, DataTable.TableTools.DEFAULTS.oTags, { 180 | "collection": { 181 | "container": "ul", 182 | "button": "li", 183 | "liner": "a" 184 | } 185 | } ); 186 | } 187 | 188 | }; // /factory 189 | 190 | 191 | // Define as an AMD module if possible 192 | if ( typeof define === 'function' && define.amd ) { 193 | define( ['jquery', 'datatables'], factory ); 194 | } 195 | else if ( typeof exports === 'object' ) { 196 | // Node/CommonJS 197 | factory( require('jquery'), require('datatables') ); 198 | } 199 | else if ( jQuery ) { 200 | // Otherwise simply initialise as normal, stopping multiple evaluation 201 | factory( jQuery, jQuery.fn.dataTable ); 202 | } 203 | 204 | 205 | })(window, document); 206 | 207 | -------------------------------------------------------------------------------- /WebContent/static/js/deleteAdmin.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | function deleteAdmin(id){ 5 | ajax( 6 | { 7 | method:'POST', 8 | url:'admin/adminManageAction_deleteAdmin.action', 9 | params: "id=" + id, 10 | callback:function(data) { 11 | if (data == 1) { 12 | showInfo("删除成功"); 13 | } 14 | else { 15 | showInfo("删除失败"); 16 | } 17 | 18 | } 19 | } 20 | 21 | ); 22 | 23 | 24 | } 25 | 26 | $('#modal_info').on('hide.bs.modal',function() {//提示模糊框隐藏时候触发 27 | location.reload(); //刷新当前页面 28 | }); 29 | 30 | 31 | 32 | function showInfo(msg) { 33 | $("#div_info").text(msg); 34 | $("#modal_info").modal('show'); 35 | } 36 | 37 | 38 | -------------------------------------------------------------------------------- /WebContent/static/js/deleteBook.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | function deleteBook(id){ 5 | ajax( 6 | { 7 | method:'POST', 8 | url:'admin/bookManageAction_deleteBook.action', 9 | params: "bookId=" + id, 10 | callback:function(data) { 11 | if (data == 1) { 12 | showInfo("删除成功"); 13 | }else if(data == -1){ 14 | showInfo("该书有未还书记录,不能删除"); 15 | }else if(data==-2){ 16 | showInfo("该书有未缴纳的罚款,不能删除"); 17 | }else{ 18 | showInfo("删除失败"); 19 | } 20 | 21 | } 22 | } 23 | 24 | ); 25 | 26 | 27 | } 28 | 29 | $('#modal_info').on('hide.bs.modal',function() {//提示模糊框隐藏时候触发 30 | location.reload(); //刷新当前页面 31 | }); 32 | 33 | 34 | 35 | function showInfo(msg) { 36 | $("#div_info").text(msg); 37 | $("#modal_info").modal('show'); 38 | } 39 | 40 | 41 | -------------------------------------------------------------------------------- /WebContent/static/js/deleteBookType.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | function deleteBookType(id){ 5 | ajax( 6 | { 7 | method:'POST', 8 | url:'admin/bookTypeManageAction_deleteBookType.action', 9 | params: "id=" + id, 10 | callback:function(data) { 11 | if (data == 1) { 12 | showInfo("删除成功"); 13 | } 14 | else { 15 | showInfo("删除失败"); 16 | } 17 | 18 | } 19 | } 20 | 21 | ); 22 | 23 | 24 | } 25 | 26 | $('#modal_info').on('hide.bs.modal',function() {//提示模糊框隐藏时候触发 27 | location.reload(); //刷新当前页面 28 | }); 29 | 30 | 31 | 32 | function showInfo(msg) { 33 | $("#div_info").text(msg); 34 | $("#modal_info").modal('show'); 35 | } 36 | 37 | 38 | -------------------------------------------------------------------------------- /WebContent/static/js/deleteReader.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | function deleteReader(id){ 5 | ajax( 6 | { 7 | method:'POST', 8 | url:'admin/readerManageAction_deleteReader.action', 9 | params: "readerId=" + id, 10 | callback:function(data) { 11 | if (data == 1) { 12 | showInfo("删除成功"); 13 | }else if(data == -1){ 14 | showInfo("该读者有未还书记录,不能删除"); 15 | }else if(data==-2){ 16 | showInfo("该读者有未缴纳的罚款,不能删除"); 17 | }else{ 18 | showInfo("删除失败"); 19 | } 20 | 21 | } 22 | } 23 | 24 | ); 25 | 26 | 27 | } 28 | 29 | $('#modal_info').on('hide.bs.modal',function() {//提示模糊框隐藏时候触发 30 | location.reload(); //刷新当前页面 31 | }); 32 | 33 | 34 | 35 | function showInfo(msg) { 36 | $("#div_info").text(msg); 37 | $("#modal_info").modal('show'); 38 | } 39 | 40 | 41 | -------------------------------------------------------------------------------- /WebContent/static/js/exportBook.js: -------------------------------------------------------------------------------- 1 | function exportBook(){ 2 | //获得basePath 3 | basePath=$('#basePath').val(); 4 | ajax( 5 | { 6 | method:'GET', 7 | url:'admin/bookManageAction_exportBook.action', 8 | callback:function(data) { 9 | showInfo("数据已导出:点击下载"); 10 | } 11 | } 12 | 13 | ); 14 | 15 | } 16 | 17 | 18 | 19 | 20 | function showInfo(msg) { 21 | $("#div_info").html(msg); 22 | $("#modal_info").modal('show'); 23 | } 24 | -------------------------------------------------------------------------------- /WebContent/static/js/exportReader.js: -------------------------------------------------------------------------------- 1 | function exportReader(){ 2 | //获得basePath 3 | basePath=$('#basePath').val(); 4 | ajax( 5 | { 6 | method:'GET', 7 | url:'admin/readerManageAction_exportReader.action', 8 | callback:function(data) { 9 | showInfo("数据已导出:点击下载"); 10 | } 11 | } 12 | 13 | ); 14 | 15 | } 16 | 17 | 18 | 19 | 20 | function showInfo(msg) { 21 | $("#div_info").html(msg); 22 | $("#modal_info").modal('show'); 23 | } 24 | -------------------------------------------------------------------------------- /WebContent/static/js/getAllBookTypes.js: -------------------------------------------------------------------------------- 1 | window.onload = new function(){ 2 | ajax( 3 | { 4 | url:"admin/bookManageAction_getAllBookTypes.action", 5 | type:"json", 6 | callback:function(data) { 7 | // 循环遍历每个图书分类,每个名称生成一个option对象,添加到中 8 | for(var index in data) { 9 | var op = document.createElement("option");//创建一个指名名称元素 10 | op.value = data[index].readerTypeId;//设置op的实际值为当前的读者分类编号 11 | var textNode = document.createTextNode(data[index].readerTypeName);//创建文本节点 12 | op.appendChild(textNode);//把文本子节点添加到op元素中,指定其显示值 13 | 14 | document.getElementById("readerType").appendChild(op); 15 | } 16 | } 17 | } 18 | ); 19 | }; -------------------------------------------------------------------------------- /WebContent/static/js/getBackInfo.js: -------------------------------------------------------------------------------- 1 | 2 | $(function () { 3 | 4 | 5 | 6 | $('#modal_info').on('hide.bs.modal',function() {//提示模糊框隐藏时候触发 7 | location.reload(); //刷新当前页面 8 | }); 9 | 10 | 11 | 12 | }); 13 | 14 | 15 | 16 | function getBackInfoById(id){ 17 | ajax( 18 | { 19 | method:'POST', 20 | url:'admin/backManageAction_getBackInfoById.action', 21 | params: "borrowId=" + id, 22 | type:"json", 23 | callback:function(data) { 24 | 25 | $("#borrowId").val(data.borrowId); 26 | $("#ISBN").val(data.borrowInfo.book.ISBN); 27 | $("#bookName").val(data.borrowInfo.book.bookName); 28 | $("#bookType").val(data.borrowInfo.book.bookType.typeName); 29 | $("#paperNO").val(data.borrowInfo.reader.paperNO); 30 | $("#readerName").val(data.borrowInfo.reader.name); 31 | $("#readerType").val(data.borrowInfo.reader.readerType.readerTypeName); 32 | $("#overday").val(data.borrowInfo.overday); 33 | if (data.borrowInfo.state == 0) { 34 | $("#state").val("未归还"); 35 | }else if(data.borrowInfo.state == 1){ 36 | $("#state").val("逾期未归还"); 37 | }else if(data.borrowInfo.state == 2){ 38 | $("#state").val("归还"); 39 | }else if(data.borrowInfo.state == 3){ 40 | $("#state").val("续借未归还"); 41 | }else if(data.borrowInfo.state == 4){ 42 | $("#state").val("续借逾期未归还"); 43 | }else if(data.borrowInfo.state == 5){ 44 | $("#state").val("续借归还"); 45 | } 46 | $("#admin").val(data.admin.name); 47 | } 48 | } 49 | 50 | 51 | 52 | ); 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | } 61 | 62 | 63 | 64 | 65 | 66 | function showInfo(msg) { 67 | $("#div_info").text(msg); 68 | $("#modal_info").modal('show'); 69 | } 70 | 71 | 72 | -------------------------------------------------------------------------------- /WebContent/static/js/getBookInfo.js: -------------------------------------------------------------------------------- 1 | 2 | $(function () { 3 | 4 | 5 | 6 | $('#modal_info').on('hide.bs.modal',function() {//提示模糊框隐藏时候触发 7 | location.reload(); //刷新当前页面 8 | }); 9 | 10 | 11 | 12 | }); 13 | 14 | 15 | 16 | function getBookInfo(id){ 17 | 18 | ajax( 19 | { 20 | method:'POST', 21 | url:'admin/bookManageAction_getBook.action', 22 | params: "bookId=" + id, 23 | type:"json", 24 | callback:function(data) { 25 | $("#findISBN").val(data.ISBN); 26 | $("#findBookName").val(data.bookName); 27 | $("#findBookType").val(data.bookType.typeName); 28 | $("#findAutho").val(data.autho); 29 | $("#findPress").val(data.press); 30 | $("#findPrice").val(data.price); 31 | $("#findDescription").val(data.description); 32 | $("#findNum").val(data.num); 33 | $("#findAdmin").val(data.admin.name); 34 | $("#findCurrentNum").val(data.currentNum); 35 | } 36 | } 37 | 38 | 39 | 40 | ); 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | } 49 | 50 | 51 | 52 | function showInfo(msg) { 53 | $("#div_info").text(msg); 54 | $("#modal_info").modal('show'); 55 | } 56 | 57 | 58 | -------------------------------------------------------------------------------- /WebContent/static/js/getBookTypes.js: -------------------------------------------------------------------------------- 1 | window.onload = new function(){ 2 | ajax( 3 | { 4 | url:"bookAction_getAllBookTypes.action", 5 | type:"json", 6 | callback:function(data) { 7 | // 循环遍历每个图书分类,每个名称生成一个option对象,添加到中 64 | for(var index in data) { 65 | var op = document.createElement("option");//创建一个指名名称元素 66 | op.value = data[index].typeId;//设置op的实际值为当前的图书分类编号 67 | var textNode = document.createTextNode(data[index].typeName);//创建文本节点 68 | op.appendChild(textNode);//把文本子节点添加到op元素中,指定其显示值 69 | 70 | document.getElementById("updateBookType").appendChild(op); 71 | } 72 | 73 | ajax( 74 | { 75 | method:'POST', 76 | url:'admin/bookManageAction_getBook.action', 77 | params: "bookId=" + id, 78 | type:"json", 79 | callback:function(data) { 80 | $("#updateBookId").val(data.bookId); 81 | $("#updateISBN").val(data.ISBN); 82 | $("#updateBookName").val(data.bookName); 83 | $("#updateBookType").val(data.bookType.typeId); 84 | $("#updateAutho").val(data.autho); 85 | $("#updatePress").val(data.press); 86 | $("#updatePrice").val(data.price); 87 | $("#updateDescription").val(data.description); 88 | 89 | } 90 | } 91 | 92 | ); 93 | } 94 | } 95 | ); 96 | 97 | 98 | } 99 | 100 | 101 | 102 | function validUpdateBook() { 103 | var flag = true; 104 | 105 | var ISBN = $.trim($("#updateISBN").val()); 106 | if (ISBN == "") { 107 | $('#updateISBN').parent().addClass("has-error"); 108 | $('#updateISBN').next().text("请输入图书ISBN码"); 109 | $("#updateISBN").next().show(); 110 | flag = false; 111 | } else { 112 | $('#updateISBN').parent().removeClass("has-error"); 113 | $('#updateISBN').next().text(""); 114 | $("#updateISBN").next().hide(); 115 | } 116 | 117 | var bookName = $.trim($("#updateBookName").val()); 118 | if (bookName == "") { 119 | $('#updateBookName').parent().addClass("has-error"); 120 | $('#updateBookName').next().text("请输入图书名称"); 121 | $("#updateBookName").next().show(); 122 | flag = false; 123 | }else { 124 | $('#updateBookName').parent().removeClass("has-error"); 125 | $('#updateBookName').next().text(""); 126 | $("#updateBookName").next().hide(); 127 | } 128 | 129 | 130 | var bookType = $.trim($("#updateBookType").val()); 131 | if(bookType == -1){ 132 | $('#updateBookType').parent().addClass("has-error"); 133 | $('#updateBookType').next().text("请选择图书分类"); 134 | $("#updateBookType").next().show(); 135 | flag = false; 136 | }else { 137 | $('#updateBookType').parent().removeClass("has-error"); 138 | $('#updateBookType').next().text(""); 139 | $("#updateBookType").next().hide(); 140 | } 141 | 142 | var autho = $.trim($("#updateAutho").val()); 143 | if(autho == ""){ 144 | $('#updateAutho').parent().addClass("has-error"); 145 | $('#updateAutho').next().text("请输入作者名称"); 146 | $("#updateAutho").next().show(); 147 | flag = false; 148 | }else { 149 | $('#updateAutho').parent().removeClass("has-error"); 150 | $('#updateAutho').next().text(""); 151 | $("#updateAutho").next().hide(); 152 | } 153 | 154 | 155 | var press = $.trim($("#updatePress").val()); 156 | if(press == ""){ 157 | $('#updatePress').parent().addClass("has-error"); 158 | $('#updatePress').next().text("请输入出版社名称"); 159 | $("#updatePress").next().show(); 160 | flag = false; 161 | }else { 162 | $('#updatePress').parent().removeClass("has-error"); 163 | $('#updatePress').next().text(""); 164 | $("#updatePress").next().hide(); 165 | } 166 | 167 | 168 | 169 | var price = $.trim($("#updatePrice").val()); 170 | if(price == ""){ 171 | $('#updatePrice').parent().addClass("has-error"); 172 | $('#updatePrice').next().text("请输入总数量"); 173 | $("#updatePrice").next().show(); 174 | flag = false; 175 | }else if(price<=0 || price!=parseInt(price)){ 176 | $('#updatePrice').parent().addClass("has-error"); 177 | $('#updatePrice').next().text("数量必须为正整数"); 178 | $("#updatePrice").next().show(); 179 | flag = false; 180 | }else { 181 | $('#updatePrice').parent().removeClass("has-error"); 182 | $('#updatePrice').next().text(""); 183 | $("#updatePrice").next().hide(); 184 | } 185 | 186 | 187 | 188 | return flag; 189 | } 190 | 191 | 192 | 193 | function showInfo(msg) { 194 | $("#div_info").text(msg); 195 | $("#modal_info").modal('show'); 196 | } 197 | 198 | 199 | -------------------------------------------------------------------------------- /WebContent/static/js/updateBookType.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * ajax提交修改图书分类的信息 4 | * @param {Object} '#updateBookType' 5 | */ 6 | $(function () { 7 | 8 | 9 | $('#updateBookType').click(function () { 10 | 11 | 12 | if (!validUpdateBookType()) { 13 | return; 14 | } 15 | 16 | var postdata = "id="+$.trim($("#updateBookTypeId").val())+"&typeName="+$.trim($("#updateBookTypeName").val()); 17 | ajax( 18 | { 19 | method:'POST', 20 | url:'admin/bookTypeManageAction_updateBookType.action', 21 | params: postdata, 22 | callback:function(data) { 23 | if (data == 1) { 24 | $("#updateModal").modal("hide");//关闭模糊框 25 | showInfo("修改成功"); 26 | 27 | }else { 28 | $("#updateinfo").modal("hide");//关闭模糊框 29 | showInfo("修改失败"); 30 | } 31 | 32 | } 33 | } 34 | 35 | ); 36 | 37 | 38 | }); 39 | 40 | $('#modal_info').on('hide.bs.modal',function() {//提示模糊框隐藏时候触发 41 | location.reload(); //刷新当前页面 42 | }); 43 | 44 | 45 | 46 | }); 47 | 48 | 49 | 50 | 51 | 52 | 53 | /** 54 | * 获取需要修改图书分类信息 55 | * @param {Object} id 需要修改的图书分类id 56 | */ 57 | function updateBookType(id){ 58 | ajax( 59 | { 60 | method:'POST', 61 | url:'admin/bookTypeManageAction_getBookType.action', 62 | params: "id=" + id, 63 | type:"json", 64 | callback:function(data) { 65 | $("#updateBookTypeId").val(data.typeId); 66 | $("#updateBookTypeName").val(data.typeName); 67 | 68 | } 69 | } 70 | 71 | ); 72 | 73 | 74 | } 75 | 76 | 77 | 78 | function validUpdateBookType() { 79 | var flag = true; 80 | 81 | var reg = new RegExp("[\\u4E00-\\u9FFF]+","g"); 82 | var bookType = $.trim($("#updateBookTypeName").val()); 83 | if(bookType == ""){ 84 | $('#updateBookTypeName').parent().addClass("has-error"); 85 | $('#updateBookTypeName').next().text("请输入图书分类名称"); 86 | $("#updateBookTypeName").next().show(); 87 | flag = false; 88 | }else if(!reg.test(bookType)){ 89 | $('#updateBookTypeName').parent().addClass("has-error"); 90 | $('#updateBookTypeName').next().text("图书分类名称必须为中文"); 91 | $("#updateBookTypeName").next().show(); 92 | flag = false; 93 | }else { 94 | $('#updateBookTypeName').parent().removeClass("has-error"); 95 | $('#updateBookTypeName').next().text(""); 96 | $("#updateBookTypeName").next().hide(); 97 | } 98 | 99 | 100 | 101 | 102 | return flag; 103 | } 104 | 105 | 106 | 107 | function showInfo(msg) { 108 | $("#div_info").text(msg); 109 | $("#modal_info").modal('show'); 110 | } 111 | 112 | 113 | -------------------------------------------------------------------------------- /WebContent/static/js/updateReader.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * ajax提交修改管理员的信息 4 | * @param {Object} '#updateReader' 5 | */ 6 | $(function () { 7 | 8 | 9 | $('#updateReader').click(function () { 10 | 11 | 12 | if (!validUpdateReader()) { 13 | return; 14 | } 15 | 16 | var postdata = "readerId="+$.trim($("#updateReaderID").val())+"&readerType="+$.trim($("#updateReaderType").val()) 17 | +"&name="+$.trim($("#updateName").val())+"&phone="+ $.trim($("#updatePhone").val())+"&email="+ $.trim($("#updateEmail").val()) 18 | +"&paperNO="+ $.trim($("#updatePaperNO").val()); 19 | ajax( 20 | { 21 | method:'POST', 22 | url:'admin/readerManageAction_updateReader.action', 23 | params: postdata, 24 | callback:function(data) { 25 | if (data == 1) { 26 | $("#updateModal").modal("hide");//关闭模糊框 27 | showInfo("修改成功"); 28 | 29 | }else { 30 | $("#updateinfo").modal("hide");//关闭模糊框 31 | showInfo("修改失败"); 32 | } 33 | 34 | } 35 | } 36 | 37 | ); 38 | 39 | 40 | }); 41 | 42 | $('#modal_info').on('hide.bs.modal',function() {//提示模糊框隐藏时候触发 43 | location.reload(); //刷新当前页面 44 | }); 45 | 46 | 47 | 48 | }); 49 | 50 | 51 | 52 | 53 | /** 54 | * 显示修改前的数据在输入框中 55 | * @param {Object} id 56 | */ 57 | function updateReader(id){ 58 | $("#updateReaderType option[value!=-1]").remove();//移除先前的选项 59 | ajax( 60 | { 61 | url:"admin/readerTypeManageAction_getAllReaderTypes.action", 62 | type:"json", 63 | callback:function(data) { 64 | // 循环遍历每个读者分类,每个名称生成一个option对象,添加到