Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Ishan Kumar Kaler
purr-data
Commits
edb80827
Commit
edb80827
authored
Sep 19, 2020
by
Jonathan Wilkes
Browse files
Merge branch 'aggraef/purr-data-help-browser-fixes'
parents
44f5db00
558ca830
Changes
1
Hide whitespace changes
Inline
Side-by-side
pd/nw/dialog_search.html
View file @
edb80827
...
...
@@ -372,8 +372,8 @@ function display_toc() {
current_dir
=
path
.
join
(
pdgui
.
get_lib_dir
(),
"
doc
"
);
toc_bookmark_update
(
current_dir
);
toc_bookmark_status
(
false
);
div
=
document
.
createElement
(
"
div
"
);
toc
.
forEach
(
function
(
doc
,
i
,
a
)
{
div
=
document
.
createElement
(
"
div
"
);
if
(
doc
.
id
)
{
try
{
fs
.
accessSync
(
check_dir
(
doc
.
id
),
fs
.
F_OK
);
...
...
@@ -500,7 +500,7 @@ function console_find_text(elem, evt, callback) {
}
else
{
window
.
findAndReplaceDOMText
(
console_text
,
{
//preset: "prose",
find
:
elem
.
value
.
toLowerCase
()
,
find
:
elem
.
value
,
wrap
:
wrap_tag
});
// The searchAndReplace API is so bad you can't even know how
...
...
@@ -700,6 +700,15 @@ function toggle_bookmark(dir)
do_bookmark
(
dir
,
toc_is_bookmarked
(
id
));
}
function
is_special_key
(
key
)
{
// determine all special keys which should be handled on the spot and
// *not* be forwarded to the search text field
return
key
===
9
// tab key
||
(
key
>=
16
&&
key
<=
18
)
// modifier (shift, ctrl, alt)
||
(
key
>=
33
&&
key
<=
40
);
// cursor keys
}
function
add_events
()
{
// closing the Window
nw
.
Window
.
get
().
on
(
"
close
"
,
function
()
{
...
...
@@ -755,6 +764,7 @@ function add_events() {
}
else
if
((
evt
.
target
===
button_elem
||
evt
.
target
===
button_elem2
)
&&
evt
.
keyCode
===
10
||
evt
.
keyCode
===
13
)
{
}
else
if
(
is_special_key
(
evt
.
keyCode
))
{
}
else
if
(
evt
.
target
!==
input_elem
)
{
input_elem
.
focus
();
}
else
if
(
bookmark_shortcut
(
evt
))
{
...
...
@@ -887,7 +897,7 @@ function doc_search() {
src=
"bookmark.svg"
id=
"bookmark_indicator"
data-i18n=
"[title]search.bookmark"
>
</form>
</form>
<div
id=
"results"
>
</div>
<div
id =
"console_find"
style=
"display:none;"
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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