Index: trunk/extensions/Translate/js/quickedit.js |
— | — | @@ -39,6 +39,16 @@ |
40 | 40 | |
41 | 41 | dialog = dialog.load(url, false, function() { |
42 | 42 | var form = jQuery("#"+ id + " form"); |
| 43 | + |
| 44 | + var fb = form.find( ".mw-translate-fb" ); |
| 45 | + fb.click( function() { |
| 46 | + var queryString = form.formSerialize(); |
| 47 | + // FIXME: forward contents of the text area |
| 48 | + var newWindow = window.open( wgScript + "?title=" + page + "&action=edit&from=xjs" ); |
| 49 | + dialog.dialog("close"); |
| 50 | + return false; |
| 51 | + } ); |
| 52 | + |
43 | 53 | var textarea = form.find( ".mw-translate-edit-area" ); |
44 | 54 | textarea.width(textarea.width()-4); |
45 | 55 | //textarea.wikiEditor(); |
Index: trunk/extensions/Translate/utils/TranslationEditPage.php |
— | — | @@ -60,7 +60,9 @@ |
61 | 61 | $hidden[] = Xml::hidden( 'action', 'edit' ); |
62 | 62 | |
63 | 63 | $summary = Xml::inputLabel( wfMsg( 'summary' ), 'summary', 'summary', 40 ); |
64 | | - $save = Html::input( 'submit', wfMsg( 'savearticle' ), 'submit' ); |
| 64 | + $save = Xml::submitButton( wfMsg( 'savearticle' ), array( 'style' => 'font-weight:bold' )); |
| 65 | + $normal = Xml::element( 'input', array( 'class' => 'mw-translate-fb', |
| 66 | + 'value' => wfMsg( 'translate-js-fb' ), 'type' => 'button' ) ); |
65 | 67 | |
66 | 68 | // Use the api to submit edits |
67 | 69 | $formParams = array( |
— | — | @@ -71,7 +73,7 @@ |
72 | 74 | $form = Html::rawElement( 'form', $formParams, |
73 | 75 | implode( "\n", $hidden ) . "\n" . |
74 | 76 | $helpers->getBoxes() . "\n" . |
75 | | - "$textarea\n$summary$save" |
| 77 | + "$textarea\n$summary$save$normal" |
76 | 78 | ); |
77 | 79 | |
78 | 80 | echo $form; |
Index: trunk/extensions/Translate/Translate.i18n.php |
— | — | @@ -305,6 +305,8 @@ |
306 | 306 | 'translate-import-err-warnings' => 'The file is not well formed. |
307 | 307 | Make sure your editor does not remove msgctxt fields. |
308 | 308 | Details: $1', |
| 309 | + |
| 310 | + 'translate-js-fb' => 'Normal edit', |
309 | 311 | ); |
310 | 312 | |
311 | 313 | /** Message documentation (Message documentation) |