1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 23:15:55 +00:00

prefs system: load phpinfo using inline method

This commit is contained in:
Andrew Dolgov
2021-02-14 12:29:08 +03:00
parent 6b5c9c781b
commit 1c7e4782aa
3 changed files with 10 additions and 11 deletions

View File

@@ -1032,7 +1032,6 @@ class Pref_Prefs extends Handler_Protected {
if (this.domNode.querySelector('.loading')) if (this.domNode.querySelector('.loading'))
window.setTimeout(() => { window.setTimeout(() => {
xhrPost("backend.php", {op: 'pref-prefs', method: 'index_auth'}, (transport) => { xhrPost("backend.php", {op: 'pref-prefs', method: 'index_auth'}, (transport) => {
console.log(this);
this.attr('content', transport.responseText); this.attr('content', transport.responseText);
}); });
}, 100); }, 100);
@@ -1047,7 +1046,6 @@ class Pref_Prefs extends Handler_Protected {
if (this.domNode.querySelector('.loading')) if (this.domNode.querySelector('.loading'))
window.setTimeout(() => { window.setTimeout(() => {
xhrPost("backend.php", {op: 'pref-prefs', method: 'index_plugins'}, (transport) => { xhrPost("backend.php", {op: 'pref-prefs', method: 'index_plugins'}, (transport) => {
console.log(this);
this.attr('content', transport.responseText); this.attr('content', transport.responseText);
}); });
}, 200); }, 200);

View File

@@ -174,9 +174,14 @@ class Pref_System extends Handler_Protected {
<div dojoType='dijit.layout.AccordionPane' title='<i class="material-icons">info</i> <?= __('PHP Information') ?>'> <div dojoType='dijit.layout.AccordionPane' title='<i class="material-icons">info</i> <?= __('PHP Information') ?>'>
<script type='dojo/method' event='onSelected' args='evt'> <script type='dojo/method' event='onSelected' args='evt'>
Helpers.System.getPHPInfo(this); if (this.domNode.querySelector('.loading'))
window.setTimeout(() => {
xhrPost("backend.php", {op: 'pref-system', method: 'getphpinfo'}, (transport) => {
this.attr('content', `<div class='phpinfo'>${transport.responseText}</div>`);
});
}, 200);
</script> </script>
<div class='phpinfo'><?= __("Loading, please wait...") ?></div> <span class='loading'><?= __("Loading, please wait...") ?></span>
</div> </div>
<?php PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_TAB, "prefSystem") ?> <?php PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_TAB, "prefSystem") ?>

View File

@@ -54,11 +54,7 @@ const Helpers = {
}, },
}, },
System: { System: {
getPHPInfo: function(widget) { //
xhrPost("backend.php", {op: 'pref-system', method: 'getphpinfo'}, (transport) => {
widget.attr('content', transport.responseText);
});
}
}, },
EventLog: { EventLog: {
log_page: 0, log_page: 0,