From de8bd67f0d1e73ba2844672b8258568e4ab9a98c Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Sat, 26 Sep 2015 14:15:49 +1000 Subject: [PATCH] Defauilt input.preset uses "slug" as default, as per docs --- modules/system/assets/ui/js/input.preset.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/system/assets/ui/js/input.preset.js b/modules/system/assets/ui/js/input.preset.js index 64d43284a..59a89e83f 100644 --- a/modules/system/assets/ui/js/input.preset.js +++ b/modules/system/assets/ui/js/input.preset.js @@ -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 }