Utente:Jalo/monobook.js/test: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
Nessun oggetto della modifica
Nessun oggetto della modifica
Riga 3 059:
tendina.options[tendina.options.length] = option;
}
 
function open() {
$j(this).data( 'offset', 0 );
if ( !( $j(this).data( 'onetimeonlystuff' ) ) ) {
$j(this).data( 'onetimeonlystuff', true );
// Execute the action associated with the first button
// when the user presses Enter
$j(this).closest( '.ui-dialog' ).keypress( function( e ) {
if ( ( e.keyCode || e.which ) == 13 ) {
var button = $j(this).data( 'dialogaction' ) || $j(this).find( 'button:first' );
button.click();
e.preventDefault();
}
});
// Make tabbing to a button and pressing
// Enter do what people expect
$j(this).closest( '.ui-dialog' ).find( 'button' ).focus( function() {
$j(this).closest( '.ui-dialog' ).data( 'dialogaction', falsethis );
});
}
var dialog = $j(this).closest( '.ui-dialog' );
var that = this;
var context = $j(this).data( 'context' );
var textbox = typeof context.$iframe != 'undefined' ?
context.$iframe[0].contentWindow.document : context.$textarea;
 
$j( textbox )
.bind( 'keypress.srdialog', function( e ) {
if ( ( e.keyCode || e.which ) == 13 ) {
// Enter
var button = dialog.data( 'dialogaction' ) || dialog.find( 'button:first' );
button.click();
e.preventDefault();
} else if ( ( e.keyCode || e.which ) == 27 ) {
// Escape
$j(that).dialog( 'close' );
});
});
}
 
function close() {
var context = $j(this).data( 'context' );
var textbox = typeof context.$iframe != 'undefined' ?
context.$iframe[0].contentWindow.document : context.$textarea;
$j( textbox ).unbind( 'keypress.srdialog' );
$j(this).closest( '.ui-dialog' ).data( 'dialogaction', thisfalse );
}
 
 
// aggiungi tutti i bottoni alla toolbar
Riga 4 074 ⟶ 4 122:
},
open: function() {
$jopen(this).data( 'offset', 0 );
$j( '#wikieditor-toolbar-argomento' ).focus();
if ( !( $j(this).data( 'onetimeonlystuff' ) ) ) {
$j(this).data( 'onetimeonlystuff', true );
// Execute the action associated with the first button
// when the user presses Enter
$j(this).closest( '.ui-dialog' ).keypress( function( e ) {
if ( ( e.keyCode || e.which ) == 13 ) {
var button = $j(this).data( 'dialogaction' ) || $j(this).find( 'button:first' );
button.click();
e.preventDefault();
}
});
// Make tabbing to a button and pressing
// Enter do what people expect
$j(this).closest( '.ui-dialog' ).find( 'button' ).focus( function() {
$j(this).closest( '.ui-dialog' ).data( 'dialogaction', this );
});
}
var dialog = $j(this).closest( '.ui-dialog' );
var that = this;
var context = $j(this).data( 'context' );
var textbox = typeof context.$iframe != 'undefined' ?
context.$iframe[0].contentWindow.document : context.$textarea;
$j( textbox )
.bind( 'keypress.srdialog', function( e ) {
if ( ( e.keyCode || e.which ) == 13 ) {
// Enter
var button = dialog.data( 'dialogaction' ) || dialog.find( 'button:first' );
button.click();
e.preventDefault();
} else if ( ( e.keyCode || e.which ) == 27 ) {
// Escape
$j(that).dialog( 'close' );
}
});
},
close: function() {
var context = $jclose(this).data( 'context' );
var textbox = typeof context.$iframe != 'undefined' ?
context.$iframe[0].contentWindow.document : context.$textarea;
$j( textbox ).unbind( 'keypress.srdialog' );
$j(this).closest( '.ui-dialog' ).data( 'dialogaction', false );
}
}