Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/queuepro/node_modules/sweetalert2/src/instanceMethods/ drwxrwxr-x | |
| Viewing file: Select action/file-type: import * as dom from '../utils/dom/index.js'
import { swalClasses } from '../utils/classes.js'
import privateProps from '../privateProps.js'
/**
* Hides loader and shows back the button which was hidden by .showLoading()
*/
function hideLoading() {
// do nothing if popup is closed
const innerParams = privateProps.innerParams.get(this)
if (!innerParams) {
return
}
const domCache = privateProps.domCache.get(this)
dom.hide(domCache.loader)
if (dom.isToast()) {
if (innerParams.icon) {
dom.show(dom.getIcon())
}
} else {
showRelatedButton(domCache)
}
dom.removeClass([domCache.popup, domCache.actions], swalClasses.loading)
domCache.popup.removeAttribute('aria-busy')
domCache.popup.removeAttribute('data-loading')
domCache.confirmButton.disabled = false
domCache.denyButton.disabled = false
domCache.cancelButton.disabled = false
}
const showRelatedButton = (domCache) => {
const buttonToReplace = domCache.popup.getElementsByClassName(domCache.loader.getAttribute('data-button-to-replace'))
if (buttonToReplace.length) {
dom.show(buttonToReplace[0], 'inline-block')
} else if (dom.allButtonsAreHidden()) {
dom.hide(domCache.actions)
}
}
export { hideLoading, hideLoading as disableLoading }
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.019 ]-- |