Skip to content
This repository was archived by the owner on Apr 1, 2021. It is now read-only.

Commit 1e38544

Browse files
committed
Merge branch 'feature/missing-plugin' into develop
2 parents 19a3cad + 11cfc34 commit 1e38544

File tree

11 files changed

+153
-11
lines changed

11 files changed

+153
-11
lines changed

.eslintrc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,12 @@
4444
"on": "colon"
4545
}
4646
}],
47-
"vue/require-default-prop": "warning",
48-
"vue/require-prop-types": "warning",
49-
"vue/prop-name-casing": ["error", "camelCase"]
47+
"vue/require-default-prop": "off",
48+
"vue/require-prop-types": "off",
49+
"vue/prop-name-casing": ["error", "camelCase"],
50+
"unicorn/catch-error-name": ["error", {
51+
"name": "err"
52+
}]
5053
},
5154
"overrides": [{
5255
"files": ["resources/assets/js/coreui/**/*.vue"],

package-lock.json

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"stylelint-scss": "^3.1.3"
3737
},
3838
"dependencies": {
39+
"animate.css": "^3.6.1",
3940
"axios": "^0.18",
4041
"bootstrap": "^4.1.1",
4142
"bootstrap-vue": "^2.0.0-rc.11",
@@ -48,7 +49,9 @@
4849
"simple-line-icons": "^2.4.1",
4950
"vue": "^2.5.16",
5051
"vue-chartjs": "^3.3.2",
52+
"vue-notification": "^1.3.10",
5153
"vue-router": "^3.0.1",
54+
"vuejs-datepicker": "^1.5.2",
5255
"vuex": "^3.0.1"
5356
},
5457
"pre-commit": [

public/mix-manifest.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

resources/assets/js/bootstrap.js

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,36 @@ window.Vue = require('vue')
1111
try {
1212
window.$ = window.jQuery = require('jquery')
1313

14+
// Animate CSS
15+
window.$.fn.extend({
16+
animateCss: function (animationName, callback) {
17+
const animationEnd = (function (el) {
18+
const animations = {
19+
animation : 'animationend',
20+
OAnimation : 'oAnimationEnd',
21+
MozAnimation : 'mozAnimationEnd',
22+
WebkitAnimation: 'webkitAnimationEnd',
23+
}
24+
25+
for (const t in animations) {
26+
if (el.style[t] !== undefined)
27+
return animations[t]
28+
}
29+
})(document.createElement('div'))
30+
31+
this.addClass(`animated ${animationName}`).one(animationEnd, function () {
32+
$(this).removeClass(`animated ${animationName}`)
33+
34+
if (typeof callback === 'function') callback()
35+
})
36+
37+
return this
38+
},
39+
})
40+
1441
require('bootstrap')
15-
} catch (error) {
16-
console.error(error)
42+
} catch (err) {
43+
console.error(err)
1744
}
1845

1946
/**

resources/assets/js/coreui/containers/Full.vue

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
<AppHeader/>
44
<div class="app-body">
55
<Sidebar :nav-items="nav"/>
6+
<notifications
7+
class="custom-notifications"
8+
:style="{ 'margin-top': offset }" />
69
<main class="main">
710
<breadcrumb :list="list"/>
811
<div class="container-fluid">
@@ -30,7 +33,8 @@ export default {
3033
},
3134
data () {
3235
return {
33-
nav: nav.items,
36+
nav : nav.items,
37+
offset: true,
3438
}
3539
},
3640
computed: {
@@ -41,5 +45,19 @@ export default {
4145
return this.$route.matched
4246
},
4347
},
48+
methods: {
49+
setPosNotify () {
50+
const top = $(document).scrollTop()
51+
const offset = top < 55 ? 55 - top : 0
52+
53+
this.offset = `${offset}px`
54+
},
55+
},
56+
mounted () {
57+
$(window).on('scroll', this.setPosNotify)
58+
},
59+
beforeDestroy () {
60+
$(window).off('scroll', this.setPosNotify)
61+
},
4462
}
4563
</script>

resources/assets/js/coreui/main.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,29 @@
22
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
33
import Vue from 'vue'
44
import BootstrapVue from 'bootstrap-vue'
5+
import Datepicker from 'vuejs-datepicker'
6+
import { id } from 'vuejs-datepicker/dist/locale'
7+
import Notifications from 'vue-notification'
58
import App from './App'
69
import router from './router'
710
import store from './store'
811

912
Vue.use(BootstrapVue)
13+
Vue.use(Notifications)
14+
15+
Vue.component('b-datepicker', {
16+
extends: Datepicker,
17+
props : {
18+
bootstrapStyling: {
19+
type : Boolean,
20+
default: true,
21+
},
22+
language: {
23+
type : Object,
24+
default: () => id,
25+
},
26+
},
27+
})
1028

1129
window.Vue = new Vue({
1230
el : '#app',

resources/assets/js/coreui/views/base/Forms.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,13 @@
162162
type="date"
163163
id="date"/>
164164
</b-form-group>
165+
<b-form-group
166+
label="Datepicker"
167+
:label-cols="3"
168+
:horizontal="true">
169+
<b-datepicker
170+
v-model="datepicker"/>
171+
</b-form-group>
165172
<b-form-group
166173
description="Please enter your email"
167174
label="Email Input"
@@ -1462,7 +1469,8 @@ export default {
14621469
name: 'Forms',
14631470
data () {
14641471
return {
1465-
selected: [], // Must be an array reference!
1472+
selected : [], // Must be an array reference!
1473+
datepicker: new Date(),
14661474
}
14671475
},
14681476
methods: {

resources/assets/js/coreui/views/notifications/Alerts.vue

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,32 @@
209209
</div>
210210
</b-card>
211211
</b-col>
212+
<b-col
213+
cols="12"
214+
md="6">
215+
<b-card
216+
header-tag="header"
217+
footer-tag="footer">
218+
<div slot="header">
219+
<i class="fa fa-align-justify"/> Alerts <small>with <b>Vue Notification</b></small>
220+
</div>
221+
<b-button
222+
variant="success"
223+
@click="showNotify('success')">
224+
Success
225+
</b-button>
226+
<b-button
227+
variant="warning"
228+
@click="showNotify('warning')">
229+
Warning
230+
</b-button>
231+
<b-button
232+
variant="danger"
233+
@click="showNotify('danger')">
234+
Danger
235+
</b-button>
236+
</b-card>
237+
</b-col>
212238
</b-row>
213239
</div>
214240
</div>
@@ -231,6 +257,13 @@ export default {
231257
showAlert () {
232258
this.dismissCountDown = this.dismissSecs
233259
},
260+
showNotify (type) {
261+
this.$notify({
262+
type,
263+
title: 'Important message',
264+
text : 'Hello user! This is a notification!',
265+
})
266+
},
234267
},
235268
}
236269
</script>

resources/assets/sass/coreui/style.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ $simple-line-font-path: '~simple-line-icons/fonts/';
1919
@import '~font-awesome/css/font-awesome.min.css';
2020
@import '~simple-line-icons/css/simple-line-icons.css';
2121
@import '~flag-icon-css/css/flag-icon.min.css';
22+
@import '~animate.css/animate.min.css';
2223

2324
// Import Other CSS Module
2425

@@ -30,3 +31,4 @@ $simple-line-font-path: '~simple-line-icons/fonts/';
3031

3132
// Custom styles
3233
@import 'custom';
34+
@import 'vendors/vue-notification/notification';

0 commit comments

Comments
 (0)