Орла
Области
Компаний
Пользователи
Галерея
Фиксированные новости
Орла
Отзывы о фирмах
Тарифы
Пользователи
Области
Банкоматы
Торговые точки
Доска объявлений
Курсы валют
Скидки
организации Орла
организации области
товары
сайты
сайты Орел
Данные
Разделы
Поиск
Поиск запросы
Статистика
Показы каталога организаций
Статистика клиенты
Пользователи
Сайты
Управление сайтом
Анкета
Аптеки
Афиша
Афиша новая
Баннеры
Бизнес >
Викторина
Голосование
Гость на сайте
Истории
Календарь событий
Каталоги >
Конкурс красоты
Конкурс аудио
Консультации
Меню
Новое на сайте
Новости >
Организации >
Программа ТВ
Публикации
Разделы сайта
Рассылка
Рестораны
Секрет фирмы >
Сервисы >
Ссылки
Тесты
Файловый менеджер
Форум
Фотогалерея
Обратная связь
Недвижимость
Новый год
Тексты
Пользователи
Юридический рейтинг
Отзывы на товары
Бан пользователей
Жалобы
Новые тесты
Коронавирус
Файловый менеджер
Имя файла
fcktoolbarstylecombo.js
Содержимое
п»ї/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKToolbarPanelButton Class: Handles the Fonts combo selector. */ var FCKToolbarStyleCombo = function( tooltip, style ) { if ( tooltip === false ) return ; this.CommandName = 'Style' ; this.Label = this.GetLabel() ; this.Tooltip = tooltip ? tooltip : this.Label ; this.Style = style ? style : FCK_TOOLBARITEM_ICONTEXT ; this.DefaultLabel = FCKConfig.DefaultStyleLabel || '' ; } // Inherit from FCKToolbarSpecialCombo. FCKToolbarStyleCombo.prototype = new FCKToolbarSpecialCombo ; FCKToolbarStyleCombo.prototype.GetLabel = function() { return FCKLang.Style ; } FCKToolbarStyleCombo.prototype.GetStyles = function() { var styles = {} ; var allStyles = FCK.ToolbarSet.CurrentInstance.Styles.GetStyles() ; for ( var styleName in allStyles ) { var style = allStyles[ styleName ] ; if ( !style.IsCore ) styles[ styleName ] = style ; } return styles ; } FCKToolbarStyleCombo.prototype.CreateItems = function( targetSpecialCombo ) { var targetDoc = targetSpecialCombo._Panel.Document ; // Add the Editor Area CSS to the panel so the style classes are previewed correctly. FCKTools.AppendStyleSheet( targetDoc, FCKConfig.ToolbarComboPreviewCSS ) ; FCKTools.AppendStyleString( targetDoc, FCKConfig.EditorAreaStyles ) ; targetDoc.body.className += ' ForceBaseFont' ; // Add ID and Class to the body. FCKConfig.ApplyBodyAttributes( targetDoc.body ) ; // Get the styles list. var styles = this.GetStyles() ; for ( var styleName in styles ) { var style = styles[ styleName ] ; // Object type styles have no preview. var caption = style.GetType() == FCK_STYLE_OBJECT ? styleName : FCKToolbarStyleCombo_BuildPreview( style, style.Label || styleName ) ; var item = targetSpecialCombo.AddItem( styleName, caption ) ; item.Style = style ; } // We must prepare the list before showing it. targetSpecialCombo.OnBeforeClick = this.StyleCombo_OnBeforeClick ; } FCKToolbarStyleCombo.prototype.RefreshActiveItems = function( targetSpecialCombo ) { var startElement = FCK.ToolbarSet.CurrentInstance.Selection.GetBoundaryParentElement( true ) ; if ( startElement ) { var path = new FCKElementPath( startElement ) ; var elements = path.Elements ; for ( var e = 0 ; e < elements.length ; e++ ) { for ( var i in targetSpecialCombo.Items ) { var item = targetSpecialCombo.Items[i] ; var style = item.Style ; if ( style.CheckElementRemovable( elements[ e ], true ) ) { targetSpecialCombo.SetLabel( style.Label || style.Name ) ; return ; } } } } targetSpecialCombo.SetLabel( this.DefaultLabel ) ; } FCKToolbarStyleCombo.prototype.StyleCombo_OnBeforeClick = function( targetSpecialCombo ) { // Two things are done here: // - In a control selection, get the element name, so we'll display styles // for that element only. // - Select the styles that are active for the current selection. // Clear the current selection. targetSpecialCombo.DeselectAll() ; var startElement ; var path ; var tagName ; var selection = FCK.ToolbarSet.CurrentInstance.Selection ; if ( selection.GetType() == 'Control' ) { startElement = selection.GetSelectedElement() ; tagName = startElement.nodeName.toLowerCase() ; } else { startElement = selection.GetBoundaryParentElement( true ) ; path = new FCKElementPath( startElement ) ; } for ( var i in targetSpecialCombo.Items ) { var item = targetSpecialCombo.Items[i] ; var style = item.Style ; if ( ( tagName && style.Element == tagName ) || ( !tagName && style.GetType() != FCK_STYLE_OBJECT ) ) { item.style.display = '' ; if ( ( path && style.CheckActive( path ) ) || ( !path && style.CheckElementRemovable( startElement, true ) ) ) targetSpecialCombo.SelectItem( style.Name ) ; } else item.style.display = 'none' ; } } function FCKToolbarStyleCombo_BuildPreview( style, caption ) { var styleType = style.GetType() ; var html = [] ; if ( styleType == FCK_STYLE_BLOCK ) html.push( '<div class="BaseFont">' ) ; var elementName = style.Element ; // Avoid <bdo> in the preview. if ( elementName == 'bdo' ) elementName = 'span' ; html = [ '<', elementName ] ; // Assign all defined attributes. var attribs = style._StyleDesc.Attributes ; if ( attribs ) { for ( var att in attribs ) { html.push( ' ', att, '="', style.GetFinalAttributeValue( att ), '"' ) ; } } // Assign the style attribute. if ( style._GetStyleText().length > 0 ) html.push( ' style="', style.GetFinalStyleValue(), '"' ) ; html.push( '>', caption, '</', elementName, '>' ) ; if ( styleType == FCK_STYLE_BLOCK ) html.push( '</div>' ) ; return html.join( '' ) ; }
/admin/fckeditor/editor/_source/classes/
Имя
Дата
Размер
..
2013-04-27
fckcontextmenu.js
2010-02-15
6 кб.
fckdataprocessor.js
2010-02-15
4 кб.
fckdocumentfragment_gecko.js
2010-02-15
2 кб.
fckdocumentfragment_ie.js
2010-02-15
2 кб.
fckdomrange.js
2010-02-15
27 кб.
fckdomrange_gecko.js
2010-02-15
3 кб.
fckdomrange_ie.js
2010-02-15
6 кб.
fckdomrangeiterator.js
2010-02-15
10 кб.
fckeditingarea.js
2010-02-15
12 кб.
fckelementpath.js
2010-02-15
2 кб.
fckenterkey.js
2010-02-15
21 кб.
fckevents.js
2010-02-15
2 кб.
fckhtmliterator.js
2010-02-15
3 кб.
fckicon.js
2010-02-15
3 кб.
fckiecleanup.js
2010-02-15
2 кб.
fckimagepreloader.js
2010-02-15
2 кб.
fckkeystrokehandler.js
2010-02-15
4 кб.
fckmenublock.js
2010-02-15
4 кб.
fckmenublockpanel.js
2010-02-15
2 кб.
fckmenuitem.js
2010-02-15
4 кб.
fckpanel.js
2010-02-15
14 кб.
fckplugin.js
2010-02-15
2 кб.
fckspecialcombo.js
2010-02-15
11 кб.
fckstyle.js
2010-02-15
46 кб.
fcktoolbar.js
2010-02-15
3 кб.
fcktoolbarbreak_gecko.js
2010-02-15
1 кб.
fcktoolbarbreak_ie.js
2010-02-15
1 кб.
fcktoolbarbutton.js
2010-02-15
2 кб.
fcktoolbarbuttonui.js
2010-02-15
6 кб.
fcktoolbarfontformatcombo.js
2010-02-15
4 кб.
fcktoolbarfontscombo.js
2010-02-15
2 кб.
fcktoolbarfontsizecombo.js
2010-02-15
2 кб.
fcktoolbarpanelbutton.js
2010-02-15
3 кб.
fcktoolbarspecialcombo.js
2010-02-15
4 кб.
fcktoolbarstylecombo.js
2010-02-15
5 кб.
fckw3crange.js
2010-02-15
13 кб.
fckxml.js
2010-02-15
2 кб.
fckxml_gecko.js
2010-02-15
3 кб.
fckxml_ie.js
2010-02-15
2 кб.
/admin/fckeditor/editor/_source/classes
Загрузить файлы
Файл 1
Файл 2
Файл 3