------------------------------------------------------ custom elements
554756
public static <E> E resolveCustomElement(HTMLElement context, String identifier) {
        Element element = DATA_ELEMENT.select(context, identifier);
        E customElement = Js.cast(element);
        return customElement;
    }
723294
function(element) {
            var $element = $(element);
            if ($element.is(':selected')) {
                $element.prop('selected', true);
            }

            // Support the label attribute on options.
            var label = this.options.optionLabel(element);
            var value = $element.val();
            var inputType = this.options.multiple ? "checkbox" : "radio";

            var $li = $(this.options.templates.li);
            var $label = $('label', $li);
            $label.addClass(inputType);

            if (this.options.enableHTML) {
                $label.html(" " + label);
            }
            else {
                $label.text(" " + label);
            }

            var $checkbox = $('<input/>').attr('type', inputType);

            if (this.options.checkboxName) {
                $checkbox.attr('name', this.options.checkboxName);
            }
            $label.prepend($checkbox);

            var selected = $element.prop('selected') || false;
            $checkbox.val(value);

            if (value === this.options.selectAllValue) {
                $li.addClass("multiselect-item multiselect-all");
                $checkbox.parent().parent()
                    .addClass('multiselect-all');
            }

            $label.attr('title', $element.attr('title'));

            this.$ul.append($li);

            if ($element.is(':disabled')) {
                $checkbox.attr('disabled', 'disabled')
                    .prop('disabled', true)
                    .closest('a')
                    .attr("tabindex", "-1")
                    .closest('li')
                    .addClass('disabled');
            }

            $checkbox.prop('checked', selected);

            if (selected && this.options.selectedClass) {
                $checkbox.closest('li')
                    .addClass(this.options.selectedClass);
            }
        }
1168539
function() {
	
	   // Create a DIV element to wrap the editing el and the image
	   this.divEl = inputEx.cn('div', {className: 'inputEx-fieldWrapper'});
	   if(this.options.id) {
	      this.divEl.id = this.options.id;
	   }
	   if(this.options.required) {
	      Dom.addClass(this.divEl, "inputEx-required");
	   }
	   
	   // Label element
	   if (YAHOO.lang.isString(this.options.label)) {
	      this.labelDiv = inputEx.cn('div', {id: this.divEl.id+'-label', className: 'inputEx-label', 'for': this.divEl.id+'-field'});
	      this.labelEl = inputEx.cn('label', null, null, this.options.label === "" ? "&nbsp;" : this.options.label);
	      this.labelDiv.appendChild(this.labelEl);
	      this.divEl.appendChild(this.labelDiv);
      }
      
      this.fieldContainer = inputEx.cn('div', {className: this.options.className}); // for wrapping the field and description
	
      // Render the component directly
      this.renderComponent();
      
      // Description
      if(this.options.description) {
         this.fieldContainer.appendChild(inputEx.cn('div', {id: this.divEl.id+'-desc', className: 'inputEx-description'}, null, this.options.description));
      }
      
   	this.divEl.appendChild(this.fieldContainer);
      
	   // Insert a float breaker
	   this.divEl.appendChild( inputEx.cn('div',null, {clear: 'both'}," ") );
	
	}
1198717
function(el) {

      var menu, span;

      // set element
      el.setAttribute('hashedit-element', '');

      // create element menu
      menu = document.createElement('span');
      menu.setAttribute('class', 'hashedit-element-menu');
      menu.setAttribute('contentEditable', 'false');
      menu.innerHTML = '<label><i class="material-icons">more_vert</i> ' + hashedit.i18n('Content Menu') + '</label>';

      // create a handle
      span = document.createElement('span');
      span.setAttribute('class', 'hashedit-move');
      span.innerHTML = '<i class="material-icons">apps</i> ' + hashedit.i18n('Move');

      // append the handle to the wrapper
      menu.appendChild(span);

      span = document.createElement('span');
      span.setAttribute('class', 'hashedit-properties');
      span.innerHTML = '<i class="material-icons">settings</i> ' + hashedit.i18n('Settings');

      // append the handle to the wrapper
      menu.appendChild(span);

      span = document.createElement('span');
      span.setAttribute('class', 'hashedit-remove');
      span.innerHTML = '<i class="material-icons">cancel</i> ' + hashedit.i18n('Remove');

      // append the handle to the wrapper
      menu.appendChild(span);

      // append the handle to the wrapper
      el.appendChild(menu);

    }
