Updates for new input preset /form field API
This commit is contained in:
parent
8ca1f8b7a3
commit
ec14cd6bee
|
|
@ -69,7 +69,8 @@ if($.oc===undefined)
|
|||
$.oc={}
|
||||
$.oc.escapeHtmlString=function(string){var htmlEscapes={'&':'&','<':'<','>':'>','"':'"',"'":''','/':'/'},htmlEscaper=/[&<>"'\/]/g
|
||||
return(''+string).replace(htmlEscaper,function(match){return htmlEscapes[match];})}
|
||||
+function($){"use strict";var TriggerOn=function(element,options){var $el=this.$el=$(element);this.options=options||{};if(this.options.triggerCondition===false)
|
||||
+function($){"use strict";var TriggerOn=function(element,options){var $el=this.$el=$(element);this.options=options||{};if(this.options.triggerType!==false&&this.options.triggerAction===false)this.options.triggerAction=this.options.triggerType
|
||||
if(this.options.triggerCondition===false)
|
||||
throw new Error('Trigger condition is not specified.')
|
||||
if(this.options.trigger===false)
|
||||
throw new Error('Trigger selector is not specified.')
|
||||
|
|
|
|||
|
|
@ -36,6 +36,9 @@
|
|||
|
||||
this.options = options || {};
|
||||
|
||||
// @deprecated remove if year >= 2016
|
||||
if (this.options.triggerType !== false && this.options.triggerAction === false) this.options.triggerAction = this.options.triggerType
|
||||
|
||||
if (this.options.triggerCondition === false)
|
||||
throw new Error('Trigger condition is not specified.')
|
||||
|
||||
|
|
|
|||
|
|
@ -14,10 +14,9 @@ fields:
|
|||
span: right
|
||||
placeholder: /
|
||||
label: cms::lang.editor.url
|
||||
attributes:
|
||||
data-input-preset: 'input[name="settings[title]"]'
|
||||
data-input-preset-type: url
|
||||
data-input-preset-closest-parent: form
|
||||
preset:
|
||||
field: settings[title]
|
||||
type: url
|
||||
|
||||
toolbar:
|
||||
type: partial
|
||||
|
|
@ -32,10 +31,9 @@ tabs:
|
|||
tab: cms::lang.editor.settings
|
||||
span: left
|
||||
label: cms::lang.editor.filename
|
||||
attributes:
|
||||
data-input-preset: 'input[name="settings[title]"]'
|
||||
data-input-preset-type: file
|
||||
data-input-preset-closest-parent: form
|
||||
preset:
|
||||
field: settings[title]
|
||||
type: file
|
||||
|
||||
settings[layout]:
|
||||
tab: cms::lang.editor.settings
|
||||
|
|
|
|||
Loading…
Reference in New Issue