From 51446f6a27b5680ba062c5afba71f95c6fda7c46 Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Fri, 2 Oct 2015 05:11:39 +1000 Subject: [PATCH] Add alias for new Ini parser --- modules/system/aliases.php | 1 + modules/system/assets/ui/storm-min.js | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/system/aliases.php b/modules/system/aliases.php index d7859661f..8a89a8c46 100644 --- a/modules/system/aliases.php +++ b/modules/system/aliases.php @@ -51,6 +51,7 @@ return [ 'Str' => 'October\Rain\Support\Facades\Str', 'Markdown' => 'October\Rain\Support\Facades\Markdown', 'Yaml' => 'October\Rain\Support\Facades\Yaml', + 'Ini' => 'October\Rain\Support\Facades\Ini', 'Twig' => 'October\Rain\Support\Facades\Twig', 'DbDongle' => 'October\Rain\Support\Facades\DbDongle', 'Backend' => 'Backend\Facades\Backend', diff --git a/modules/system/assets/ui/storm-min.js b/modules/system/assets/ui/storm-min.js index aff7d5105..84a8c9d96 100644 --- a/modules/system/assets/ui/storm-min.js +++ b/modules/system/assets/ui/storm-min.js @@ -3398,13 +3398,11 @@ this.$el.on('change',function(){self.cancelled=true})} InputPreset.prototype.formatNamespace=function(){var value=toCamel(this.$src.val()) return value.substr(0,1).toUpperCase()+value.substr(1)} InputPreset.prototype.formatValue=function(){if(this.options.inputPresetType=='namespace'){return this.formatNamespace()} -if(this.options.inputPresetType=='camel') -var value=toCamel(this.$src.val()) +if(this.options.inputPresetType=='camel'){var value=toCamel(this.$src.val())} else{var value=slugify(this.$src.val())} -if(this.options.inputPresetType=='url') -value='/'+value +if(this.options.inputPresetType=='url'){value='/'+value} return value.replace(/\s/gi,"-")} -InputPreset.DEFAULTS={inputPreset:'',inputPresetType:'file',inputPresetClosestParent:undefined,inputPresetPrefixInput:undefined} +InputPreset.DEFAULTS={inputPreset:'',inputPresetType:'slug',inputPresetClosestParent:undefined,inputPresetPrefixInput:undefined} var old=$.fn.inputPreset $.fn.inputPreset=function(option){return this.each(function(){var $this=$(this) var data=$this.data('oc.inputPreset')