28123
function(nodes, options) {
        var element;

        options = this.setOptions(options);
        this.element = element = this.createElement();

        // Nodes found in the page on initialization
        this.nodes = $(nodes);

        // The wrapping items element
        this.items = element.find(this.ns('items'));

        // The wrapping tabs element
        this.tabs = element.find(this.ns('tabs'));

        // The caption element
        this.caption = element.find(this.ns('caption'));

        // Blackout element if enabled
        if (options.blackout) {
            this.blackout = Blackout.instance();
        }

        // Initialize events
        this.addEvents([
            ['keydown', 'window', 'onKeydown'],
            ['click', 'document', 'onShow', '{selector}'],
            ['click', 'element', 'hide', this.ns('close')],
            ['click', 'element', 'next', this.ns('next')],
            ['click', 'element', 'prev', this.ns('prev')],
            ['click', 'element', 'onJump', this.ns('tabs') + ' a']
        ]);

        if (options.clickout) {
            this.addEvents([
                ['clickout', 'document', 'onHide', '{selector}'],
                ['clickout', 'element', 'onHide']
            ]);
        }

        if (options.swipe) {
            this.addEvents([
                ['swipeleft', 'element', 'next'],
                ['swiperight', 'element', 'prev']
            ]);
        }

        // Stop `transitionend` events from bubbling up when the showcase is resized
        this.addEvent(Toolkit.transitionEnd, 'element', function(e) {
            e.stopPropagation();
        }, this.ns('items'));

        this.initialize();
    }
1075541
function wrapElements(els, wrapper) {
  var wrapperEl = document.createElement(wrapper);

  // make sure elements are in an array
  if (els instanceof HTMLElement) {
    els = [els];
  } else {
    els = Array.prototype.slice.call(els);
  }

  _each(els, function (el) {
    // put it into the wrapper, remove it from its parent
    el.parentNode.removeChild(el);
    wrapperEl.appendChild(el);
  });

  // return the wrapped elements
  return wrapperEl;
}
195577
function () {
            if (!this.options) {
                this.options = [];
                if (this._domElt.options) {
                    for (var i = 0, l = this._domElt.options.length; i < l; i++) {
                        var elementToPush = {
                            value : this._domElt.options[i].value,
                            label : this._domElt.options[i].label
                        };
                        this.options.push(elementToPush);
                    }
                }
            }
        }
1213059
function upgradeElementsInternal(elements) {
    if (!Array.isArray(elements)) {
      if (elements instanceof Element) {
        elements = [elements];
      } else {
        elements = Array.prototype.slice.call(elements);
      }
    }
    for (var i = 0, n = elements.length, element; i < n; i++) {
      element = elements[i];
      if (element instanceof HTMLElement) {
        upgradeElementInternal(element);
        if (element.children.length > 0) {
          upgradeElementsInternal(element.children);
        }
      }
    }
  }
1199928
function Plugin( element ) {
        this.element = element;
        this.jqElement = $(element);
        this.isScaleActive = false;

        this._defaults = defaults;
        this._name = pluginName;
    }
974088
function(checkbox, options) {
        this.element = checkbox = $(checkbox);
        options = this.setOptions(options, checkbox);
        this.wrapper = this._buildWrapper();

        // Create custom input
        this.input = this.render(options.checkboxTemplate)
            .attr('for', checkbox.attr('id'))
            .insertAfter(checkbox);

        // Initialize events
        this.initialize();
    }
