Pengguna:Kenrick95/idwp-gpu.js: Perbedaan antara revisi
Konten dihapus Konten ditambahkan
←Membuat halaman berisi 'function IdwpGpuHelper(action) { mw.loader.using('oojs-ui', function() { var messageDialog = new OO.ui.MessageDialog(); var windowManager = new OO.ui.WindowManage...' |
Tidak ada ringkasan suntingan |
||
Baris 1:
function IdwpGpuHelper(action) {
mw.loader.using('oojs-ui', function() {
var windowManager = new OO.ui.WindowManager();
var
input[0] = new OO.ui.TextInputWidget( { placeholder: '
} );
▲ var input2 = new OO.ui.TextInputWidget( {
▲ placeholder: 'Password',
} );
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: '
classes: [ "container" ]
} );
Baris 26 ⟶ 23:
// elements (the text inputs and submit button) to the FieldsetLayout:
fieldset.addItems( [
new OO.ui.FieldLayout(
label: '
align: 'top'
} ),
new OO.ui.FieldLayout(
label: '
align: 'top'
} ),
new OO.ui.FieldLayout(
label: 'Deskripsi panjang (memperbolehkan markah wiki)',
} )▼
] );
// Add the FieldsetLayout to a FormLayout.
var form = new OO.ui.FormLayout( {
items: [ fieldset ]
} );
Baris 51 ⟶ 49:
// Specify a static title and actions.
ProcessDialog.static.title = '
ProcessDialog.static.actions = [
{ label: '
];
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.close( { action: action } );
▲ }
}
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.
$( 'body' ).append( windowManager.$element );
Baris 100:
// Open the window.
windowManager.openWindow( processDialog );
});
}
|