Skip to content

Commit

Permalink
Merge branch 'master' into preloader
Browse files Browse the repository at this point in the history
  • Loading branch information
papasikis committed Jul 31, 2017
2 parents 8034f7d + 362ad02 commit 4cf5a78
Show file tree
Hide file tree
Showing 34 changed files with 782 additions and 61 deletions.
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@
"ionicons": "^2.0.1",
"leaflet-map": "^0.2.1",
"normalize.css": "^5.0.0",
"vee-validate": "^2.0.0-rc.6",
"vee-validate": "2.0.0-rc.7",
"vue": "^2.3.0",
"vue-bulma-expanding": "0.0.0",
"vue-chartjs": "^2.7.1",
"vue-router": "^2.2.0",
"vue-slider-component": "^2.3.3",
"vue2-circle-progress": "^1.0.3",
"vuetable-2": "^1.6.5",
"vuex": "2.1.1",
"vuex-router-sync": "4.0.2"
},
Expand All @@ -37,9 +38,10 @@
"babel-core": "^6.22.1",
"babel-eslint": "^7.1.1",
"babel-loader": "^6.2.10",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-preset-es2015": "^6.22.0",
"babel-preset-stage-2": "^6.22.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
"babel-preset-env": "^1.6.0",
"babel-register": "^6.22.0",
"bootstrap": "4.0.0-alpha.6",
"chalk": "^1.1.3",
Expand Down
1 change: 1 addition & 0 deletions src/assets/icons/vuestic-clean-code.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/icons/vuestic-free.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/icons/vuestic-fresh.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/icons/vuestic-responsive.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/icons/vuestic-rich.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/icons/vuestic-vue.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
115 changes: 115 additions & 0 deletions src/components/common/vuestic-datatable/DataTable.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
<template>
<div>
<div class="d-flex justify-content-between">
<filter-bar @filter="onFilterSet"></filter-bar>
<items-per-page :options="itemsPerPage"
:defaultPerPage="perPage"
@items-per-page="onItemsPerPage"></items-per-page>
</div>
<div class="table-responsive">
<vuetable ref="vuetable"
apiUrl="https://vuetable.ratiw.net/api/users"
:fields="tableFields"
:css="css.table"
paginationPath=""
:appendParams="moreParams"
:perPage="perPage"
@vuetable:pagination-data="onPaginationData"
>
</vuetable>
<div class="d-flex justify-content-center mb-4">
<vuetable-pagination ref="pagination"
:css="css.pagination"
@vuetable-pagination:change-page="onChangePage"></vuetable-pagination>
</div>
</div>
</div>
</template>

<script>
import Vuetable from 'vuetable-2/src/components/Vuetable'
import VuetablePagination from 'vuetable-2/src/components/VuetablePagination'
import FilterBar from './FilterBar.vue'
import ItemsPerPage from './ItemsPerPage.vue'
import Vue from 'vue'
import VueEvents from 'vue-events'
Vue.use(VueEvents)
export default {
name: 'data-table',
components: {
FilterBar,
Vuetable,
VuetablePagination,
ItemsPerPage
},
props: {
apiUrl: {
type: String,
required: true
},
tableFields: {
type: Array,
required: true
},
itemsPerPage: {
type: Array,
required: true
}
},
data () {
return {
perPage: 6,
colorClasses: {},
moreParams: {},
css: {
table: {
tableClass: 'table table-striped',
ascendingIcon: 'entypo entypo-up-dir',
descendingIcon: 'entypo entypo-down-dir'
},
pagination: {
wrapperClass: 'btn-group green-box-shadow',
activeClass: 'focus',
disabledClass: 'disabled',
pageClass: 'btn btn-primary',
linkClass: 'btn btn-primary',
icons: {
first: 'fa fa-angle-double-left',
prev: 'fa fa-angle-left',
next: 'fa fa-angle-right',
last: 'fa fa-angle-double-right'
}
}
}
}
},
mounted () {
this.$events.$on('filter-set', eventData => this.onFilterSet(eventData))
this.$events.$on('items-per-page', eventData => this.onItemsPerPage(eventData))
},
methods: {
onFilterSet (filterText) {
this.moreParams = {
'filter': filterText
}
Vue.nextTick(() => this.$refs.vuetable.refresh())
},
onItemsPerPage (itemsPerPageValue) {
this.perPage = itemsPerPageValue
Vue.nextTick(() => this.$refs.vuetable.refresh())
},
onPaginationData (paginationData) {
this.$refs.pagination.setPaginationData(paginationData)
},
onChangePage (page) {
this.$refs.vuetable.changePage(page)
}
}
}
</script>

