Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
9f4a02f
added rental library collection
gofarann Jun 13, 2017
139c7f3
basics are in for movie model, view and app.js
secretsharer Jun 13, 2017
d3ad7c3
added stubs for search results and search result view
gofarann Jun 13, 2017
4eaa0ca
moved model and view initiators outside of doc.ready
gofarann Jun 14, 2017
5ab66e2
added search bar css
gofarann Jun 14, 2017
b0e2d54
changed movie_view file name
gofarann Jun 14, 2017
bca3b6a
added template for movie-display
gofarann Jun 14, 2017
bf4760b
changed some syntax on app.js, added rental lib view
gofarann Jun 14, 2017
2b4ef94
adjusted movie model
gofarann Jun 14, 2017
002d5c8
rental library setup with search function
gofarann Jun 14, 2017
c5e4ae1
added search and get query term functions in rental library
gofarann Jun 14, 2017
ecc51b2
added searchresults collection with initialize and render methods
gofarann Jun 14, 2017
c94ba21
tracing back to trouble shoot displaying rental library
gofarann Jun 14, 2017
8af107a
left crumbs and trouble shooted until movies displayed on page
gofarann Jun 14, 2017
0b845a7
added just a touch of foundation
secretsharer Jun 14, 2017
7d2fdbc
added search functionality
gofarann Jun 14, 2017
99adde6
styling stuff
gofarann Jun 15, 2017
a4640ea
added add to library button
gofarann Jun 15, 2017
9d59cad
some foundation
gofarann Jun 15, 2017
64c4f9b
adding stubs for adding to lib function
gofarann Jun 15, 2017
46f9711
rental lib font changed
gofarann Jun 16, 2017
0be3f55
style
gofarann Jun 16, 2017
a22be1e
trying to fix missing work
secretsharer Jun 16, 2017
52c5399
additions, putting the code back together
secretsharer Jun 16, 2017
057d166
added add to library method
gofarann Jun 16, 2017
cbe5262
commiting manual merge files
secretsharer Jun 16, 2017
5a250e5
Merge branch 'movieDetails' into merge-movieDetails
secretsharer Jun 16, 2017
60bb299
Merge branch 'fixwcharles' into merge-movieDetails
secretsharer Jun 16, 2017
90b8bd7
Add movie details template back
secretsharer Jun 16, 2017
969e621
added post to rental library function
gofarann Jun 16, 2017
1234bd9
Merge branch 'master' of https://github.com/gofarann/VideoStoreConsumer
secretsharer Jun 16, 2017
fac5a2a
added modal html to index.html
gofarann Jun 19, 2017
f8c7c7c
created a new movie template with add button for searched movies
gofarann Jun 19, 2017
76db31e
adjusted movie View
gofarann Jun 20, 2017
bd48773
added alphabetical sort to rental library
gofarann Jun 20, 2017
fb3df3f
fixed modal to show for search results and rental library
gofarann Jun 20, 2017
87f66c7
added delete functionality
gofarann Jun 23, 2017
376a86a
more index.html work
gofarann 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
99 changes: 94 additions & 5 deletions build/css/styles.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
@include foundation-everything;
@import url('https://fonts.googleapis.com/css?family=Yellowtail');

@import url('https://fonts.googleapis.com/css?family=Orbitron');



main {
background: lightblue;
}

header {
Expand Down Expand Up @@ -37,8 +41,93 @@ aside label {
div {
display: inline;
}
/*
* {
border-style: solid;

#movie-card {
display: inline;
height: 430px;
width: 200px;
color: black;
margin: auto;
/*padding: 140px 40px;*/

}

#search-bar {
display: block;
padding-top: 20px;
padding-bottom: 80px;


}

#logo {
color: black;
font-size: 50px;
padding-top: 25px;
padding-bottom: 15px;
font-family: 'Orbitron', sans-serif;

}

.button {
display: block;
background-color: #ffffff;
color: #E24E42;
border: 2px solid #E24E42;
border-radius: 500px;
text-transform: uppercase;
}


.button:hover {
color: #ffffff;
background-color: #E24E42;
}

.center {
text-align: center;
padding-left: 10%;
padding-right: 10%;
}

.inline {
display: inline;
padding-top: 20px;
padding-bottom: 80px;
}


#movie-details {
z-index: 10;
position: fixed;
width: 70%;
height: 80%;
top: 10%;
border-style: ridge;
background-color: white;
text-align: center;
margin-left: 10%;
border-radius: 25px;
font-size: 80%


}

#title-and-date {
position: relative;
font-weight: 400;
font-size: 80%;
color: black;
text-align: center;

}

