Skip to content

Commit

Permalink
Merge branches 'master' and 'vuestic_scrollbar' of bitbucket.org:smar…
Browse files Browse the repository at this point in the history
…tapant/vuejs-admin into vuestic_scrollbar

# Conflicts:
#	src/components/common/vue2-scrollbar-custom/horizontal-scrollbar.vue
#	src/components/common/vue2-scrollbar-custom/vertical-scrollbar.vue
#	src/components/common/vue2-scrollbar-custom/vue-scrollbar.vue
  • Loading branch information
papasikis committed Aug 1, 2017
2 parents 28def3f + 2cd6c60 commit 6ea1652
Show file tree
Hide file tree
Showing 92 changed files with 3,413 additions and 714 deletions.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ COPY . /app

EXPOSE 8080

CMD npm install && npm run dev
RUN npm install http-server -g

RUN npm install && npm run build

CMD http-server ./dist
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>vuejs-admin</title>
</head>
<body>
Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,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 @@ -38,9 +39,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.
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
<div class="form-group">
<div class="input-group">
<input type="text" id="email" required="required"/>
<label class="control-label" for="email">EMAIL</label><i class="bar"></i>
<label class="control-label" for="email">Email</label><i class="bar"></i>
</div>
</div>
<div class="form-group">
<div class="input-group">
<input type="password" id="password" required="required"/>
<label class="control-label" for="password">PASSWORD</label><i class="bar"></i>
<label class="control-label" for="password">Password</label><i class="bar"></i>
</div>
</div>
<div class="d-flex flex-column flex-lg-row align-items-center justify-content-between down-container">
<button class="btn btn-primary" type="submit">
LOGIN
Log In
</button>
<router-link class='link' :to="{name: 'Signup'}">Create account</router-link>
</div>
Expand All @@ -31,9 +31,9 @@
</script>

<style lang="scss">
@import '../../sass/variables';
@import '../../../node_modules/bootstrap/scss/mixins/breakpoints';
@import '../../../node_modules/bootstrap/scss/variables';
@import '../../../sass/variables';
@import '../../../../node_modules/bootstrap/scss/mixins/breakpoints';
@import '../../../../node_modules/bootstrap/scss/variables';
.login {
@include media-breakpoint-down(md) {
width: 100%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<div class="form-group">
<div class="input-group">
<input type="text" id="email" required="required"/>
<label class="control-label" for="email">EMAIL</label><i class="bar"></i>
<label class="control-label" for="email">Email</label><i class="bar"></i>
</div>
</div>
<div class="form-group">
<div class="input-group">
<input type="password" id="password" required="required"/>
<label class="control-label" for="password">PASSWORD</label><i class="bar"></i>
<label class="control-label" for="password">Password</label><i class="bar"></i>
</div>
</div>
<div class="abc-checkbox abc-checkbox-primary">
Expand All @@ -22,7 +22,7 @@
</div>
<div class="d-flex flex-column flex-lg-row align-items-center justify-content-between down-container">
<button class="btn btn-primary" type="submit">
SIGN UP
Sign Up
</button>
<router-link class='link' :to="{name: 'Login'}">Already joined?</router-link>
</div>
Expand All @@ -37,9 +37,9 @@
</script>

<style lang="scss">
@import '../../sass/variables';
@import '../../../node_modules/bootstrap/scss/mixins/breakpoints';
@import '../../../node_modules/bootstrap/scss/variables';
@import '../../../sass/variables';
@import '../../../../node_modules/bootstrap/scss/mixins/breakpoints';
@import '../../../../node_modules/bootstrap/scss/variables';
.signup {
@include media-breakpoint-down(md) {
Expand Down
146 changes: 146 additions & 0 deletions src/components/common/vue2-scrollbar-custom/horizontal-scrollbar.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@

<template>
<div>
<div
v-if="width < 100"
class="vue-scrollbar__scrollbar-horizontal"
ref="container"
@click="jump">

<div
:class="'scrollbar' + ( dragging || draggingFromParent ? '' : ' vue-scrollbar-transition')"
ref="scrollbar"
@touchstart="startDrag"
@mousedown="startDrag"
:style="{
width: this.width+'%',
left: this.scrolling + '%'
}" >
</div>

</div>
</div>
</template>

<script>
export default {
props: {
draggingFromParent: Boolean,
scrolling: Number,
wrapper: Object,
area: Object,
onChangePosition: Function,
onDragging: Function,
onStopDrag: Function
},
data () {
return {
width: 0,
dragging: false,
start: 0
}
},
watch: {
'wrapper.width' (val, old) {
this.calculateSize(this)
},
'area.width' (val, old) {
this.calculateSize(this)
}
},
methods: {
startDrag (e) {
e = e.changedTouches ? e.changedTouches[0] : e
// Prepare To Drag
this.dragging = true
this.start = e.clientX
},
onDrag (e) {
if (this.dragging) {
// Make The Parent being in the Dragging State
this.onDragging()
e.preventDefault()
e.stopPropagation()
e = e.changedTouches ? e.changedTouches[0] : e
let xMovement = e.clientX - this.start
let xMovementPercentage = xMovement / this.wrapper.width * 100
// Update the last e.clientX
this.start = e.clientX
// The next Horizontal Value will be
let next = this.scrolling + xMovementPercentage
// Tell the parent to change the position
this.onChangePosition(next, 'horizontal')
}
},
stopDrag (e) {
if (this.dragging) {
// Parent Should Change the Dragging State
this.onStopDrag()
this.dragging = false
}
},
jump (e) {
let isContainer = e.target === this.$refs.container
if (isContainer) {
// Get the Element Position
let position = this.$refs.scrollbar.getBoundingClientRect()
// Calculate the horizontal Movement
let xMovement = e.clientX - position.left
let centerize = (this.width / 2)
let xMovementPercentage = xMovement / this.wrapper.width * 100 - centerize
// Update the last e.clientX
this.start = e.clientX
// The next Horizontal Value will be
let next = this.scrolling + xMovementPercentage
// Tell the parent to change the position
this.onChangePosition(next, 'horizontal')
}
},
calculateSize (source) {
// Scrollbar Width
this.width = source.wrapper.width / source.area.width * 100
}
},
mounted () {
this.calculateSize(this)
// Put the Listener
document.addEventListener('mousemove', this.onDrag)
document.addEventListener('touchmove', this.onDrag)
document.addEventListener('mouseup', this.stopDrag)
document.addEventListener('touchend', this.stopDrag)
},
beforeDestroy () {
// Remove the Listener
document.removeEventListener('mousemove', this.onDrag)
document.removeEventListener('touchmove', this.onDrag)
document.removeEventListener('mouseup', this.stopDrag)
document.removeEventListener('touchend', this.stopDrag)
}
}
</script>
Loading

0 comments on commit 6ea1652

Please sign in to comment.