1. Re-introduces check if the browser supports the dialogs, which was removed for no apparent reason in r74276.

2. Makes the isEnabled function public, to allow other extensions to use the same configuration settings as WikiEditor.
This commit is contained in:
Jan Paul Posma 2011-02-25 00:01:57 +00:00
parent 8ca58dd46b
commit 9d6f6e3526
2 changed files with 11 additions and 6 deletions

View file

@ -158,9 +158,17 @@ class WikiEditorHooks {
),
);
/* Protected Static Methods */
/* Static Methods */
protected static function isEnabled( $name ) {
/**
* Checks if a certain option is enabled
*
* This method is public to allow other extensions that use WikiEditor to use the
* same configuration as WikiEditor itself
*
* @param $name Name of the feature, should be a key of $features
*/
public static function isEnabled( $name ) {
global $wgWikiEditorFeatures, $wgUser;
// Features with global set to true are always enabled
@ -183,8 +191,6 @@ class WikiEditorHooks {
return false;
}
/* Static Methods */
/**
* EditPage::showEditForm:initial hook
*

View file

@ -3,11 +3,10 @@
*/
$( document ).ready( function() {
/*
if ( !$.wikiEditor.isSupported( $.wikiEditor.modules.dialogs ) ) {
return;
}
*/
// Replace icons
$.wikiEditor.modules.dialogs.config.replaceIcons( $( '#wpTextbox1' ) );