Defauilt input.preset uses "slug" as default, as per docs

This commit is contained in:
Samuel Georges 2015-09-26 14:15:49 +10:00
parent 0a31869525
commit de8bd67f0d
1 changed files with 5 additions and 3 deletions

View File

@ -236,21 +236,23 @@
return this.formatNamespace()
}
if (this.options.inputPresetType == 'camel')
if (this.options.inputPresetType == 'camel') {
var value = toCamel(this.$src.val())
}
else {
var value = slugify(this.$src.val())
}
if (this.options.inputPresetType == 'url')
if (this.options.inputPresetType == 'url') {
value = '/' + value
}
return value.replace(/\s/gi, "-")
}
InputPreset.DEFAULTS = {
inputPreset: '',
inputPresetType: 'file',
inputPresetType: 'slug',
inputPresetClosestParent: undefined,
inputPresetPrefixInput: undefined
}