Skip to content

Commit

Permalink
refactoring:linting
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorybesson committed Oct 4, 2016
1 parent 991ce7f commit 64aac09
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
5 changes: 3 additions & 2 deletions src/cli/cms/editor/handlebars/compileAbe.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export default function compileAbe(){
var hash
var value
var testXSS

if(arguments[0].hash['key'].indexOf('}-') > 0){
key = arguments[0].hash['key'].split('-')
key = key[key.length - 1]
Expand All @@ -43,8 +44,8 @@ export default function compileAbe(){

key = arguments[0].hash['key'].replace('.', '-')

var hash = arguments[0].hash
var value = ((content) ? content[hash.key.replace('.', '-')] : hash.key)
hash = arguments[0].hash
value = ((content) ? content[hash.key.replace('.', '-')] : hash.key)
if(typeof value === 'undefined' || typeof value === 'function' || value === null) {
value = ''
}
Expand Down
6 changes: 3 additions & 3 deletions src/cli/cms/editor/handlebars/printInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ export default function printInput () {
<label class="control-label" for="${params.key}"
${(params.type.indexOf('text_link') > -1) ? 'data-for-link="' + params.key + '"' : ''} >
${desc}
</label>`,
disabled = ''
</label>`
var disabled = ''

if(typeof params.placeholder === 'undefined' || params.placeholder === null || params.placeholder === 'undefined') {
params.placeholder = ''
Expand Down Expand Up @@ -56,7 +56,7 @@ export default function printInput () {
placeholder="${params.placeholder}"`

var multiple = ''
var disabled = ''
disabled = ''
if(typeof params['max-length'] === 'undefined' || params['max-length'] === null || params['max-length'] === ''
|| (params['max-length'] > 1 && params.source.length > 0)) {
multiple = 'multiple'
Expand Down
2 changes: 0 additions & 2 deletions src/cli/cms/editor/handlebars/sourceAttr.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@

import {Sql} from '../../../'

export default function sourceAttr(val, params) {
var hiddenVal = val
var selected = ''
Expand Down
4 changes: 0 additions & 4 deletions src/cli/cms/editor/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import Handlebars from 'handlebars'
import HandlebarsIntl from 'handlebars-intl'
import handlebarsHelperSlugify from 'handlebars-helper-slugify'

import hooks from '../../extend/abe-hooks'

/* Handlebar abe */
import abeEngine from './handlebars/abeEngine'
Expand All @@ -19,7 +16,6 @@ import sourceAttr from './handlebars/sourceAttr'
import sourceAutocomplete from './handlebars/sourceAutocomplete'
import sourceOption from './handlebars/sourceOption'

/* Register abe */
Handlebars.registerHelper('abeImport', abeImport)
Handlebars.registerHelper('abe', compileAbe)
Handlebars.registerHelper('folders', folders)
Expand Down

0 comments on commit 64aac09

Please sign in to comment.