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
cf17c7ab
authored
2016-08-16 10:38:51 -0400
by
Jeff Balicki
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
js changes
1 parent
7dbc1e0c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
18 deletions
public/files/js/interfaceGdrive.js
public/files/js/interfaceGdrive.js
View file @
cf17c7a
//var pluginUrl = "http://localhost:8888/Forms"
;
//var pdf_customizer = "http://localhost:8888/pdf-customizer/public
";
var
pluginUrl
=
window
.
location
.
protocol
+
'//'
+
window
.
location
.
host
;
var
pdf_customizer
=
"http://pdf-customizer.synapsus.co
"
;
var
pluginUrl
=
"http://contact.gotenzing.com"
;
var
pdf_customizer
=
"http://pdf-customizer.synapsus.co"
;
//
var pluginUrl = "http://contact.gotenzing.com";
//
var pdf_customizer = "http://pdf-customizer.synapsus.co";
var
imageHeight
=
""
;
...
...
@@ -87,7 +87,7 @@ function ShowBox(pheight, pwidth, up, right, height, width, count, example) {
var
ctx
=
c
.
getContext
(
"2d"
);
ctx
.
save
();
ctx
.
lineWidth
=
2
;
ctx
.
strokeStyle
=
"#F7A800"
;
ctx
.
strokeStyle
=
$
(
'.callout'
).
css
(
"background-color"
)
ctx
.
roundRect
(
scaleRight
,
scaleDown
,
scalewidth
,
scaleheight
,
5
).
stroke
();
//ctx.rect(scaleRight, scaleDown, scalewidth, scaleheight );
//console.log(scaleRight, scaleDown, scalewidth, scaleheight);
...
...
@@ -179,7 +179,7 @@ function pickPdfFromList(json) {
pdflist
+=
"</div>"
;
}
strVar
+=
' <div class="callout primary"><div class="row column"> <h1 class="pdfeditortitle">CUBOS COLLATERAL MATERIAL</h1>'
;
strVar
+=
' <div
id="callout"
class="callout primary"><div class="row column"> <h1 class="pdfeditortitle">CUBOS COLLATERAL MATERIAL</h1>'
;
strVar
+=
'</div></div></div><div id="contentAreaOver"></div> '
;
document
.
getElementById
(
'contentArea'
).
innerHTML
=
strVar
;
});
...
...
@@ -230,20 +230,23 @@ function changePdfOptions(json, edit) {
var
pdfChange
=
""
;
var
f
=
0
;
var
windowWidth
=
0.68
*
$
(
window
).
width
();
var
windowHeight
=
0.86
*
$
(
window
).
height
();
var
windowWidth
=
0.90
*
$
(
".layout-grid"
).
width
();
var
windowHeight
=
0.90
*
$
(
".layout-grid"
).
height
();
var
windowHBG
=
0.923
*
$
(
window
).
height
();
var
pwidth
=
parseInt
(
json
[
0
].
pwidth
);
var
pheight
=
parseInt
(
json
[
0
].
pheight
);
//console.log( windowWidth+' '+windowHeight);
//console.log( pwidth+' '+pheight);
if
(
pwidth
>
pheight
){
//console.log('wide')
var
scaleImage
=
windowWidth
/
pwidth
;
var
imageHeight
=
pheight
*
scaleImage
;
var
imageWidth
=
windowWidth
;
var
imgLeft
=
0
;
var
imgTop
=
25
;
var
imgTop
=
40
;
}
else
{
var
scaleImage
=
windowHeight
/
pheight
;
var
imageHeight
=
windowHeight
;
...
...
@@ -317,13 +320,13 @@ function changePdfOptions(json, edit) {
init_instance_callback
:
function
(
editor
)
{
var
editorDoc
=
document
.
getElementById
(
editor
.
id
+
'_ifr'
);
var
editorDocContent
=
editorDoc
.
contentDocument
;
editorDoc
.
style
.
border
=
"
2
px solid #131212"
;
editorDoc
.
style
.
border
=
"
0
px solid #131212"
;
editorDocContent
.
body
.
style
.
backgroundColor
=
"#131212"
;
editorDocContent
.
body
.
style
.
color
=
"#ccc"
;
},
setup
:
function
(
editor
)
{
editor
.
on
(
'focus'
,
function
(
e
)
{
console
.
log
(
editor
.
id
);
//
console.log(editor.id);
var
editorDoc
=
document
.
getElementById
(
editor
.
id
+
'_ifr'
);
var
editorDocContent
=
editorDoc
.
contentDocument
;
...
...
@@ -333,7 +336,7 @@ function changePdfOptions(json, edit) {
//$(this).css('border', '2px solid #F7A800 !important');
});
editor
.
on
(
'blur'
,
function
(
e
)
{
console
.
log
(
'out'
+
editor
.
id
);
//
console.log('out' + editor.id);
var
editorDoc
=
document
.
getElementById
(
editor
.
id
+
'_ifr'
);
var
editorDocContent
=
editorDoc
.
contentDocument
;
editorDoc
.
style
.
border
=
"2px solid #131212"
;
...
...
@@ -358,7 +361,7 @@ function changePdfOptions(json, edit) {
$
(
".fileupload"
).
change
(
function
(
e
)
{
var
target
=
e
.
target
;
files
=
e
.
target
.
files
;
console
.
log
(
files
);
//
console.log(files);
if
(
files
.
length
>=
1
)
{
for
(
var
i
=
0
,
file
;
file
=
files
[
i
];
i
++
)
{
...
...
@@ -418,7 +421,7 @@ function changePdfOptions(json, edit) {
}
});}
var
form
=
$
(
"#changes"
);
console
.
log
(
form
);
//
console.log(form);
returnfileOptions
(
imagefiles
,
form
);
return
false
;
...
...
@@ -501,8 +504,8 @@ function returnOptions(form) {
}
jsonReturn
+=
' ]}'
;
var
windowWidth
=
0.
68
*
$
(
window
).
width
();
var
windowHeight
=
0.
86
*
$
(
window
).
height
();
var
windowWidth
=
0.
75
*
$
(
"#wrapper"
).
width
();
var
windowHeight
=
0.
75
*
$
(
"#wrapper"
).
height
();
var
windowHBG
=
0.923
*
$
(
window
).
height
();
var
pwidth
=
parseInt
(
json
[
0
].
pwidth
);
...
...
@@ -554,7 +557,7 @@ function returnOptions(form) {
var
strVar3
=
'<div id="button"><input id="editMe" type="submit" value="Edit"><a href="'
+
pdf_customizer
+
'/fileentry/getPDF/'
+
json
[
0
].
folder
+
'/new_'
+
json
[
0
].
file
+
'" download="'
+
json
[
0
].
file
+
'" ><input id="downloadMe" type="submit" value="Download"></a> </div>'
;
document
.
getElementById
(
'changes'
).
innerHTML
=
strVar3
;
//
console.log(data);
//
console.log(data);
// $('#changes').show();
...
...
Please
register
or
sign in
to post a comment