Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
ckeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vanilla ckeditor-3.3.2
[ckeditor.git]
/
_source
/
plugins
/
button
/
plugin.js
diff --git
a/_source/plugins/button/plugin.js
b/_source/plugins/button/plugin.js
index
b211a28
..
f16e192
100644
(file)
--- a/
_source/plugins/button/plugin.js
+++ b/
_source/plugins/button/plugin.js
@@
-69,9
+69,13
@@
CKEDITOR.ui.button.prototype =
*/
\r
render : function( editor, output )
\r
{
\r
*/
\r
render : function( editor, output )
\r
{
\r
- var env = CKEDITOR.env;
\r
+ var env = CKEDITOR.env,
\r
+ id = this._.id = 'cke_' + CKEDITOR.tools.getNextNumber(),
\r
+ classes = '',
\r
+ command = this.command, // Get the command name.
\r
+ clickFn,
\r
+ index;
\r
\r
\r
- var id = this._.id = 'cke_' + CKEDITOR.tools.getNextNumber();
\r
this._.editor = editor;
\r
\r
var instance =
\r
this._.editor = editor;
\r
\r
var instance =
\r
@@
-90,14
+94,9
@@
CKEDITOR.ui.button.prototype =
}
\r
};
\r
\r
}
\r
};
\r
\r
- var clickFn = CKEDITOR.tools.addFunction( instance.execute, instance );
\r
+ instance.clickFn = clickFn = CKEDITOR.tools.addFunction( instance.execute, instance );
\r
\r
\r
- var index = CKEDITOR.ui.button._.instances.push( instance ) - 1;
\r
-
\r
- var classes = '';
\r
-
\r
- // Get the command name.
\r
- var command = this.command;
\r
+ instance.index = index = CKEDITOR.ui.button._.instances.push( instance ) - 1;
\r
\r
if ( this.modes )
\r
{
\r
\r
if ( this.modes )
\r
{
\r
@@
-135,7
+134,7
@@
CKEDITOR.ui.button.prototype =
'<span class="cke_button">',
\r
'<a id="', id, '"' +
\r
' class="', classes, '"',
\r
'<span class="cke_button">',
\r
'<a id="', id, '"' +
\r
' class="', classes, '"',
\r
- env.gecko && env.version >= 10900 && !env.hc ? '' : '" href="javascript:void(\''+ ( this.title || '' ).replace( "'"+ '' )+ '\')"',
\r
+ env.gecko && env.version >= 10900 && !env.hc ? '' : '" href="javascript:void(\''+ ( this.title || '' ).replace( "'", '' )+ '\')"',
\r
' title="', this.title, '"' +
\r
' tabindex="-1"' +
\r
' hidefocus="true"' +
\r
' title="', this.title, '"' +
\r
' tabindex="-1"' +
\r
' hidefocus="true"' +
\r
@@
-173,13
+172,16
@@
CKEDITOR.ui.button.prototype =
}
\r
\r
output.push(
\r
}
\r
\r
output.push(
\r
- '></span>' +
\r
+ '> </span>' +
\r
'<span id="', id, '_label" class="cke_label">', this.label, '</span>' );
\r
\r
if ( this.hasArrow )
\r
{
\r
output.push(
\r
'<span id="', id, '_label" class="cke_label">', this.label, '</span>' );
\r
\r
if ( this.hasArrow )
\r
{
\r
output.push(
\r
- '<span class="cke_buttonarrow"></span>' );
\r
+ '<span class="cke_buttonarrow">'
\r
+ // BLACK DOWN-POINTING TRIANGLE
\r
+ + ( CKEDITOR.env.hc ? '▼' : ' ' )
\r
+ + '</span>' );
\r
}
\r
\r
output.push(
\r
}
\r
\r
output.push(
\r
@@
-268,3
+270,8
@@
CKEDITOR.ui.prototype.addButton = function( name, definition )
{
\r
this.add( name, CKEDITOR.UI_BUTTON, definition );
\r
};
\r
{
\r
this.add( name, CKEDITOR.UI_BUTTON, definition );
\r
};
\r
+
\r
+CKEDITOR.on( 'reset', function()
\r
+ {
\r
+ CKEDITOR.ui.button._.instances = [];
\r
+ });
\r