Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
494731f
basic html outline done:
bcmdarroch Jun 13, 2017
f79be1e
made movie list model
bcmdarroch Jun 13, 2017
d00cd4f
finished models, views, app.js
bcmdarroch Jun 14, 2017
daf66c3
added underscore templates to index, fixed api url
ashtn Jun 14, 2017
136d473
we can see images! whoooo
ashtn Jun 14, 2017
62a2225
uncomment listenTo
bcmdarroch Jun 14, 2017
4c089a3
Merge branch 'master' of https://github.com/ashtn/VideoStoreConsumer
bcmdarroch Jun 14, 2017
eff68a4
movies display in grid sweeet
bcmdarroch Jun 14, 2017
9512f99
add search bard, get input data event handler, and stub of search fun…
ashtn Jun 14, 2017
ae3ba04
got searchfunction to trigger yeeeaa
bcmdarroch Jun 14, 2017
1c1d9dc
pull problems
ashtn Jun 14, 2017
5cd3376
merge
ashtn Jun 14, 2017
7b55821
search function works
ashtn Jun 14, 2017
cb558ff
added addmovie function to movie view
bcmdarroch Jun 14, 2017
269cdd8
spacing of code fix
bcmdarroch Jun 14, 2017
91e2008
merge
ashtn Jun 14, 2017
7a35dff
merging again"
ashtn Jun 14, 2017
ce27c2e
JSON comments
bcmdarroch Jun 14, 2017
4cb7437
Merge branch 'master' of https://github.com/ashtn/VideoStoreConsumer
ashtn Jun 14, 2017
71b343a
fixed overview bug
ashtn Jun 15, 2017
1d4a07a
image bug fixed
ashtn Jun 15, 2017
dec293c
added inventory selection index, pass inventory to rails db
ashtn Jun 15, 2017
7fbfee8
added conditional add/delete buttons
bcmdarroch Jun 16, 2017
50b8681
added delete button listener and handler - eod 6/16
ashtn Jun 17, 2017
b1c52cc
can delete model from collection without addtional api call
ashtn Jun 19, 2017
19a8512
added movie details template
ashtn Jun 19, 2017
5a3ba76
added movie details template, event listener for a clock on the movie…
ashtn Jun 19, 2017
0dec5ad
first draft showMovieDetails
bcmdarroch Jun 19, 2017
fdbf234
can show movie details, that display in a modal
ashtn Jun 19, 2017
197fbb7
made modal less gross, still gross, but less gross
ashtn Jun 19, 2017
6458a03
made rental model
bcmdarroch Jun 19, 2017
69b6004
Merge branch 'master' into bcd/checkout
bcmdarroch Jun 19, 2017
43f0ac9
sync is bein mean :((
bcmdarroch Jun 20, 2017
29250df
sync is our friend again yayaya
bcmdarroch Jun 20, 2017
d64331e
created customer model, view and collection, can successfully make ca…
ashtn Jun 20, 2017
444675b
we can see a list of customers in a drop down and it's a beautiful th…
ashtn Jun 20, 2017
ea93c0d
small url tweak
ashtn Jun 21, 2017
bdaef79
the modal is centered-ish
ashtn Jun 21, 2017
36728a8
we need sync / oops
ashtn Jun 21, 2017
32e17d6
created rental and rental list, first attempts at checkout function i…
bcmdarroch Jun 21, 2017
ba1e5c5
can rent! but its wonky and rents all the movies you ever clicked
bcmdarroch Jun 22, 2017
5f2591b
got checkout working not wonky wohooo
bcmdarroch Jun 23, 2017
3f5f3e1
can succesffuly check in a movie, and hide model on alert click
ashtn Jun 23, 2017
7ce91ce
added styling to search bar
ashtn Jun 23, 2017
2b105bc
got neon effect working coolcool
bcmdarroch Jun 23, 2017
bd1909b
added some cute button colors
ashtn Jun 23, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build/css/foundation.css
Original file line number Diff line number Diff line change
Expand Up @@ -1613,7 +1613,7 @@ kbd {
background-color: #5e5e5e;
color: #fefefe; }
.button.success {
background-color: #3adb76;
background-color: #b6f8d0;
color: #0a0a0a; }
.button.success:hover, .button.success:focus {
background-color: #22bb5b;
Expand All @@ -1625,7 +1625,7 @@ kbd {
background-color: #cc8b00;
color: #0a0a0a; }
.button.alert {
background-color: #cc4b37;
background-color: #ff66bc;
color: #fefefe; }
.button.alert:hover, .button.alert:focus {
background-color: #a53b2a;
Expand Down
115 changes: 91 additions & 24 deletions build/css/styles.css
Original file line number Diff line number Diff line change
@@ -1,44 +1,111 @@
@include foundation-everything;
@import url('https://fonts.googleapis.com/css?family=Fascinate|Rajdhani');

main {
background: lightblue;

/************************ GENERAL ***********************/

@font-face {
font-family: "Clip";
src: url("http://ff.static.1001fonts.net/c/l/clip.regular.ttf");
}

header {
background-color: lightgreen;
main, header, body {
background: #000;
color: lightpink;
}


header.row {
padding: 0.5rem;
/*position: fixed;*/
}

h1 {
font-family: 'Fascinate', cursive;
font-size: 5rem
}


h3 {
font-family: 'Rajdhani', sans-serif;
padding: .5rem;
}

#completed-checkbox {
display: inline;
h1 {
font-family: "Clip", cursive;
font-size: 5rem;

color: #fff;
-webkit-animation: neon1 1.5s ease-in-out infinite alternate;
-moz-animation: neon1 1.5s ease-in-out infinite alternate;
animation: neon1 1.5s ease-in-out infinite alternate;
}

label {
display: inline;
h1:hover {
color: #ff66bc;
-webkit-animation: none;
-moz-animation: none;
animation: none;
}

button.success {
margin-right: 1.2rem;
display: inline;
@-webkit-keyframes neon1 {
from {
text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #fff, 0 0 40px #FF1177, 0 0 70px #FF1177, 0 0 80px #FF1177, 0 0 100px #FF1177, 0 0 150px #FF1177;
}
to {
text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff, 0 0 20px #FF1177, 0 0 35px #FF1177, 0 0 40px #FF1177, 0 0 50px #FF1177, 0 0 75px #FF1177;
}
}

aside.create-tasklist {
background-color: navy;
color: #FFFFFF;
li {
list-style: none;
height: 450px;
margin-bottom: 50px;
}
aside label {
color: #FFFFFF;
/************************ SEARCH BAR ***********************/


input[type=text] {
border: 1px solid #27909F;
border-radius: 2em;
padding: 1.5em 2em;
float: left;
-webkit-appearance: none;
}

button[type=submit] {
color: #fff;
text-align: center;
border: none;
border-radius: 2em;
padding: 1em 4em;
background-color: #27909F;
float: right;
-webkit-appearance: none;

}

.completed {
text-decoration: line-through;
button[type="submit"]:hover, input[type="submit"]:active {
background-color: #71C2CD;
}

div {
display: inline;
button success {
background-color: #b6f8d0;
}
/*
* {
border-style: solid;



/************************ MODAL ***********************/
#movie-details {
/*z-index: 10;*/
color: black;
position: fixed;
width: 50%;
top: 30%;
background-color: white;
text-align: center;
padding: 25px;
/*border: 1em solid black;*/
margin-left: 22.5%;

}
*/
78 changes: 65 additions & 13 deletions build/index.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,67 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="css/_settings.css">
<link rel="stylesheet" type="text/css" href="css/foundation.css">
<link rel="stylesheet" type="text/css" href="css/styles.css">
<title>Backbone Baseline</title>
</head>
<body>

<script src="/app.bundle.js"></script>

</body>
</html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="css/_settings.css">
<link rel="stylesheet" type="text/css" href="css/foundation.css">
<link rel="stylesheet" type="text/css" href="css/styles.css">
<title> My Video Store!!!! </title>
</head>
<body>

<header class='row'>
<h1> Retro Rental </h1>
<section id="search-bar">
<form>
<input type="text" name="query" placeholder="Search Movies">
<button id="search" class="button success" type='submit'>Search</button>
</form>
</section>
</header>
<main>
<section id="movie-list" class="row"><ul>

</ul> </section>
<section id="movie-details" class="hide"></section>
<div id='test'></div>
</main>

<!-- Templates -->

<script id="movie-template" type='text/template'>
<li class="large-3 medium-6 small-12 columns">
<img id="poster" src=<%- image_url %>>
<h3 id="title"><%- title %></h3>

<% if (external_id) { %>
<input type='number' min="1" max="10" value="1"/>
<button id="add" class="button success">Add</button>
<% } else { %>
<button id="delete" class="button alert">Delete</button>
<% } %>

</li>
</script>

<script id="tmpl-movie-details" type="text/template">
<h3><%- title %></h3>
<p>Released: <%- release_date %></p>
<p>Overview: <%- overview %></p>
<% if (!external_id) { %>
<p> Inventory: <%- available_inventory %> out of <%- inventory %> </p>
<p> Customer: </p>
<select id='customer-list'></select>
<button id="check_out" class="button alert">Check Out</button>
<button id="check_in" class="button success">Check In</button>
<% } %>
</script>

<script id='tmpl-customer' type="text/template">
<%- name %>
</script>


<script src="/app.bundle.js"></script>

</body>
</html>
14 changes: 11 additions & 3 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,18 @@
// Import jQuery & Underscore
import $ from 'jquery';
import _ from 'underscore';
import MovieList from './collections/movie_list.js';
import MovieListView from './views/movie_list_view.js';

// ready to go
$(document).ready(function() {
var rentalList = new MovieList();

var rentalListView = new MovieListView({
model: rentalList,
template: _.template($('#movie-template').html()),
el: 'body'
});

$('section.main-content').append('<p>Hello World!</p>');

$(document).ready(function() {

});
15 changes: 15 additions & 0 deletions src/collections/customer_list.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import Backbone from 'backbone';
import Customer from '../models/customer.js';


var CustomerList = Backbone.Collection.extend({
model: Customer,
url: "http://localhost:3000/customers",
parse: function(data) {
return data;
},


});

export default CustomerList;
12 changes: 12 additions & 0 deletions src/collections/movie_list.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import Backbone from 'backbone';
import Movie from '../models/movie.js';

var MovieList = Backbone.Collection.extend({
model: Movie,
url: "http://localhost:3000/movies/",
parse: function(data) {
return data;
}
});

export default MovieList;
12 changes: 12 additions & 0 deletions src/collections/rental_list.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import Backbone from 'backbone';
import Rental from '../models/rental.js';

var RentalList = Backbone.Collection.extend({
model: Rental,
url: "http://localhost:3000/rentals/",
parse: function(data) {
return data;
}
});

export default RentalList;
Loading