Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Tenzing
/
pdf-customizer
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
362be453
authored
2016-07-09 12:30:59 -0400
by
Jeff Balicki
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed focus
1 parent
cff0af30
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
public/files/js/interfaceGdrive.js
public/files/js/interfaceGdrive.js
View file @
362be45
...
...
@@ -101,7 +101,7 @@ function ShowBox(pheight, pwidth, up, right, height, width, count, example) {
function
HideBox
()
{
jQuery
(
document
).
ready
(
function
(
$
)
{
$
(
'span'
).
hide
();
console
.
log
(
'hide'
);
//
console.log('hide');
var
Qc
=
document
.
getElementById
(
"Canvas"
);
var
Qctx
=
Qc
.
getContext
(
"2d"
);
Qctx
.
clearRect
(
0
,
0
,
Qc
.
width
,
Qc
.
height
);
...
...
@@ -222,7 +222,7 @@ function changePdfOptions(json) {
pdfChange
+=
'<span id="span'
+
i
+
'">'
+
json
[
i
].
tips
+
'</span><br/>'
;
}
if
(
json
[
i
].
change_type
==
"img"
)
{
pdfChange
+=
json
[
i
].
names
+
':<label
id="focusButton'
+
i
+
'" class="custom-file-input" tabindex="0"><input tabindex="-1" onfocusout="HideBox()" onfocus=" ShowBox('
+
json
[
0
].
pheight
+
','
+
json
[
0
].
pwidth
+
','
+
json
[
i
].
locationUp
+
','
+
json
[
i
].
locationRight
+
','
+
json
[
i
].
height
+
','
+
json
[
i
].
width
+
','
+
i
+
',\''
+
example
+
'\')
" class="fileupload upload required" id="changescontent['
+
i
+
']" type="file" name="content['
+
i
+
']" ><span class="file-button"><span class="file-name file-button"></span><strong>Browse</strong></span></label>'
;
pdfChange
+=
json
[
i
].
names
+
':<label
onfocusout="HideBox()" onfocus=" ShowBox('
+
json
[
0
].
pheight
+
','
+
json
[
0
].
pwidth
+
','
+
json
[
i
].
locationUp
+
','
+
json
[
i
].
locationRight
+
','
+
json
[
i
].
height
+
','
+
json
[
i
].
width
+
','
+
i
+
',\''
+
example
+
'\')" id="focusButton'
+
i
+
'" class="custom-file-input" tabindex="0"><input tabindex="-1
" class="fileupload upload required" id="changescontent['
+
i
+
']" type="file" name="content['
+
i
+
']" ><span class="file-button"><span class="file-name file-button"></span><strong>Browse</strong></span></label>'
;
pdfChange
+=
'<span id="span'
+
i
+
'">'
+
json
[
i
].
tips
+
'</span><br/>'
;
}
if
(
json
[
i
].
change_type
==
"date"
)
{
...
...
@@ -307,12 +307,16 @@ function changePdfOptions(json) {
$
(
target
).
parent
(
'label'
).
find
(
'.file-name'
).
text
(
''
);
}
$
(
target
).
parent
(
'label'
).
trigger
(
'focus'
);
});
$
(
'.custom-file-input'
).
keypress
(
function
(
event
)
{
if
(
event
.
which
==
13
)
{
$
(
this
).
trigger
(
'click'
);
}
});
$
(
"#changes"
).
submit
(
function
(
e
)
{
e
.
preventDefault
();
...
...
Please
register
or
sign in
to post a comment