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
16d2f67a
authored
2016-07-08 16:13:28 -0400
by
Jeff Balicki
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit
1 parent
262fa897
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
14 deletions
public/files/js/interfaceGdrive.js
public/files/js/interfaceGdrive.js
View file @
16d2f67
//
var pluginUrl = "http://localhost:8888/Forms";
//
var pdf_customizer = "http://localhost:8888/pdf-customizer/public";
//
var pluginUrl = "http://localhost:8888/Forms";
//
var pdf_customizer = "http://localhost:8888/pdf-customizer/public";
var
pluginUrl
=
"http://contact.gotenzing.com"
;
...
...
@@ -101,21 +101,23 @@ function ShowBox(pheight, pwidth, up, right, height, width, count, example) {
function
HideBox
()
{
jQuery
(
document
).
ready
(
function
(
$
)
{
$
(
'span'
).
hide
();
console
.
log
(
'hide'
);
var
Qc
=
document
.
getElementById
(
"Canvas"
);
var
Qctx
=
Qc
.
getContext
(
"2d"
);
Qctx
.
clearRect
(
0
,
0
,
Qc
.
width
,
Qc
.
height
);
Qctx
.
restore
();
var
cnv
=
document
.
getElementById
(
"Canvas"
);
var
ctx
=
cnv
.
getContext
(
'2d'
);
// gets reference to canvas context
ctx
.
beginPath
();
// clear existing drawing paths
ctx
.
save
();
// store the current transformation matrix
});
}
function
HideBoxwithdate
()
{
jQuery
(
document
).
ready
(
function
(
$
)
{
var
cnv
=
document
.
getElementById
(
"Canvas"
);
var
ctx
=
cnv
.
getContext
(
'2d'
);
// gets reference to canvas context
ctx
.
beginPath
();
// clear existing drawing paths
ctx
.
save
();
// store the current transformation matrix
var
Qc
=
document
.
getElementById
(
"Canvas"
);
var
Qctx
=
Qc
.
getContext
(
"2d"
);
Qctx
.
clearRect
(
0
,
0
,
Qc
.
width
,
Qc
.
height
);
Qctx
.
restore
();
});
}
...
...
@@ -180,7 +182,16 @@ function changePdfOptions(json) {
// '$(this)' refers to '$("#datepicker")'
});
$
(
"#changes"
).
validate
();
$
(
"#changes"
).
validate
({
errorPlacement
:
function
(
error
,
element
)
{
var
isFile
=
$
(
element
).
attr
(
'type'
)
==
'file'
;
if
(
isFile
)
{
error
.
insertAfter
(
$
(
element
).
parent
(
'label'
));
}
else
{
error
.
insertAfter
(
element
);
}
}
});
});
var
strVar2
=
""
;
...
...
@@ -188,9 +199,9 @@ function changePdfOptions(json) {
var
pdfChange
=
""
;
var
f
=
0
;
var
scaleImage
=
40
0
/
json
[
0
].
pwidth
;
var
scaleImage
=
35
0
/
json
[
0
].
pwidth
;
var
imageHeight
=
json
[
0
].
pheight
*
scaleImage
;
var
imageWidth
=
40
0
;
var
imageWidth
=
35
0
;
console
.
log
(
json
[
0
].
pheight
,
scaleImage
,
imageHeight
);
pdflist
+=
'<div id="pdfPreview" class="column">'
;
...
...
@@ -295,9 +306,14 @@ function changePdfOptions(json) {
}
else
{
$
(
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