wikijs-fork/client/js/pages/edit.js

21 lines
603 B
JavaScript
Raw Normal View History

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