You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.1 KiB
44 lines
1.1 KiB
<?php
|
|
|
|
/**
|
|
*
|
|
* @package templates/default
|
|
*/
|
|
|
|
defined('ABSPATH') || defined('DUPXABSPATH') || exit;
|
|
?>
|
|
<script>
|
|
DUPX.pageComponents = {
|
|
pageContent: null,
|
|
init: function () {
|
|
this.pageContent = $('#main-content-wrapper');
|
|
},
|
|
resetTopMessages: function () {
|
|
DUPX.topMessages.empty();
|
|
return this;
|
|
},
|
|
showProgress: function (options) {
|
|
this.pageContent.hide();
|
|
DUPX.ajaxError.hide();
|
|
DUPX.progress.show(options);
|
|
return this;
|
|
},
|
|
showError: function (result, textStatus, jqXHR, tryAgainButtonCallback) {
|
|
DUPX.ajaxError.update(result, textStatus, jqXHR, tryAgainButtonCallback);
|
|
DUPX.progress.hide();
|
|
this.pageContent.hide();
|
|
DUPX.ajaxError.show();
|
|
return this;
|
|
},
|
|
showContent: function () {
|
|
DUPX.progress.hide();
|
|
DUPX.ajaxError.hide();
|
|
this.pageContent.show();
|
|
return this;
|
|
}
|
|
};
|
|
|
|
$(document).ready(function () {
|
|
DUPX.pageComponents.init();
|
|
});
|
|
</script>
|