Converted all client code to Standard JS compliant

This commit is contained in:
NGPixel
2017-02-09 20:24:28 -05:00
parent 414dc386d6
commit 547f3065d3
28 changed files with 418 additions and 173 deletions

View File

@@ -1,3 +1,4 @@
/* global $, Vue */
// Vue Create User instance

View File

@@ -1,3 +1,4 @@
/* global $, Vue */
// Vue Delete User instance

View File

@@ -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 {

View File

@@ -1,3 +1,4 @@
/* global $, _, alerts, currentBasePath */
// -> Move Existing Document
@@ -10,7 +11,7 @@ let moveInitialDocument = _.lastIndexOf(currentBasePath, '/') + 1
$('.btn-move-prompt').on('click', (ev) => {
$('#txt-move-prompt').val(currentBasePath)
$('#modal-move-prompt').toggleClass('is-active')
setInputSelection($('#txt-move-prompt').get(0), moveInitialDocument, currentBasePath.length)
setInputSelection($('#txt-move-prompt').get(0), moveInitialDocument, currentBasePath.length) // eslint-disable-line no-undef
$('#txt-move-prompt').removeClass('is-danger').next().addClass('is-hidden')
})
@@ -21,7 +22,7 @@ $('#txt-move-prompt').on('keypress', (ev) => {
})
$('.btn-move-go').on('click', (ev) => {
let newDocPath = makeSafePath($('#txt-move-prompt').val())
let newDocPath = makeSafePath($('#txt-move-prompt').val()) // eslint-disable-line no-undef
if (_.isEmpty(newDocPath) || newDocPath === currentBasePath || newDocPath === 'home') {
$('#txt-move-prompt').addClass('is-danger').next().removeClass('is-hidden')
} else {