/dev/qulogic/ckeditor: 510024b27299: Decompress the skin's JS file.
Elliott Sales de Andrade
qulogic at pidgin.im
Fri Aug 9 03:13:29 EDT 2013
Changeset: 510024b27299b1d0e53365cdeea5e0728c910b18
Author: Elliott Sales de Andrade <qulogic at pidgin.im>
Date: 2013-08-07 20:25 -0400
Branch: default
URL: https://hg.pidgin.im/dev/qulogic/ckeditor/rev/510024b27299
Description:
Decompress the skin's JS file.
diffstat:
pidgin/ckeditor/skins/pidgin/skin.js | 226 ++++++++++++++++++++++++++++++=
+++-
1 files changed, 216 insertions(+), 10 deletions(-)
diffs (230 lines):
diff --git a/pidgin/ckeditor/skins/pidgin/skin.js b/pidgin/ckeditor/skins/p=
idgin/skin.js
--- a/pidgin/ckeditor/skins/pidgin/skin.js
+++ b/pidgin/ckeditor/skins/pidgin/skin.js
@@ -1,10 +1,216 @@
-=EF=BB=BF/*
- Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserve=
d.
- For licensing, see LICENSE.md or http://ckeditor.com/license
-*/
-CKEDITOR.skin.name=3D"pidgin";
-CKEDITOR.skin.chameleon=3Dfunction(){var b=3Dfunction(){return function(b,=
e){for(var a=3Db.match(/[^#]./g),c=3D0;3>c;c++){var f=3Da,h=3Dc,d;d=3Dparse=
Int(a[c],16);d=3D("0"+(0>e?0|d*(1+e):0|d+(255-d)*e).toString(16)).slice(-2)=
;f[h]=3Dd}return"#"+a.join("")}}(),c=3Dfunction(){var b=3Dnew CKEDITOR.temp=
late("background:#{to};background-image:-webkit-gradient(linear,lefttop,lef=
tbottom,from({from}),to({to}));background-image:-moz-linear-gradient(top,{f=
rom},{to});background-image:-webkit-linear-gradient(top,{from},{to});backgr=
ound-image:-o-linear-gradient(top,{from},{to});background-image:-ms-linear-=
gradient(top,{from},{to});background-image:linear-gradient(top,{from},{to})=
;filter:progid:DXImageTransform.Microsoft.gradient(gradientType=3D0,startCo=
lorstr=3D'{from}',endColorstr=3D'{to}');");return function(c,
-a){return b.output({from:c,to:a})}}(),f=3D{editor:new CKEDITOR.template("{=
id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ {defaultGrad=
ient}border-bottom-color:{defaultBorder};] {id} .cke_bottom [{defaultGradie=
nt}border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color=
:{ckeResizer}] {id} .cke_dialog_title [{defaultGradient}border-bottom-color=
:{defaultBorder};] {id} .cke_dialog_footer [{defaultGradient}outline-color:=
{defaultBorder};border-top-color:{defaultBorder};] {id} .cke_dialog_tab [{l=
ightGradient}border-color:{defaultBorder};] {id} .cke_dialog_tab:hover [{me=
diumGradient}] {id} .cke_dialog_contents [border-top-color:{defaultBorder};=
] {id} .cke_dialog_tab_selected, {id} .cke_dialog_tab_selected:hover [backg=
round:{dialogTabSelected};border-bottom-color:{dialogTabSelectedBorder};] {=
id} .cke_dialog_body [background:{dialogBody};border-color:{defaultBorder};=
] {id} .cke_toolgroup [{lightGradient}border-color:{defaultBorder};] {id} a=
.cke_button_off:hover, {id} a.cke_button_off:focus, {id} a.cke_button_off:a=
ctive [{mediumGradient}] {id} .cke_button_on [{ckeButtonOn}] {id} .cke_tool=
bar_separator [background-color: {ckeToolbarSeparator};] {id} .cke_combo_bu=
tton [border-color:{defaultBorder};{lightGradient}] {id} a.cke_combo_button=
:hover, {id} a.cke_combo_button:focus, {id} .cke_combo_on a.cke_combo_butto=
n [border-color:{defaultBorder};{mediumGradient}] {id} .cke_path_item [colo=
r:{elementsPathColor};] {id} a.cke_path_item:hover, {id} a.cke_path_item:fo=
cus, {id} a.cke_path_item:active [background-color:{elementsPathBg};] {id}.=
cke_panel [border-color:{defaultBorder};] "),
-panel:new CKEDITOR.template(".cke_panel_grouptitle [{lightGradient}border-=
color:{defaultBorder};] .cke_menubutton_icon [background-color:{menubuttonI=
con};] .cke_menubutton:hover .cke_menubutton_icon, .cke_menubutton:focus .c=
ke_menubutton_icon, .cke_menubutton:active .cke_menubutton_icon [background=
-color:{menubuttonIconHover};] .cke_menuseparator [background-color:{menubu=
ttonIcon};] a:hover.cke_colorbox, a:focus.cke_colorbox, a:active.cke_colorb=
ox [border-color:{defaultBorder};] a:hover.cke_colorauto, a:hover.cke_color=
more, a:focus.cke_colorauto, a:focus.cke_colormore, a:active.cke_colorauto,=
a:active.cke_colormore [background-color:{ckeColorauto};border-color:{defa=
ultBorder};] ")};
-return function(g,e){var a=3Dg.uiColor,a=3D{id:"."+g.id,defaultBorder:b(a,=
-0.1),defaultGradient:c(b(a,0.9),a),lightGradient:c(b(a,1),b(a,0.7)),medium=
Gradient:c(b(a,0.8),b(a,0.5)),ckeButtonOn:c(b(a,0.6),b(a,0.7)),ckeResizer:b=
(a,-0.4),ckeToolbarSeparator:b(a,0.5),ckeColorauto:b(a,0.8),dialogBody:b(a,=
0.7),dialogTabSelected:c("#FFFFFF","#FFFFFF"),dialogTabSelectedBorder:"#FFF=
",elementsPathColor:b(a,-0.6),elementsPathBg:a,menubuttonIcon:b(a,0.5),menu=
buttonIconHover:b(a,0.3)};return f[e].output(a).replace(/\[/g,
-"{").replace(/\]/g,"}")}}();
+/* pidgin
+ *
+ * Pidgin is the legal property of its developers, whose names are too num=
erous
+ * to list here. Please refer to the COPYRIGHT file distributed with this
+ * source distribution.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-13=
01 USA
+ *
+ */
+
+CKEDITOR.skin.name =3D 'pidgin';
+CKEDITOR.skin.chameleon =3D (function() {
+ // This method can be used to adjust colour brightness of various element.
+ // Colours are accepted in 7-byte hex format, for example: #00ff00.
+ // Brightness ratio must be a float number within [-1, 1],
+ // where -1 is black, 1 is white and 0 is the original colour.
+ var colorBrightness =3D (function() {
+ function channelBrightness( channel, ratio ) {
+ return ( '0' + ( ratio < 0 ?
+ 0 | channel * ( 1 + ratio )
+ :
+ 0 | channel + ( 255 - channel ) * ratio ).toString( 16 )
+ ).slice( -2 );
+ }
+
+ return function( hexColor, ratio ) {
+ var channels =3D hexColor.match( /[^#]./g );
+
+ for ( var i =3D 0 ; i < 3 ; i++ )
+ channels[ i ] =3D channelBrightness( parseInt( channels[ i ], 16 ), ra=
tio );
+
+ return '#' + channels.join( '' );
+ };
+ })(),
+
+ // Use this function just to avoid having to repeat all these rules on
+ // several places of our template.
+ verticalGradient =3D (function() {
+ var template =3D new CKEDITOR.template( 'background:#{to};'+
+ 'background-image:-webkit-gradient(linear,lefttop,leftbottom,from({from=
}),to({to}));'+
+ 'background-image:-moz-linear-gradient(top,{from},{to});'+
+ 'background-image:-webkit-linear-gradient(top,{from},{to});'+
+ 'background-image:-o-linear-gradient(top,{from},{to});'+
+ 'background-image:-ms-linear-gradient(top,{from},{to});'+
+ 'background-image:linear-gradient(top,{from},{to});'+
+ 'filter:progid:DXImageTransform.Microsoft.gradient(gradientType=3D0,sta=
rtColorstr=3D\'{from}\',endColorstr=3D\'{to}\');' );
+
+ return function( from, to ) {
+ return template.output( { from: from, to: to } );
+ };
+ })(),
+
+ // Style templates for various user interface parts:
+ // * Default editor template.
+ // * Default panel template.
+ templates =3D {
+ editor: new CKEDITOR.template(
+ '{id}.cke_chrome [border-color:{defaultBorder};] ' +
+ '{id} .cke_top [ ' +
+ '{defaultGradient}' +
+ 'border-bottom-color:{defaultBorder};' +
+ '] ' +
+ '{id} .cke_bottom [' +
+ '{defaultGradient}' +
+ 'border-top-color:{defaultBorder};' +
+ '] ' +
+ '{id} .cke_resizer [border-right-color:{ckeResizer}] ' +
+
+ // Dialogs.
+ '{id} .cke_dialog_title [' +
+ '{defaultGradient}' +
+ 'border-bottom-color:{defaultBorder};' +
+ '] ' +
+ '{id} .cke_dialog_footer [' +
+ '{defaultGradient}' +
+ 'outline-color:{defaultBorder};' +
+ 'border-top-color:{defaultBorder};' + // IE7 doesn't use outline.
+ '] ' +
+ '{id} .cke_dialog_tab [' +
+ '{lightGradient}' +
+ 'border-color:{defaultBorder};' +
+ '] ' +
+ '{id} .cke_dialog_tab:hover [' +
+ '{mediumGradient}' +
+ '] ' +
+ '{id} .cke_dialog_contents [' +
+ 'border-top-color:{defaultBorder};' +
+ '] ' +
+ '{id} .cke_dialog_tab_selected, {id} .cke_dialog_tab_selected:hover [' +
+ 'background:{dialogTabSelected};' +
+ 'border-bottom-color:{dialogTabSelectedBorder};' +
+ '] ' +
+ '{id} .cke_dialog_body [' +
+ 'background:{dialogBody};' +
+ 'border-color:{defaultBorder};' +
+ '] ' +
+
+ // Toolbars, buttons.
+ '{id} .cke_toolgroup [' +
+ '{lightGradient}' +
+ 'border-color:{defaultBorder};' +
+ '] ' +
+ '{id} a.cke_button_off:hover, {id} a.cke_button_off:focus, {id} a.cke_b=
utton_off:active [' +
+ '{mediumGradient}' +
+ '] ' +
+ '{id} .cke_button_on [' +
+ '{ckeButtonOn}' +
+ '] ' +
+ '{id} .cke_toolbar_separator [' +
+ 'background-color: {ckeToolbarSeparator};' +
+ '] ' +
+
+ // Combo buttons.
+ '{id} .cke_combo_button [' +
+ 'border-color:{defaultBorder};' +
+ '{lightGradient}' +
+ '] ' +
+ '{id} a.cke_combo_button:hover, {id} a.cke_combo_button:focus, {id} .ck=
e_combo_on a.cke_combo_button [' +
+ 'border-color:{defaultBorder};' +
+ '{mediumGradient}' +
+ '] ' +
+
+ // Elementspath.
+ '{id} .cke_path_item [' +
+ 'color:{elementsPathColor};' +
+ '] ' +
+ '{id} a.cke_path_item:hover, {id} a.cke_path_item:focus, {id} a.cke_pat=
h_item:active [' +
+ 'background-color:{elementsPathBg};' +
+ '] ' +
+
+ '{id}.cke_panel [' +
+ 'border-color:{defaultBorder};' +
+ '] '
+ ),
+ panel: new CKEDITOR.template(
+ // Panel drop-downs.
+ '.cke_panel_grouptitle [' +
+ '{lightGradient}' +
+ 'border-color:{defaultBorder};' +
+ '] ' +
+
+ // Context menus.
+ '.cke_menubutton_icon [' +
+ 'background-color:{menubuttonIcon};' +
+ '] ' +
+ '.cke_menubutton:hover .cke_menubutton_icon, .cke_menubutton:focus .cke=
_menubutton_icon, .cke_menubutton:active .cke_menubutton_icon [' +
+ 'background-color:{menubuttonIconHover};' +
+ '] ' +
+ '.cke_menuseparator [' +
+ 'background-color:{menubuttonIcon};' +
+ '] ' +
+
+ // Color boxes.
+ 'a:hover.cke_colorbox, a:focus.cke_colorbox, a:active.cke_colorbox [' +
+ 'border-color:{defaultBorder};' +
+ '] ' +
+ 'a:hover.cke_colorauto, a:hover.cke_colormore, a:focus.cke_colorauto, a=
:focus.cke_colormore, a:active.cke_colorauto, a:active.cke_colormore [' +
+ 'background-color:{ckeColorauto};' +
+ 'border-color:{defaultBorder};' +
+ '] '
+ )
+ };
+
+ return function( editor, part ) {
+ var uiColor =3D editor.uiColor,
+ // The following are CSS styles used in templates.
+ // Styles are generated according to current editor.uiColor.
+ templateStyles =3D {
+ // CKEditor instances have a unique ID, which is used as class name in=
to
+ // the outer container of the editor UI (e.g. ".cke_1").
+ //
+ // The Chameleon feature is available for each CKEditor instance,
+ // independently. Because of this, we need to prefix all CSS selectors=
with
+ // the unique class name of the instance.
+ id: '.' + editor.id,
+
+ // These styles are used by various UI elements.
+ defaultBorder: colorBrightness( uiColor, -0.1 ),
+ defaultGradient: verticalGradient( colorBrightness( uiColor, 0.9 ), ui=
Color ),
+ lightGradient: verticalGradient( colorBrightness( uiColor, 1 ), colorB=
rightness( uiColor, 0.7 ) ),
+ mediumGradient: verticalGradient( colorBrightness( uiColor, 0.8 ), col=
orBrightness( uiColor, 0.5 ) ),
+
+ // These are for specific UI elements.
+ ckeButtonOn: verticalGradient( colorBrightness( uiColor, 0.6 ), colorB=
rightness( uiColor, 0.7 ) ),
+ ckeResizer: colorBrightness( uiColor, -0.4 ),
+ ckeToolbarSeparator: colorBrightness( uiColor, 0.5 ),
+ ckeColorauto: colorBrightness( uiColor, 0.8 ),
+ dialogBody: colorBrightness( uiColor, 0.7 ),
+ // Use gradient instead of simple hex to avoid further filter resettin=
g in IE.
+ dialogTabSelected: verticalGradient( '#FFFFFF', '#FFFFFF' ),
+ dialogTabSelectedBorder: '#FFF',
+ elementsPathColor: colorBrightness( uiColor, -0.6 ),
+ elementsPathBg: uiColor,
+ menubuttonIcon: colorBrightness( uiColor, 0.5 ),
+ menubuttonIconHover: colorBrightness( uiColor, 0.3 )
+ };
+
+ return templates[ part ]
+ .output( templateStyles )
+ .replace( /\[/g, '{' ) // Replace brackets with braces.
+ .replace( /\]/g, '}' );
+ };
+})();
+
More information about the Commits
mailing list