interface.js
8.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
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);
}