Pengguna:Kenrick95/idwp-gpu.js: Perbedaan antara revisi

Konten dihapus Konten ditambahkan
Kenrick95 (bicara | kontrib)
←Membuat halaman berisi 'function IdwpGpuHelper(action) { mw.loader.using('oojs-ui', function() { var messageDialog = new OO.ui.MessageDialog(); var windowManager = new OO.ui.WindowManage...'
 
Kenrick95 (bicara | kontrib)
Tidak ada ringkasan suntingan
Baris 1:
function IdwpGpuHelper(action) {
mw.loader.using('oojs-ui', function() {
var messageDialog = new OO.ui.MessageDialog();
var windowManager = new OO.ui.WindowManager();
 
var input1input = [];
input[0] = new OO.ui.TextInputWidget( {
placeholder: 'UsernameContoh.jpg'
} );
var input2input[1] = new OO.ui.TextInputWidget( {
placeholder: 'PasswordContoh nama berkas',
var input2 = new OO.ui.TextInputWidget( {
placeholder: 'Password',
type: 'password'
} );
var submitinput[2] = new OO.ui.ButtonInputWidgetTextInputWidget( {
placeholder: 'Deskripsi contoh nama berkas, bla bla bla...'
var submit = new OO.ui.ButtonInputWidget( {
label: 'Submit'
} );
// Create a FieldsetLayout.
var fieldset = new OO.ui.FieldsetLayout( {
label: 'UsingFormulir auntuk formmengusulkan layoutgambar withpilihan adi fieldsetperiode layoutXX tahun XXXX',
classes: [ "container" ]
} );
Baris 26 ⟶ 23:
// elements (the text inputs and submit button) to the FieldsetLayout:
fieldset.addItems( [
new OO.ui.FieldLayout( input1input[0], {
label: 'UsernameNama berkas (tanpa awalan "Berkas:")',
align: 'top'
} ),
new OO.ui.FieldLayout( input2input[1], {
label: 'PasswordDeskripsi singkat (tanpa markah wiki)',
align: 'top'
} ),
new OO.ui.FieldLayout( submit ) input[2], {
label: 'Deskripsi panjang (memperbolehkan markah wiki)',
label align: 'Submittop'
} )
] );
// Add the FieldsetLayout to a FormLayout.
var form = new OO.ui.FormLayout( {
items: [ fieldset ],
action: '/api/formhandler',
method: 'get'
} );
 
Baris 51 ⟶ 49:
 
// Specify a static title and actions.
ProcessDialog.static.title = 'ProcessPengusulan dialogGambar Pilihan';
ProcessDialog.static.actions = [
{ action: 'save', label: 'DoneSelesai', flags: 'primary' },
{ label: 'CancelBatal', flags: 'safe' }
];
 
Baris 71 ⟶ 69:
// actions (for the 'save' action, in this example).
ProcessDialog.prototype.getActionProcess = function ( action ) {

var dialog = this;
if ( action ) {
return new OO.ui.Process( function () {
dialog console.closelog( { action: action } dialog);
} console.log(action);
dialog.close( { action: action } );
}
// Fallback to parent handler.} );
}
return ProcessDialog.super.prototype.getActionProcess.call( this, action );
// Fallback to parent handler.
return ProcessDialog.super.prototype.getActionProcess.call( this, action );
};
 
// Get dialog height.
ProcessDialog.prototype.getBodyHeight = function () {
return this.content.$element.outerHeight( true );
};
 
// Create and append the window manager.
var windowManager = new OO.ui.WindowManager();
$( 'body' ).append( windowManager.$element );
 
Baris 100:
// Open the window.
windowManager.openWindow( processDialog );
messageDialogprocessDialog.setSize("large");
});
}