Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
CmsPage.prototype.onInspectorHidden = function(ev) {
var element = ev.target,
values = $.parseJSON($('[data-inspector-values]', element).val())
$('[name="component_aliases[]"]', element).val(values['oc.alias'])
$('span.alias', element).text(values['oc.alias'])
}
CmsPage.prototype.onInspectorHidden = function(ev) {
var element = ev.target,
values = $.parseJSON($('[data-inspector-values]', element).val())
$('[name="component_aliases[]"]', element).val(values['oc.alias'])
$('span.alias', element).text(values['oc.alias'])
}
CmsPage.prototype.onInspectorHiding = function(ev, values) {
var element = ev.target,
values = $.parseJSON($('[data-inspector-values]', element).val()),
alias = values['oc.alias'],
$componentList = $('#cms-master-tabs > div.tab-content > .tab-pane.active .control-componentlist .layout'),
$cell = $(ev.target).parent()
$('div.layout-cell', $componentList).each(function(){
if ($cell.get(0) == this)
return true
var $input = $('input[name="component_aliases[]"]', this)
if ($input.val() == alias) {
ev.preventDefault()
alert('The component alias "'+alias+'" is already used.')
return false
}
})
}
CmsPage.prototype.onInspectorHidden = function(ev) {
var element = ev.target,
values = $.parseJSON($('[data-inspector-values]', element).val())
$('[name="component_aliases[]"]', element).val(values['oc.alias'])
$('span.alias', element).text(values['oc.alias'])
}
CmsPage.prototype.onInspectorHidden = function(ev) {
var element = ev.target,
values = $.parseJSON($('[data-inspector-values]', element).val())
$('[name="component_aliases[]"]', element).val(values['oc.alias'])
$('span.alias', element).text(values['oc.alias'])
}
CmsPage.prototype.onInspectorHiding = function(ev, values) {
var element = ev.target,
values = $.parseJSON($('[data-inspector-values]', element).val()),
alias = values['oc.alias'],
$componentList = $('#cms-master-tabs > div.tab-content > .tab-pane.active .control-componentlist .layout'),
$cell = $(ev.target).parent()
$('div.layout-cell', $componentList).each(function(){
if ($cell.get(0) == this)
return true
var $input = $('input[name="component_aliases[]"]', this)
if ($input.val() == alias) {
ev.preventDefault()
alert('The component alias "'+alias+'" is already used.')
return false
}
})
}