Обработка тега "tabcontrol"

@param DOMNode $node  Элемент
@param string  $id    Идентификатор виджета вкладок
547950
protected function extendedNodeTabControl(DOMNode $node, $id)
	{
		$parent = $node->parentNode;

		/* Создаём замену для тега tabcontrol */
		$newNode = $this->xml->createElement('ul');
		/* Копируем в него содержимое tabcontrol */
		$childNodes = $this->childrenAsArray($node->childNodes);
		for ($i = 0; $i < count($childNodes); $i++)
		{
			$child = $childNodes[$i];
			$newNode->appendChild($child->cloneNode(true));
		}
		$parent->replaceChild($newNode, $node);

		$tabs = $this->childrenAsArray($newNode->getElementsByTagNameNS(self::NS, 'tab'));
		for ($i = 0; $i < count($tabs); $i++)
		{
			$this->extendedNodeTab($tabs[$i], $id);
		}

		return $newNode;
	}
506715
protected function renderControlWrapper($id, $element, $elementString, $description, $wrapper = null)
    {
        if (!$wrapper) {
            if ($element instanceof ButtonElement || $element instanceof SubmitElement) {
                return $elementString . $description;
            }
            $wrapper = $this->controlWrapper;
        }
        return sprintf($wrapper, $id, $elementString, $description);
    }
1280813
public function editBlockConfiguration(Tree $tree, int $block_id): void
    {
        $title          = $this->getBlockSetting($block_id, 'title', '');
        $html           = $this->getBlockSetting($block_id, 'html', '');
        $show_timestamp = $this->getBlockSetting($block_id, 'show_timestamp', '0');
        $languages      = explode(',', $this->getBlockSetting($block_id, 'languages'));
        $all_trees      = Tree::getNameList();

        $templates = [
            $html                                    => I18N::translate('Custom'),
            view('modules/html/template-keywords')   => I18N::translate('Keyword examples'),
            view('modules/html/template-narrative')  => I18N::translate('Narrative description'),
            view('modules/html/template-statistics') => I18N::translate('Statistics'),
        ];

        echo view('modules/html/config', [
            'all_trees'      => $all_trees,
            'html'           => $html,
            'languages'      => $languages,
            'show_timestamp' => $show_timestamp,
            'templates'      => $templates,
            'title'          => $title,
        ]);
    }
343907
public function execute(NodeData $node)
    {
        $node->setProperty($this->newPropertyName, $node->getProperty($this->oldPropertyName));
        $node->removeProperty($this->oldPropertyName);
    }
1301655
private function _retrieveNodeText(DOMNode $node, &$text)
    {
        if ($node->nodeType == XML_TEXT_NODE) {
            $text .= $node->nodeValue;
            if(!in_array($node->parentNode->tagName, $this->_inlineTags)) {
                $text .= ' ';
            }
        } else if ($node->nodeType == XML_ELEMENT_NODE  &&  $node->nodeName != 'script') {
            foreach ($node->childNodes as $childNode) {
                $this->_retrieveNodeText($childNode, $text);
            }
        }
    }
501660
public function removeElementFromTrash($id)
    {
        $query = $this->handler->createDeleteQuery();
        $query
            ->deleteFrom('ezcontentobject_trash')
            ->where(
                $query->expr->eq(
                    $this->handler->quoteColumn('node_id'),
                    $query->bindValue($id, null, \PDO::PARAM_INT)
                )
            );
        $query->prepare()->execute();
    }
251088
protected function checkNode(DOMNode $node, Tag $tag)
	{
		if ($node instanceof DOMAttr)
		{
			$this->checkAttributeNode($node, $tag);
		}
		elseif ($node instanceof DOMElement)
		{
			if ($node->namespaceURI === self::XMLNS_XSL && $node->localName === 'copy-of')
			{
				$this->checkCopyOfNode($node, $tag);
			}
			else
			{
				$this->checkElementNode($node, $tag);
			}
		}
	}
1234810
public function addTab(string $id, array $tab): void
	{
		$this->optionTabs[] = array_merge($tab, ['DIV' => $id]);
	}
521516
function controlledByATab(element) {
        var controlledBy = document.querySelectorAll('[role="tab"][aria-controls="' + element.id + '"]')
        return element.id && (controlledBy.length === 1);
    }