608577
function(el)
	{
		if (!conbo.isElement(el))
		{
			conbo.error('Invalid element passed to View');
			return;
		}
		
		var attrs = conbo.assign({}, this.attributes);
		
		if (this.id && !el.id) 
		{
			attrs.id = this.id;
		}
		
		if (this.style) 
		{
			conbo.assign(el.style, this.style);
		}
		
		var ep = __ep(el);
		
		el.cbView = this;
		
		ep.addClass('cb-view')
			.addClass(this.className)
			.setAttributes(attrs)
			;
		
		__definePrivateProperty(this, '__el', el);
		
		return this;
	}
1207112
function (name){
	this._elementTitle = name;
	var th = "";
	var t1 = "";
	var t2 = "";

	this._inpRow = ["<th>New Property</th>", "<td><input id='current-header' type='text' placeholder='Name'></td><td id='prop-feedback'></td>", "<td><input id='current-default' type='text' placeholder='default value'></td><td><input type='button' value='+' onclick='NewProperty()' /></td>"];

	this._Row = function (prop){

		th += this._inpRow[0];
		t1 += this._inpRow[1];
		t2 += this._inpRow[2];
	};
	this._AdvRow = function (prop){
		var newRow = ["<th>" + prop + "</th>", "<td></td>", "<td></td>"];
		th = newRow[0] + th;
		t1 = newRow[1] + t1;
		t2 = newRow[2] + t2;
	};

	this._Table = function (){
		var table = "<article id='element-" + this._elementTitle + "' class='element'><h2>" + this._elementTitle + "</h2><table id='new-element'><tr>" + th + "</tr><tr>" + t1 + "</tr><tr>" + t2 + "</tr></table><input type='button' value='Confirm' onclick='SendElement()'/></article>";
		return table;
	};
	this._append = "<form class='appendor' method='post' enctype='multipart/form-data' action='./modify/add/" + this._elementTitle + "'></form>";

	this._props = [];
	this._packet = {
		'_title' : name,
		'_fresh' : true
	};

	console.log("new element");
}
86523
function(element)
	{
		var i, l;

		this.element = element;

		this._rebindSubViews(element, {
			subviewIndex: 0,
			subviewsStructIndex: 0,
			index: 0
		});

		if(this._modelBindersMap)
		{
			this._modelBindersMap.setView(this);
		}

		if(this._collectionBinder)
		{
			this._collectionBinder.view = this;
		}

	}
156895
function(element, options) {
        element = this.setElement(element);
        options = this.setOptions(options);

        if (!options.target || !options.marker) {
            throw new Error('A marker and target is required');
        }

        if (element.css('overflow') === 'auto') {
            this.container = element;
        }

        // Initialize events
        this.addEvents([
            ['scroll', 'container', $.throttle(this.onScroll.bind(this), options.throttle)],
            ['ready', 'document', 'onScroll']
        ]);

        this.initialize();

        // Gather markets and targets
        this.refresh();
    }
