2017-02-09 19:24:28 -06:00
|
|
|
/* global $ */
|
2016-08-28 10:27:05 -05:00
|
|
|
|
2017-02-08 19:52:37 -06:00
|
|
|
if ($('#page-type-edit').length) {
|
2017-02-09 19:24:28 -06:00
|
|
|
let pageEntryPath = $('#page-type-edit').data('entrypath') // eslint-disable-line no-unused-vars
|
2017-03-25 16:03:09 -05:00
|
|
|
// let pageCleanExit = false
|
2016-08-28 10:27:05 -05:00
|
|
|
|
2017-02-09 19:24:28 -06:00
|
|
|
// -> Discard
|
2016-08-30 22:38:21 -05:00
|
|
|
|
2017-02-08 19:52:37 -06:00
|
|
|
$('.btn-edit-discard').on('click', (ev) => {
|
|
|
|
$('#modal-edit-discard').toggleClass('is-active')
|
|
|
|
})
|
2016-08-28 10:27:05 -05:00
|
|
|
|
2017-03-25 16:03:09 -05:00
|
|
|
// window.onbeforeunload = function () {
|
|
|
|
// return (pageCleanExit) ? true : 'Unsaved modifications will be lost. Are you sure you want to navigate away from this page?'
|
|
|
|
// }
|
|
|
|
|
2017-02-09 19:24:28 -06:00
|
|
|
/* eslint-disable spaced-comment */
|
|
|
|
//=include ../components/editor.js
|
|
|
|
/* eslint-enable spaced-comment */
|
2017-02-08 19:52:37 -06:00
|
|
|
}
|