<style lang="scss">
</style>
31 changes: 31 additions & 0 deletions src/components/common/vuestic-datatable/FilterBar.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<template>
<div class="form-group with-icon-left">
<div class="input-group">
<input id="input-icon-left" name="input-icon-left" @keyup="doFilter()" v-model="filterText" required/>
<i class="glyphicon glyphicon-search icon-left input-icon search-icon"></i>
<label class="control-label" for="input-icon-left">Search</label><i class="bar"></i>
</div>
</div>
</template>

<script>
export default {
name: 'filterBar',
data () {
return {
filterText: ''
}
},
methods: {
doFilter () {
this.$emit('filter', this.filterText)
}
}
}
</script>

<style lang="scss">
.search-icon {
transform: rotate(90deg);
}
</style>
56 changes: 56 additions & 0 deletions src/components/common/vuestic-datatable/ItemsPerPage.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<template>
<div class="form-group dropdown" v-dropdown.closeOnMenuClick>
<button id="itemsPerPageBtn" class="btn btn-primary btn-sm dropdown-toggle" type="button"
data-toggle="dropdown">
{{selected}} per page
<i class="ion-chevron-down arrow-down"></i>
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" v-for="option in options" @click="selectedItemsPerPage(option.value)">{{option.value}} per page</a>
</div>
</div>

</template>

<script>
import Dropdown from 'directives/Dropdown'
export default {
directives: {
Dropdown
},
props: {
options: {
type: Array,
required: true
},
defaultPerPage: {
type: Number
}
},
data () {
return {
selected: this.defaultPerPage
}
},
methods: {
selectedItemsPerPage (optionValue) {
this.selected = optionValue
this.$emit('items-per-page', this.selected)
}
}
}
</script>

<style lang="scss" scoped>
@import "../../../sass/variables";
.btn.dropdown-toggle, .dropdown-menu {
min-width: 13rem;
max-width: 13rem;
}
.dropdown-item, .dropdown-toggle {
text-transform: uppercase;
}
</style>
15 changes: 7 additions & 8 deletions src/components/common/vuestic-feed/VuesticFeed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<div class="photo-container"><div class="photo" :style="`background: url(${post.photoURL})`"></div></div>
<div class="underscored">
<span class="text"><span class="name">{{post.name}}</span> {{post.text}}.</span>
<button v-on:click="removePost(post)" class="btn btn-micro btn-primary btn-with-icon rounded-icon">
<span class="entypo entypo-cancel icon"></span>
<button v-on:click="removePost(post)" class="btn btn-micro btn-primary btn-with-icon close-btn rounded-icon">
<i class="ion-android-close ion"></i>
</button>
</div>
</div>
Expand Down Expand Up @@ -56,6 +56,8 @@
align-items: center;
.photo-container {
margin-right: 1rem;
border-radius: 50%;
border: 2px solid $lighter-gray;
.photo {
background-size: cover !important;
width: 3rem;
Expand All @@ -80,13 +82,10 @@
font-weight: $font-weight-bold;
}
}
.btn {
.close-btn {
margin-left: 1rem;
.icon {
&:before {
padding-left: .18rem; // TODO : FIX IT !!!
font-size: 1.5rem;
}
i {
left: 10.5px;
}
}
}
Expand Down
27 changes: 11 additions & 16 deletions src/components/common/vuestic-social-news/VuesticSocialNews.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<template>
<div class="vuestic-social-news">
<div class="d-flex justify-content-between align-items-center text-w-btn">
<span class="text">That was users have posted about your business.</span>
<a :href="url">
<span class="text">That what users have posted about your business.</span>
<a :href="url" target="_blank">
<button class="btn btn-micro btn-primary">VIEW</button>
</a>
</div>
<div class="d-flex justify-content-between photos">
<div class="d-flex flex-row justify-content-around photos">
<div class="photo" v-for="pieceOfNews in news" :style="`background: url(${pieceOfNews.photoURL})`"></div>
</div>
</div>
Expand All @@ -32,31 +32,26 @@
padding-bottom: 1.5rem;
overflow: hidden;
.text {
font-size: $font-size-sm;
font-size: $font-size-base;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.btn {
margin-left: 1rem;
line-height: 1; //TODO: review btn styles
}
}
.photos {
padding-right: 2rem;
height: 80px;
flex-wrap: wrap;
overflow: hidden;
.photo {
background-size: cover !important;
@include media-breakpoint-up(lg) {
width: 4.8vw;
height: 4.8vw;
}
@include media-breakpoint-between(sm, md) {
width: 6vw;
height: 6vw;
}
@include media-breakpoint-between(xs, sm) {
width: 12vw;
height: 12vw;
}
width: 80px;
height: 80px;
margin-right: 2px;
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/components/common/widget/Widget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
padding: 0 $widget-padding;
border-bottom: $widget-header-border;
font-size: $font-size-larger;
font-weight: 600;
display: flex;
align-items: center;
}
Expand Down
Loading

0 comments on commit 4cf5a78

Please sign in to comment.