seungmin lee

done except search

Showing 73 changed files with 1892 additions and 184 deletions
1 +<?xml version="1.0" encoding="UTF-8"?>
2 +<module type="PYTHON_MODULE" version="4">
3 + <component name="Flask">
4 + <option name="enabled" value="true" />
5 + </component>
6 + <component name="NewModuleRootManager">
7 + <content url="file://$MODULE_DIR$" />
8 + <orderEntry type="inheritedJdk" />
9 + <orderEntry type="sourceFolder" forTests="false" />
10 + </component>
11 + <component name="TemplatesService">
12 + <option name="TEMPLATE_CONFIGURATION" value="Jinja2" />
13 + <option name="TEMPLATE_FOLDERS">
14 + <list>
15 + <option value="$MODULE_DIR$/templates" />
16 + </list>
17 + </option>
18 + </component>
19 + <component name="TestRunnerService">
20 + <option name="PROJECT_TEST_RUNNER" value="Unittests" />
21 + </component>
22 +</module>
...\ No newline at end of file ...\ No newline at end of file
1 +<?xml version="1.0" encoding="UTF-8"?>
2 +<project version="4">
3 + <component name="JavaScriptSettings">
4 + <option name="languageLevel" value="ES6" />
5 + </component>
6 + <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7 (venv)" project-jdk-type="Python SDK" />
7 +</project>
...\ No newline at end of file ...\ No newline at end of file
1 +<?xml version="1.0" encoding="UTF-8"?>
2 +<project version="4">
3 + <component name="ProjectModuleManager">
4 + <modules>
5 + <module fileurl="file://$PROJECT_DIR$/.idea/helloworld.iml" filepath="$PROJECT_DIR$/.idea/helloworld.iml" />
6 + </modules>
7 + </component>
8 +</project>
...\ No newline at end of file ...\ No newline at end of file
1 +<?xml version="1.0" encoding="UTF-8"?>
2 +<project version="4">
3 + <component name="VcsDirectoryMappings">
4 + <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
5 + </component>
6 +</project>
...\ No newline at end of file ...\ No newline at end of file
This diff is collapsed. Click to expand it.
1 -# 이승민씨를 위한 간단 GIT 설정법
2 -## 1.설치
3 -- 깃을 설치해주세요
4 -> https://git-scm.com/downloads
5 -
6 -## 2.GIT bash 열기
7 -- 깃을 설치하고 GIT bash를 열어주세요.
8 -
9 -## 3.GIT 설정하기
10 -- 깃을 설정해주세요. username과 email을 설정하면 됩니다.
11 -- global 옵션은 깃을 설치한 컴퓨터 전체에 대한 설정이라는 뜻입니다.
12 -> git config --global user.name "이름"
13 -> git config --global user.email 메일@khu.ac.kr
14 -
15 -## 4.Clone하기
16 -- GIT bash에서 적당한 폴더를 만들고 들어가주세요.
17 -> cd \<만드신 폴더\>
18 -> git clone http://khuhub.khu.ac.kr/2013104043/db-frs.git
19 -> cd db-frs
20 -
21 -## 5.Branch 파기
22 -- master는 위험하니 님을 위한 브랜치를 하나 만드세요.
23 -- git branch "브랜치이름"을 입력하시면 "브랜치이름"이라는 브랜치를 만들겠다는 뜻입니다.
24 -- 브랜치 이름은 맘대로 하시고
25 -- checkout은 뒤에 입력한 브랜치를 사용하겠다는 뜻입니다.
26 -- git branch 를 입력하시면 전체 브랜치를 볼 수 있습니다.
27 -> git branch \<브랜치이름\>
28 -> git checkout \<브랜치이름\>
29 -
30 -## 6.Branch push
31 -- 만든 브랜치를 khuhub에 올려주세요.
32 -> git push origin \<브랜치이름\>
33 -
34 -## 자 이제 마음대로 가지고 노세요!
35 -
36 -## 7.ADD와 COMMIT과 PUSH
37 -- clone한 폴더를 기준으로(여기서는 db-frs)
38 -- Add를 할 수 있습니다. 이왕이면 파일을 지정해서 사용해주세요. 안그러면 설정파일 다 올라가요...
39 -> git add .(현재 폴더를 모두 add하겠다는 뜻)
40 -> git add filename.py(filename.py만 add하겠다는 뜻)
41 -- Add된 현황을 봅니다.
42 -> git status
43 -- 마음에 들었으면 커밋을 하죠. 참고로 -m "커밋메시지"는 꼭 들어가야 합니다.
44 -> git commit -m \<커밋메시지\>
45 -- push를 합시다! push는 웹에 업로드 하는 기능입니다.
46 -> git push origin \<브랜치이름\>
47 -
48 -
1 +#-*- coding: utf-8 -*-
2 +# 한글 인코딩을 위한 주석입니다.
3 +
4 +# 사전설정:
5 + # pymysql 패키지가 있어야 합니다.
6 + # pip install pymysql
7 + # 보안상 user_info에서 DB id, password를 가져옵니다.
8 + # user_info.py에서 DB id, password를 설정하고 사용해주세요.
9 +# 외부에서 사용법:
10 + # from ReservationControl import *
11 +
12 +import pymysql
13 +import user_info
14 +import datetime
15 +
16 +
17 +
18 +
19 +
20 +
21 +
22 +
23 +# getReservations - 대여현황반환 함수
24 +# input:
25 + # string user_id
26 +# output:
27 + # 성공시 : tuple형태로 반환 => ( (1 ,"steven123", 7, "전자정보대학", "136호", 10, datetime.datetime(2018,12,5,12,0,0), datetime.datetime(2018,12,5,12,10,0), ), )
28 + # 순서 : reservations_id, user_id, facility_id, location, location_detail, capacity, start_time, end_time
29 +
30 + # 실패시 : tuple형태로 반환 => ( ("SQL Error!", ), )
31 +# 사용예:
32 + # result = getReservations("khucse123")
33 + # reservation_start_time = result[0][3]
34 +
35 +def getReservations(user_id):
36 + try:
37 + db = pymysql.connect(host='1.201.139.92', port=3306, user=user_info.user_id, password=user_info.user_passwd, db='FRS', charset='utf8')
38 + curs = db.cursor()
39 +
40 + #curs.execute("select * from reservations where user_id=%s", user_id)
41 + curs.execute("select r.reservations_id, r.user_id, r.facility_id, f.location, f.location_detail, f.capacity, r.start_time, r.end_time from reservations r, facilities f where r.user_id=%s AND r.facility_id=f.facility_id;", user_id)
42 + result = curs.fetchall()
43 + print("Fetch Success!")
44 + return result
45 + except:
46 + print("SQL Error!")
47 + return (("SQL Error!",),)
48 +
49 + finally:
50 + db.close()
51 +
52 +
53 +# deleteReservations - 대여현황삭제 함수
54 +# input:
55 + # int reservations_id
56 +# output:
57 + # 성공시 : True
58 + # 실패시 : False
59 +# 사용예:
60 + # deleteReservations(5)
61 +# 주의사항:
62 + # 테스트환경에서 없는 reservations_id를 넣으면 에러가 날 수 있음
63 +
64 +def deleteReservations(reservations_id):
65 + try:
66 + db = pymysql.connect(host='1.201.139.92', port=3306, user=user_info.user_id, password=user_info.user_passwd, db='FRS', charset='utf8')
67 + curs = db.cursor()
68 +
69 + curs.execute("delete from reservations where reservations_id=%s", reservations_id)
70 + db.commit()
71 + print("Delete Success!")
72 + return True
73 + except:
74 + print("SQL Error!")
75 + return False
76 +
77 + finally:
78 + db.close()
79 +
80 +
81 +# addReservations - 대여현황추가 함수
82 +# input:
83 + # string user_id
84 + # int facility_id
85 + # datetime.datetime start_time
86 + # datetime.datetime end_time
87 +# output:
88 + # 성공시 : True
89 + # 실패시 : False
90 +# 사용예:
91 + # tstart = datetime.datetime(2018,12,5,0,11,12)
92 + # tend = datetime.datetime(2018,12,5,0,20,12)
93 + # addReservations("khucse123", 6, tstart, tend)
94 +# 주의사항:
95 + # 테스트환경에서 없는 user_id를 넣으면 에러가 날 수 있음
96 + # 테스트환경에서 없는 facility_id를 넣으면 에러가 날 수 있음
97 +
98 +def addReservations(user_id, facility_id, start_time, end_time):
99 + try:
100 + db = pymysql.connect(host='1.201.139.92', port=3306, user=user_info.user_id, password=user_info.user_passwd, db='FRS', charset='utf8')
101 + curs = db.cursor()
102 +
103 + curs.execute("insert into reservations (user_id, facility_id, start_time, end_time) values (%s,%s,%s,%s)", (user_id, facility_id, start_time, end_time))
104 + db.commit()
105 + print("Add Reservation Success!")
106 + return True
107 + except:
108 + print("SQL Error!")
109 + return False
110 +
111 + finally:
112 + db.close()
113 +
1 +# -*- coding: utf-8 -*-
2 +# 한글 인코딩을 위한 주석입니다.
3 +
4 +# 사전설정:
5 +# pymysql 패키지가 있어야 합니다.
6 +# pip install pymysql
7 +# 보안상 user_info에서 DB id, password를 가져옵니다.
8 +# user_info.py에서 DB id, password를 설정하고 사용해주세요.
9 +# 외부에서 사용법:
10 +# from Users import *
11 +
12 +import pymysql
13 +import user_info
14 +
15 +
16 +# UserLogin - 유저 로그인 함수
17 +# input:
18 +# string user_id
19 +# string password
20 +# output:
21 +# 성공시 : True
22 +# 실패시 : False
23 +# 사용예:
24 +# UserLogin("khucse124", "steven1234")
25 +
26 +def UserLogin(user_id, password):
27 + try:
28 + db = pymysql.connect(host='1.201.139.92', port=3306, user=user_info.user_id, password=user_info.user_passwd,
29 + db='FRS', charset='utf8')
30 + curs = db.cursor()
31 +
32 + curs.execute("select exists (select user_name from users where user_id=%s and password=%s) as result",
33 + (user_id, password))
34 + result = curs.fetchall()
35 +
36 + if (result[0][0] == 1):
37 + print("User login Success!")
38 + return True
39 + else:
40 + print("User login Failed!")
41 + return False
42 +
43 + except:
44 + print("SQL ERROR!!")
45 + return False
46 +
47 + finally:
48 + db.close()
49 +
50 +
51 +# UserJoin - 유저 회원가입 함수
52 +# input:
53 +# string user_id
54 +# int dept_id
55 +# string user_name
56 +# string pwd
57 +# string phone
58 +# string mail
59 +# output:
60 +# 성공시 : True
61 +# 실패시 : False
62 +# 사용예:
63 +# UserJoin("khucse124", 7, "Steven", "steven1234", "031-201-2566", "cs@khu.ac.kr")
64 +# 주의사항:
65 +# 테스트환경에서 같은 user_id가 있으면 에러가 날 수 있음
66 +# 테스트환경에서 dept_id는 departments 테이블에 없는 값을 넣으면 에러가 날 수 있음
67 +
68 +def UserJoin(user_id, dept_id, user_name, pwd, phone, mail):
69 + try:
70 + db = pymysql.connect(host='1.201.139.92', port=3306, user=user_info.user_id, password=user_info.user_passwd,
71 + db='FRS', charset='utf8')
72 + curs = db.cursor()
73 +
74 + curs.execute(
75 + "insert into users (user_id, department_id, user_name, password, phone, mail_address) values (%s,%s,%s,%s,%s,%s)",
76 + (user_id, dept_id, user_name, pwd, phone, mail))
77 + db.commit()
78 + print("User Join Success!")
79 + return True
80 +
81 + except:
82 + print("SQL ERROR!!")
83 + return False
84 +
85 + finally:
86 + db.close()
87 +
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
1 +
2 +from flask import request, render_template, redirect, session, flash, Flask
3 +from Users import *
4 +from ReservationControl import *
5 +from datetime import datetime
6 +
7 +app = Flask(__name__)
8 +app.secret_key = 'A0Zr98j/3yX R~XHH!jmN]LWX/,?RT'
9 +
10 +@app.route('/', redirect_to="/login")
11 +def http_prepost_response():
12 + return "helloworld"
13 +
14 +
15 +@app.route('/login', methods=["GET"])
16 +def login():
17 + if session.get('ID'):
18 + return redirect('/myhome')
19 + elif request.args.get('retry') == 'true':
20 + return render_template("login.html", retry=True)
21 + return render_template("login.html", retry=False)
22 +
23 +
24 +@app.route('/join')
25 +def join():
26 + return render_template('join.html')
27 +
28 +
29 +@app.route('/join/confirm', methods=['POST'])
30 +def join_confirm():
31 + join_item = request.form
32 + print(join_item)
33 + if UserJoin(join_item.get('id'),join_item.get('deptid'),join_item.get('name'),join_item.get('password'),join_item.get('phone'),join_item.get('email')):
34 + flash('회원가입 성공!')
35 + return redirect('/login')
36 + flash('회원가입 실패!')
37 + return redirect('/join')
38 +
39 +
40 +@app.route('/logincheck', methods=["POST"])
41 +def login_check():
42 + IDPW = request.form
43 + if UserLogin(IDPW.get('id'),IDPW.get('pw')):
44 + session['ID'] = IDPW.get('id')
45 + welcome = IDPW.get('id')+" 님 안녕하세요!"
46 + flash(welcome)
47 + return redirect('/myhome')
48 + flash("ID와 비밀번호를 확인해주세요.")
49 + return redirect('/login?retry=true')
50 +
51 +
52 +@app.route('/myhome')
53 +def mystat():
54 + return render_template("myhome.html", ID=session['ID'])
55 +
56 +
57 +@app.route('/viewresv')
58 +def view_resv():
59 + resv_list = getReservations(session['ID'])
60 + print(resv_list)
61 + return render_template('resv_view.html', resv_list=resv_list)
62 +
63 +@app.route('/deleteresv', methods=['POST'])
64 +def delete_resv():
65 + resv_id = request.form
66 + if deleteReservations(resv_id.get('resv_id')):
67 + flash("예약이 삭제되었습니다")
68 + else:
69 + flash("예약 삭제에 실패했습니다")
70 + return redirect('/viewresv')
71 +
72 +
73 +
74 +@app.route('/search')
75 +def book():
76 + return render_template("resv_sch.html", ID=session['ID'])
77 +
78 +
79 +@app.route('/search/result', methods=['POST'])
80 +def search_result():
81 + searchdata = request.form
82 + print(searchdata)
83 + starttime = datetime.strptime(searchdata.get('starttime'),'%Y-%m-%dT%H:%M')
84 + endtime = datetime.strptime(searchdata.get('endtime'),'%Y-%m-%dT%H:%M')
85 + print(starttime,endtime)
86 + if searchdata.get('search'):
87 + # searchdata.get('searchinput') 얻어와서 sql 검색 쿼리
88 + pass
89 + elif searchdata.get('cat'):
90 + # searchdata.get('searchinput') 얻어와서 sql 검색 쿼리
91 + pass
92 + return render_template("searchresult.html", result)
93 +
94 +
95 +@app.route('/search/resv', methods=['POST'])
96 +def book_confirm():
97 + pass #search_result 페이지에서 JS로든 요청 보내면 예약 처리
98 +
99 +
100 +
101 +
102 +@app.route('/logout')
103 +def logout():
104 + session.clear()
105 + flash("로그아웃 되었습니다.")
106 + return redirect('/login')
107 +
108 +
109 +if __name__ == '__main__':
110 +
111 + print("done")
112 + app.config['SESSION_TYPE'] = 'filesystem'
113 + app.run(host="0.0.0.0")
1 -<!DOCTYPE html>
2 -<html>
3 -<head>
4 - <title>대여화면2</title>
5 -</head>
6 -<style>
7 -body {
8 - background-color: rgb(230, 243, 255);
9 -}
10 -img {
11 - display:block;
12 - margin:auto;
13 -}
14 -input[type=text] {
15 - width: 300px;
16 - box-sizing: border-box;
17 - border: 3px solid lightgray;
18 - border-radius: 4px;
19 - font-size: 16px;
20 - background-color: rgb(230, 243, 255);
21 - background-image: searchicon.png;
22 - background-position: 10px 10px;
23 - background-repeat: no-repeat;
24 - padding: 12px 20px 12px 40px;
25 - -webkit-transition: width 0.4s ease-in-out;
26 - transition: width 0.4s ease-in-out;
27 -}
28 -
29 -input[type=text]:focus {
30 - width: 50%;
31 -}
32 -#btn1 {
33 - width: 300px;
34 - height: 50px;
35 - font-size:25px;
36 - font-family: '배달의민족 도현';
37 - color: gray;
38 - background: white;
39 - border: solid 5px white;
40 - border-radius: 5px;
41 -}
42 -
43 -</style>
44 -
45 -<body>
46 -
47 -<br><br>
48 -<img style="border-radius:15px;" width="300px;" src="캡처6.png"/>
49 -<form>
50 -
51 -<br>
52 -
53 -<center><input type="text" name="search" placeholder="Search.."><image width="30px"src="searchicon.png"></center><br>
54 -
55 -<center><button id="btn1">강의실</button></center><br>
56 -<center><button id="btn1">회의 공간</button></center><br>
57 -<center><button id="btn1">체육 시설</button></center><br>
58 -<center><button id="btn1">예술 / 문화 시설</button></center>
59 -
60 -<img width="100;" height="70;" align="bottom;" src="khu.png"/>
61 -
62 -</form>
63 -
64 -
65 -
66 -</body>
67 -
68 -</html>
...\ No newline at end of file ...\ No newline at end of file
1 -<!DOCTYPE html>
2 -<html>
3 -<head>
4 - <title>처음화면</title>
5 -</head>
6 -<style>
7 -body {
8 - background-color: rgb(230, 243, 255);
9 -}
10 -img {
11 - display:block;
12 - margin:auto;
13 - border-radius: 50%;
14 - width: 350px;
15 - height: 340px;
16 -}
17 -
18 -</style>
19 -
20 -<body>
21 -
22 -<br><br><br><br><br>
23 -<img src="캡처5.png"/>
24 -
25 -</body>
26 -
27 -</html>
...\ No newline at end of file ...\ No newline at end of file
No preview for this file type
No preview for this file type
No preview for this file type
1 +language: node_js
2 +node_js:
3 + - "8"
4 +before_script:
5 + - "export DISPLAY=:99.0"
6 + - "sh -e /etc/init.d/xvfb start"
7 + - sleep 3 # give xvfb some time to start
...\ No newline at end of file ...\ No newline at end of file
1 +Copyright (c) 2013 http://xdsoft.net
2 +
3 +Permission is hereby granted, free of charge, to any person obtaining a copy
4 +of this software and associated documentation files (the "Software"), to deal
5 +in the Software without restriction, including without limitation the rights
6 +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 +copies of the Software, and to permit persons to whom the Software is
8 +furnished to do so, subject to the following conditions:
9 +
10 +The above copyright notice and this permission notice shall be included in
11 +all copies or substantial portions of the Software.
12 +
13 +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 +THE SOFTWARE.
...\ No newline at end of file ...\ No newline at end of file
1 +# jQuery DateTimePicker
2 +[Demo and Documentation](https://xdsoft.net/jqplugins/datetimepicker/)
3 +
4 +[![Build Status](https://travis-ci.org/xdan/datetimepicker.svg?branch=master)](https://travis-ci.org/xdan/datetimepicker)
5 +[![npm version](https://badge.fury.io/js/jquery-datetimepicker.svg)](https://badge.fury.io/js/jquery-datetimepicker)
6 +[![npm](https://img.shields.io/npm/dm/jquery-datetimepicker.svg)](https://www.npmjs.com/package/jquery-datetimepicker)
7 +
8 +
9 +
10 +PLEASE. Help me update documentation.
11 +[Doc.tpl](https://github.com/xdan/datetimepicker/blob/master/doc.tpl)
12 +This file will be automatically displayed on the site
13 +
14 +# Installation
15 +
16 +```bash
17 +npm install jquery-datetimepicker
18 +```
19 +OR
20 +```bash
21 +yarn add jquery-datetimepicker
22 +```
23 +or download [zip](https://github.com/xdan/datetimepicker/releases)
24 +# datetimepicker
25 +==============
26 +
27 +**!!! The latest version of the options 'lang' obsolete. The language setting is now global. !!!**
28 +
29 +Use this:
30 +```javascript
31 +jQuery.datetimepicker.setLocale('en');
32 +```
33 +[Documentation][doc]
34 +
35 +jQuery Plugin Date and Time Picker
36 +
37 +DateTimePicker
38 +
39 +![ScreenShot](https://raw.github.com/xdan/datetimepicker/master/screen/1.png)
40 +
41 +DatePicker
42 +
43 +![ScreenShot](https://raw.github.com/xdan/datetimepicker/master/screen/2.png)
44 +
45 +TimePicker
46 +
47 +![ScreenShot](https://raw.github.com/xdan/datetimepicker/master/screen/3.png)
48 +
49 +Options to highlight individual dates or periods
50 +
51 +![ScreenShot](https://raw.github.com/Mingpao/datetimepicker/master/screen/4.png)
52 +
53 +![ScreenShot](https://raw.github.com/Mingpao/datetimepicker/master/screen/5.png)
54 +
55 +![ScreenShot](https://raw.github.com/Mingpao/datetimepicker/master/screen/6.png)
56 +
57 +[doc]: https://xdsoft.net/jqplugins/datetimepicker/
58 +
59 +### JS Build help
60 +
61 +**Requires Node and NPM** [Download and install node.js](http://nodejs.org/download/).
62 +
63 +Install:
64 +
65 +1. Install `bower` globally with `npm install -g bower`.
66 +2. Run `npm install`. npm will look at `package.json` and automatically install the necessary dependencies.
67 +3. Run `bower install`, which installs front-end packages defined in `bower.json`.
68 +
69 +Notice: If you use Bower v1.5.2, you will get error: `The "main" field cannot contain minified files`
70 +You can regress to version 1.3.12
71 +
72 +1. `npm uninstall bower -g`
73 +2. `npm install -g bower@1.3.12`
74 +
75 +Build:
76 +
77 +First install npm requirements: `npm install -g uglifycss concat-cli`
78 +Then build the files: `npm run build`
79 +
80 +When build completed, you'll have the following files:
81 +- **build/jquery.datetimepicker.full.js** - browser file
82 +- **build/jquery.datetimepicker.full.min.js** - browser minified file
83 +- **build/jquery.datetimepicker.min.js** - amd module style minified file
1 +{
2 + "name": "datetimepicker",
3 + "version": "2.5.11",
4 + "main": [
5 + "build/jquery.datetimepicker.full.min.js",
6 + "jquery.datetimepicker.css"
7 + ],
8 + "ignore": [
9 + "**/screen",
10 + "**/datetimepicker.jquery.json",
11 + "**/*.png",
12 + "**/*.txt",
13 + "**/*.md",
14 + "**/*.html",
15 + "**/*.tpl",
16 + "**/jquery.js",
17 + "bower_components",
18 + "node_modules"
19 + ],
20 + "keywords": [
21 + "calendar",
22 + "date",
23 + "time",
24 + "form",
25 + "datetime",
26 + "datepicker",
27 + "timepicker",
28 + "datetimepicker",
29 + "validation",
30 + "ui",
31 + "scroller",
32 + "picker",
33 + "i18n",
34 + "input",
35 + "jquery",
36 + "touch"
37 + ],
38 + "authors": [
39 + {
40 + "name": "Chupurnov Valeriy",
41 + "email": "chupurnov@gmail.com",
42 + "homepage": "http://xdsoft.net/contacts.html"
43 + }
44 + ],
45 + "dependencies": {
46 + "jquery": ">= 1.7.2",
47 + "jquery-mousewheel": ">= 3.1.13",
48 + "php-date-formatter": ">= 1.3.3"
49 + },
50 + "license": "MIT",
51 + "homepage": "http://xdsoft.net/jqplugins/datetimepicker/",
52 + "repository": {
53 + "type": "git",
54 + "url": "git://github.com:xdan/datetimepicker.git"
55 + }
56 +}
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 +{
2 + "name": "datetimepicker",
3 + "version": "2.5.4",
4 + "title": "jQuery Date and Time picker",
5 + "description": "jQuery plugin for date, time, or datetime manipulation in form",
6 + "keywords": [
7 + "calendar",
8 + "date",
9 + "time",
10 + "form",
11 + "datetime",
12 + "datepicker",
13 + "timepicker",
14 + "datetimepicker",
15 + "validation",
16 + "ui",
17 + "scroller",
18 + "picker",
19 + "i18n",
20 + "input",
21 + "jquery",
22 + "touch"
23 + ],
24 + "author": {
25 + "name": "Chupurnov Valeriy",
26 + "email": "chupurnov@gmail.com",
27 + "url": "http://xdsoft.net/contacts.html"
28 + },
29 + "maintainers": [{
30 + "name": "Chupurnov Valeriy",
31 + "email": "chupurnov@gmail.com",
32 + "url": "http://xdsoft.net"
33 + }],
34 + "licenses": [
35 + {
36 + "type": "MIT",
37 + "url": "https://github.com/xdan/datetimepicker/blob/master/MIT-LICENSE.txt"
38 + }
39 + ],
40 + "bugs": "https://github.com/xdan/datetimepicker/issues",
41 + "homepage": "http://xdsoft.net/jqplugins/datetimepicker/",
42 + "docs": "http://xdsoft.net/jqplugins/datetimepicker/",
43 + "download": "https://github.com/xdan/datetimepicker/archive/master.zip",
44 + "dependencies": {
45 + "jquery": ">=1.7"
46 + }
47 +}
...\ No newline at end of file ...\ No newline at end of file
This diff is collapsed. Click to expand it.
1 +<!DOCTYPE html>
2 +<html lang="en">
3 +<head>
4 +<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
5 +<link rel="stylesheet" type="text/css" href="./jquery.datetimepicker.css"/>
6 +<style type="text/css">
7 +
8 +.custom-date-style {
9 + background-color: red !important;
10 +}
11 +
12 +.input{
13 +}
14 +.input-wide{
15 + width: 500px;
16 +}
17 +
18 +</style>
19 +</head>
20 +<body>
21 +
22 + <p><a href="http://xdsoft.net/jqplugins/datetimepicker/">Homepage</a></p>
23 + <h3>DateTimePicker</h3>
24 + <input type="text" value="" id="datetimepicker"/><br><br>
25 + <h3>DateTimePickers selected by class</h3>
26 + <input type="text" class="some_class" value="" id="some_class_1"/>
27 + <input type="text" class="some_class" value="" id="some_class_2"/>
28 + <h3>Mask DateTimePicker</h3>
29 + <input type="text" value="" id="datetimepicker_mask"/><br><br>
30 + <h3>TimePicker</h3>
31 + <input type="text" id="datetimepicker1"/><br><br>
32 + <h3>DatePicker</h3>
33 + <input type="text" id="datetimepicker2"/><br><br>
34 + <h3>Inline DateTimePicker</h3>
35 + <!--<div id="console" style="background-color:#fff;color:red">sdfdsfsdf</div>-->
36 + <input type="text" id="datetimepicker3"/><input type="button" onclick="$('#datetimepicker3').datetimepicker({value:'2011/12/11 12:00'})" value="set inline value 2011/12/11 12:00"/><br><br>
37 + <h3>Button Trigger</h3>
38 + <input type="text" value="2013/12/03 18:00" id="datetimepicker4"/><input id="open" type="button" value="open"/><input id="close" type="button" value="close"/><input id="reset" type="button" value="reset"/>
39 + <h3>TimePicker allows time</h3>
40 + <input type="text" id="datetimepicker5"/><br><br>
41 + <h3>Destroy DateTimePicker</h3>
42 + <input type="text" id="datetimepicker6"/><input id="destroy" type="button" value="destroy"/>
43 + <h3>Set options runtime DateTimePicker</h3>
44 + <input type="text" id="datetimepicker7"/>
45 + <p>If select day is Saturday, the minimum set 11:00, otherwise 8:00</p>
46 + <h3>onGenerate</h3>
47 + <input type="text" id="datetimepicker8"/>
48 + <h3>disable all weekend</h3>
49 + <input type="text" id="datetimepicker9"/>
50 + <h3>Default date and time </h3>
51 + <input type="text" id="default_datetimepicker"/>
52 + <h3>Show inline</h3>
53 + <a href="javascript:void(0)" onclick="var si = document.getElementById('show_inline').style; si.display = (si.display=='none')?'block':'none';return false; ">Show/Hide</a>
54 + <div id="show_inline" style="display:none">
55 + <input type="text" id="datetimepicker10"/>
56 + </div>
57 + <h3>Disable Specific Dates</h3>
58 + <p>Disable the dates 2 days from now.</p>
59 + <input type="text" id="datetimepicker11"/>
60 + <h3>Custom Date Styling</h3>
61 + <p>Make the background of the date 2 days from now bright red.</p>
62 + <input type="text" id="datetimepicker12"/>
63 + <h3>Dark theme</h3>
64 + <p>thank for this <a href="https://github.com/lampslave">https://github.com/lampslave</a></p>
65 + <input type="text" id="datetimepicker_dark"/>
66 + <h3>Date time format and locale</h3>
67 + <p></p>
68 + <select id="datetimepicker_format_locale">
69 + <option value="en">English</option>
70 + <option value="de">German</option>
71 + <option value="ru">Russian</option>
72 + <option value="uk">Ukrainian</option>
73 + <option value="fr">French</option>
74 + <option value="es">Spanish</option>
75 + </select>
76 + <input type="text" value="D, l, M, F, Y-m-d H:i:s" id="datetimepicker_format_value"/>
77 + <input type="button" value="applay =>" id="datetimepicker_format_change"/>
78 + <input type="text" id="datetimepicker_format" class="input input-wide"/>
79 +</body>
80 +<script src="./jquery.js"></script>
81 +<script src="node_modules/php-date-formatter/js/php-date-formatter.min.js"></script>
82 +<script src="node_modules/jquery-mousewheel/jquery.mousewheel.js"></script>
83 +<script src="jquery.datetimepicker.js"></script>
84 +<script>/*
85 +window.onerror = function(errorMsg) {
86 + $('#console').html($('#console').html()+'<br>'+errorMsg)
87 +}*/
88 +
89 +$.datetimepicker.setLocale('en');
90 +
91 +$('#datetimepicker_format').datetimepicker({value:'2015/04/15 05:03', format: $("#datetimepicker_format_value").val()});
92 +console.log($('#datetimepicker_format').datetimepicker('getValue'));
93 +
94 +$("#datetimepicker_format_change").on("click", function(e){
95 + $("#datetimepicker_format").data('xdsoft_datetimepicker').setOptions({format: $("#datetimepicker_format_value").val()});
96 +});
97 +$("#datetimepicker_format_locale").on("change", function(e){
98 + $.datetimepicker.setLocale($(e.currentTarget).val());
99 +});
100 +
101 +$('#datetimepicker').datetimepicker({
102 +dayOfWeekStart : 1,
103 +lang:'en',
104 +disabledDates:['1986/01/08','1986/01/09','1986/01/10'],
105 +startDate: '1986/01/05'
106 +});
107 +$('#datetimepicker').datetimepicker({value:'2015/04/15 05:03', step:10});
108 +
109 +$('.some_class').datetimepicker();
110 +
111 +$('#default_datetimepicker').datetimepicker({
112 + formatTime:'H:i',
113 + formatDate:'d.m.Y',
114 + //defaultDate:'8.12.1986', // it's my birthday
115 + defaultDate:'+03.01.1970', // it's my birthday
116 + defaultTime:'10:00',
117 + timepickerScrollbar:false
118 +});
119 +
120 +$('#datetimepicker10').datetimepicker({
121 + step:5,
122 + inline:true
123 +});
124 +$('#datetimepicker_mask').datetimepicker({
125 + mask:'9999/19/39 29:59'
126 +});
127 +
128 +$('#datetimepicker1').datetimepicker({
129 + datepicker:false,
130 + format:'H:i',
131 + step:5
132 +});
133 +$('#datetimepicker2').datetimepicker({
134 + yearOffset:222,
135 + lang:'ch',
136 + timepicker:false,
137 + format:'d/m/Y',
138 + formatDate:'Y/m/d',
139 + minDate:'-1970/01/02', // yesterday is minimum date
140 + maxDate:'+1970/01/02' // and tommorow is maximum date calendar
141 +});
142 +$('#datetimepicker3').datetimepicker({
143 + inline:true
144 +});
145 +$('#datetimepicker4').datetimepicker();
146 +$('#open').click(function(){
147 + $('#datetimepicker4').datetimepicker('show');
148 +});
149 +$('#close').click(function(){
150 + $('#datetimepicker4').datetimepicker('hide');
151 +});
152 +$('#reset').click(function(){
153 + $('#datetimepicker4').datetimepicker('reset');
154 +});
155 +$('#datetimepicker5').datetimepicker({
156 + datepicker:false,
157 + allowTimes:['12:00','13:00','15:00','17:00','17:05','17:20','19:00','20:00'],
158 + step:5
159 +});
160 +$('#datetimepicker6').datetimepicker();
161 +$('#destroy').click(function(){
162 + if( $('#datetimepicker6').data('xdsoft_datetimepicker') ){
163 + $('#datetimepicker6').datetimepicker('destroy');
164 + this.value = 'create';
165 + }else{
166 + $('#datetimepicker6').datetimepicker();
167 + this.value = 'destroy';
168 + }
169 +});
170 +var logic = function( currentDateTime ){
171 + if (currentDateTime && currentDateTime.getDay() == 6){
172 + this.setOptions({
173 + minTime:'11:00'
174 + });
175 + }else
176 + this.setOptions({
177 + minTime:'8:00'
178 + });
179 +};
180 +$('#datetimepicker7').datetimepicker({
181 + onChangeDateTime:logic,
182 + onShow:logic
183 +});
184 +$('#datetimepicker8').datetimepicker({
185 + onGenerate:function( ct ){
186 + $(this).find('.xdsoft_date')
187 + .toggleClass('xdsoft_disabled');
188 + },
189 + minDate:'-1970/01/2',
190 + maxDate:'+1970/01/2',
191 + timepicker:false
192 +});
193 +$('#datetimepicker9').datetimepicker({
194 + onGenerate:function( ct ){
195 + $(this).find('.xdsoft_date.xdsoft_weekend')
196 + .addClass('xdsoft_disabled');
197 + },
198 + weekends:['01.01.2014','02.01.2014','03.01.2014','04.01.2014','05.01.2014','06.01.2014'],
199 + timepicker:false
200 +});
201 +var dateToDisable = new Date();
202 + dateToDisable.setDate(dateToDisable.getDate() + 2);
203 +$('#datetimepicker11').datetimepicker({
204 + beforeShowDay: function(date) {
205 + if (date.getMonth() == dateToDisable.getMonth() && date.getDate() == dateToDisable.getDate()) {
206 + return [false, ""]
207 + }
208 +
209 + return [true, ""];
210 + }
211 +});
212 +$('#datetimepicker12').datetimepicker({
213 + beforeShowDay: function(date) {
214 + if (date.getMonth() == dateToDisable.getMonth() && date.getDate() == dateToDisable.getDate()) {
215 + return [true, "custom-date-style"];
216 + }
217 +
218 + return [true, ""];
219 + }
220 +});
221 +$('#datetimepicker_dark').datetimepicker({theme:'dark'})
222 +
223 +
224 +</script>
225 +</html>
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 +module.exports = function(config) {
2 + config.set({
3 + basePath: '',
4 + frameworks: ['mocha', 'chai'],
5 + files: [
6 + 'jquery.datetimepicker.css',
7 + 'node_modules/php-date-formatter/js/php-date-formatter.js',
8 + 'jquery.js',
9 + 'jquery.datetimepicker.js',
10 + 'tests/bootstrap.js',
11 + 'tests/tests/*.js'
12 + ],
13 + reporters: ['progress'],
14 + port: 9876,
15 + colors: true,
16 + logLevel: config.LOG_INFO,
17 + browsers: ['Firefox'],
18 + autoWatch: true,
19 + singleRun: false, // Karma captures browsers, runs the tests and exits
20 + concurrency: Infinity,
21 + plugins: [
22 + 'karma-firefox-launcher',
23 + 'karma-mocha',
24 + 'karma-chai'
25 + ],
26 + client: {
27 + captureConsole: true
28 + }
29 + })
30 +};
...\ No newline at end of file ...\ No newline at end of file
This diff could not be displayed because it is too large.
1 +{
2 + "name": "jquery-datetimepicker",
3 + "version": "2.5.20",
4 + "description": "jQuery Plugin DateTimePicker it is DatePicker and TimePicker in one",
5 + "main": "build/jquery.datetimepicker.full.min.js",
6 + "scripts": {
7 + "test": "karma start --browsers Firefox karma.conf.js --single-run",
8 + "concat": "concat-cli -f node_modules/php-date-formatter/js/php-date-formatter.min.js jquery.datetimepicker.js node_modules/jquery-mousewheel/jquery.mousewheel.js -o build/jquery.datetimepicker.full.js",
9 + "minify": "uglifyjs jquery.datetimepicker.js -c -m -o build/jquery.datetimepicker.min.js && uglifycss jquery.datetimepicker.css > build/jquery.datetimepicker.min.css",
10 + "minifyconcat": "uglifyjs build/jquery.datetimepicker.full.js -c -m -o build/jquery.datetimepicker.full.min.js",
11 + "github": "git add --all && git commit -m \"New version %npm_package_version% \" && git tag %npm_package_version% && git push --tags origin HEAD:master && npm publish",
12 + "build": "npm run minify && npm run concat && npm run minifyconcat",
13 + "public": "npm run test && npm version patch --no-git-tag-version && npm run build && npm run github"
14 + },
15 + "repository": {
16 + "type": "git",
17 + "url": "https://github.com/xdan/datetimepicker.git"
18 + },
19 + "keywords": [
20 + "jquery-plugin",
21 + "calendar",
22 + "date",
23 + "time",
24 + "datetime",
25 + "datepicker",
26 + "timepicker"
27 + ],
28 + "author": "Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/)",
29 + "license": "MIT",
30 + "bugs": {
31 + "url": "https://github.com/xdan/datetimepicker/issues"
32 + },
33 + "homepage": "https://github.com/xdan/datetimepicker",
34 + "dependencies": {
35 + "jquery": ">= 1.7.2",
36 + "jquery-mousewheel": ">= 3.1.13",
37 + "php-date-formatter": "^1.3.4"
38 + },
39 + "devDependencies": {
40 + "chai": "^4.1.2",
41 + "concat": "azer/concat",
42 + "concat-cli": "^4.0.0",
43 + "karma": "^2.0.0",
44 + "karma-chai": "^0.1.0",
45 + "karma-firefox-launcher": "^1.1.0",
46 + "karma-mocha": "^1.3.0",
47 + "mocha": "^5.0.4",
48 + "uglifycss": "^0.0.27",
49 + "uglifyjs": "^2.4.10"
50 + }
51 +}
1 +<!doctype html>
2 +<html>
3 +<head>
4 + <meta charset="UTF-8"/>
5 + <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/>
6 + <meta http-equiv="X-UA-Compatible" content="ie=edge"/>
7 + <title>jQuery DateTimepicker Tests </title>
8 + <link rel="stylesheet" href="../node_modules/mocha/mocha.css" />
9 +</head>
10 +<body>
11 +<div id="mocha"></div>
12 +
13 +<script src="../node_modules/mocha/mocha.js"></script>
14 +<script src="../node_modules/chai/chai.js"></script>
15 +
16 +<script>
17 + mocha.ui('bdd');
18 + mocha.reporter('html');
19 +</script>
20 +
21 +<link rel="stylesheet" href="./app.css" />
22 +<link rel="stylesheet" href="../jquery.datetimepicker.css" />
23 +<script src="../jquery.js"></script>
24 +
25 +<script src="../node_modules/php-date-formatter/js/php-date-formatter.js"></script>
26 +<script src="../jquery.datetimepicker.js"></script>
27 +
28 +<script src="./tests/bootstrap.js"></script>
29 +<script src="./tests/init.js"></script>
30 +<script src="./tests/destroy.js"></script>
31 +<script src="./tests/options.js"></script>
32 +<script src="./tests/methods.js"></script>
33 +<script src="./tests/events.js"></script>
34 +
35 +<script>
36 + window.onload = function() {
37 + if (window.mochaPhantomJS) {
38 + mochaPhantomJS.run();
39 + } else {
40 + mocha.run();
41 + }
42 + };
43 +</script>
44 +</body>
45 +</html>
...\ No newline at end of file ...\ No newline at end of file
1 +var inputs = [];
2 +
3 +var box = document.createElement('div');
4 +document.body.appendChild(box);
5 +
6 +
7 +var getInput = function () {
8 + var input = document.createElement('input');
9 + input.setAttribute('type', 'text');
10 + inputs.push(input);
11 + box.appendChild(input);
12 + return input;
13 +};
14 +
15 +var clear = function() {
16 + inputs.forEach(function (inp) {
17 + $(inp).datetimepicker('destroy');
18 + inp.parentNode && inp.parentNode.removeChild(inp)
19 + });
20 +};
21 +
22 +var PICKER = 'xdsoft_datetimepicker';
23 +
24 +var simulateEvent = function (type, element, keyCodeArg, options) {
25 + if (!keyCodeArg) {
26 + keyCodeArg = 0;
27 + }
28 +
29 + if (element instanceof jQuery) {
30 + element = element[0];
31 + }
32 +
33 + var evt = (element.ownerDocument || document).createEvent('HTMLEvents')
34 + evt.initEvent(type, true, true);
35 + evt.keyCode = keyCodeArg;
36 + evt.which = keyCodeArg;
37 +
38 + if (options) {
39 + options(evt);
40 + }
41 +
42 + if (type.match(/^mouse/)) {
43 + ['pageX', 'pageY', 'clientX', 'clientY'].forEach(function (key) {
44 + if (evt[key] === undefined) {
45 + evt[key] = 0;
46 + }
47 + })
48 + }
49 +
50 + element.dispatchEvent(evt);
51 +};
52 +
53 +afterEach(clear);
54 +var expect = chai.expect;
55 +chai.config.includeStack = true
...\ No newline at end of file ...\ No newline at end of file
1 +describe('Check destructor', function () {
2 + describe('Init picker and after this init again with command destroy', function () {
3 + it('Should remove picker from DOM and remove all listeners from original input', function (done) {
4 + var input = getInput();
5 + $(input).datetimepicker();
6 + var dtp = $(input).data('xdsoft_datetimepicker');
7 + expect(dtp).to.be.not.equal(null);
8 + expect(dtp[0].tagName).to.be.equal('DIV');
9 + expect(dtp[0].classList.contains('xdsoft_datetimepicker')).to.be.true;
10 + expect(dtp.is(':hidden')).to.be.true;
11 +
12 + $(input).datetimepicker('destroy');
13 + expect($(input).data('xdsoft_datetimepicker')).to.be.equal(null);
14 +
15 + $(input).trigger('mousedown')
16 + setTimeout(function () {
17 + expect(dtp.is(':hidden')).to.be.true;
18 + done();
19 + }, 150)
20 + });
21 + });
22 +});
...\ No newline at end of file ...\ No newline at end of file
1 +describe('Test events', function () {
2 + describe('onSelectDate', function () {
3 + it('Should fired after user selected day', function (done) {
4 + var input= $(getInput()).val('2011/04/15');
5 +
6 + var picker = input.datetimepicker({
7 + onSelectDate: function (time, inp, evt) {
8 + expect(picker).to.be.equal(this);
9 + expect(time.getDate()).to.be.equal(17);
10 + expect(time.getMonth()).to.be.equal(3);
11 + expect(time.getFullYear()).to.be.equal(2011);
12 + expect(inp[0]).to.be.equal(input[0]);
13 + expect(evt.type).to.be.equal('click');
14 + done();
15 + },
16 + format: 'Y/m/d'
17 + }).trigger('mousedown').data(PICKER);
18 +
19 + setTimeout(function () {
20 + var select = picker.find('td[data-date="17"][data-month="3"][data-year="2011"]');
21 + expect(select.length).to.be.equal(1);
22 + select.trigger('click');
23 + }, 100);
24 + });
25 + });
26 +});
...\ No newline at end of file ...\ No newline at end of file
1 +describe('Init', function () {
2 + describe('jQuery.fn', function () {
3 + it('Should have datetimepicker method', function () {
4 + expect(typeof jQuery.fn.datetimepicker).to.be.equal('function');
5 + expect(typeof $.fn.datetimepicker).to.be.equal('function');
6 + });
7 + });
8 + describe('jQuery.fn.datetimepicker', function () {
9 + it('Should have `defaults` property', function () {
10 + expect(typeof jQuery.fn.datetimepicker.defaults).to.be.equal('object');
11 + expect(jQuery.fn.datetimepicker.defaults.format).to.be.equal('Y/m/d H:i');
12 + });
13 + });
14 + describe('Create datetimepicker', function () {
15 + describe('Without parameters', function () {
16 + it('Should create plugin with default options', function (done) {
17 + var input = getInput();
18 + $(input).datetimepicker();
19 + var dtp = $(input).data('xdsoft_datetimepicker');
20 + expect(dtp).to.be.not.equal(null);
21 + expect(dtp[0].tagName).to.be.equal('DIV');
22 + expect(dtp[0].classList.contains('xdsoft_datetimepicker')).to.be.true;
23 + expect(dtp.is(':hidden')).to.be.true;
24 + $(input).trigger('mousedown')
25 + setTimeout(function () {
26 + expect(dtp.is(':hidden')).to.be.false;
27 + done();
28 + }, 150)
29 + });
30 + });
31 + describe('In inline mode', function () {
32 + it('Should create picker and replace original input', function () {
33 + var input = getInput();
34 + $(input).datetimepicker({
35 + inline: true
36 + });
37 + var dtp = $(input).data('xdsoft_datetimepicker');
38 + expect(dtp.is(':hidden')).to.be.false;
39 + expect($(input).is(':hidden')).to.be.true;
40 + });
41 + });
42 + });
43 + describe('Set locale', function () {
44 + describe('Change locale', function () {
45 + it('Should create different pickers fro all locales', function (done) {
46 + $.datetimepicker.setLocale('en');
47 + var $input = $(getInput());
48 + $input.datetimepicker({inline: true});
49 + setTimeout(function () {
50 + var text = $input.data('xdsoft_datetimepicker').text();
51 + $input.datetimepicker('destroy');
52 + $.datetimepicker.setLocale('ru');
53 + $input.datetimepicker({inline: true});
54 + setTimeout(function () {
55 + expect($input.data('xdsoft_datetimepicker').text()).to.be.not.equal(text);
56 + done();
57 + }, 100)
58 + }, 100)
59 + });
60 + });
61 + });
62 + describe('Select day', function () {
63 + it('Should set selected date to input by format', function (done) {
64 + var input= $(getInput()).val('2011/04/15');
65 +
66 + var picker = input.datetimepicker({
67 + format: 'Y/m/d'
68 + }).trigger('mousedown').data(PICKER);
69 +
70 + setTimeout(function () {
71 + var start = picker.find('td[data-date="15"][data-month="3"][data-year="2011"]');
72 + expect(start.length).to.be.equal(1);
73 + expect(start.hasClass('xdsoft_disabled')).to.be.false;
74 + expect(start.hasClass('xdsoft_current')).to.be.true;
75 + var select = picker.find('td[data-date="17"][data-month="3"][data-year="2011"]');
76 + expect(start.length).to.be.equal(1);
77 + select.trigger('click');
78 + expect(input.val()).to.be.equal('2011/04/17')
79 + done();
80 + }, 100);
81 + });
82 + });
83 +});
...\ No newline at end of file ...\ No newline at end of file
1 +describe('Test methods', function () {
2 + describe('Show', function () {
3 + it('Should show picker', function () {
4 + var input= $(getInput());
5 + var picker = input
6 + .datetimepicker()
7 + .datetimepicker('show')
8 + .data(PICKER);
9 +
10 + expect(picker.is(':hidden')).to.be.false;
11 + });
12 + });
13 + describe('Hide', function () {
14 + it('Should hide picker', function () {
15 + var input= $(getInput());
16 + var picker = input
17 + .datetimepicker()
18 + .datetimepicker('show')
19 + .data(PICKER);
20 +
21 + expect(picker.is(':hidden')).to.be.false;
22 + input.datetimepicker('hide')
23 + expect(picker.is(':hidden')).to.be.true;
24 + });
25 + });
26 + describe('Toggle', function () {
27 + it('Should hide/show picker', function () {
28 + var input= $(getInput());
29 + var picker = input
30 + .datetimepicker()
31 + .datetimepicker('show')
32 + .data(PICKER);
33 +
34 + expect(picker.is(':hidden')).to.be.false;
35 + input.datetimepicker('toggle')
36 + expect(picker.is(':hidden')).to.be.true;
37 + input.datetimepicker('toggle')
38 + expect(picker.is(':hidden')).to.be.false;
39 + });
40 + });
41 + describe('Reset', function () {
42 + it('Should restore default value', function (done) {
43 + var input= $('<input type="text" value="15.12.2008"/>').appendTo(document.body);
44 +
45 + var picker = input
46 + .datetimepicker({format: 'd.m.Y'})
47 + .datetimepicker('show')
48 + .data(PICKER);
49 +
50 + setTimeout(function () {
51 + var select = picker.find('td[data-date="16"][data-month="11"][data-year="2008"]');
52 + expect(select.length).to.be.equal(1);
53 + select.trigger('click');
54 + expect(input.val()).to.be.equal('16.12.2008');
55 + input.datetimepicker('reset');
56 + expect(input.val()).to.be.equal('15.12.2008');
57 + input.datetimepicker('destroy').remove();
58 + done();
59 + }, 100)
60 + });
61 + });
62 +});
...\ No newline at end of file ...\ No newline at end of file
1 +describe('Test options', function () {
2 + describe('dayOfWeekStart', function () {
3 + it('Should change default start of week', function (done) {
4 + $.datetimepicker.setLocale('en');
5 + var input = $(getInput());
6 + var picker = input.datetimepicker({inline: true}).trigger('mousedown').data('xdsoft_datetimepicker');
7 + setTimeout(function () {
8 + var day = picker.find('th').eq(0).text();
9 + var date = picker.find('td').eq(0).text();
10 + input.datetimepicker('destroy');
11 +
12 + var picker2 = $(getInput()).datetimepicker({
13 + inline: true,
14 + dayOfWeekStart: 2
15 + }).trigger('mousedown').data(PICKER);
16 +
17 + setTimeout(function () {
18 + expect(picker2.find('th').eq(0).text()).to.be.not.equal(day);
19 + expect(picker2.find('td').eq(0).text()).to.be.not.equal(date);
20 + done();
21 + }, 100);
22 + }, 100);
23 + });
24 + });
25 + describe('disabledDates and startDate', function () {
26 + it('Should disable some dates in picker and picker should be open on startDate', function (done) {
27 + var input= $(getInput());
28 + var picker = input.datetimepicker({
29 + disabledDates:['1986/01/08','1986/01/09','1986/01/10'],
30 + startDate: '1986/01/05'
31 + }).trigger('mousedown').data(PICKER);
32 +
33 + setTimeout(function () {
34 + var day = picker.find('td[data-date="8"][data-month="0"][data-year="1986"]');
35 + expect(day.hasClass('xdsoft_disabled')).to.be.true;
36 + var start = picker.find('td[data-date="5"][data-month="0"][data-year="1986"]');
37 + expect(start.length).to.be.equal(1);
38 + expect(start.hasClass('xdsoft_disabled')).to.be.false;
39 + done();
40 + }, 100);
41 + });
42 + });
43 + describe('defaultDate', function () {
44 + it('Should open picker on some date', function (done) {
45 + var input= $(getInput());
46 + var picker = input.datetimepicker({formatDate:'d.m.Y', defaultDate: '+03.01.1970'}).trigger('mousedown').data(PICKER);
47 +
48 + setTimeout(function () {
49 + var now = new Date();
50 + now.setDate(now.getDate() + 2)
51 + var start = picker.find('td[data-date="' + now.getDate() + '"][data-month="' + now.getMonth() + '"][data-year="' + now.getFullYear() + '"]');
52 + expect(start.length).to.be.equal(1);
53 + expect(start.hasClass('xdsoft_disabled')).to.be.false;
54 + expect(start.hasClass('xdsoft_current xdsoft_today')).to.be.true;
55 + done();
56 + }, 100);
57 + });
58 + });
59 + describe('Value', function () {
60 + it('Should set value to plugin', function (done) {
61 + var input= $(getInput());
62 + var picker = input.datetimepicker({value: '2011/04/15 05:03'}).trigger('mousedown').data(PICKER);
63 +
64 + setTimeout(function () {
65 + var start = picker.find('td[data-date="15"][data-month="3"][data-year="2011"]');
66 + expect(start.length).to.be.equal(1);
67 + expect(start.hasClass('xdsoft_disabled')).to.be.false;
68 + done();
69 + }, 100);
70 + });
71 + });
72 + describe('timepicker = false', function () {
73 + it('Should create only datepicker', function (done) {
74 + var input= $(getInput());
75 + var picker = input.datetimepicker({
76 + timepicker: false
77 + }).trigger('mousedown').data(PICKER);
78 +
79 + setTimeout(function () {
80 + var timepicker = picker.find('.xdsoft_timepicker');
81 + expect(timepicker.length).to.be.equal(1);
82 + expect(timepicker.is(':hidden')).to.be.true;
83 + done();
84 + }, 100);
85 + });
86 + });
87 + describe('datepicker = false', function () {
88 + it('Should create only timepicker', function (done) {
89 + var input= $(getInput());
90 + var picker = input.datetimepicker({
91 + datepicker: false
92 + }).trigger('mousedown').data(PICKER);
93 +
94 + setTimeout(function () {
95 + var datepicker = picker.find('.xdsoft_datepicker');
96 + expect(datepicker.length).to.be.equal(1);
97 + expect(datepicker.is(':hidden')).to.be.true;
98 + done();
99 + }, 100);
100 + });
101 + });
102 +});
...\ No newline at end of file ...\ No newline at end of file
1 +@font-face{
2 + font-family: 'MyWebFont';
3 + src: url('WebFont.ttf') format('truetype');
4 +}
...\ No newline at end of file ...\ No newline at end of file
1 +<html>
2 +<head>
3 + <link rel="stylesheet" href="toast.css"/>
4 + <script src="toast.js" charset="utf-8"></script>
5 +</head>
6 +<script type="text/javascript">
7 +function init () {
8 + drawToast("HTML toast likes Android");
9 +}
10 +</script>
11 +<body onload="init();">
12 +</body>
13 +</html>
...\ No newline at end of file ...\ No newline at end of file
1 +#toast{
2 + position: fixed;
3 + top: 80%;
4 + left: 50%;
5 + width: 200px;
6 + background-color: black;
7 + color:white;
8 + margin-left: -100px;
9 + border: 1px solid #666;
10 + padding: 10px 0 ;
11 + text-align:center;
12 + opacity: .9;
13 +
14 +
15 + /* opacity time */
16 + -webkit-transition: opacity 0.5s ease-out;
17 + -moz-transition: opacity 0.5s ease-out;
18 + -ms-transition: opacity 0.5s ease-out;
19 + -o-transition: opacity 0.5s ease-out;
20 + transition: opacity 0.5s ease-out;
21 +
22 + /* round border */
23 + -webkit-border-radius: 10px;
24 + -moz-border-radius: 10px;
25 + border-radius: 10px;
26 +}
...\ No newline at end of file ...\ No newline at end of file
1 +var intervalCounter = 0;
2 +
3 +function hideToast(){
4 + var alert = document.getElementById("toast");
5 + alert.style.opacity = 0;
6 + clearInterval(intervalCounter);
7 +}
8 +
9 +function drawToast(message){
10 +
11 + var alert = document.getElementById("toast");
12 +
13 + if (alert == null){
14 + var toastHTML = '<div id="toast">' + message + '</div>';
15 + document.body.insertAdjacentHTML('beforeEnd', toastHTML);
16 + }
17 + else{
18 + alert.style.opacity = .9;
19 + }
20 +
21 +
22 + intervalCounter = setInterval("hideToast()", 1000);
23 +}
...\ No newline at end of file ...\ No newline at end of file
1 +{% extends "main.html" %}
2 +{% block head %}
3 +
4 +{% endblock %}
5 +{% block style %}
6 +<style>
7 +#btn2 {
8 + width: 150px;
9 + height: 47px;
10 + font-size:25px;
11 + font-family: '배달의민족 도현';
12 + color: gray;
13 + background: white;
14 + border: solid 5px white;
15 + border-radius: 5px;
16 +}
17 +input[type=text] {
18 + width: 60%;
19 + padding: 12px 20px;
20 + box-sizing: border-box;
21 + border: 3px solid #ccc;
22 + -webkit-transition: 0.5s;
23 + transition: 0.5s;
24 + outline: none;
25 + font-family: '배달의민족 도현';
26 + display: inline;
27 + float: right;
28 +}
29 +input[type=text]:focus {
30 + border: 3px solid #555;
31 +}
32 +input[type=password] {
33 + width: 60%;
34 + padding: 12px 20px;
35 + box-sizing: border-box;
36 + border: 3px solid #ccc;
37 + -webkit-transition: 0.5s;
38 + transition: 0.5s;
39 + outline: none;
40 + display: inline;
41 + float: right;
42 +}
43 +input[type=password]:focus {
44 + border: 3px solid #555;
45 +}
46 +select{
47 + width: 60%;
48 + padding: 12px 20px;
49 + box-sizing: border-box;
50 + border: 3px solid #ccc;
51 + -webkit-transition: 0.5s;
52 + transition: 0.5s;
53 + outline: none;
54 + font-family: '배달의민족 도현';
55 + display: inline;
56 + float: right;
57 + border-radius: 5px;
58 +}
59 +h2 {
60 + display: inline;
61 + vertical-align: bottom;
62 +
63 +}
64 +input{
65 +
66 +}
67 +#wrapper {
68 + width: 400px;
69 +
70 +}
71 +
72 +.item{
73 + height: 50px;
74 +
75 +}
76 +
77 +</style>
78 +{% endblock %}
79 +{% block content %}
80 +<img style="border-radius:15px;" width="300px;" src="{{ url_for('static', filename = '캡처6.png') }}"/>
81 +<form action="/join/confirm" method="post">
82 +
83 +<br><br>
84 + <div id="wrapper">
85 + <div class="item"><H2>ID</H2><input style="border-radius:10px;" type="text" name="id" placeholder="ID 입력" required></div>
86 + <div class="item"><H2>PW</H2><input style="border-radius:10px;" type="password" name="password" placeholder="비밀번호 입력" required><br></div>
87 + <div class="item"><H2>이름</H2><input style="border-radius:10px;" type="text" name="name" placeholder="사용자 이름 입력" required><br></div>
88 + <div class="item"><H2>메일주소</H2><input style="border-radius:10px;" type="text" name="email" placeholder="메일주소 입력" required><br></div>
89 + <div class="item"><H2>전화번호</H2><input style="border-radius:10px;" type="text" name="phone" placeholder="전화번호 입력" required><br></div>
90 + <div class="item"><H2>부서 ID</H2>
91 + <select name="deptid" required><option value="1">전자정보대학</option>
92 + <option value="2">외국어대학</option>
93 + <option value="3">공과대학</option>
94 + <option value="4">예술디자인대학</option>
95 + <option value="5">체육대학</option>
96 + <option value="6">국제대학</option>
97 + <option value="7">대학본부</option></select>
98 + <br></div>
99 +
100 +</div>
101 +<br>
102 +
103 +<center><input type="submit" id="btn2" value="회원가입"></center><br>
104 +
105 +</form>
106 +{% endblock %}
...\ No newline at end of file ...\ No newline at end of file
1 +<!doctype html>
2 +<html>
3 + <head>
4 + {% block head %}
5 + <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
6 + <title>{% block title %}{% endblock %} - My Webpage</title>
7 + {% endblock %}
8 + </head>
9 +<body>
10 + <div id="content">{% block content %}{% endblock %}</div>
11 + <div id="footer">
12 + {% block footer %}
13 + &copy; Copyright 2010 by <a href="http://domain.invalid/">you</a>.
14 + {% endblock %}
15 + </div>
16 +</body>
...\ No newline at end of file ...\ No newline at end of file
1 -<!DOCTYPE html> 1 +{% extends "main.html" %}
2 -<html> 2 +{% block title %}Select Menu{% endblock %}
3 -<head> 3 +{% block head %}
4 - <title>로그인화면</title> 4 +
5 -</head> 5 +{% endblock %}
6 +{% block style %}
6 <style> 7 <style>
7 body { 8 body {
8 background-color: rgb(230, 243, 255); 9 background-color: rgb(230, 243, 255);
...@@ -20,6 +21,7 @@ input[type=text] { ...@@ -20,6 +21,7 @@ input[type=text] {
20 -webkit-transition: 0.5s; 21 -webkit-transition: 0.5s;
21 transition: 0.5s; 22 transition: 0.5s;
22 outline: none; 23 outline: none;
24 + font-family: 'MyWebFont';
23 } 25 }
24 input[type=text]:focus { 26 input[type=text]:focus {
25 border: 3px solid #555; 27 border: 3px solid #555;
...@@ -33,7 +35,8 @@ input[type=password] { ...@@ -33,7 +35,8 @@ input[type=password] {
33 -webkit-transition: 0.5s; 35 -webkit-transition: 0.5s;
34 transition: 0.5s; 36 transition: 0.5s;
35 outline: none; 37 outline: none;
36 - margin-right: 7px; 38 + margin-right: 7px;
39 + font-family: 'MyWebFont';
37 } 40 }
38 input[type=password]:focus { 41 input[type=password]:focus {
39 border: 3px solid #555; 42 border: 3px solid #555;
...@@ -42,7 +45,7 @@ input[type=password]:focus { ...@@ -42,7 +45,7 @@ input[type=password]:focus {
42 width: 120px; 45 width: 120px;
43 height: 45px; 46 height: 45px;
44 font-size:25px; 47 font-size:25px;
45 - font-family: '배달의민족 도현'; 48 + font-family: 'MyWebFont';
46 color: gray; 49 color: gray;
47 background: white; 50 background: white;
48 border: solid 5px white; 51 border: solid 5px white;
...@@ -52,39 +55,31 @@ input[type=password]:focus { ...@@ -52,39 +55,31 @@ input[type=password]:focus {
52 width: 150px; 55 width: 150px;
53 height: 47px; 56 height: 47px;
54 font-size:25px; 57 font-size:25px;
55 - font-family: '배달의민족 도현'; 58 + font-family: 'MyWebFont';
56 color: gray; 59 color: gray;
57 background: white; 60 background: white;
58 border: solid 5px white; 61 border: solid 5px white;
59 border-radius: 5px; 62 border-radius: 5px;
60 } 63 }
61 h2 { 64 h2 {
62 - font-family: '배달의민족 도현'; 65 + font-family: 'MyWebFont';
63 } 66 }
64 67
65 -</style>
66 -
67 -
68 -<body>
69 68
69 +</style>
70 +{% endblock %}
71 +{% block content %}
72 +<br><br>
70 <br><br> 73 <br><br>
71 -<img style="border-radius:15px;" width="300px;" src="캡처6.png"/> 74 +<img style="border-radius:15px;" width="300px;" src="{{ url_for('static', filename = '캡처6.png') }}"/>
72 -<form> 75 +
73 76
74 <br> 77 <br>
78 + <form action="/logincheck" method="post">
75 <center><H2>ID&nbsp;&nbsp;<input style="border-radius:10px;" type="text" name="id" placeholder="ID 입력" required><br></H2></center> 79 <center><H2>ID&nbsp;&nbsp;<input style="border-radius:10px;" type="text" name="id" placeholder="ID 입력" required><br></H2></center>
76 -<center><H2>PW&nbsp;<input style="border-radius:10px;" type="password" name="password" placeholder="비밀번호 입력" required><br></H2></center> 80 +<center><H2>PW&nbsp;<input style="border-radius:10px;" type="password" name="pw" placeholder="비밀번호 입력" required><br></H2></center>
77 <br> 81 <br>
78 82
79 -<center><button id="btn1">로그인</button></center><br>
80 -<center><button id="btn2">회원가입</button></center><br>
81 -<!--<center><button class="btn;" id="btn;" type="submit;"><img width="120;" height="45;" class="btn-img" src="로그인.png"></button></center><br>
82 -<center><button class="btn;" id="btn;" type="submitl"><img width="150;" height="47;" class="btn-img" src="회원가입.png"></button></center><br>-->
83 -<img width="100;" height="70;" align="bottom;" src="khu.png"/>
84 -
85 -</form>
86 -
87 -
88 -</body>
89 -
90 -</html>
...\ No newline at end of file ...\ No newline at end of file
83 +<center><input type="submit" id="btn1" value="로그인" ></center><br></form>
84 +<center><button id="btn2" onclick="window.location.href='/join'">회원가입</button></center><br>
85 +{% endblock %}
...\ No newline at end of file ...\ No newline at end of file
......
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 - <title>대여화면1</title> 4 + {% block head %}
5 + <title>{% block title %}{% endblock %} - My Webpage</title>
6 + {% endblock %}
7 +<link rel="stylesheet" href="{{url_for('static', filename='toast/toast.css')}}"/>
8 + <script src="{{url_for('static', filename='toast/toast.js')}}" charset="utf-8"></script>
5 </head> 9 </head>
10 +<script type="text/javascript">
11 +function init () {
12 + drawToast("HTML toast likes Android");
13 +}
14 +</script>
15 +<link type="text/css" rel="stylesheet" href="{{url_for('static', filename='font.css')}}"/>
6 <style> 16 <style>
7 body { 17 body {
8 background-color: rgb(230, 243, 255); 18 background-color: rgb(230, 243, 255);
19 + font-family: 'MyWebFont';
9 } 20 }
10 img { 21 img {
11 display:block; 22 display:block;
12 margin:auto; 23 margin:auto;
13 } 24 }
25 +#page_title{
26 + font-family : 'MyWebFont';
27 + text-align: center;
28 + color: gray;
29 +}
14 #btn1 { 30 #btn1 {
15 width: 150px; 31 width: 150px;
16 height: 150px; 32 height: 150px;
17 font-size:32px; 33 font-size:32px;
18 - font-family: '배달의민족 도현'; 34 + font-family: 'MyWebFont';
19 color: rgb(165, 210, 134); 35 color: rgb(165, 210, 134);
20 background: white; 36 background: white;
21 border: solid 5px white; 37 border: solid 5px white;
22 border-radius: 50%; 38 border-radius: 50%;
23 - margin-right: 150px;
24 margin-top: 50px; 39 margin-top: 50px;
25 } 40 }
26 #btn2 { 41 #btn2 {
27 width: 150px; 42 width: 150px;
28 height: 150px; 43 height: 150px;
29 font-size:32px; 44 font-size:32px;
30 - font-family: '배달의민족 도현'; 45 + font-family: 'MyWebFont';
31 color: rgb(251, 199, 205); 46 color: rgb(251, 199, 205);
32 background: white; 47 background: white;
33 border: solid 5px white; 48 border: solid 5px white;
34 border-radius: 50%; 49 border-radius: 50%;
35 - margin-left: 150px;
36 margin-top: 50px; 50 margin-top: 50px;
37 } 51 }
52 + #btn3 {
53 + width: 150px;
54 + height: 150px;
55 + font-size:32px;
56 + font-family: 'MyWebFont';
57 + color: rgb(165, 210, 134);
58 + background: white;
59 + border: solid 5px white;
60 + border-radius: 50%;
61 + margin-top: 50px;
62 +}
38 63
39 </style> 64 </style>
65 +{% block style %}{% endblock %}
40 66
41 -<body> 67 +<body >
42 - 68 +{% with messages = get_flashed_messages(with_categories=true) %}
69 + {% if messages %}
70 + {% for category, message in messages %}
71 + <script type="text/javascript">drawToast("{{ message }}")</script>
72 + {% endfor %}
73 + {% endif %}
74 +{% endwith %}
43 <br><br> 75 <br><br>
44 -<img style="border-radius:15px;" width="300px;" src="캡처6.png"/><br> 76 +
45 -<form>
46 77
47 <br> 78 <br>
48 79
49 -<center><button id="btn1">대여하기</button></center> 80 +<center><div id="content">{% block content %}{% endblock %}</div></center>
50 -<center><button id="btn2">대여현황</button></center>
51 <br><br><br><br> 81 <br><br><br><br>
52 -<img width="100;" height="70;" align="bottom;" src="khu.png"/> 82 +<img width="100;" height="70;" align="bottom;" src="{{ url_for('static', filename = 'khu.PNG') }}"/>
83 +
53 84
54 -</form>
55 85
56 86
57 87
......
1 +{% extends "main.html" %}
2 +{% block title %}Select Menu{% endblock %}
3 +{% block head %}
4 +
5 +{% endblock %}
6 +{% block style %}
7 +<style>
8 +body {
9 + background-color: rgb(230, 243, 255);
10 +}
11 +img {
12 + display:block;
13 + margin:auto;
14 +}
15 +#btn1 {
16 + width: 150px;
17 + height: 150px;
18 + font-size:32px;
19 + font-family: 'MyWebFont';
20 + color: rgb(165, 210, 134);
21 + background: white;
22 + border: solid 5px white;
23 + border-radius: 50%;
24 + margin-top: 50px;
25 +}
26 +#btn2 {
27 + width: 150px;
28 + height: 150px;
29 + font-size:32px;
30 + font-family: 'MyWebFont';
31 + color: rgb(251, 199, 205);
32 + background: white;
33 + border: solid 5px white;
34 + border-radius: 50%;
35 + margin-top: 50px;
36 +}
37 + #btn3 {
38 + width: 150px;
39 + height: 150px;
40 + font-size:32px;
41 + font-family: 'MyWebFont';
42 + color: rgb(165, 210, 134);
43 + background: white;
44 + border: solid 5px white;
45 + border-radius: 50%;
46 + margin-top: 50px;
47 +}
48 +
49 +
50 +</style>
51 +{% endblock %}
52 +{% block content %}
53 +<br><br>
54 +<img style="border-radius:15px;" width="300px;" src="{{ url_for('static', filename = '캡처6.png') }}"/><br>
55 +
56 +<br>
57 +
58 +<center><button id="btn1" onclick="window.location.href='/search'">대여하기</button></center>
59 +<center><button id="btn2" onclick="window.location.href='/viewresv'">대여현황</button></center>
60 +<center><button id="btn3" onclick="window.location.href='/logout'">로그아웃</button></center>
61 +{% endblock %}
...\ No newline at end of file ...\ No newline at end of file
1 +{% extends "main.html" %}
2 +{% block head %}
3 +
4 +{% endblock %}
5 +{% block style %}
6 +<style>
7 +body {
8 + background-color: rgb(230, 243, 255);
9 + text-align: center;
10 +}
11 +
12 +#select1 {
13 + width: 300px;
14 + border: 3px solid rgb(191, 191, 191);
15 + border-radius: 4px;
16 + font-size: 20px;
17 + font-family: '배달의민족 도현';
18 + background-color: rgb(230, 243, 255);
19 + background-position: 5px 2.5px;
20 + -webkit-appearance: none;
21 + -moz-appearance: none;
22 + background: url('select-arrow.png') no-repeat 95% 50%;
23 + padding: 10px 10px 10px 20px;
24 +}
25 +select::-ms-expand {
26 + display: none;
27 +}
28 +#select2 {
29 + width: 150px;
30 + border: 3px solid rgb(191, 191, 191);
31 + border-radius: 4px;
32 + font-size: 20px;
33 + font-family: '배달의민족 도현';
34 + background-color: rgb(230, 243, 255);
35 + background-position: 5px 2.5px;
36 + -webkit-appearance: none;
37 + -moz-appearance: none;
38 + background: url('select-arrow.png') no-repeat 95% 50%;
39 + padding: 10px 10px 10px 20px;
40 + margin-left: 50;
41 +}
42 +input[type=number] {
43 + width: 109px;
44 + border: 3px solid rgb(191, 191, 191);
45 + border-radius: 4px;
46 + font-size: 20px;
47 + font-family: '배달의민족 도현';
48 + background-color: rgb(230, 243, 255);
49 + background-position: 5px 2.5px;
50 + padding: 10px 10px 10px 20px;
51 + margin-left: 50;
52 +}
53 +input[type=text] {
54 + width: 300px;
55 + box-sizing: border-box;
56 + border: 3px solid rgb(191, 191, 191);
57 + border-radius: 4px;
58 + font-size: 18px;
59 + font-family: '배달의민족 도현';
60 + background-color: rgb(230, 243, 255);
61 + padding: 10px 10px 10px 20px;
62 +}
63 +input[type=submit] {
64 + width: 300px;
65 + box-sizing: border-box;
66 + border: 3px solid rgb(251, 199, 205);
67 + border-radius: 4px;
68 + font-size: 25px;
69 + font-family: '배달의민족 도현';
70 + background-color: rgb(251, 199, 205);
71 + padding: 10px 10px 10px 10px;
72 +}
73 +input[type=datetime-local] {
74 + width: 320px;
75 + box-sizing: border-box;
76 + border: 3px solid rgb(191, 191, 191);
77 + border-radius: 4px;
78 + font-size: 18px;
79 + font-family: '배달의민족 도현';
80 + background-color: rgb(230, 243, 255);
81 + padding: 10px 10px 10px 20px;
82 +}
83 +#btn1 {
84 + width: 147px;
85 + height: 60px;
86 + font-size:16px;
87 + font-family: '배달의민족 도현';
88 + text-align: left;
89 + color: gray;
90 + background: white;
91 + border: solid 5px white;
92 + border-radius: 5px;
93 + vertical-align: bottom;
94 +}
95 +#btn2 {
96 + width: 147px;
97 + height: 60px;
98 + font-size:25px;
99 + font-family: '배달의민족 도현';
100 + color: rgb(045, 098, 155);
101 + background: white;
102 + border: solid 5px white;
103 + border-radius: 5px;
104 +}
105 +#btn3 {
106 + width: 147px;
107 + height: 60px;
108 + font-size:25px;
109 + font-family: '배달의민족 도현';
110 + color: rgb(164, 025, 018);
111 + background: white;
112 + border: solid 5px white;
113 + border-radius: 5px;
114 +}
115 +#btn3 {
116 + width: 65px;
117 + height: 65px;
118 + font-size:25px;
119 + font-family: '배달의민족 도현';
120 + color: rgb(164, 025, 018);
121 + border-radius: 50%;
122 + border: solid 5px rgb(230, 243, 255);
123 + background-image: url('back-arrow.png');
124 +}
125 +form {
126 + font-family: '배달의민족 도현';
127 + font-size:20px;
128 +}
129 +#wrapper {
130 + width: 400px;
131 + text-align: center;
132 + display: inline-block;
133 +
134 +}
135 +select{
136 + width: 60%;
137 + padding: 12px 20px;
138 + box-sizing: border-box;
139 + border: 3px solid #ccc;
140 + -webkit-transition: 0.5s;
141 + transition: 0.5s;
142 + outline: none;
143 + font-family: '배달의민족 도현';
144 + display: inline;
145 + float: right;
146 + border-radius: 5px;
147 +}
148 +#maxpeople{
149 + width: 55%;
150 + padding: 12px 20px;
151 + box-sizing: border-box;
152 + border: 3px solid #ccc;
153 + -webkit-transition: 0.5s;
154 + transition: 0.5s;
155 + outline: none;
156 + font-family: '배달의민족 도현';
157 + display: inline;
158 + float: right;
159 + border-radius: 5px;
160 +}
161 +.item{
162 + height: 50px;
163 + margin: 10px;
164 +
165 +}
166 +h3 {
167 + display: inline-block;
168 + vertical-align: middle;
169 +margin-top: 15px;
170 +
171 +}
172 +{% endblock %}
173 +{% block content %}
174 +</style>
175 +
176 +<body>
177 +
178 +<br>
179 +<img style="border-radius:15px;" width="300px;" src="{{ url_for('static', filename = '캡처6.png') }}"/>
180 +<div id="wrapper">
181 +<form action="/search/result" method="post">
182 +
183 +<br><br>
184 +
185 +<div class="item"><H3>부서 ID</H3>
186 + <select name="deptid" required><option value="1">전자정보대학</option>
187 + <option value="2">외국어대학</option>
188 + <option value="3">공과대학</option>
189 + <option value="4">예술디자인대학</option>
190 + <option value="5">체육대학</option>
191 + <option value="6">국제대학</option>
192 + <option value="7">대학본부</option></select>
193 + <br></div>
194 + <center><div class="item"><H3>사용 인원 수</H3><input type="number" id="maxpeople" name="quantity" min="1" max="200"></div></center><br>
195 +
196 +
197 +<center>시작 시간<br><br><input type="datetime-local" name="starttime"></center><br>
198 +<center>종료 시간<br><br><input type="datetime-local" name="endtime"></center><br>
199 +
200 +
201 +<br>
202 + <center><input type="submit" value="검색"></center></form>
203 + </div>
204 +{% endblock %}
...\ No newline at end of file ...\ No newline at end of file
1 +{% extends "main.html" %}
2 +{% block title %}예약 현황{% endblock %}
3 +{% block head %}
4 +
5 +{% endblock %}
6 +{% block style %}
7 +<style>
8 +#list_item{
9 + width: 275px;
10 + height: 100px;
11 + font-size:20px;
12 + font-family: '배달의민족 도현';
13 + color: gray;
14 + background: white;
15 + border: solid 5px white;
16 + border-radius: 5px;
17 + vertical-align: bottom;
18 + line-height: 150%;
19 + display: inline-block;
20 +}
21 +#delete_btn{
22 + width: 47px;
23 + height: 110px;
24 + box-sizing: border-box;
25 + font-size: 20px;
26 + font-family: '배달의민족 도현';
27 + background-color: rgb(255, 101, 101);
28 + color: white;
29 + border-radius:5px;
30 + border: solid 5px rgb(255, 101, 101);
31 + float: right;
32 + display: inline-block;
33 +
34 +}
35 +
36 +</style>
37 +{% endblock %}
38 +{% block content %}
39 + <img style="border-radius:15px;" width="300px;" src="{{ url_for('static', filename = '캡처6.png') }}"/><br>
40 + <h1>예약 현황</h1>
41 + {% if not resv_list %}
42 + <p>예약 데이터가 없습니다.</p>
43 +{% endif %}
44 + <table>
45 + {% for resv_item in resv_list %}
46 + <tr><td><form method="post" action="/deleteresv"><div id="list_item">{{ resv_item[3] }} {{ resv_item[4] }}<br>{{ resv_item[6].strftime('%Y-%m-%d') }}<br>{{ resv_item[6].strftime('%H:%M') }} ~ {{ resv_item[7].strftime('%H:%M') }}<form method="post" action="/deleteresv"><input type="hidden" name="resv_id" value="{{ resv_item[0] }}"></div><input type="submit" id="delete_btn" value="X"></form></td></tr>
47 + {% endfor %}
48 + </table>
49 +{% endblock %}
...\ No newline at end of file ...\ No newline at end of file
1 +{% extends "main.html" %}
2 +{% block title %}예약 현황{% endblock %}
3 +{% block head %}
4 +
5 +{% endblock %}
6 +{% block style %}
7 +<style>
8 +#list_item{
9 + width: 275px;
10 + height: 100px;
11 + font-size:20px;
12 + font-family: '배달의민족 도현';
13 + color: gray;
14 + background: white;
15 + border: solid 5px white;
16 + border-radius: 5px;
17 + vertical-align: bottom;
18 + line-height: 150%;
19 + display: inline-block;
20 +}
21 +#delete_btn{
22 + width: 47px;
23 + height: 110px;
24 + box-sizing: border-box;
25 + font-size: 20px;
26 + font-family: '배달의민족 도현';
27 + background-color: rgb(255, 101, 101);
28 + color: white;
29 + border-radius:5px;
30 + border: solid 5px rgb(255, 101, 101);
31 + float: right;
32 + display: inline-block;
33 +
34 +}
35 +
36 +</style>
37 +{% endblock %}
38 +{% block content %}
39 + <img style="border-radius:15px;" width="300px;" src="{{ url_for('static', filename = '캡처6.png') }}"/><br>
40 + <h1>검색 결과</h1>
41 + {% if not resv_list %}
42 + <p>가능한 강의실이 없습니다.</p>
43 +{% endif %}
44 + <table>
45 + {% for resv_item in resv_list %}
46 + <tr><td><form method="post" action="/search/resv"><div id="list_item">{{ resv_item[3] }} {{ resv_item[4] }}<br>{{ resv_item[6].strftime('%Y-%m-%d') }}<br>{{ resv_item[6].strftime('%H:%M') }} ~ {{ resv_item[7].strftime('%H:%M') }}
47 + <form method="post" action="/deleteresv">
48 + <input type="hidden" name="resv_id" value="{{ 강의실ID }}">
49 + </div><input type="submit" id="delete_btn" value="예약"></form></td></tr>
50 + {% endfor %}
51 + </table>
52 +{% endblock %}
53 +
1 +user_id = ''
2 +user_passwd = ''
...\ No newline at end of file ...\ No newline at end of file