BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
56c7fc30
Unverified
Commit
56c7fc30
authored
Nov 03, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Peek's original keyboard shortcut (numpad 0, keycode 96)
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
f580e497
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
18 deletions
+10
-18
peek.js
vendor/assets/javascripts/peek.js
+10
-18
No files found.
vendor/assets/javascripts/peek.js
View file @
56c7fc30
/*
* This is a modified version of https://github.com/peek/peek/blob/master/app/assets/javascripts/peek.js
*
* - Removed the dependency on jquery.tipsy
* - Removed the initializeTipsy and toggleBar functions
* - Customized updatePerformanceBar to handle SQL queries report specificities
* - Changed /peek/results to /-/peek/results
* - Removed the keypress, pjax:end, page:change, and turbolinks:load handlers
*/
(
function
(
$
)
{
var
fetchRequestResults
,
getRequestId
,
peekEnabled
,
toggleBar
,
updatePerformanceBar
;
var
fetchRequestResults
,
getRequestId
,
peekEnabled
,
updatePerformanceBar
;
getRequestId
=
function
()
{
return
$
(
'#peek'
).
data
(
'request-id'
);
};
...
...
@@ -41,22 +50,6 @@
});
return
$
(
document
).
trigger
(
'peek:render'
,
[
getRequestId
(),
results
]);
};
toggleBar
=
function
(
event
)
{
var
wrapper
;
if
(
$
(
event
.
target
).
is
(
':input'
))
{
return
;
}
if
(
event
.
which
===
96
&&
!
event
.
metaKey
)
{
wrapper
=
$
(
'#peek'
);
if
(
wrapper
.
hasClass
(
'disabled'
))
{
wrapper
.
removeClass
(
'disabled'
);
return
document
.
cookie
=
"peek=true; path=/"
;
}
else
{
wrapper
.
addClass
(
'disabled'
);
return
document
.
cookie
=
"peek=false; path=/"
;
}
}
};
fetchRequestResults
=
function
()
{
return
$
.
ajax
(
'/-/peek/results'
,
{
data
:
{
...
...
@@ -68,7 +61,6 @@
error
:
function
(
xhr
,
textStatus
,
error
)
{}
});
};
$
(
document
).
on
(
'keypress'
,
toggleBar
);
$
(
document
).
on
(
'peek:update'
,
fetchRequestResults
);
return
$
(
function
()
{
if
(
peekEnabled
())
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment