Commit c9b91ddb authored by ejcris's avatar ejcris

Merge branch 'master' of https://github.com/chiawase/CS123-uBus

parents 547aee6c 61d32d3e
......@@ -10,7 +10,11 @@
android:theme="@style/AppTheme" >
<activity
android:name=".Login_Screen"
android:label="@string/app_name" >
android:label="@string/app_name"
android:parentActivityName=".SignUp" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".SignUp" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
......@@ -26,13 +30,15 @@
android:value=".Login_Screen" />
</activity>
<activity
android:name=".ChangeInfoFragment"
android:label="@string/title_activity_change_info_fragment" >
</activity>
<activity
android:name=".PastTrips"
android:label="@string/title_activity_past_trips" >
android:name=".SignUp"
android:label="Sign Up"
android:parentActivityName=".Login_Screen" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".Login_Screen" />
</activity>
</application>
</manifest>
package com.example.pearlsantos.project;
import android.support.v4.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
public class About extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_about, container, false);
return rootView;
}
}
package com.example.pearlsantos.project;
import android.app.Activity;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AbsListView;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListAdapter;
import android.widget.TextView;
public class Help extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_about, container, false);
return rootView;
}
}
......@@ -50,4 +50,13 @@ public class Login_Screen extends AppCompatActivity {
startActivity(intent);
}
public void newUser(View view){
Intent intent = new Intent(this, SignUp.class);
//EditText editText = (EditText) findViewById(R.id.name);
//String message = editText.getText().toString();
//intent.putExtra(EXTRA_MESSAGE, message);
startActivity(intent);
}
}
......@@ -5,12 +5,14 @@ import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ListView;
public class PastTrips extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_pasttrips, container, false);
return rootView;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_pasttrips, container, false);
return rootView;
}
}
......@@ -4,25 +4,24 @@ import android.app.Activity;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.widget.DrawerLayout;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ListView;
/**
* A simple {@link Fragment} subclass.
* Activities that contain this fragment must implement the
* {@link Schedules.OnFragmentInteractionListener} interface
* to handle interaction events.
* Use the {@link Schedules#newInstance} factory method to
* create an instance of this fragment.
*/
public class Schedules extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_schedules, container, false);
View rootView = inflater.inflate(R.layout.fragment_schedules, container, false);
return rootView;
}
}
......
package com.example.pearlsantos.project;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast;
/**
* Created by Pearl Santos on 10/15/2015.
*/
public class SignUp extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.sign_up);
ActionBar actionBar = getSupportActionBar();
actionBar.setTitle("Sign Up");
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_action_bar_attempt, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
public void okay(View view){
Intent intent = new Intent(this, Login_Screen.class);
//EditText editText = (EditText) findViewById(R.id.name);
//String message = editText.getText().toString();
//intent.putExtra(EXTRA_MESSAGE, message);
startActivity(intent);
}
}
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
android:id="@+id/container"
tools:context="com.example.pearlsantos.project.ActionBarAttempt">
<ViewAnimator
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/viewAnimator"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true" />
</RelativeLayout>
android:layout_height="match_parent">
<!-- The main content view -->
<FrameLayout
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<!-- The navigation drawer -->
<ListView android:id="@+id/left_drawer"
android:layout_width="320dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:choiceMode="singleChoice"
android:divider="@android:color/transparent"
android:dividerHeight="0dp"
android:background="#111"/>
</android.support.v4.widget.DrawerLayout>
......@@ -9,13 +9,22 @@
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".Login_Screen"
>
<LinearLayout
android:layout_width="263dp"
android:layout_height="236dp"
android:layout_weight="0.5"
android:layout_gravity="center">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/logo"
android:id="@+id/imageView"
android:layout_gravity="center"
/>
</LinearLayout>
<ImageView
android:layout_width="234dp"
android:layout_height="258dp"
android:src="@mipmap/logo"
android:id="@+id/imageView"
android:layout_gravity="center" />
<TextView
android:layout_width="wrap_content"
......@@ -63,7 +72,8 @@
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_width="wrap_content"
android:layout_gravity="center"
android:layout_height="wrap_content"
android:layout_weight="3">
<Button
......@@ -72,7 +82,17 @@
android:layout_gravity="center"
android:text="SUBMIT"
android:onClick="submit"
android:layout_weight="2"
android:id="@+id/submit" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="NEW USER"
android:onClick="newUser"
android:layout_weight="2"
android:id="@+id/newUser" />
</LinearLayout>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<!--The layout for the person's profile-->
<LinearLayout
android:id="@+id/profileLayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:orientation="horizontal"
android:layout_marginTop="0dp"
android:background="?android:attr/activatedBackgroundIndicator"
>
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:orientation="vertical">
<ImageView
android:id="@+id/userImage"
android:src="@mipmap/logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
/>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceListItemSmall"
android:gravity="center_vertical"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:textColor="#fff"
android:background="?android:attr/activatedBackgroundIndicator"
android:minHeight="?android:attr/listPreferredItemHeightSmall"/>
<TextView
android:id="@+id/user_UserName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="2"
android:textAppearance="?android:attr/textAppearanceLarge"
android:gravity="center"
android:text="Name"/>
<TextView
android:id="@+id/user_UserNumber"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="2"
android:textAppearance="?android:attr/textAppearanceLarge"
android:gravity="center"
android:text="Number"/>
</LinearLayout>
</LinearLayout>
<!--The layout for the item list-->
<LinearLayout
android:id="@+id/itemLayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:minHeight="55dp"
android:orientation="vertical"
>
<TextView
android:id="@+id/itemName"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="2"
android:textAppearance="?android:attr/textAppearanceLarge"
android:gravity="center"
android:text="Name"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="1dp"
android:layout_marginTop="1dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="#DADADC"
></View>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.pearlsantos.project.Help">
<TextView android:id="@android:id/empty" android:layout_width="match_parent"
android:layout_height="match_parent" android:gravity="center" android:text="Coming soon" />
</FrameLayout>
......@@ -2,7 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:orientation="vertical"
>
<!--
......@@ -12,19 +12,49 @@
fragment_layout_three.xml
**********************************************************************
-->
<ImageView
android:id="@+id/frag1_icon"
android:layout_width="wrap_content"
<LinearLayout
android:orientation="vertical"
android:layout_height="wrap_content"
/>
android:layout_width="match_parent"
android:layout_weight="1">
<TextView
android:gravity="center"
android:id="@+id/frag1_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Hi, Hello"/>
android:text="Change Info"/>
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_weight="1">
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="textPersonName"
android:text="Name"
android:ems="20"
android:id="@+id/editText" />
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_weight="1">
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/editText2"
android:ems="20"
android:text="Number" />
</LinearLayout>
</LinearLayout>
\ No newline at end of file
......@@ -2,7 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:orientation="vertical"
>
<!--
......@@ -13,11 +13,6 @@
**********************************************************************
-->
<ImageView
android:id="@+id/frag2_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<TextView
android:id="@+id/frag2_text"
......@@ -25,7 +20,13 @@
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Hello, how are you?"/>
android:text="Past Trips"/>
<ListView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/listView2"
android:layout_weight="1" />
</LinearLayout>
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- The main content view -->
<FrameLayout
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<!-- The navigation drawer -->
<ListView android:id="@+id/left_drawer"
android:layout_width="320dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:choiceMode="singleChoice"
android:divider="@android:color/transparent"
android:dividerHeight="0dp"
android:background="#111"/>
</android.support.v4.widget.DrawerLayout>
android:layout_height="match_parent"
android:orientation="vertical"
>
<!--
**************************IMPORTANT***********************************
change this id attribute values as "frag2_icon" and "frag2_text" for
fragment_layout_two.xml and "frag3_icon" and "frag3_text" for
fragment_layout_three.xml
**********************************************************************
-->
<TextView
android:id="@+id/frag3_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Available Schedules"/>
<ListView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/listView"
android:layout_gravity="center_vertical"
android:layout_weight="1" />
</LinearLayout>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/text3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceListItemSmall"
android:gravity="center_vertical"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:textColor="#fff"
android:background="?android:attr/activatedBackgroundIndicator"
android:minHeight="?android:attr/listPreferredItemHeightSmall"/>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceListItemSmall"
android:gravity="center_vertical"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:textColor="#fff"
android:background="?android:attr/activatedBackgroundIndicator"
android:minHeight="?android:attr/listPreferredItemHeightSmall"/>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_gravity="center"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".Login_Screen"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="New User"
android:layout_gravity="center"
android:id="@+id/textView"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:layout_weight="2"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/name"
android:text="Name"
android:layout_weight="2"
android:layout_gravity="center_horizontal" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="phone"
android:text="Cellphone Number"
android:ems="10"
android:id="@+id/phone"
android:layout_weight="2"
android:layout_gravity="center_horizontal" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_gravity="center"
android:layout_height="wrap_content"
android:layout_weight="3">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="OK"
android:onClick="okay"
android:id="@+id/submit" />
</LinearLayout>
</LinearLayout>
......@@ -9,10 +9,6 @@
android:icon="@mipmap/ic_search"
android:orderInCategory="100"
app:showAsAction="always" />
<item android:id="@+id/action_profile"
android:title="Profile"
android:orderInCategory="100"
app:showAsAction="never" />
<item android:id="@+id/action_aboutUs"
android:title="About Us"
android:orderInCategory="100"
......
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.example.pearlsantos.project.Profile">
tools:context="com.example.pearlsantos.project.About">
<item android:id="@+id/action_settings" android:title="@string/action_settings"
android:orderInCategory="100" app:showAsAction="never" />
</menu>
<resources>
<!--
Layout alias to replace the single-pane version of the layout with a
two-pane version on Large screens.
For more on layout aliases, see:
http://developer.android.com/training/multiscreen/screensizes.html#TaskUseAliasFilters
-->
<item name="fragment_item" type="layout">@layout/fragment_about</item>
</resources>
\ No newline at end of file
<resources>
<!--
Layout alias to replace the single-pane version of the layout with a
two-pane version on Large screens.
For more on layout aliases, see:
http://developer.android.com/training/multiscreen/screensizes.html#TaskUseAliasFilters
-->
<item name="fragment_item" type="layout">@layout/fragment_about</item>
</resources>
\ No newline at end of file
<resources>
<!--
Layout alias to replace the single-pane version of the layout with a
two-pane version on Large screens.
For more on layout aliases, see:
http://developer.android.com/training/multiscreen/screensizes.html#TaskUseAliasFilters
-->
<item name="fragment_item" type="layout">@layout/sign_up</item>
</resources>
\ No newline at end of file
......@@ -5,6 +5,18 @@
<string name="action_settings">Settings</string>
<string name="title_activity_home_screen">HomeScreen</string>
<string name="title_activity_action_bar_attempt">ActionBarAttempt</string>
<string name="drawer_open">open</string>
<string name="drawer_close">close</string>
<string-array name="options">
<item>Schedules</item>
<item>Change Info</item>
<item>View Past Trips</item>
</string-array>
<string-array name="list">
<item>Sched1</item>
<item>Sched2</item>
</string-array>
<!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string>
......
This diff is collapsed.
/*
Main CSS styles for main uBus web app.
for CS 123 Group Project.
Group D : Ian De La Cruz, Pearl Santos, Chi Señires, EJ Villadarez
*/
/* ------------ */
/* MAIN */
/* ------------ */
*, *:after, *:before {
html, body {
margin: 0;
padding: 0;
box-sizing: border-box; }
html, body {
font-size: 10px;
background-color: #124E78;
font-family: monospace;
overflow: hidden;
}
a {
text-decoration: none;
color: #333;
font-weight: bold;
}
/* ------------ */
/* INDEX.html */
/* ------------ */
.container {
margin: 4.5% auto;
width: 50%;
background-color: #A7BCAF;
border-radius: 5%;
}
header {
width: 100%;
padding: 2.5em 0;
text-align: center;
}
.logo {
display: block;
margin: 0 auto;
width: 20em;
}
.content {
height: 15em;
}
.button a {
display: block;
width: 12em;
height: 12em;
text-align: center;
nav {
position: relative;
height: 60px;
background-color: #124E78;
}
.button > a img {
width: 100%;
background-color: #ccc;
padding: 3%;
border-radius: 10%;
nav a {
display: inline-block;
height: 100%;
padding: 10px;
position: relative;
float:right;
}
#admin {
nav a:first-child {
float: left;
}
#loading {
float: right;
margin-right: 30%;
.button {
display: inline-block;
width: 45% !important;
text-align:center;
padding: 0 !important;
}
/* -------------- */
/* SCHEDULE.html */
/* -------------- */
nav {
background-color: #999;
height: 115px;
.button:first-child {
margin-right: 15px;
}
.button a {
display: block;
width: 100%;
text-decoration: none;
color: black;
}
.button img {
display:block;
width:80%;
margin:0 5% 0 15%;
}
.brand img {
float: left;
width: 100px;
margin: 10px;
.wrapper {
width: 90%;
margin: 0 auto;
padding-top: 20px;
}
.align-right {
float: right;
margin: 20px 10px;
.title {
text-align: center;
}
.nav a {
display: inline-block;
padding: 20px 10px;
margin: auto 0;
}
.title h1{
display: inline-block;
}
.wrapper {
width: 60%;
.card {
box-shadow:0 1px 2px #aaa;
/*height: 300px;*/
padding: 2rem;
border-radius:3px;
margin: 0 auto;
width: 60%;
}
.content {
display: block;
width: 100%;
margin: 0 auto;
}
.card img {
display: inline-block;
position: relative;
top: 0;
left: 0;
}
.title {
margin: 2.5% 5%;
color: #f0f0c9;
}
.card form {
display: inline-block;
width: calc(100% - 80px);
}
.title > img {
width: 75px;
background-color: #ccc;
padding: 0.75%;
border-radius: 10%;
float: left;
margin-left: -9em;
.card_schedule fieldset {
display: inline-block;
width: 30%;
border:none;
}
/* Temporary */
.placeholder {
width: 50px;
height: 50px;
background-color: aqua;
}
.card_schedule fieldset:nth-child(5) {
width: 80%;
}
.card_schedule fieldset:nth-child(n+6):nth-child(-n+8) {
width: 40%;
}
.clearfix {
.card_schedule fieldset:nth-child(n+5):nth-child(-n+8) input {
position: relative;
top: 50%;
transform: translateY(-50%);
margin-left: 10px;
border-top:0;
border-left: 0;
border-right: 0;
}
.row {
display: block;
clear: both;
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
<!DOCTYPE html>
<html>
<head>
<title>uBus | Admin System</title>
<!DOCTYPE html>
<html>
<head>
<title>uBus | Admin System</title>
<meta name="description" content="uBus Ticket Reservation System administrator tools.">
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<div class="container">
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<header>
<img class="logo" src="img/logo.png">
<h1>Bus Ticket Reservation System</h1>
<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>
</nav>
</header>
<div class="content">
<div class="button">
<div class="wrapper">
<div class="card button">
<a href="schedule.html" id="admin">
<img src="img/scheduling.png">
<img src="img/scheduling.png" width="50%">
<br><h3>SCHEDULING</h3>
</a>
</div>
<div class="button">
<div class="card button">
<a href="loading.html" id="loading">
<img src="img/loading.png">
<img src="img/loading.png" width="50%">
<br><h3>LOADING</h3>
</a>
</div>
</div>
</div>
</body>
</body>
</html>
Parse.initialize("waBL5APV9kwdeqnm1kQ34BivGHQjjHQr1I58ubmJ", "01foVLqzLntdIIplsOJCOkfCGTL63wti1rcUlVCD");
var Schedule = Parse.Object.extend("Schedule");
$("#create_schedule").submit(function(event){
event.preventDefault();
var destination = document.getElementById("destination").value,
initial = document.getElementById("initial").value,
etd = document.getElementById("etd").value,
eta = document.getElementById("eta").value,
company = document.getElementById("bus_company").value,
plate = document.getElementById("plate_number").value,
seats = document.getElementById("seats_available").value,
fare = document.getElementById("fare").value;
// 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
......@@ -2,28 +2,69 @@
<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>
<nav>
<div class="brand">
<a href="index.html"><img src="img/logo.png"></a>
</div>
<div class="align-right">
<a href="javascript:void(0);"><img src="img/add.png" class="nav button"></a>
<a href="javascript:void(0);"><img src="img/search.png" class="nav button"></a>
</div>
</nav>
<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="content">
<div class="title">
<img src="img/scheduling.png">
<h1>Bus Schedules</h1>
<div class="title">
<img src="img/scheduling.png" width="40px">
<h1>Bus Schedules</h1>
</div>
<div class="card">
<div class="row">
<img src="img/scheduling.png" width="60px">
<form method="post" class="card_schedule" id="create_schedule">
<fieldset>
<label for="etd" style="display:block;">Starting Terminal</label>
<input type="text" id="initial" placeholder="hello">
</fieldset>
<fieldset>
<label for="etd" style="display:block;">Destination</label>
<input type="text" id="destination" placeholder="hello">
</fieldset>
<fieldset>
<label for="etd" style="display:block;">ETD</label>
<input type="datetime-local" id="etd" placeholder="hello">
</fieldset>
<fieldset>
<label for="etd" style="display:block;">ETA</label>
<input type="datetime-local" id="eta" placeholder="hello">
</fieldset>
<fieldset>
<label><i class="fa fa-2x fa-bus"></i>
<input type="text" id="bus_company" placeholder="Company" size="10"></label>
<label>
<input type="text" id="plate_number" placeholder="Plate Number" size="10"></label>
</fieldset>
<fieldset>
<label><i class="fa fa-2x fa-users"></i>
<input type="text" id="seats_available" placeholder="Seats Available" size="10"></label>
</fieldset>
<fieldset>
<label><i class="fa fa-2x fa-money"></i>
<input type="text" id="fare" placeholder="Fare" size="10"></label>
</fieldset>
<fieldset>
<input type="submit">
</fieldset>
</form>
</div>
</div>
<div class="schedules"></div>
</div>
<script type="text/javascript" src="js/app.js"></script>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment