import Vue from 'vue' import VueAutosize from 'vue-autosize' import Vuelidate from 'vuelidate' import 'babel-polyfill' import CourseRedactor from '../components/CourseRedactor.vue' import $ from 'jquery'; if (process.env.NODE_ENV === 'development') { // Enable vue-devtools Vue.config.devtools = true; } Vue.use(VueAutosize); Vue.use(Vuelidate); let app = new Vue({ el: '#lilcity-vue-app', components: { 'course-redactor': CourseRedactor, } }); $(document).ready(function () { $('#course-redactor__publish-button').on('click', function () { let event = new Event('course_publish'); document.getElementById('lilcity__course-redactor').dispatchEvent(event); }); $('#course-redactor__preview-button').on('click', function () { let event = new Event('course_preview'); document.getElementById('lilcity__course-redactor').dispatchEvent(event); }); });