#939: add toolbar buttons at runtime
---------------------------+------------------------------------------------
Reporter: saul11 | Owner:
Type: New Feature | Status: reopened
Priority: Normal | Milestone:
Component: UI : Toolbar | Version:
Resolution: | Keywords: Confirmed
---------------------------+------------------------------------------------
Changes (by arczi):
* keywords: => Confirmed
* status: closed => reopened
* resolution: duplicate =>
Comment:
I changed my opinion.
Right now it is hard to hide button added to ToolbarSets in fckconfig.js
{{{
tbButton = new FCKToolbarButton( 'myButton', 'myButton', 'My button',
FCK_TOOLBARITEM_ICONTEXT ) ) ;
tbButton.IconPath = icon;
FCKToolbarItems.RegisterItem( 'myButton', tbButton ) ;
if ( !IWantThisButton ) { //hack to hide myButton
tbButton.Create = function() {return 0;}
tbButton.Disable = function() {return 0;}
tbButton.RefreshState = function() {return 0;}
}
}}}
it should look like...
{{{
if ( IWantThisButton ) {
tbButton = new FCKToolbarButton( 'myButton', 'myButton', 'My
button', FCK_TOOLBARITEM_ICONTEXT ) ) ;
}else{
tbButton = new FCKToolbarButton( 'myButton', 'myButton', 'My
button', FCK_TOOLBARITEM_ICONTEXT | FCK_HIDDEN ) ) ;
}
}}}
and/or...
{{{
tbButton.setState('myButton', FCK_VISIBLE);
tbButton.setState('myButton', FCK_HIDDEN);
}}}
--
Ticket URL: <http://dev.fckeditor.net/ticket/939#comment:4>
FCKeditor <http://www.fckeditor.net/>
The text editor for Internet
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac