Allow the CodeEditor in read only mode

Depends on: I6885d617e18562acf0331e8db5790b53b489dbc2
Bug: 45258
Change-Id: Ie69e9c33bc307ec34abb7dcf3f427cfbe407fde3
This commit is contained in:
Derk-Jan Hartman 2014-03-23 21:13:50 +01:00
parent 495be60c60
commit 0759a6de4f
2 changed files with 3 additions and 0 deletions

View file

@ -24,6 +24,7 @@ $wgMessagesDirs['CodeEditor'] = __DIR__ . '/i18n';
$wgExtensionMessagesFiles['CodeEditor'] = $dir . '/CodeEditor.i18n.php';
$wgHooks['EditPage::showEditForm:initial'][] = 'CodeEditorHooks::editPageShowEditFormInitial';
$wgHooks['EditPage::showReadOnlyForm:initial'][] = 'CodeEditorHooks::editPageShowEditFormInitial';
$wgHooks['BeforePageDisplay'][] = 'CodeEditorHooks::onBeforePageDisplay';
$wgHooks['MakeGlobalVariablesScript'][] = 'CodeEditorHooks::onMakeGlobalVariablesScript';

View file

@ -179,6 +179,8 @@
context.codeEditor.commands.removeCommand( 'transposeletters' ); // ctrl+T
context.codeEditor.commands.removeCommand( 'gotoline' ); // ctrl+L
context.codeEditor.setReadOnly( box.prop( 'readonly' ) );
// fakeout for bug 29328
context.$iframe = [
{