Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
uBus
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chiara Veronica Señires
uBus
Commits
ffaf6a16
Commit
ffaf6a16
authored
Oct 29, 2015
by
Pearl Jen Santos
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/chiawase/CS123-uBus
parents
ab6c9aa0
944bf227
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
179 additions
and
69 deletions
+179
-69
adminAccount.html
web-app/adminAccount.html
+58
-0
style.css
web-app/css/style.css
+39
-0
favicon.ico
web-app/img/favicon.ico
+0
-0
index.html
web-app/index.html
+8
-2
app.js
web-app/js/app.js
+35
-61
loading.html
web-app/loading.html
+2
-1
login.html
web-app/login.html
+31
-0
schedule.html
web-app/schedule.html
+6
-5
No files found.
web-app/adminAccount.html
0 → 100644
View file @
ffaf6a16
<!DOCTYPE html>
<html>
<head>
<title>
uBus | Bus Schedules
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"css/font-awesome.min.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"css/style.css"
>
<script
type=
"text/javascript"
src=
"https://code.jquery.com/jquery-2.1.4.js"
></script>
<script
src=
"http://www.parsecdn.com/js/parse-1.6.6.min.js"
></script>
</head>
<body>
<header>
<nav>
<a
href=
"index.html"
><img
src=
"img/logo.png"
width=
"40px"
></a>
<a
href=
"javascript:void(0);"
><img
src=
"img/add.png"
width=
"40px"
></a>
<a
href=
"javascript:void(0);"
><img
src=
"img/search.png"
width=
"40px"
></a>
</nav>
</header>
<div
class=
"wrapper"
>
<div
class=
"title"
>
<img
src=
"img/scheduling.png"
width=
"40px"
>
<h1>
Create Admin Account
</h1>
</div>
<div
class=
"card"
>
<div
class=
"row"
>
<form
method=
"post"
class=
"card_adminAccount"
id=
"create_adminAccount"
style=
"display:block; margin:0 auto;"
>
<fieldset>
<label
for=
"addUname"
><i
class=
"fa fa-2x fa-user"
></i>
<input
type=
"text"
id=
"addUname"
placeholder=
"Username"
></label>
</fieldset>
<fieldset>
<label
for=
"addPassword"
><i
class=
"fa fa-2x fa-key"
></i>
<input
type=
"password"
id=
"addPassword"
placeholder=
"Password"
>
</label>
</fieldset>
<fieldset>
<label
for=
"addEmail"
><i
class=
"fa fa-2x fa-envelope"
></i>
<input
type=
"text"
id=
"addEmail"
placeholder=
"admin@example.com"
>
</label>
</fieldset>
<fieldset>
<label
for=
"addBusCompany"
><i
class=
"fa fa-2x fa-bus"
></i>
<input
type=
"text"
id=
"addBusCompany"
placeholder=
"Example Lines"
>
</label>
</fieldset>
<fieldset
style=
"margin-top: 40px;"
>
<input
type=
"submit"
>
</fieldset>
</form>
</div>
</div>
<div
class=
"schedules"
></div>
</div>
<script
type=
"text/javascript"
src=
"js/app.js"
></script>
</body>
</html>
web-app/css/style.css
View file @
ffaf6a16
...
@@ -3,6 +3,10 @@ html, body {
...
@@ -3,6 +3,10 @@ html, body {
padding
:
0
;
padding
:
0
;
}
}
body
{
font-family
:
"Courier New"
,
Courier
,
monospace
;
}
nav
{
nav
{
position
:
relative
;
position
:
relative
;
height
:
60px
;
height
:
60px
;
...
@@ -21,6 +25,14 @@ nav a:first-child {
...
@@ -21,6 +25,14 @@ nav a:first-child {
float
:
left
;
float
:
left
;
}
}
nav
>
h1
{
display
:
inline-block
;
margin
:
0
;
padding-top
:
15px
;
padding-left
:
15px
;
color
:
#fff
;
}
.button
{
.button
{
display
:
inline-block
;
display
:
inline-block
;
width
:
45%
!important
;
width
:
45%
!important
;
...
@@ -75,8 +87,18 @@ nav a:first-child {
...
@@ -75,8 +87,18 @@ nav a:first-child {
left
:
0
;
left
:
0
;
}
}
.row
{
position
:
relative
;
}
.card
.img-placeholder
{
position
:
absolute
;
top
:
0
;
}
.card
form
{
.card
form
{
display
:
inline-block
;
display
:
inline-block
;
margin-left
:
80px
;
width
:
calc
(
100%
-
80px
);
width
:
calc
(
100%
-
80px
);
}
}
...
@@ -113,6 +135,23 @@ nav a:first-child {
...
@@ -113,6 +135,23 @@ nav a:first-child {
border-right
:
0
;
border-right
:
0
;
}
}
.card_adminAccount
fieldset
{
display
:
inline-block
;
width
:
40%
;
border
:
none
;
margin-bottom
:
20px
;
}
.card_adminAccount
input
[
type
=
"text"
],
.card_adminAccount
input
[
type
=
"password"
]
{
position
:
relative
;
top
:
50%
;
transform
:
translateY
(
-50%
);
margin-left
:
15px
;
border-top
:
0
;
border-left
:
0
;
border-right
:
0
;
}
input
[
type
=
"text"
]
{
input
[
type
=
"text"
]
{
}
}
...
...
web-app/img/favicon.ico
0 → 100644
View file @
ffaf6a16
14.7 KB
web-app/index.html
View file @
ffaf6a16
...
@@ -3,18 +3,24 @@
...
@@ -3,18 +3,24 @@
<head>
<head>
<title>
uBus | Admin System
</title>
<title>
uBus | Admin System
</title>
<meta
name=
"description"
content=
"uBus Ticket Reservation System administrator tools."
>
<meta
name=
"description"
content=
"uBus Ticket Reservation System administrator tools."
>
<link
rel=
"icon"
type=
"image/x-icon"
href=
"img/favicon.ico"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"css/font-awesome.min.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"css/style.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"css/style.css"
>
<script
type=
"text/javascript"
src=
"https://code.jquery.com/jquery-2.1.4.js"
></script>
<script
src=
"http://www.parsecdn.com/js/parse-1.6.6.min.js"
></script>
<script
type=
"text/javascript"
src=
"js/app.js"
></script>
</head>
</head>
<body>
<body>
<header>
<header>
<nav>
<nav>
<a
href=
"index.html"
><img
src=
"img/logo.png"
width=
"40px"
></a>
<a
href=
"index.html"
><img
src=
"img/logo.png"
width=
"40px"
></a>
<h1
style=
"display:inline-block; margin:0; padding-top:10px; padding-left:15px;"
>
Bus Ticket Reservation System
</h1>
<h1
style=
"display:inline-block; margin:0; padding-top:10px; padding-left:15px;"
>
Bus Ticket Reservation System
</h1>
<a
href=
"adminAccount.html"
style=
"color:white;padding:15px 20px;"
><i
class=
"fa fa-plus fa-2x"
></i></a>
<a
href=
"login.html"
><i
class=
"fa fa-2x fa-user"
></i></a>
</nav>
</nav>
</header>
</header>
<div
class=
"wrapper"
>
<div
class=
"wrapper"
id=
"parent"
>
<div
class=
"card button"
>
<div
class=
"card button"
>
<a
href=
"schedule.html"
id=
"admin"
>
<a
href=
"schedule.html"
id=
"admin"
>
<img
src=
"img/scheduling.png"
width=
"50%"
>
<img
src=
"img/scheduling.png"
width=
"50%"
>
...
...
web-app/js/app.js
View file @
ffaf6a16
Parse
.
initialize
(
"waBL5APV9kwdeqnm1kQ34BivGHQjjHQr1I58ubmJ"
,
"01foVLqzLntdIIplsOJCOkfCGTL63wti1rcUlVCD"
);
Parse
.
initialize
(
"waBL5APV9kwdeqnm1kQ34BivGHQjjHQr1I58ubmJ"
,
"01foVLqzLntdIIplsOJCOkfCGTL63wti1rcUlVCD"
);
var
Schedule
=
Parse
.
Object
.
extend
(
"Schedule"
);
var
login
=
function
(){
event
.
preventDefault
();
var
uname
=
document
.
getElementById
(
"login_uname"
).
value
,
pass
=
document
.
getElementById
(
"login_pass"
).
value
;
Parse
.
User
.
logIn
(
uname
,
pass
,
{
success
:
function
(
user
){
// console.log("success");
window
.
location
=
"index.html"
;
},
error
:
function
(
user
,
error
){
console
.
log
(
"Error "
+
error
.
code
+
" "
+
error
.
message
);
}
});
}
$
(
'#reload'
).
submit
(
function
(){
var
logout
=
function
(){
event
.
preventDefault
();
Parse
.
User
.
logOut
();
location
.
href
=
"login.html"
;
}
$
(
'#reload'
).
submit
(
function
(
event
){
event
.
preventDefault
();
event
.
preventDefault
();
var
cell
=
document
.
getElementById
(
"cellphone_number"
).
value
,
var
cell
=
document
.
getElementById
(
"cellphone_number"
).
value
,
...
@@ -38,7 +57,7 @@ $('#reload').submit(function(){
...
@@ -38,7 +57,7 @@ $('#reload').submit(function(){
console
.
log
(
"Saved."
);
console
.
log
(
"Saved."
);
},
},
error
:
function
(
error
){
error
:
function
(
error
){
console
.
log
(
"Error "
+
error
);
console
.
log
(
"Error "
+
error
.
code
+
" "
+
error
.
message
);
}
}
});
});
}
}
...
@@ -52,61 +71,16 @@ $('#reload').submit(function(){
...
@@ -52,61 +71,16 @@ $('#reload').submit(function(){
//save
//save
});
});
window
.
onload
=
function
(){
var
currentUser
=
Parse
.
User
.
current
();
$
(
"#create_schedule"
).
submit
(
function
(
event
){
var
currLoc
=
location
.
href
;
event
.
preventDefault
();
if
(
!
currentUser
&&
currLoc
.
indexOf
(
"login.html"
)
==
-
1
)
{
location
.
href
=
"login.html"
;
var
destination
=
document
.
getElementById
(
"destination"
).
value
,
}
else
{
initial
=
document
.
getElementById
(
"initial"
).
value
,
var
parent
=
document
.
getElementById
(
"parent"
);
etd
=
document
.
getElementById
(
"etd"
).
value
,
var
outBtn
=
document
.
createElement
(
"button"
);
eta
=
document
.
getElementById
(
"eta"
).
value
,
outBtn
.
setAttribute
(
"onclick"
,
"logout()"
);
company
=
document
.
getElementById
(
"bus_company"
).
value
,
outBtn
.
innerHTML
=
"Logout"
;
plate
=
document
.
getElementById
(
"plate_number"
).
value
,
parent
.
appendChild
(
outBtn
);
seats
=
document
.
getElementById
(
"seats_available"
).
value
,
}
fare
=
document
.
getElementById
(
"fare"
).
value
;
}
\ No newline at end of file
// console.log(typeof "plate");
var
newSchedule
=
new
Schedule
();
newSchedule
.
save
({
destination
:
destination
,
startingTerminal
:
initial
,
arrival
:
eta
,
departure
:
etd
,
busCompany
:
company
,
busPlate
:
plate
,
seatsAmount
:
seats
,
ticketPrice
:
fare
},
{
success
:
function
(
newSchedule
)
{
// Execute any logic that should take place after the object is saved.
alert
(
'New object created with objectId: '
+
newSchedule
.
id
);
console
.
log
(
'New object created with objectId: '
+
newSchedule
.
id
);
},
error
:
function
(
newSchedule
,
error
)
{
// Execute any logic that should take place if the save fails.
// error is a Parse.Error with an error code and message.
alert
(
'Failed to create new object, with error code: '
+
error
.
message
);
}
});
alert
(
destination
);
});
var
query
=
new
Parse
.
Query
(
Schedule
);
var
id
;
query
.
find
({
success
:
function
(
results
)
{
console
.
log
(
"Successfully retrieved "
+
results
.
length
);
// Do something with the returned Parse.Object values
for
(
var
i
=
0
;
i
<
results
.
length
;
i
++
)
{
var
object
=
results
[
i
];
id
=
object
.
id
;
console
.
log
(
object
);
}
},
error
:
function
(
error
)
{
status
.
error
(
"Error: "
+
error
.
code
+
" "
+
error
.
message
);
}
});
\ No newline at end of file
web-app/loading.html
View file @
ffaf6a16
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<html>
<head>
<head>
<title>
uBus |
Bus Schedule
s
</title>
<title>
uBus |
Loading User Account
s
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"css/font-awesome.min.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"css/font-awesome.min.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"css/style.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"css/style.css"
>
<link
rel=
"icon"
type=
"image/x-icon"
href=
"img/favicon.ico"
>
<script
type=
"text/javascript"
src=
"https://code.jquery.com/jquery-2.1.4.js"
></script>
<script
type=
"text/javascript"
src=
"https://code.jquery.com/jquery-2.1.4.js"
></script>
<script
src=
"http://www.parsecdn.com/js/parse-1.6.6.min.js"
></script>
<script
src=
"http://www.parsecdn.com/js/parse-1.6.6.min.js"
></script>
</head>
</head>
...
...
web-app/login.html
0 → 100644
View file @
ffaf6a16
<!DOCTYPE html>
<html>
<head>
<title>
uBus | Admin System
</title>
<meta
name=
"description"
content=
"uBus Ticket Reservation System administrator tools."
>
<link
rel=
"icon"
type=
"image/x-icon"
href=
"img/favicon.ico"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"css/font-awesome.min.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"css/style.css"
>
<script
type=
"text/javascript"
src=
"https://code.jquery.com/jquery-2.1.4.js"
></script>
<script
src=
"http://www.parsecdn.com/js/parse-1.6.6.min.js"
></script>
<script
type=
"text/javascript"
src=
"js/app.js"
></script>
</head>
<body>
<header>
<nav>
<a
href=
"index.html"
><img
src=
"img/logo.png"
width=
"40px"
></a>
<h1
style=
"display:inline-block; margin:0; padding-top:10px; padding-left:15px;"
>
Bus Ticket Reservation System
</h1>
<a
href=
"adminAccount.html"
style=
"color:white;padding:15px 20px;"
><i
class=
"fa fa-plus fa-2x"
></i></a>
<a
href=
"login.html"
><i
class=
"fa fa-2x fa-user"
></i></a>
</nav>
</header>
<div
class=
"wrapper"
>
<form
method=
"post"
id=
"adminLogin"
>
<input
type=
"text"
placeholder=
"Username"
id=
"login_uname"
>
<input
type=
"password"
placeholder=
"Password"
id=
"login_pass"
>
<button
type=
"button"
onclick=
"login()"
>
Log-In
</button>
</form>
</div>
</body>
</html>
web-app/schedule.html
View file @
ffaf6a16
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
<title>
uBus | Bus Schedules
</title>
<title>
uBus | Bus Schedules
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"css/font-awesome.min.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"css/font-awesome.min.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"css/style.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"css/style.css"
>
<link
rel=
"icon"
type=
"image/x-icon"
href=
"img/favicon.ico"
>
<script
type=
"text/javascript"
src=
"https://code.jquery.com/jquery-2.1.4.js"
></script>
<script
type=
"text/javascript"
src=
"https://code.jquery.com/jquery-2.1.4.js"
></script>
<script
src=
"http://www.parsecdn.com/js/parse-1.6.6.min.js"
></script>
<script
src=
"http://www.parsecdn.com/js/parse-1.6.6.min.js"
></script>
</head>
</head>
...
@@ -13,8 +14,8 @@
...
@@ -13,8 +14,8 @@
<nav>
<nav>
<a
href=
"index.html"
><img
src=
"img/logo.png"
width=
"40px"
></a>
<a
href=
"index.html"
><img
src=
"img/logo.png"
width=
"40px"
></a>
<a
href=
"javascript:void(0);"
><i
mg
src=
"img/add.png"
width=
"40px"
></a>
<a
href=
"javascript:void(0);"
><i
class=
"fa fa-2x fa-plus"
style=
"color:white; padding-top:5px; padding-right:10px;"
></i
></a>
<a
href=
"javascript:void(0);"
><i
mg
src=
"img/search.png"
width=
"40px"
></a>
<a
href=
"javascript:void(0);"
><i
class=
"fa fa-2x fa-search"
style=
"color:white; padding-top:5px; padding-right:10px;"
></i
></a>
</nav>
</nav>
</header>
</header>
...
@@ -25,15 +26,15 @@
...
@@ -25,15 +26,15 @@
</div>
</div>
<div
class=
"card"
>
<div
class=
"card"
>
<div
class=
"row"
>
<div
class=
"row"
>
<img
src=
"img/scheduling.png"
width=
"60px"
>
<img
class=
"img-placeholder"
src=
"img/scheduling.png"
width=
"60px"
>
<form
method=
"post"
class=
"card_schedule"
id=
"create_schedule"
>
<form
method=
"post"
class=
"card_schedule"
id=
"create_schedule"
>
<fieldset>
<fieldset>
<label
for=
"etd"
style=
"display:block;"
>
Starting Terminal
</label>
<label
for=
"etd"
style=
"display:block;"
>
Starting Terminal
</label>
<input
type=
"text"
id=
"initial"
placeholder=
"
hello
"
>
<input
type=
"text"
id=
"initial"
placeholder=
"
Current Terminal
"
>
</fieldset>
</fieldset>
<fieldset>
<fieldset>
<label
for=
"etd"
style=
"display:block;"
>
Destination
</label>
<label
for=
"etd"
style=
"display:block;"
>
Destination
</label>
<input
type=
"text"
id=
"destination"
placeholder=
"
hello
"
>
<input
type=
"text"
id=
"destination"
placeholder=
"
End Terminal
"
>
</fieldset>
</fieldset>
<fieldset>
<fieldset>
<label
for=
"etd"
style=
"display:block;"
>
ETD
</label>
<label
for=
"etd"
style=
"display:block;"
>
ETD
</label>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment