-
+ DE097902BB921302C51BADA6B3C2A5051FEF277B8ABD38664E267D6BC16499A5B96DAFCC48C599C56C83CAC43D663416F9FF000AA3E6A8B1CE4E6A789FE7DD24
mp-wp/wp-includes/js/swfupload/plugins/swfupload.graceful_degradation.js
(0 . 0)(1 . 64)
116564 /*
116565 SWFUpload Graceful Degradation Plug-in
116566
116567 This plugin allows SWFUpload to display only if it is loaded successfully. Otherwise a default form is left displayed.
116568
116569 Usage:
116570
116571 To use this plugin create two HTML containers. Each should have an ID defined. One container should hold the SWFUpload UI. The other should hold the degraded UI.
116572
116573 The SWFUpload container should have its CSS "display" property set to "none".
116574
116575 If SWFUpload loads successfully the SWFUpload container will be displayed ("display" set to "block") and the
116576 degraded container will be hidden ("display" set to "none").
116577
116578 Use the settings "swfupload_element_id" and "degraded_element_id" to indicate your container IDs. The default values are "swfupload_container" and "degraded_container".
116579
116580 */
116581
116582 var SWFUpload;
116583 if (typeof(SWFUpload) === "function") {
116584 SWFUpload.gracefulDegradation = {};
116585 SWFUpload.prototype.initSettings = function (old_initSettings) {
116586 return function (init_settings) {
116587 if (typeof(old_initSettings) === "function") {
116588 old_initSettings.call(this, init_settings);
116589 }
116590
116591 this.addSetting("swfupload_element_id", init_settings.swfupload_element_id, "swfupload_container");
116592 this.addSetting("degraded_element_id", init_settings.degraded_element_id, "degraded_container");
116593 this.addSetting("user_swfUploadLoaded_handler", init_settings.swfupload_loaded_handler, SWFUpload.swfUploadLoaded);
116594
116595 this.swfUploadLoaded_handler = SWFUpload.gracefulDegradation.swfUploadLoaded;
116596 };
116597 }(SWFUpload.prototype.initSettings);
116598
116599 SWFUpload.gracefulDegradation.swfUploadLoaded = function () {
116600 var swfupload_container_id, swfupload_container, degraded_container_id, degraded_container, user_swfUploadLoaded_handler;
116601 try {
116602 if (uploadDegradeOptions.is_lighttpd_before_150) throw "Lighttpd versions earlier than 1.5.0 aren't supported!";
116603 swfupload_element_id = this.getSetting("swfupload_element_id");
116604 degraded_element_id = this.getSetting("degraded_element_id");
116605
116606 // Show the UI container
116607 swfupload_container = document.getElementById(swfupload_element_id);
116608 if (swfupload_container !== null) {
116609 swfupload_container.style.display = "block";
116610
116611 // Now take care of hiding the degraded UI
116612 degraded_container = document.getElementById(degraded_element_id);
116613 if (degraded_container !== null) {
116614 degraded_container.style.display = "none";
116615 }
116616 }
116617 } catch (ex) {
116618 this.debug(ex);
116619 }
116620
116621 user_swfUploadLoaded_handler = this.getSetting("user_swfUploadLoaded_handler");
116622 if (typeof(user_swfUploadLoaded_handler) === "function") {
116623 user_swfUploadLoaded_handler.apply(this);
116624 }
116625 };
116626
116627 }