Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Зуев Егор
/
wiki.dev
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Authored by
Dan Brown
2015-11-22 13:12:15 +0000
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Commit
3825ea8c14675dee1eab61bdfe6eecc45580d701
3825ea8c
1 parent
004a8c75
Fixed book js not working
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
resources/assets/js/pages/book-show.js
resources/views/books/show.blade.php
resources/assets/js/pages/book-show.js
View file @
3825ea8
...
...
@@ -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
);
...
...
resources/views/books/show.blade.php
View file @
3825ea8
...
...
@@ -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>
...
...
@@ -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"
>
...
...
Please
register
or
sign in
to post a comment