mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-11-24 16:25:00 +00:00
Merge "Use jquery.spinner when console is pending"
This commit is contained in:
commit
3f9377cd70
|
@ -82,7 +82,7 @@ $wgResourceModules['ext.scribunto'] = $sbtpl + array(
|
|||
$wgResourceModules['ext.scribunto.edit'] = $sbtpl + array(
|
||||
'scripts' => 'ext.scribunto.edit.js',
|
||||
'styles' => 'ext.scribunto.edit.css',
|
||||
'dependencies' => array( 'ext.scribunto', 'mediawiki.api' ),
|
||||
'dependencies' => array( 'ext.scribunto', 'mediawiki.api', 'jquery.spinner' ),
|
||||
'messages' => array(
|
||||
'scribunto-console-title',
|
||||
'scribunto-console-intro',
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
question,
|
||||
_in,
|
||||
_out,
|
||||
_$spinner,
|
||||
lastError = null,
|
||||
sessionContent = null,
|
||||
sessionKey = null,
|
||||
|
@ -31,6 +32,7 @@
|
|||
function initConsole() {
|
||||
_in = document.getElementById( "mw-scribunto-input" );
|
||||
_out = document.getElementById( "mw-scribunto-output" );
|
||||
_$spinner = $.createSpinner( { size: 'small', type: 'block' } );
|
||||
|
||||
recalculateInputHeight();
|
||||
println( mw.msg( 'scribunto-console-intro' ), 'mw-scribunto-message' );
|
||||
|
@ -208,9 +210,11 @@
|
|||
function setPending() {
|
||||
pending = true;
|
||||
_in.readOnly = true;
|
||||
_$spinner.insertBefore( _in );
|
||||
}
|
||||
|
||||
function clearPending() {
|
||||
_$spinner.remove();
|
||||
pending = false;
|
||||
_in.readOnly = false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue