1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +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:
vrana 2012-05-25 18:09:45 -07:00
parent af6238ca4a
commit 648c8aa499
2 changed files with 7 additions and 1 deletions

View file

@ -882,7 +882,7 @@ celerity_register_resource_map(array(
),
'javelin-behavior-dark-console' =>
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',
'requires' =>
array(

View file

@ -39,12 +39,18 @@ JX.behavior('dark-console', function(config) {
new JX.KeyboardShortcut('`', desc)
.setHandler(function(manager) {
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;
if (config.visible) {
JX.DOM.show(console);
JX.DOM.show(requestLog);
} else {
JX.DOM.hide(console);
JX.DOM.hide(requestLog);
}
new JX.Request(config.uri, JX.bag)