708071
protected function registerNode(\DOMNode $node)
    {
        if ($node->nodeType == XML_ELEMENT_NODE) {
            /** @var \DOMElement $node */
            $localContext = $this->elementProcessor->processElement($node, $this->initialContext);

            // Register the node context
            $localContextId = spl_object_hash($localContext);
            if (empty($this->contexts[$localContextId])) {
                $this->contexts[$localContextId] = $localContext;
            }

            $this->contextMap[$node->getNodePath()] = $localContextId;
        }

        return $node;
    }
353111
public function setInvisible(int $id): void
    {
        $sourceNodeData = $this->locationGateway->getBasicNodeData($id);

        $this->locationGateway->setNodeWithChildrenInvisible($sourceNodeData['path_string']);
    }
338941
protected function checkVariableDeclaration(DOMNode $node, $tag, $query)
	{
		$query = 'ancestor-or-self::*/preceding-sibling::' . $query . '[@select]';
		$xpath = new DOMXPath($node->ownerDocument);
		foreach ($xpath->query($query, $node) as $varNode)
		{
			// Intercept the UnsafeTemplateException and change the node to the one we're
			// really checking before rethrowing it
			try
			{
				$this->checkExpression($varNode, $varNode->getAttribute('select'), $tag);
			}
			catch (UnsafeTemplateException $e)
			{
				$e->setNode($node);

				throw $e;
			}
		}
	}
