TheDJ has uploaded a new change for review. https://gerrit.wikimedia.org/r/121559
Change subject: CodeEditor: Support warning for unsaved changes ...................................................................... CodeEditor: Support warning for unsaved changes Write the value to the textarea when we leave the page before we have submitted. Bug: 61056 Change-Id: I1b0638ee36a048c607bb83dc5f95bd6c53871d7e --- M modules/jquery.codeEditor.js 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CodeEditor refs/changes/59/121559/1 diff --git a/modules/jquery.codeEditor.js b/modules/jquery.codeEditor.js index 17f7141..5c93ee0 100644 --- a/modules/jquery.codeEditor.js +++ b/modules/jquery.codeEditor.js @@ -158,6 +158,9 @@ editdiv.text( box.val() ); context.codeEditor = ace.edit( editdiv[0] ); + // This is used by editwarning script to write the contents to the form + box.data( 'syncEditorWithFormFn', context.evt.codeEditorSubmit ); + // Disable some annoying commands context.codeEditor.commands.removeCommand( 'replace' ); // ctrl+R context.codeEditor.commands.removeCommand( 'transposeletters' ); // ctrl+T -- To view, visit https://gerrit.wikimedia.org/r/121559 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1b0638ee36a048c607bb83dc5f95bd6c53871d7e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CodeEditor Gerrit-Branch: master Gerrit-Owner: TheDJ <hartman.w...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits