How to use the oc.alias function in oc

To help you get started, we’ve selected a few oc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ivandoric / Making-Websites-With-October-CMS / modules / cms / assets / js / october.cmspage.js View on Github external
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'])
    }
github ivandoric / Making-Websites-With-October-CMS / modules / cms / assets / js / october.cmspage.js View on Github external
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'])
    }
github octobercms / october / modules / cms / assets / js / october.cmspage.js View on Github external
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
           }
        })
    }
github octobercms / october / modules / cms / assets / js / october.cmspage.js View on Github external
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'])
    }
github octobercms / october / modules / cms / assets / js / october.cmspage.js View on Github external
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'])
    }
github ivandoric / Making-Websites-With-October-CMS / modules / cms / assets / js / october.cmspage.js View on Github external
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
           }
        })
    }

oc

A framework for developing and distributing html components

MIT
Latest version published 27 days ago

Package Health Score

78 / 100
Full package analysis