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
2931546b
authored
2016-05-19 12:56:54 -0400
by
Jeff Balicki
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
f
1 parent
214e8112
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
221 deletions
public/files/js/interface.js
public/js/interface.js
public/files/js/interface.js
View file @
2931546
...
...
@@ -77,46 +77,22 @@ $.ajax(settings).done(function (response) {
var
strVar
=
""
;
strVar
+=
"<link rel=\"stylesheet\" href=\"http:\/\/dhbhdrzi4tiry.cloudfront.net\/cdn\/sites\/foundation.min.css\">"
;
strVar
+=
" <link href=\"http:\/\/cdnjs.cloudflare.com\/ajax\/libs\/foundicons\/3.0.0\/foundation-icons.css\" rel=\"stylesheet\" type=\"text\/css\">"
;
var
i
;
var
pdflist
=
""
;
for
(
i
=
0
;
i
<
json
.
length
;
++
i
)
{
pdflist
+=
"<div class=\"column\">"
;
pdflist
+=
'<a href=\"#\" onclick=\"getOneJson('
+
json
[
i
].
idPDF
+
');\"> <img class=\"thumbnail\" src="http://pdf-customizer.synapsus.co//fileentry/getImage/'
+
json
[
i
].
folder
+
'/'
+
json
[
i
].
image
+
'" height=\"270px\"></a>'
;
pdflist
+=
'<a href=\"#\" onclick=\"getOneJson('
+
json
[
i
].
idPDF
+
');\"> <img class=\"thumbnail\" src="http://pdf-customizer.synapsus.co//
/
fileentry/getImage/'
+
json
[
i
].
folder
+
'/'
+
json
[
i
].
image
+
'" height=\"270px\"></a>'
;
pdflist
+=
" <h5>"
+
json
[
i
].
name
+
"<\/h5>"
;
pdflist
+=
"<\/div>"
;
}
strVar
+=
" <div class=\"callout primary\">"
;
strVar
+=
" <div class=\"row column\">"
;
strVar
+=
" <h1>Welcome to Synapsus Online PDF Editor<\/h1>"
;
strVar
+=
" <p class=\"lead\">Please pick a PDF<\/p>"
;
strVar
+=
" <\/div>"
;
strVar
+=
" <\/div>"
;
strVar
+=
" <div class=\"row small-up-2 medium-up-3 large-up-4\">"
;
strVar
+=
pdflist
;
strVar
+=
" <\/div>"
;
strVar
+=
" <hr>"
;
strVar
+=
""
;
strVar
+=
" <\/div>"
;
strVar
+=
" <\/div>"
;
strVar
+=
" <\/div>"
;
strVar
+=
" <\/div>"
;
strVar
+=
"<\/div>"
;
strVar
+=
"<\/div>"
;
strVar
+=
""
;
strVar
+=
"<script src=\"http:\/\/dhbhdrzi4tiry.cloudfront.net\/cdn\/sites\/foundation.js\"><\/script>"
;
strVar
+=
"<script>"
;
strVar
+=
" $(document).foundation();"
;
strVar
+=
"<\/script>"
;
strVar
+=
""
;
strVar
+=
""
;
strVar
+=
" <div class=\"callout primary\"><div class=\"row column\"> <h1>Welcome to Synapsus Online PDF Editor<\/h1>"
;
strVar
+=
" <p class=\"lead\">Please pick a PDF<\/p> <\/div><\/div> <div class=\"row small-up-2 medium-up-3 large-up-4\">"
;
strVar
+=
pdflist
+
" <\/div>"
;
document
.
getElementById
(
'contentArea'
).
innerHTML
=
strVar
;
...
...
@@ -133,61 +109,31 @@ function changePdfOptions(json){
json
=
JSON
.
parse
(
json
);
var
strVar2
=
""
;
strVar2
+=
"<link rel=\"stylesheet\" href=\"http:\/\/dhbhdrzi4tiry.cloudfront.net\/cdn\/sites\/foundation.min.css\">"
;
strVar2
+=
"<link href=\"http:\/\/cdnjs.cloudflare.com\/ajax\/libs\/foundicons\/3.0.0\/foundation-icons.css\" rel=\"stylesheet\" type=\"text\/css\">"
;
var
pdflist
=
""
;
var
pdfChange
=
""
;
pdflist
+=
"<div class=\"column\">"
;
pdflist
+=
' <img src=\"http://pdf-customizer.synapsus.co//fileentry/getImage/'
+
json
[
0
].
folder
+
'/'
+
json
[
0
].
image
+
'\" width=\"300px\">'
;
pdflist
+=
"<\/div>"
;
var
pdfChange
=
"<br>"
;
pdflist
+=
' <img src=\"http://pdf-customizer.synapsus.co/fileentry/getImage/'
+
json
[
0
].
folder
+
'/'
+
json
[
0
].
image
+
'\" width=\"300px\">'
;
pdflist
+=
"<\/div><br>"
;
pdfChange
+=
"<form id=\"changes\" name=\"changes\" enctype=\"multipart/form-data\" action=\"#\" METHOD=\"POST\"><h4>"
+
json
[
0
].
name
+
"</h4>"
;
pdfChange
+=
" <input type=\"hidden\" id=\"id\" name=\"id\" value=\""
+
json
[
0
].
idPDF
+
"\">"
;
for
(
i
=
0
;
i
<
json
.
length
;
++
i
)
{
if
(
json
[
i
].
change_type
==
"text"
){
pdfChange
+=
" Text: <input id=\"content\" type=\"text\" name=\"content\" value=\""
+
json
[
i
].
content
+
"\">"
;
;
}
if
(
json
[
i
].
change_type
==
"img"
){
pdfChange
+=
"Image: <input class=\"fileupload\" id=\"content\" style=\"display: block; box-sizing: border-box; width: 100%; height: 2.4375rem; padding: .5rem; border: 1px solid #cacaca; margin: 0 0 1rem; font-family: inherit; font-size: 1rem; color: #8a8a8a; background-color: #fefefe; box-shadow: inset 0 1px 2px rgba(10,10,10,.1); border-radius: 0; transition: box-shadow .5s,border-color .25s ease-in-out; -webkit-appearance: none; -moz-appearance: none;\" type=\"file\" name=\"content\" >"
;
pdfChange
+=
" Text: <input id=\"content\" type=\"text\" name=\"content\" value=\""
+
json
[
i
].
content
+
"\">"
;
}
if
(
json
[
i
].
change_type
==
"img"
){
pdfChange
+=
"Image: <input class=\"fileupload\" id=\"content\" style=\"display: block; box-sizing: border-box; width: 100%; height: 2.4375rem; padding: .5rem; border: 1px solid #cacaca; margin: 0 0 1rem; font-family: inherit; font-size: 1rem; color: #8a8a8a; background-color: #fefefe; box-shadow: inset 0 1px 2px rgba(10,10,10,.1); border-radius: 0; transition: box-shadow .5s,border-color .25s ease-in-out; -webkit-appearance: none; -moz-appearance: none;\" type=\"file\" name=\"content\" >"
;
}
}
}
pdfChange
+=
" <input type=\"submit\" onclick=' ' value=\"Submit\">"
;
pdfChange
+=
"<\/form>"
;
strVar2
+=
" <link rel=\"stylesheet\" href=\"http:\/\/dhbhdrzi4tiry.cloudfront.net\/cdn\/sites\/foundation.min.css\">"
;
strVar2
+=
" <div class=\"callout primary\">"
;
strVar2
+=
" <div class=\"row column\">"
;
strVar2
+=
" <h1>Welcome to Synapsus Online PDF Editor<\/h1>"
;
strVar2
+=
" <p class=\"lead\">Please make your changes or return <a href=\"#\" onclick=\"getJson("
+
user_id
+
");\">back to the list</a><\/p>"
;
strVar2
+=
" <\/div>"
;
strVar2
+=
" <\/div>"
;
strVar2
+=
" <div class=\"row small-up-2 medium-up-3 large-up-3\">"
;
strVar2
+=
pdflist
+
"<div class=\"column\">"
+
pdfChange
+
"<\/div>"
;
strVar2
+=
" <\/div>"
;
strVar2
+=
" <hr>"
;
strVar2
+=
""
;
strVar2
+=
" <\/div>"
;
strVar2
+=
" <\/div>"
;
strVar2
+=
" <\/div>"
;
strVar2
+=
" <\/div>"
;
strVar2
+=
"<\/div>"
;
strVar2
+=
""
;
strVar2
+=
"<script src=\"http:\/\/dhbhdrzi4tiry.cloudfront.net\/cdn\/sites\/foundation.js\"><\/script>"
;
strVar2
+=
"<script>"
;
strVar2
+=
" $(document).foundation();"
;
strVar2
+=
"<\/script>"
;
strVar2
+=
""
;
strVar2
+=
" <div class=\"callout primary\"><div class=\"row column\"><h1>Welcome to Synapsus Online PDF Editor<\/h1>"
;
strVar2
+=
"<p class=\"lead\">Please make your changes or return <a href=\"#\" onclick=\"getJson("
+
user_id
+
");\">back to the list</a><\/p>"
;
strVar2
+=
" <\/div><\/div><div class=\"row small-up-2 medium-up-3 large-up-3\">"
;
strVar2
+=
pdflist
+
"<div class=\"column\">"
+
pdfChange
+
"<\/div><\/div>"
;
document
.
getElementById
(
'contentArea'
).
innerHTML
=
strVar2
;
...
...
public/js/interface.js
deleted
100644 → 0
View file @
214e811
function
pickPdfFromList
(){
var
strVar
=
""
;
strVar
+=
"<link rel=\"stylesheet\" href=\"http:\/\/dhbhdrzi4tiry.cloudfront.net\/cdn\/sites\/foundation.min.css\">"
;
strVar
+=
" <link href=\"http:\/\/cdnjs.cloudflare.com\/ajax\/libs\/foundicons\/3.0.0\/foundation-icons.css\" rel=\"stylesheet\" type=\"text\/css\">"
;
strVar
+=
" <script src=\"https:\/\/code.jquery.com\/jquery-2.2.3.min.js\" integrity=\"sha256-a23g1Nt4dtEYOj7bR+vTu7+T8VP13humZFBJNIYoEJo=\" crossorigin=\"anonymous\"><\/script>"
;
var
json
=
[{
"idPDF"
:
14
,
"name"
:
"SISKINDS_test file"
,
"folder"
:
"SISKINDS_test"
,
"file"
:
"SISKINDS_test_file.pdf"
,
"image"
:
"SISKINDS_test_file.jpg"
,
"custId"
:
1
,
"apiCallId"
:
3
},{
"idPDF"
:
27
,
"name"
:
"test file"
,
"folder"
:
"SISKINDStest-file"
,
"file"
:
"pdf-sample.pdf"
,
"image"
:
"pdf-sample.jpg"
,
"custId"
:
1
,
"apiCallId"
:
25
}];
var
i
;
var
pdflist
=
""
;
for
(
i
=
0
;
i
<
json
.
length
;
++
i
)
{
pdflist
+=
"<div class=\"column\">"
;
pdflist
+=
' <img class=\"thumbnail\" src="/Applications/MAMP/htdocs/pdfEdit/storage/app/public/'
+
json
[
i
].
folder
+
'/'
+
json
[
i
].
image
+
'" height=\"270px\">'
;
pdflist
+=
" <h5>"
+
json
[
i
].
name
+
"<\/h5>"
;
pdflist
+=
"<\/div>"
;
}
strVar
+=
" <link rel=\"stylesheet\" href=\"http:\/\/dhbhdrzi4tiry.cloudfront.net\/cdn\/sites\/foundation.min.css\">"
;
strVar
+=
"<div class=\"off-canvas-wrapper\">"
;
strVar
+=
" <div class=\"off-canvas-wrapper-inner\" data-off-canvas-wrapper>"
;
strVar
+=
" <div class=\"off-canvas position-left reveal-for-large\" id=\"my-info\" data-off-canvas data-position=\"left\">"
;
strVar
+=
" <div class=\"row column\">"
;
strVar
+=
" <br>"
;
strVar
+=
" <img class=\"thumbnail\" src=\"http:\/\/placehold.it\/550x350\">"
;
strVar
+=
" <\/div>"
;
strVar
+=
" <\/div>"
;
strVar
+=
" <div class=\"off-canvas-content\" data-off-canvas-content>"
;
strVar
+=
" <div class=\"title-bar hide-for-large\">"
;
strVar
+=
" <div class=\"title-bar-left\">"
;
strVar
+=
" <button class=\"menu-icon\" type=\"button\" data-open=\"my-info\"><\/button>"
;
strVar
+=
" <span class=\"title-bar-title\">Synapsus<\/span>"
;
strVar
+=
" <\/div>"
;
strVar
+=
" <\/div>"
;
strVar
+=
" <div class=\"callout primary\">"
;
strVar
+=
" <div class=\"row column\">"
;
strVar
+=
" <h1>Welcome to Synapsus Online PDF Editor<\/h1>"
;
strVar
+=
" <p class=\"lead\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.<\/p>"
;
strVar
+=
" <\/div>"
;
strVar
+=
" <\/div>"
;
strVar
+=
" <div class=\"row small-up-2 medium-up-3 large-up-4\">"
;
strVar
+=
pdflist
;
strVar
+=
" <\/div>"
;
strVar
+=
" <hr>"
;
strVar
+=
""
;
strVar
+=
" <\/div>"
;
strVar
+=
" <\/div>"
;
strVar
+=
" <\/div>"
;
strVar
+=
" <\/div>"
;
strVar
+=
"<\/div>"
;
strVar
+=
""
;
strVar
+=
"<script src=\"http:\/\/dhbhdrzi4tiry.cloudfront.net\/cdn\/sites\/foundation.js\"><\/script>"
;
strVar
+=
"<script>"
;
strVar
+=
" $(document).foundation();"
;
strVar
+=
"<\/script>"
;
strVar
+=
""
;
strVar
+=
""
;
document
.
write
(
strVar
);
}
function
changePdfOptions
(){
var
strVar2
=
""
;
strVar2
+=
"<link rel=\"stylesheet\" href=\"http:\/\/dhbhdrzi4tiry.cloudfront.net\/cdn\/sites\/foundation.min.css\">"
;
strVar2
+=
" <link href=\"http:\/\/cdnjs.cloudflare.com\/ajax\/libs\/foundicons\/3.0.0\/foundation-icons.css\" rel=\"stylesheet\" type=\"text\/css\">"
;
strVar2
+=
" <script src=\"https:\/\/code.jquery.com\/jquery-2.2.3.min.js\" integrity=\"sha256-a23g1Nt4dtEYOj7bR+vTu7+T8VP13humZFBJNIYoEJo=\" crossorigin=\"anonymous\"><\/script>"
;
var
json
=
[{
"idPDF"
:
14
,
"name"
:
"test file"
,
"folder"
:
"SISKINDS_test"
,
"file"
:
"SISKINDS_test_file.pdf"
,
"image"
:
"SISKINDS_test_file.jpg"
,
"custId"
:
1
,
"apiCallId"
:
3
,
"idchangesPDF"
:
18
,
"PDF_idPDF"
:
14
,
"change_typePDF_idchange_typePDF"
:
1
,
"stylesPDF_idstylesPDF"
:
18
,
"locationUp"
:
"60"
,
"locationRight"
:
290
,
"pages"
:
"1"
,
"content"
:
"519.660.2121 siskinds.com\/change"
,
"z-index"
:
0
,
"idstylesPDF"
:
18
,
"order"
:
"1"
,
"label"
:
"Text"
,
"style"
:
"a:3:{s:11:\"font-family\";s:11:\"TradeGothic\";s:9:\"font-size\";s:2:\"14\";s:10:\"font-color\";s:14:\"cmyk 0 0 0.5 0\";}"
,
"idchange_typePDF"
:
1
,
"change_type"
:
"text"
},{
"idPDF"
:
14
,
"name"
:
"test file"
,
"folder"
:
"SISKINDS_test"
,
"file"
:
"SISKINDS_test_file.pdf"
,
"image"
:
"SISKINDS_test_file.jpg"
,
"custId"
:
1
,
"apiCallId"
:
3
,
"idchangesPDF"
:
17
,
"PDF_idPDF"
:
14
,
"change_typePDF_idchange_typePDF"
:
2
,
"stylesPDF_idstylesPDF"
:
17
,
"locationUp"
:
"400"
,
"locationRight"
:
90
,
"pages"
:
"1"
,
"content"
:
"siskins.png"
,
"z-index"
:
0
,
"idstylesPDF"
:
17
,
"order"
:
"2"
,
"label"
:
"Image"
,
"style"
:
null
,
"idchange_typePDF"
:
2
,
"change_type"
:
"img"
}];
var
pdflist
=
""
;
pdflist
+=
"<div class=\"column\">"
;
pdflist
+=
' <img src=\"/Applications/MAMP/htdocs/pdfEdit/storage/app/public/'
+
json
[
0
].
folder
+
'/'
+
json
[
0
].
image
+
'\" width=\"300px\">'
;
pdflist
+=
"<\/div>"
;
var
pdfChange
=
"<br>"
;
pdfChange
+=
"<form id=\"changes\" action=\"\"><h4>"
+
json
[
0
].
name
+
"</h4>"
;
for
(
i
=
0
;
i
<
json
.
length
;
++
i
)
{
if
(
json
[
i
].
change_type
==
"text"
){
pdfChange
+=
" Text: <input id=\"content"
+
i
+
"\" type=\"text\" name=\"content"
+
i
+
"\" value=\""
+
json
[
i
].
content
+
"\">"
;
}
if
(
json
[
i
].
change_type
==
"img"
){
pdfChange
+=
" <input type=\"hidden\" id=\"content"
+
i
+
"\" name=\"content"
+
i
+
"\" value=\""
+
json
[
i
].
content
+
"\">"
;
pdfChange
+=
" Image: <input id=\"content"
+
i
+
"\" style=\"display: block; box-sizing: border-box; width: 100%; height: 2.4375rem; padding: .5rem; border: 1px solid #cacaca; margin: 0 0 1rem; font-family: inherit; font-size: 1rem; color: #8a8a8a; background-color: #fefefe; box-shadow: inset 0 1px 2px rgba(10,10,10,.1); border-radius: 0; transition: box-shadow .5s,border-color .25s ease-in-out; -webkit-appearance: none; -moz-appearance: none;\" type=\"file\" name=\"content"
+
i
+
"\" value=\""
+
json
[
i
].
content
+
"\">"
;
}
}
pdfChange
+=
" <input type=\"submit\" value=\"Submit\">"
;
pdfChange
+=
"<\/form>"
;
strVar2
+=
" <link rel=\"stylesheet\" href=\"http:\/\/dhbhdrzi4tiry.cloudfront.net\/cdn\/sites\/foundation.min.css\">"
;
strVar2
+=
"<div class=\"off-canvas-wrapper\">"
;
strVar2
+=
" <div class=\"off-canvas-wrapper-inner\" data-off-canvas-wrapper>"
;
strVar2
+=
" <div class=\"off-canvas position-left reveal-for-large\" id=\"my-info\" data-off-canvas data-position=\"left\">"
;
strVar2
+=
" <div class=\"row column\">"
;
strVar2
+=
" <br>"
;
strVar2
+=
" <img class=\"thumbnail\" src=\"http:\/\/placehold.it\/550x350\">"
;
strVar2
+=
" <\/div>"
;
strVar2
+=
" <\/div>"
;
strVar2
+=
" <div class=\"off-canvas-content\" data-off-canvas-content>"
;
strVar2
+=
" <div class=\"title-bar hide-for-large\">"
;
strVar2
+=
" <div class=\"title-bar-left\">"
;
strVar2
+=
" <button class=\"menu-icon\" type=\"button\" data-open=\"my-info\"><\/button>"
;
strVar2
+=
" <span class=\"title-bar-title\">Synapsus<\/span>"
;
strVar2
+=
" <\/div>"
;
strVar2
+=
" <\/div>"
;
strVar2
+=
" <div class=\"callout primary\">"
;
strVar2
+=
" <div class=\"row column\">"
;
strVar2
+=
" <h1>Welcome to Synapsus Online PDF Editor<\/h1>"
;
strVar2
+=
" <p class=\"lead\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.<\/p>"
;
strVar2
+=
" <\/div>"
;
strVar2
+=
" <\/div>"
;
strVar2
+=
" <div class=\"row small-up-2 medium-up-3 large-up-3\">"
;
strVar2
+=
pdflist
+
"<div class=\"column\">"
+
pdfChange
+
"<\/div>"
;
strVar2
+=
" <\/div>"
;
strVar2
+=
" <hr>"
;
strVar2
+=
""
;
strVar2
+=
" <\/div>"
;
strVar2
+=
" <\/div>"
;
strVar2
+=
" <\/div>"
;
strVar2
+=
" <\/div>"
;
strVar2
+=
"<\/div>"
;
strVar2
+=
""
;
strVar2
+=
"<script src=\"http:\/\/dhbhdrzi4tiry.cloudfront.net\/cdn\/sites\/foundation.js\"><\/script>"
;
strVar2
+=
"<script>"
;
strVar2
+=
" $(document).foundation();"
;
strVar2
+=
"<\/script>"
;
strVar2
+=
""
;
strVar2
+=
""
;
document
.
write
(
strVar2
);
}
\ No newline at end of file
Please
register
or
sign in
to post a comment