Fuse-box client scripts integration + deps update
This commit is contained in:
@@ -1,20 +1,22 @@
|
||||
/* global $ */
|
||||
'use strict'
|
||||
|
||||
if ($('#page-type-edit').length) {
|
||||
let pageEntryPath = $('#page-type-edit').data('entrypath') // eslint-disable-line no-unused-vars
|
||||
// let pageCleanExit = false
|
||||
import $ from 'jquery'
|
||||
|
||||
// -> Discard
|
||||
module.exports = (alerts, socket) => {
|
||||
if ($('#page-type-edit').length) {
|
||||
let pageEntryPath = $('#page-type-edit').data('entrypath')
|
||||
// let pageCleanExit = false
|
||||
|
||||
$('.btn-edit-discard').on('click', (ev) => {
|
||||
$('#modal-edit-discard').toggleClass('is-active')
|
||||
})
|
||||
// -> Discard
|
||||
|
||||
// window.onbeforeunload = function () {
|
||||
// return (pageCleanExit) ? true : 'Unsaved modifications will be lost. Are you sure you want to navigate away from this page?'
|
||||
// }
|
||||
$('.btn-edit-discard').on('click', (ev) => {
|
||||
$('#modal-edit-discard').toggleClass('is-active')
|
||||
})
|
||||
|
||||
/* eslint-disable spaced-comment */
|
||||
//=include ../components/editor.js
|
||||
/* eslint-enable spaced-comment */
|
||||
// window.onbeforeunload = function () {
|
||||
// return (pageCleanExit) ? true : 'Unsaved modifications will be lost. Are you sure you want to navigate away from this page?'
|
||||
// }
|
||||
|
||||
require('../components/editor.js')(alerts, pageEntryPath, socket)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user