/*
---
description:     MooDialog

authors:
  - Arian Stolwijk

license:
  - MIT-style license

requires:
  core/1.2.4:   '*'

provides:
  - [MooDialog.Request]
...
*/

MooDialog.Request = new Class({	
	
	Extends: MooDialog,	

	options: {
		okText: 'Ok',
		focus: true
	},

	initialize: function(url,reqOptions,options){
		this.parent(options);

		var okButton = new Element('input',{
			type: 'button',
			'class': 'button',
			events: {
				click: function(){
					this.close();
				}.bind(this)
			},
			value: this.options.okText
		});
		
		this.setContent(
			new Element('div').load(url,reqOptions).adopt(
					new Element('div',{
						'class': 'buttons'
					}).adopt(okButton)
				)
		).open();
    }
});


