Skip to content

Commit

Permalink
Fixed book js not working
Browse files Browse the repository at this point in the history
  • Loading branch information
ssddanbrown committed Nov 22, 2015
1 parent 004a8c7 commit 3825ea8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion resources/assets/js/pages/book-show.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = {
if (term.length == 0) return;
this.searching = true;
this.searchResults = '';
var searchUrl = this.$$.form.getAttribute('action');
var searchUrl = this.$els.form.getAttribute('action');
searchUrl += '?term=' + encodeURIComponent(term);
this.$http.get(searchUrl, function (data) {
this.$set('searchResults', data);
Expand Down
6 changes: 3 additions & 3 deletions resources/views/books/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
</div>
</div>
<div class="search-results" v-if="searching">
<h3 class="text-muted">Search Results <a v-if="searching" v-on="click: clearSearch" class="text-small"><i class="zmdi zmdi-close"></i>Clear Search</a></h3>
<h3 class="text-muted">Search Results <a v-if="searching" v-on:click="clearSearch" class="text-small"><i class="zmdi zmdi-close"></i>Clear Search</a></h3>
<div v-if="!searchResults">
@include('partials/loading-icon')
</div>
Expand All @@ -76,11 +76,11 @@
<div class="col-md-4 col-md-offset-1">
<div class="margin-top large"></div>
<div class="search-box">
<form v-on="submit: searchBook, input: checkSearchForm" v-el="form" action="/search/book/{{ $book->id }}">
<form v-on:submit="searchBook" v-on:input="checkSearchForm" v-el:form action="/search/book/{{ $book->id }}">
{!! csrf_field() !!}
<input v-model="searchTerm" type="text" name="term" placeholder="Search This Book">
<button type="submit"><i class="zmdi zmdi-search"></i></button>
<button v-if="searching" v-on="click: clearSearch" type="button primary"><i class="zmdi zmdi-close"></i></button>
<button v-if="searching" v-on:click="clearSearch" type="button"><i class="zmdi zmdi-close"></i></button>
</form>
</div>
<div class="activity anim fadeIn">
Expand Down

0 comments on commit 3825ea8

Please sign in to comment.