mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-01-28 09:28:39 +00:00
23 lines
539 B
JavaScript
23 lines
539 B
JavaScript
import { UriFactory } from '../../../Uri/UriFactory.js';
|
|
|
|
/**
|
|
* Redirect.
|
|
*
|
|
* @param {Object} action Action data
|
|
* @param {function} callback Callback
|
|
* @param {string} id Action element
|
|
*
|
|
* @since 1.0.0
|
|
*/
|
|
export function redirectMessage (action, callback, id)
|
|
{
|
|
setTimeout(function ()
|
|
{
|
|
if (data.src) {
|
|
document.getElementById(data.src).src = UriFactory.build(data.uri);
|
|
} else {
|
|
window.location = UriFactory.build(data.uri);
|
|
}
|
|
}, parseInt(data.delay));
|
|
};
|