From a09e12721fbab8f1f716495a04957f52595fc272 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 17 Feb 2015 20:01:56 +0100 Subject: Fix lib in .gitignore --- .../lib/MooTools/MooDialog/MooDialog.Request.js | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 pyload/webui/themes/Next/lib/MooTools/MooDialog/MooDialog.Request.js (limited to 'pyload/webui/themes/Next/lib/MooTools/MooDialog/MooDialog.Request.js') diff --git a/pyload/webui/themes/Next/lib/MooTools/MooDialog/MooDialog.Request.js b/pyload/webui/themes/Next/lib/MooTools/MooDialog/MooDialog.Request.js new file mode 100644 index 000000000..7b8eb23c4 --- /dev/null +++ b/pyload/webui/themes/Next/lib/MooTools/MooDialog/MooDialog.Request.js @@ -0,0 +1,37 @@ +/* +--- +name: MooDialog.Request +description: Loads Data into a Dialog with Request +authors: Arian Stolwijk +license: MIT-style license +requires: [MooDialog, Core/Request.HTML] +provides: MooDialog.Request +... +*/ + +MooDialog.Request = new Class({ + + Extends: MooDialog, + + initialize: function(url, requestOptions, options){ + this.parent(options); + this.requestOptions = requestOptions || {}; + + this.addEvent('open', function(){ + var request = new Request.HTML(this.requestOptions).addEvent('success', function(text){ + this.setContent(text); + }.bind(this)).send({ + url: url + }); + }.bind(this)); + + if (this.options.autoOpen) this.open(); + + }, + + setRequestOptions: function(options){ + this.requestOptions = Object.merge(this.requestOptions, options); + return this; + } + +}); -- cgit v1.2.3