#detail-title {
font-weight: 900;
font-size: 50px;
color: black;
}

.hidden {
display: none;
}
*/
76 changes: 72 additions & 4 deletions build/index.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@


<!DOCTYPE html>
<html lang="en">
<head>
Expand All @@ -7,9 +9,75 @@
<link rel="stylesheet" type="text/css" href="css/styles.css">
<title>Backbone Baseline</title>
</head>
<body>
<main>

<!-- <section>
<img src="https://static1.squarespace.com/static/522f305be4b0186bd83d5cf8/t/5489e4b8e4b0d0edcbe82988/1418323128978/wood_block" height="80" width="80"><img src="https://vignette2.wikia.nocookie.net/arthur/images/5/5d/Buster.jpg/revision/latest?cb=20090712025127" height="100" width="100">
</section> -->
<!-- <nav class="top-bar"> -->
<!-- <div class="title-area"> -->
<div>
<h1 id="logo" class="center">OliviAnn's Video Rental</h1>
</div>
<!-- </div> -->
<section id="top-bar-search">
<label class='left'>
<input type="text" id="query" placeholder="Search for Movies to Add"></input>
</label>
<button id="search" class="button left">Search</button>

</section>
<!-- </nav> -->



<section class="hidden" id='movie-details'></section>
<section class="column small-12 medium-12 large-12" id='movie-list'></section>
</main>

<!--- Templates ------------->

<script id="movie-card-template" type="text/template">
<section class="column small-12 medium-12 large-12 inline" id="movie-card">
<section id='title-and-date'>
<p class="movie-title"><%- title %></p>
<p> (<%- release_date.substring(0,4) %>) </p>
<button id="remove-from-library" class="medium-3 large-12 columns button center ">Remove</button>

</section>


<img id="movie-image" src=<%-image_url %> alt=<% title %>></img>
</section>
</script>


<script id="new-movie-card-template" type="text/template">
<section class="column small-12 medium-12 large-12 inline" id="movie-card">
<p class="movie-title"><%- title %></p>
<p> (<%- release_date.substring(0,4) %>) </p>
<!-- <p> (<%- image_url %>) </p> -->

<button id="add-to-library" class="medium-3 large-12 columns button center ">+</button>
<img id="movie-image" src=<%-image_url %> alt=<% title %>></img>

</section>
</script>

<script id="movie-details-template" type="text/template">
<section>
<p id="detail-title"><%- title %></p>
<p><%- release_date.substring(0,4) %></p>
<img src="<%-image_url %>"alt="<% title %>"></img>
<p>Overview: <%- overview %></p>
</section>
</script>
<script src="/app.bundle.js" charset="utf-8"></script>


</html>


<script src="/app.bundle.js"></script>
<!-- <script id="movie-list-template" type="text/template">

</body>
</html>
</script> -->
23 changes: 17 additions & 6 deletions src/app.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
// /src/app.js

// Import jQuery & Underscore
import $ from 'jquery';
import _ from 'underscore';

// ready to go
$(document).ready(function() {

$('section.main-content').append('<p>Hello World!</p>');
import RentalLibrary from './collections/rental_library';
import RentalLibraryView from './views/rental_library_view';


var rentalLibrary = new RentalLibrary();
rentalLibrary.fetch();
// console.log("crumb 1");

// would be replaced with fetched rental library from rails api
var rentalLibraryView = new RentalLibraryView({
model: rentalLibrary,
template: _.template($('#movie-card-template').html()),
el: 'main'
});


$(document).ready(function() {
rentalLibraryView.render();
});
31 changes: 31 additions & 0 deletions src/collections/rental_library.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import Backbone from 'backbone';
import Movie from '../models/movie.js';
console.log("crumb 5");


var RentalLibrary = Backbone.Collection.extend({
model: Movie,
url: 'http://localhost:3000/movies',
comparator: function( collection ){
return( collection.get( 'title') );
}
// comparator: function (property) {
// return selectedStrategy.apply(myModel.get(property));
// },
// strategies: {
// byTitle: function (title) { return this.model.get("title"); },
// byReleaseDate: function (release_date) { return this.model.get("release_date"); },
// },
// changeSort: function (sortProperty) {
// this.comparator = this.strategies[sortProperty];
// },
// initialize: function () {
// this.changeSort('byTitle');
// console.log(this.comparator);
// this.changeSort("byReleaseDate");
// console.log(this.comparator);
// }

});

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

console.log("crumb 6");

var SearchResults = Backbone.Collection.extend({
model: Movie,
url: 'http://localhost:3000/movies?query='

});


export default SearchResults;
Loading