Skip to content

Commit

Permalink
Fix vue component
Browse files Browse the repository at this point in the history
  • Loading branch information
milanarandjelovic committed Apr 6, 2017
1 parent 7377d2a commit bf5cf01
Show file tree
Hide file tree
Showing 13 changed files with 1,171 additions and 1,138 deletions.
637 changes: 316 additions & 321 deletions public/js/app.js

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions resources/assets/js/vuejs/components/admin/Channel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@
class="form-control description"
v-model="form.description"
rows="6"
>
</textarea>
></textarea>
<div v-if="form.errors.has('description')" class="form-error-message">
<p class="text-danger">{{ form.errors.get('description') }}</p>
</div>
Expand Down Expand Up @@ -159,8 +158,7 @@
class="form-control description"
v-model="form.description"
rows="6"
>
</textarea>
></textarea>
<div v-if="form.errors.has('description')" class="form-error-message">
<p class="text-danger">{{ form.errors.get('description') }}</p>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
</template>

<script>
import Spinner from './../common/Spinner.vue'
import Spinner from './../../common/Spinner.vue'
export default {
name: 'activity-log',
Expand Down Expand Up @@ -89,7 +89,6 @@
getAllActivities () {
axios.get('/api/admin/activities')
.then((response) => {
console.log(response)
this.activities = response.data
})
.catch((error) => {
Expand Down
68 changes: 37 additions & 31 deletions resources/assets/js/vuejs/components/common/Pagination.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<a data-page="prev" @click.prevent="changePage(pagination.current_page - 1)">‹</a>
</li>
<li v-for="page in pagination.last_page"
class="paginate_button"
:class="page == pagination.current_page ? 'active': ''"
class="paginate_button"
:class="page == pagination.current_page ? 'active': ''"
>
<a @click.prevent="changePage(page)">{{ page }}</a>
</li>
Expand All @@ -22,41 +22,47 @@
</li>
</ul>

</div>
</div> <!-- /#pagination -->
</template>

<script>
export default{
name: 'pagination',
data(){
return{
}
},
props: {
pagination: {
type: Object,
required: true
},
callback: {
type: Function,
required: true
},
size: {
type: String,
default: ""
},
navClass: {
type: String,
default: ""
},
offset: {
type: Number,
default: 4
},
visible: {
type: Number,
default: 1
}
}, // data()
props: {
pagination: {
type: Object,
required: true
},
callback: {
type: Function,
required: true
},
size: {
type: String,
default: ""
},
navClass: {
type: String,
default: ""
},
offset: {
type: Number,
default: 4
},
visible: {
type: Number,
default: 1
}
}, // props
computed: {
Expand Down Expand Up @@ -102,4 +108,4 @@
}
} // methods
}
</script>
</script>
6 changes: 3 additions & 3 deletions resources/assets/js/vuejs/components/common/Spinner.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<div id="spinner" v-show="loading">
<div class="center-block" :style="spinnerStyle">
<i class="fa fa-cog fa-spin fa-5x fa-fw"></i>
</div>
<div class="center-block" :style="spinnerStyle">
<i class="fa fa-cog fa-spin fa-5x fa-fw"></i>
</div>
</div>
</template>

Expand Down
23 changes: 13 additions & 10 deletions resources/assets/js/vuejs/components/forum/DiscussionComments.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,24 @@
<div v-if="$root.laraForum.authenticated == 'true'">
<div class="social-comment">
<a :href="'/@' + $root.laraForum.username" class="pull-left">
<img :src="$root.laraForum.avatar" alt="$root.laraForum.username + 'avatar'"
class="img-responsive"
<img
:src="$root.laraForum.avatar"
alt="$root.laraForum.username + 'avatar'"
class="img-responsive"
>
</a>
<div class="media-body">
<div class="form-group">
<textarea class="form-control comment"
rows="8"
placeholder="Write comment..."
name="description"
v-model="description"
></textarea>
<textarea class="form-control comment"
rows="8"
placeholder="Write comment..."
name="description"
v-model="description"
></textarea>
</div> <!-- /.form-group -->
<div class="form-group">
<a class="btn btn-primary pull-right"
@click.prevent="createComment"
@click.prevent="createComment"
>
Post Your Reply
</a>
Expand All @@ -62,6 +64,7 @@
export default {
name: 'discussion-comments',
data () {
return {
comments: [],
Expand Down Expand Up @@ -107,4 +110,4 @@
textarea.comment {
resize: none;
}
</style>
</style>
Loading

0 comments on commit bf5cf01

Please sign in to comment.