Вход Регистрация
Файл: concrete5.7.5.6/concrete/js/build/core/app/concrete5.js
Строк: 48
<?php
var Concrete = (function (ConcreteEvent, $) {
    
'use strict';

    var 
html = $('html');

    function 
getAttribute(attributeskey) {
        return 
attributes[key];
    }

    function 
setAttribute(attributeskeyvalue) {
        
key += ''// Make sure we always have a string.
        
var get_method 'get' key.substr(01).toUpperCase() + key.substr(1),
            
set_method 'set' key.substr(01).toUpperCase() + key.substr(1);
        if (
typeof this[get_method] == 'undefined') {
            
this[get_method] = _.partial(getAttributeattributeskey);
        }
        if (
typeof this[set_method] == 'undefined') {
            
this[set_method] = _.partial(setAttributeattributeskey);
        }

        
attributes[key] = value;
        return 
value;
    }

    return {
        
editModenull,
        
eventConcreteEvent,

        
/**
         * Create the getter / setter methods and attach them if they don't exist
         * @param  {Object} attributes Object containing the attributes to create getter/setters for.
         * @return {Boolean}           Success, always true.
         */
        
createGetterSetters: function generateGetterSetters(attributes) {
            var 
obj this;
            
obj.getAttr _.partial(getAttributeattributes);
            
obj.setAttr _.partial(setAttributeattributes);
            
_(attributes).each(function (valuekey) {
                
obj.setAttr(keyvalue);
            });
            return 
true;
        },

        
/**
         * Force a Refresh of the dom when we need to
         */
        
forceRefresh: function forceRefresh() {
            
html.hide(0, function(){
                $(
this).show();
            });
        },

        
/*
         * the next array will be automatically filled by a second script generated by Grunt
         */
        
const: {}

    };

}(
ConcreteEventjQuery));
?>
Онлайн: 1
Реклама