Converted all client code to Standard JS compliant
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
/* global $, _, currentBasePath */
|
||||
|
||||
// -> Create New Document
|
||||
|
||||
@@ -6,7 +7,7 @@ let suggestedCreatePath = currentBasePath + '/new-page'
|
||||
$('.btn-create-prompt').on('click', (ev) => {
|
||||
$('#txt-create-prompt').val(suggestedCreatePath)
|
||||
$('#modal-create-prompt').toggleClass('is-active')
|
||||
setInputSelection($('#txt-create-prompt').get(0), currentBasePath.length + 1, suggestedCreatePath.length)
|
||||
setInputSelection($('#txt-create-prompt').get(0), currentBasePath.length + 1, suggestedCreatePath.length) // eslint-disable-line no-undef
|
||||
$('#txt-create-prompt').removeClass('is-danger').next().addClass('is-hidden')
|
||||
})
|
||||
|
||||
@@ -17,7 +18,7 @@ $('#txt-create-prompt').on('keypress', (ev) => {
|
||||
})
|
||||
|
||||
$('.btn-create-go').on('click', (ev) => {
|
||||
let newDocPath = makeSafePath($('#txt-create-prompt').val())
|
||||
let newDocPath = makeSafePath($('#txt-create-prompt').val()) // eslint-disable-line no-undef
|
||||
if (_.isEmpty(newDocPath)) {
|
||||
$('#txt-create-prompt').addClass('is-danger').next().removeClass('is-hidden')
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user