Index: _source/plugins/devtools/lang/en.js
===================================================================
--- _source/plugins/devtools/lang/en.js (revision 0)
+++ _source/plugins/devtools/lang/en.js (revision 0)
@@ -0,0 +1,16 @@
+/*
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'devtools', 'en',
+{
+ devTools :
+ {
+ title : 'Element Information',
+ dialogName : 'Dialog window name',
+ tabName : 'Tab name',
+ elementId : 'Element ID',
+ elementType : 'Element type'
+ }
+});
Index: _source/plugins/devtools/plugin.js
===================================================================
--- _source/plugins/devtools/plugin.js (revision 0)
+++ _source/plugins/devtools/plugin.js (revision 0)
@@ -0,0 +1,173 @@
+/*
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.add( 'devtools',
+{
+ lang : [ 'en' ],
+
+ init : function( editor )
+ {
+ editor._.showDialogDefinitionTooltips = 1;
+ },
+ onLoad : function()
+ {
+ CKEDITOR.document.appendStyleText( CKEDITOR.config.devtools_styles ||
+ '#cke_tooltip { padding: 5px; border: 2px solid #333; background: #ffffff }' +
+ '#cke_tooltip h2 { font-size: 1.1em; border-bottom: 1px solid; margin: 0; padding: 1px; }' +
+ '#cke_tooltip ul { padding: 0pt; list-style-type: none; }' );
+ }
+});
+
+(function()
+{
+ function defaultCallback( editor, dialog, element, tabName )
+ {
+ var lang = editor.lang.devTools,
+ link = '' + ( element ? element.type : 'content' ) + '',
+ str =
+ '
' + lang.title + '
' +
+ '' +
+ '- ' + lang.dialogName + ' : ' + dialog.getName() + '
' +
+ '- ' + lang.tabName + ' : ' + tabName + '
';
+
+ if ( element )
+ str += '- ' + lang.elementId + ' : ' + element.id + '
';
+
+ str += '- ' + lang.elementType + ' : ' + link + '
';
+
+ return str + '
';
+ }
+
+ function showTooltip( callback, el, editor, dialog, obj, tabName )
+ {
+ var pos = el.getDocumentPosition(),
+ styles = { 'z-index' : CKEDITOR.dialog._.currentZIndex + 10, top : ( pos.y + el.getSize( 'height' ) ) + 'px' };
+
+ tooltip.setHtml( callback( editor, dialog, obj, tabName ) );
+ tooltip.show();
+
+ // Translate coordinate for RTL.
+ if ( editor.lang.dir == 'rtl' )
+ {
+ var viewPaneSize = CKEDITOR.document.getWindow().getViewPaneSize();
+ styles.right = ( viewPaneSize.width - pos.x - el.getSize( 'width' ) ) + 'px';
+ }
+ else
+ styles.left = pos.x + 'px';
+
+ tooltip.setStyles( styles );
+ }
+
+ var tooltip;
+ CKEDITOR.on( 'reset', function()
+ {
+ tooltip && tooltip.remove();
+ tooltip = null;
+ });
+
+ CKEDITOR.on( 'dialogDefinition', function( evt )
+ {
+ var editor = evt.editor;
+ if ( editor._.showDialogDefinitionTooltips )
+ {
+ if ( !tooltip )
+ {
+ tooltip = CKEDITOR.dom.element.createFromHtml( '', CKEDITOR.document );
+ tooltip.hide();
+ tooltip.on( 'mouseover', function(){ this.show(); } );
+ tooltip.on( 'mouseout', function(){ this.hide(); } );
+ tooltip.appendTo( CKEDITOR.document.getBody() );
+ }
+
+ var dialog = evt.data.definition.dialog,
+ callback = editor.config.devtools_textCallback || defaultCallback;
+
+ dialog.on( 'load', function()
+ {
+ var tabs = dialog.parts.tabs.getChildren(), tab;
+ for ( var i = 0, len = tabs.count(); i < len; i++ )
+ {
+ tab = tabs.getItem( i );
+ tab.on( 'mouseover', function()
+ {
+ var id = this.$.id;
+ showTooltip( callback, this, editor, dialog, null, id.substring( 4, id.lastIndexOf( '_' ) ) );
+ });
+ tab.on( 'mouseout', function()
+ {
+ tooltip.hide();
+ });
+ }
+
+ dialog.foreach( function( obj )
+ {
+ if ( obj.type in { hbox : 1, vbox : 1 } )
+ return;
+
+ var el = obj.getElement();
+ if ( el )
+ {
+ el.on( 'mouseover', function()
+ {
+ showTooltip( callback, this, editor, dialog, obj, dialog._.currentTabId );
+ });
+ el.on( 'mouseout', function()
+ {
+ tooltip.hide();
+ });
+ }
+ });
+ });
+ }
+ });
+})();
+
+/**
+ * A function that returns the text to be displayed inside the developer tooltip when hovering over a dialog UI element.
+ * There are 4 parameters that are being passed into the function: editor, dialog, element, tab name.
+ * @name editor.config.devtools_textCallback
+ * @since 3.6
+ * @type Function
+ * @default (see example)
+ * @example
+ * // This is actually the default value.
+ * // Show dialog name, tab id and element id.
+ * config.devtools_textCallback = function( editor, dialog, element, tabName )
+ * {
+ * var lang = editor.lang.devTools,
+ * link = '' + ( element ? element.type : 'content' ) + '',
+ * str =
+ * '' + lang.title + '
' +
+ * '' +
+ * '- ' + lang.dialogName + ' : ' + dialog.getName() + '
' +
+ * '- ' + lang.tabName + ' : ' + tabName + '
';
+ *
+ * if ( element )
+ * str += '- ' + lang.elementId + ' : ' + element.id + '
';
+ *
+ * str += '- ' + lang.elementType + ' : ' + link + '
';
+ *
+ * return str + '
';
+ * }
+ */
+
+/**
+ * A setting that holds CSS rules to be injected do page and contain styles to be applied to the tooltip element.
+ * @name CKEDITOR.config.devtools_styles
+ * @since 3.6
+ * @type String
+ * @default (see example)
+ * @example
+ * // This is actually the default value.
+ * CKEDITOR.config.devtools_styles = "
+ * #cke_tooltip { padding: 5px; border: 2px solid #333; background: #ffffff }
+ * #cke_tooltip h2 { font-size: 1.1em; border-bottom: 1px solid; margin: 0; padding: 1px; }
+ * #cke_tooltip ul { padding: 0pt; list-style-type: none; }
+ * ";
+ */
Index: _source/plugins/find/dialogs/find.js
===================================================================
--- _source/plugins/find/dialogs/find.js (revision 6658)
+++ _source/plugins/find/dialogs/find.js (working copy)
@@ -628,6 +628,7 @@
},
{
type : 'button',
+ id : 'btnFind',
align : 'left',
style : 'width:100%',
label : lang.find,
@@ -693,6 +694,7 @@
},
{
type : 'button',
+ id : 'btnFindReplace',
align : 'left',
style : 'width:100%',
label : lang.replace,
@@ -726,6 +728,7 @@
},
{
type : 'button',
+ id : 'btnReplaceAll',
align : 'left',
style : 'width:100%',
label : lang.replaceAll,
Index: _source/plugins/forms/dialogs/select.js
===================================================================
--- _source/plugins/forms/dialogs/select.js (revision 6658)
+++ _source/plugins/forms/dialogs/select.js (working copy)
@@ -408,6 +408,7 @@
[
{
type : 'button',
+ id : 'btnAdd',
style : '',
label : editor.lang.select.btnAdd,
title : editor.lang.select.btnAdd,
@@ -431,6 +432,7 @@
},
{
type : 'button',
+ id : 'btnModify',
label : editor.lang.select.btnModify,
title : editor.lang.select.btnModify,
style : 'width:100%;',
@@ -453,6 +455,7 @@
},
{
type : 'button',
+ id : 'btnUp',
style : 'width:100%;',
label : editor.lang.select.btnUp,
title : editor.lang.select.btnUp,
@@ -469,6 +472,7 @@
},
{
type : 'button',
+ id : 'btnDown',
style : 'width:100%;',
label : editor.lang.select.btnDown,
title : editor.lang.select.btnDown,
@@ -494,6 +498,7 @@
[
{
type : 'button',
+ id : 'btnSetValue',
label : editor.lang.select.btnSetValue,
title : editor.lang.select.btnSetValue,
onClick : function()
@@ -507,6 +512,7 @@
},
{
type : 'button',
+ id : 'btnDelete',
label : editor.lang.select.btnDelete,
title : editor.lang.select.btnDelete,
onClick : function()
Index: _source/plugins/image/dialogs/image.js
===================================================================
--- _source/plugins/image/dialogs/image.js (revision 6658)
+++ _source/plugins/image/dialogs/image.js (working copy)
@@ -729,6 +729,7 @@
},
{
type : 'html',
+ id : 'htmlButtons',
style : 'margin-top:30px;width:40px;height:40px;',
onLoad : function()
{
@@ -1059,6 +1060,7 @@
[
{
type : 'html',
+ id : 'htmlPreview',
style : 'width:95%;',
html : '' + CKEDITOR.tools.htmlEncode( editor.lang.common.preview ) +'
'+
'
'+
Index: _source/plugins/smiley/dialogs/smiley.js
===================================================================
--- _source/plugins/smiley/dialogs/smiley.js (revision 6658)
+++ _source/plugins/smiley/dialogs/smiley.js (working copy)
@@ -183,6 +183,7 @@
var smileySelector =
{
type : 'html',
+ id : 'smileySelector',
html : html.join( '' ),
onLoad : function( event )
{