D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
ltfsolutionsco
/
www
/
wp-content
/
plugins
/
ml-slider
/
admin
/
assets
/
js
/
app
/
slideshows
/
Filename :
Toolbar.vue
back
Copy
<script> import { EventManager } from '../utils' import { CSSManagerNotice } from '../notices' import { mapState } from 'vuex' export default { data() { return { duplicating: false, scrolling: 0 } }, computed: mapState({ locked: state => state.slideshows.locked }), mounted() { // Get height of admin bar to make the header sticky with offset (useful in case something else alters the admin bar height) const calculateToolbarPosition = function() { window.requestAnimationFrame(() => { document.getElementById('ms-toolbar').style.top = document.getElementById('wpadminbar').clientHeight + 'px' }) } calculateToolbarPosition() window.addEventListener('resize', calculateToolbarPosition) // Know when the user isn't scrolled to the top window.addEventListener('scroll', () => { this.scrolling = window.scrollY > 0 }, { passive: true }) }, methods: { save() { EventManager.$emit('metaslider/save') }, preview() { if (this.locked) return EventManager.$emit('metaslider/preview') }, duplicate() { if (this.locked) return this.duplicating = true this.notifyInfo('metaslider/duplicate-preparing', this.__('Preparing slideshow for duplication...', 'ml-slider'), true) setTimeout(() => { EventManager.$emit('metaslider/duplicate') }, 1500) }, showCSSManagerNotice() { EventManager.$emit('metaslider/open-utility-modal', CSSManagerNotice) }, addSlide() { // The easy way // TODO: refactor out the jQuery way in admin.js (i.e. create Slide component) window.create_slides.open() } } } </script>
Name
Size
Last Modified
Owner
Permissions
Actions
nav
Dir
February 03 2024 3:18:15
ltfsolutionsco
0755
settings
Dir
February 03 2024 3:18:15
ltfsolutionsco
0755
Slideshow.vue
10.476
KB
February 03 2024 3:18:15
ltfsolutionsco
0644
SlideshowMeta.vue
3.831
KB
February 03 2024 3:18:15
ltfsolutionsco
0644
Toolbar.vue
1.559
KB
February 03 2024 3:18:15
ltfsolutionsco
0644
index.js
0.104
KB
February 03 2024 3:18:15
ltfsolutionsco
0644
2017 © D7net | D704T team