2017-04-02 19:36:43 -04:00
|
|
|
'use strict'
|
2016-08-29 22:19:47 -04:00
|
|
|
|
2017-04-02 19:36:43 -04:00
|
|
|
import $ from 'jquery'
|
2016-08-29 22:19:47 -04:00
|
|
|
|
2017-04-02 19:36:43 -04:00
|
|
|
module.exports = (alerts, socket) => {
|
|
|
|
if ($('#page-type-create').length) {
|
|
|
|
let pageEntryPath = $('#page-type-create').data('entrypath')
|
2016-09-10 22:53:21 -04:00
|
|
|
|
2017-04-02 19:36:43 -04:00
|
|
|
// -> Discard
|
2016-08-29 22:19:47 -04:00
|
|
|
|
2017-04-02 19:36:43 -04:00
|
|
|
$('.btn-create-discard').on('click', (ev) => {
|
|
|
|
$('#modal-create-discard').toggleClass('is-active')
|
|
|
|
})
|
|
|
|
|
|
|
|
require('../components/editor.js')(alerts, pageEntryPath, socket)
|
|
|
|
}
|
2017-02-08 20:52:37 -05:00
|
|
|
}
|