mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-30 08:28:20 +01:00
Toggle DarkConsole request log by keyboard shortcut
Test Plan: ` ` Reviewers: btrahan Reviewed By: btrahan CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D2583
This commit is contained in:
parent
af6238ca4a
commit
648c8aa499
2 changed files with 7 additions and 1 deletions
|
@ -882,7 +882,7 @@ celerity_register_resource_map(array(
|
||||||
),
|
),
|
||||||
'javelin-behavior-dark-console' =>
|
'javelin-behavior-dark-console' =>
|
||||||
array(
|
array(
|
||||||
'uri' => '/res/d2518cbf/rsrc/js/application/core/behavior-dark-console.js',
|
'uri' => '/res/9cc84023/rsrc/js/application/core/behavior-dark-console.js',
|
||||||
'type' => 'js',
|
'type' => 'js',
|
||||||
'requires' =>
|
'requires' =>
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -39,12 +39,18 @@ JX.behavior('dark-console', function(config) {
|
||||||
new JX.KeyboardShortcut('`', desc)
|
new JX.KeyboardShortcut('`', desc)
|
||||||
.setHandler(function(manager) {
|
.setHandler(function(manager) {
|
||||||
var console = JX.DOM.find(document.body, 'table', 'dark-console');
|
var console = JX.DOM.find(document.body, 'table', 'dark-console');
|
||||||
|
var requestLog = JX.DOM.find(
|
||||||
|
document.body,
|
||||||
|
'table',
|
||||||
|
'dark-console-request-log');
|
||||||
|
|
||||||
config.visible = !config.visible;
|
config.visible = !config.visible;
|
||||||
if (config.visible) {
|
if (config.visible) {
|
||||||
JX.DOM.show(console);
|
JX.DOM.show(console);
|
||||||
|
JX.DOM.show(requestLog);
|
||||||
} else {
|
} else {
|
||||||
JX.DOM.hide(console);
|
JX.DOM.hide(console);
|
||||||
|
JX.DOM.hide(requestLog);
|
||||||
}
|
}
|
||||||
|
|
||||||
new JX.Request(config.uri, JX.bag)
|
new JX.Request(config.uri, JX.bag)
|
||||||
|
|
Loading…
Add table
Reference in a new issue