161543
function (ctrl, key, value, element) {
/*Line 33 - 'AtomControl.js' */        value = value.substr(1, value.length - 2);
/*Line 34 - 'AtomControl.js' */        var be = AtomEvaluator.parse(value);
/*Line 35 - 'AtomControl.js' */        if (be.length == 0) {
/*Line 36 - 'AtomControl.js' */            value = eval(value);
/*Line 37 - 'AtomControl.js' */            AtomBinder.setValue(ctrl, key, value);
/*Line 38 - 'AtomControl.js' */        } else {
/*Line 39 - 'AtomControl.js' */            if (be.length == 1 && be.path[0] == be.original) {
/*Line 40 - 'AtomControl.js' */                ctrl.bind(element, key, value, false);
/*Line 41 - 'AtomControl.js' */            }
/*Line 42 - 'AtomControl.js' */            else {
/*Line 43 - 'AtomControl.js' */                ctrl.bind(element, key, be.path, false, be.method);
/*Line 44 - 'AtomControl.js' */            }
/*Line 45 - 'AtomControl.js' */        }
/*Line 46 - 'AtomControl.js' */    }
627727
function(node) {
            var $activeCollapse = $(node);
            var $paneParent = $activeCollapse.closest('.tab-pane');
            var $paneID = $paneParent.attr('id');
            var $paneContainer = $activeCollapse.closest('.tab-content');

            $paneContainer.find('[data-cfw="collapse"]').each(function() {
                var $this = $(this);
                if ($this[0] === $activeCollapse[0]) {
                    return;
                }
                $this.CFW_Collapse('hide');
            });

            var $tabList = this.$element.find('[data-cfw="tab"]');
            $tabList.each(function() {
                var $this = $(this);
                var selector = $this.attr('data-cfw-tab-target');
                if (!selector) {
                    selector = $this.attr('href');
                }
                selector = selector.replace(/^#/, '');
                if (selector == $paneID) {
                    $this.one('beforeShow.cfw.tab', function(e) {
                            e.stopPropagation();
                        })
                        .CFW_Tab('show');
                }
            });
        }
774305
protected function checkVariable(DOMNode $node, $tag, $qname)
	{
		// Test whether this variable comes from a previous xsl:param or xsl:variable element
		$this->checkVariableDeclaration($node, $tag, 'xsl:param[@name="' . $qname . '"]');
		$this->checkVariableDeclaration($node, $tag, 'xsl:variable[@name="' . $qname . '"]');
	}
962821
function (element) {


/*Line 723 - 'AtomControl.js' */                var obj;
/*Line 724 - 'AtomControl.js' */                var key;
/*Line 725 - 'AtomControl.js' */                var value;
/*Line 726 - 'AtomControl.js' */                var fn;
/*Line 727 - 'AtomControl.js' */                var at;

/*Line 729 - 'AtomControl.js' */                var attr = element.attributes;
/*Line 730 - 'AtomControl.js' */                var ae = new AtomEnumerator(attr);

/*Line 732 - 'AtomControl.js' */                var remove = [];

/*Line 734 - 'AtomControl.js' */                var nodeValue = "value";
/*Line 735 - 'AtomControl.js' */                if (AtomBrowser.isIE && AtomBrowser.majorVersion < 9) {
/*Line 736 - 'AtomControl.js' */                    nodeValue = "nodeValue";
/*Line 737 - 'AtomControl.js' */                }

/*Line 739 - 'AtomControl.js' */                var bindList = {};

/*Line 741 - 'AtomControl.js' */                var compiledFunc = null;

/*Line 743 - 'AtomControl.js' */                while (ae.next()) {
/*Line 744 - 'AtomControl.js' */                    at = ae.current();
/*Line 745 - 'AtomControl.js' */                    key = at.nodeName;
/*Line 746 - 'AtomControl.js' */                    value = at[nodeValue];

/*Line 748 - 'AtomControl.js' */                    if (key === "data-atom-init") {
/*Line 749 - 'AtomControl.js' */                        compiledFunc = value;
/*Line 750 - 'AtomControl.js' */                        remove.push(at);
/*Line 751 - 'AtomControl.js' */                        continue;
/*Line 752 - 'AtomControl.js' */                    }
/*Line 753 - 'AtomControl.js' */                    if (/^data\-atom/.test(key)) {
/*Line 754 - 'AtomControl.js' */                        key = key.substr(5);
/*Line 755 - 'AtomControl.js' */                    }

/*Line 757 - 'AtomControl.js' */                    if (/^atomControl$/g.test(key)) {
/*Line 758 - 'AtomControl.js' */                        continue;
/*Line 759 - 'AtomControl.js' */                    }
/*Line 760 - 'AtomControl.js' */                    if (/^atom\-type$/.test(key)) {
/*Line 761 - 'AtomControl.js' */                        remove.push(at);
/*Line 762 - 'AtomControl.js' */                        continue;
/*Line 763 - 'AtomControl.js' */                    }
/*Line 764 - 'AtomControl.js' */                    if (!(/^(atom|bind|style|event)\-/g.test(key)))
/*Line 765 - 'AtomControl.js' */                        continue;
/*Line 766 - 'AtomControl.js' */                    if (!(/^(style|event)\-/g.test(key)))
/*Line 767 - 'AtomControl.js' */                        key = key.substr(5);

/*Line 769 - 'AtomControl.js' */                    if (!value)
/*Line 770 - 'AtomControl.js' */                        continue;

/*Line 772 - 'AtomControl.js' */                    if (!/(^style$|dock)/.test(key)) {
/*Line 773 - 'AtomControl.js' */                        remove.push(at);
/*Line 774 - 'AtomControl.js' */                    }

/*Line 776 - 'AtomControl.js' */                    // rename key...
/*Line 777 - 'AtomControl.js' */                    key = $.camelCase(key);

/*Line 779 - 'AtomControl.js' */                    bindList[key] = value;

/*Line 781 - 'AtomControl.js' */                }

/*Line 783 - 'AtomControl.js' */                if (compiledFunc) {
/*Line 784 - 'AtomControl.js' */                    var f = WebAtoms.PageSetup[compiledFunc];
/*Line 785 - 'AtomControl.js' */                    f.call(this, element);
/*Line 786 - 'AtomControl.js' */                }

/*Line 788 - 'AtomControl.js' */                // Since setValue may add up new attributes
/*Line 789 - 'AtomControl.js' */                // We set value after we have collected attribute list
/*Line 790 - 'AtomControl.js' */                for (key in bindList) {
/*Line 791 - 'AtomControl.js' */                    this.setValue(key, bindList[key], true, element);
/*Line 792 - 'AtomControl.js' */                }

/*Line 794 - 'AtomControl.js' */                ae = new AtomEnumerator(remove);
/*Line 795 - 'AtomControl.js' */                while (ae.next()) {
/*Line 796 - 'AtomControl.js' */                    //$(element).removeAttr(ae.current().nodeName);
/*Line 797 - 'AtomControl.js' */                    element.removeAttributeNode(ae.current());
/*Line 798 - 'AtomControl.js' */                }

/*Line 800 - 'AtomControl.js' */                var child = new ChildEnumerator(element);
/*Line 801 - 'AtomControl.js' */                while (child.next()) {
/*Line 802 - 'AtomControl.js' */                    var childItem = child.current();
/*Line 803 - 'AtomControl.js' */                    if (childItem.atomControl)
/*Line 804 - 'AtomControl.js' */                        continue;
/*Line 805 - 'AtomControl.js' */                    this.setProperties(childItem);
/*Line 806 - 'AtomControl.js' */                }

/*Line 808 - 'AtomControl.js' */            }
398124
public void retainNode(String id) {
        synchronized (retainedNodes) {
            Node current = getCurrentNode();

            if (current != null) {
                retainedNodes.put(id, current);
            }
        }
    }