1203430
function(element, options) {
        var that = this;
        that.name = NAME;
        that.$ = $(element);

        options = that.options = $.extend({}, DEFAULTS, this.$.data(), options);
        var lang   = options.lang || 'zh_cn';
        that.lang  = $.isPlainObject(lang) ? ($.extend(true, {}, LANG[lang.lang || $.zui.clientLang()], lang)) : LANG[lang];

        // Initialize here
        var $navbar = that.$.find('.tabs-navbar');
        if (!$navbar.length) {
            $navbar = $(options.navTemplate).appendTo(that.$);
        }
        that.$navbar = $navbar;

        var $nav = $navbar.find('.tabs-nav');
        if (!$nav.length) {
            $nav = $('<ul class="tabs-nav nav nav-tabs"></ul>').appendTo($navbar);
        }
        that.$nav = $nav;

        var $tabs = that.$.find('.tabs-container');
        if (!$tabs.length) {
            $tabs = $(options.containerTemplate).appendTo(that.$);
        }
        that.$tabs = $tabs;

        that.activeTabId = options.defaultTab;
        var tabs = options.tabs || [];
        that.tabs = {};
        $.each(tabs, function(index, item) {
            var tab = Tab.create(item);
            that.tabs[tab.id] = tab;

            if (!that.activeTabId) {
                that.activeTabId = tab.id;
            }

            that.renderTab(tab);
        });
        that.closedTabs = [];

        that.open(that.getActiveTab());

        $nav.on('click.' + NAME, '.tab-nav-link', function () {
            that.open(that.getTab($(this).data('id')));
        }).on('click.' + NAME, '.tab-nav-close', function (e) {
            that.close($(this).closest('.tab-nav-link').data('id'));
            e.stopPropagation();
        }).on('resize.' + NAME, function () {
            that.adjustNavs();
        });

        if (options.contextMenu) {
            $nav.contextmenu({
                selector: '.tab-nav-link',
                itemsCreator: function (e) {
                    return that.createMenuItems(that.getTab($(this).data('id')));
                },
                onShow: function () {
                    that.$.addClass('tabs-show-contextmenu');
                },
                onHide: function () {
                    that.$.removeClass('tabs-show-contextmenu');
                }
            });
        }
    }
1309773
protected void init() {

        m_elementMappings = new HashMap<String, List<String>>();
        m_elementWidgets = new HashMap<String, I_CmsWidget>();
        m_validationErrorRules = new HashMap<String, String>();
        m_validationErrorMessages = new HashMap<String, String>();
        m_validationWarningRules = new HashMap<String, String>();
        m_validationWarningMessages = new HashMap<String, String>();
        m_defaultValues = new HashMap<String, String>();
        m_configurationValues = new HashMap<String, String>();
        m_searchSettings = new HashMap<String, Boolean>();
        m_relations = new HashMap<String, CmsRelationType>();
        m_relationChecks = new HashMap<String, Boolean>();
        m_previewLocation = null;
        m_modelFolder = null;
        m_tabs = new ArrayList<CmsXmlContentTab>();
        m_cssHeadIncludes = new LinkedHashSet<String>();
        m_jsHeadIncludes = new LinkedHashSet<String>();
        m_settings = new LinkedHashMap<String, CmsXmlContentProperty>();
        m_titleMappings = new ArrayList<String>(2);
        m_formatters = new ArrayList<CmsFormatterBean>();
        m_searchFields = new HashMap<String, CmsSearchField>();
        m_searchFieldsPage = new HashMap<String, CmsSearchField>();
        m_allowedTemplates = new CmsDefaultSet<String>();
        m_allowedTemplates.setDefaultMembership(true);
        m_displayTypes = new HashMap<String, DisplayType>();
        m_synchronizations = new ArrayList<String>();
        m_editorChangeHandlers = new ArrayList<I_CmsXmlContentEditorChangeHandler>();
        m_nestedFormatterElements = new HashSet<String>();
        try (
        InputStream stream = CmsDefaultXmlContentHandler.class.getResourceAsStream("simple-searchsetting-configs.st")) {
            m_searchTemplateGroup = CmsStringUtil.readStringTemplateGroup(stream);
        } catch (IOException e) {
            LOG.error(e.getLocalizedMessage(), e);
        }
    }
1023465
function TagsInput(element, options) {
    this.isInit = true;
    this.itemsArray = [];

    this.$element = $(element);
    this.$element.hide();

    this.isSelect = (element.tagName === 'SELECT');
    this.multiple = (this.isSelect && element.hasAttribute('multiple'));
    this.objectItems = options && options.itemValue;
    this.placeholderText = element.hasAttribute('placeholder') ? this.$element.attr('placeholder') : '';
    this.inputSize = Math.max(1, this.placeholderText.length);

    this.$container = $('<div class="bootstrap-tagsinput"></div>');
    this.$input = $('<input type="text" placeholder="' + this.placeholderText + '"/>').appendTo(this.$container);

    this.$element.before(this.$container);

    this.build(options);
    this.isInit = false;
  }