__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
/**
* Step management code.
*
* @module tool_usertours/managesteps
* @copyright 2016 Andrew Nicols <andrew@nicols.co.uk>
*/
import {prefetchStrings} from 'core/prefetch';
import {getString} from 'core/str';
import {confirm as confirmModal} from 'core/notification';
/**
* Handle step management actions.
*
* @param {Event} e
* @private
*/
const removeStepHandler = e => {
const deleteButton = e.target.closest('[data-action="delete"]');
if (deleteButton) {
e.preventDefault();
removeStepFromLink(deleteButton.href);
}
};
/**
* Handle removal of a step with confirmation.
*
* @param {string} targetUrl
* @private
*/
const removeStepFromLink = targetUrl => {
confirmModal(
getString('confirmstepremovaltitle', 'tool_usertours'),
getString('confirmstepremovalquestion', 'tool_usertours'),
getString('yes', 'core'),
getString('no', 'core'),
() => {
window.location = targetUrl;
}
);
};
/**
* Set up the step management handlers.
*/
export const setup = () => {
prefetchStrings('tool_usertours', [
'confirmstepremovaltitle',
'confirmstepremovalquestion',
]);
prefetchStrings('core', [
'yes',
'no',
]);
document.querySelector('body').addEventListener('click', removeStepHandler);
};
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| events.js | File | 4.43 KB | 0777 |
|
| filter_cssselector.js | File | 1.3 KB | 0777 |
|
| managesteps.js | File | 1.32 KB | 0777 |
|
| managetours.js | File | 1.32 KB | 0777 |
|
| repository.js | File | 1.73 KB | 0777 |
|
| tour.js | File | 63.05 KB | 0777 |
|
| usertours.js | File | 7.34 KB | 0777 |
|