%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 188.40.95.74 / Your IP : 216.73.216.10 Web Server : Apache System : Linux cp01.striminghost.net 3.10.0-1160.119.1.el7.tuxcare.els13.x86_64 #1 SMP Fri Nov 22 06:29:45 UTC 2024 x86_64 User : vlasotin ( 1054) PHP Version : 5.6.40 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/vlasotin/public_html/mojadmin/resources/tinymce/classes/ui/ |
Upload File : |
/** * SplitButton.js * * Copyright, Moxiecode Systems AB * Released under LGPL License. * * License: http://www.tinymce.com/license * Contributing: http://www.tinymce.com/contributing */ /** * Creates a split button. * * @-x-less SplitButton.less * @class tinymce.ui.SplitButton * @extends tinymce.ui.MenuButton */ define("tinymce/ui/SplitButton", [ "tinymce/ui/MenuButton", "tinymce/ui/DomUtils" ], function(MenuButton, DomUtils) { return MenuButton.extend({ Defaults: { classes: "widget btn splitbtn", role: "button" }, /** * Repaints the control after a layout operation. * * @method repaint */ repaint: function() { var self = this, elm = self.getEl(), rect = self.layoutRect(), mainButtonElm, menuButtonElm; self._super(); mainButtonElm = elm.firstChild; menuButtonElm = elm.lastChild; DomUtils.css(mainButtonElm, { width: rect.w - DomUtils.getSize(menuButtonElm).width, height: rect.h - 2 }); DomUtils.css(menuButtonElm, { height: rect.h - 2 }); return self; }, /** * Sets the active menu state. * * @private */ activeMenu: function(state) { var self = this; DomUtils.toggleClass(self.getEl().lastChild, self.classPrefix + 'active', state); }, /** * Renders the control as a HTML string. * * @method renderHtml * @return {String} HTML representing the control. */ renderHtml: function() { var self = this, id = self._id, prefix = self.classPrefix, image; var icon = self.settings.icon; image = self.settings.image; if (image) { icon = 'none'; // Support for [high dpi, low dpi] image sources if (typeof image != "string") { image = window.getSelection ? image[0] : image[1]; } image = ' style="background-image: url(\'' + image + '\')"'; } else { image = ''; } icon = self.settings.icon ? prefix + 'ico ' + prefix + 'i-' + icon : ''; return ( '<div id="' + id + '" class="' + self.classes() + '" role="button" tabindex="-1">' + '<button type="button" hidefocus="1" tabindex="-1">' + (icon ? '<i class="' + icon + '"' + image + '></i>' : '') + (self._text ? (icon ? ' ' : '') + self._text : '') + '</button>' + '<button type="button" class="' + prefix + 'open" hidefocus="1" tabindex="-1">' + //(icon ? '<i class="' + icon + '"></i>' : '') + (self._menuBtnText ? (icon ? '\u00a0' : '') + self._menuBtnText : '') + ' <i class="' + prefix + 'caret"></i>' + '</button>' + '</div>' ); }, /** * Called after the control has been rendered. * * @method postRender */ postRender: function() { var self = this, onClickHandler = self.settings.onclick; self.on('click', function(e) { var node = e.target; if (e.control == this) { // Find clicks that is on the main button while (node) { if ((e.aria && e.aria.key != 'down') || (node.nodeName == 'BUTTON' && node.className.indexOf('open') == -1)) { e.stopImmediatePropagation(); onClickHandler.call(this, e); return; } node = node.parentNode; } } }); delete self.settings.onclick; return self._super(); } }); });