f
Showing
2 changed files
with
14 additions
and
215 deletions
| ... | @@ -77,46 +77,22 @@ $.ajax(settings).done(function (response) { | ... | @@ -77,46 +77,22 @@ $.ajax(settings).done(function (response) { |
| 77 | 77 | ||
| 78 | 78 | ||
| 79 | var strVar=""; | 79 | var strVar=""; |
| 80 | strVar += "<link rel=\"stylesheet\" href=\"http:\/\/dhbhdrzi4tiry.cloudfront.net\/cdn\/sites\/foundation.min.css\">"; | ||
| 81 | strVar += " <link href=\"http:\/\/cdnjs.cloudflare.com\/ajax\/libs\/foundicons\/3.0.0\/foundation-icons.css\" rel=\"stylesheet\" type=\"text\/css\">"; | ||
| 82 | |||
| 83 | 80 | ||
| 84 | 81 | ||
| 85 | var i; | 82 | var i; |
| 86 | var pdflist = ""; | 83 | var pdflist = ""; |
| 87 | for (i = 0; i < json.length; ++i) { | 84 | for (i = 0; i < json.length; ++i) { |
| 88 | pdflist += "<div class=\"column\">"; | 85 | pdflist += "<div class=\"column\">"; |
| 89 | 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>'; | 86 | 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>'; |
| 90 | pdflist += " <h5>" + json[i].name + "<\/h5>"; | 87 | pdflist += " <h5>" + json[i].name + "<\/h5>"; |
| 91 | pdflist += "<\/div>"; | 88 | pdflist += "<\/div>"; |
| 92 | } | 89 | } |
| 93 | 90 | ||
| 94 | 91 | ||
| 95 | strVar += " <div class=\"callout primary\">"; | 92 | strVar += " <div class=\"callout primary\"><div class=\"row column\"> <h1>Welcome to Synapsus Online PDF Editor<\/h1>"; |
| 96 | strVar += " <div class=\"row column\">"; | 93 | strVar += " <p class=\"lead\">Please pick a PDF<\/p> <\/div><\/div> <div class=\"row small-up-2 medium-up-3 large-up-4\">"; |
| 97 | strVar += " <h1>Welcome to Synapsus Online PDF Editor<\/h1>"; | 94 | strVar += pdflist +" <\/div>"; |
| 98 | strVar += " <p class=\"lead\">Please pick a PDF<\/p>"; | 95 | |
| 99 | strVar += " <\/div>"; | ||
| 100 | strVar += " <\/div>"; | ||
| 101 | |||
| 102 | strVar += " <div class=\"row small-up-2 medium-up-3 large-up-4\">"; | ||
| 103 | strVar += pdflist; | ||
| 104 | strVar += " <\/div>"; | ||
| 105 | strVar += " <hr>"; | ||
| 106 | strVar += ""; | ||
| 107 | strVar += " <\/div>"; | ||
| 108 | strVar += " <\/div>"; | ||
| 109 | strVar += " <\/div>"; | ||
| 110 | strVar += " <\/div>"; | ||
| 111 | strVar += "<\/div>"; | ||
| 112 | strVar += "<\/div>"; | ||
| 113 | strVar += ""; | ||
| 114 | strVar += "<script src=\"http:\/\/dhbhdrzi4tiry.cloudfront.net\/cdn\/sites\/foundation.js\"><\/script>"; | ||
| 115 | strVar += "<script>"; | ||
| 116 | strVar += " $(document).foundation();"; | ||
| 117 | strVar += "<\/script>"; | ||
| 118 | strVar += ""; | ||
| 119 | strVar += ""; | ||
| 120 | document.getElementById('contentArea').innerHTML = strVar; | 96 | document.getElementById('contentArea').innerHTML = strVar; |
| 121 | 97 | ||
| 122 | 98 | ||
| ... | @@ -133,61 +109,31 @@ function changePdfOptions(json){ | ... | @@ -133,61 +109,31 @@ function changePdfOptions(json){ |
| 133 | json = JSON.parse(json); | 109 | json = JSON.parse(json); |
| 134 | 110 | ||
| 135 | var strVar2=""; | 111 | var strVar2=""; |
| 136 | strVar2 += "<link rel=\"stylesheet\" href=\"http:\/\/dhbhdrzi4tiry.cloudfront.net\/cdn\/sites\/foundation.min.css\">"; | ||
| 137 | strVar2 += "<link href=\"http:\/\/cdnjs.cloudflare.com\/ajax\/libs\/foundicons\/3.0.0\/foundation-icons.css\" rel=\"stylesheet\" type=\"text\/css\">"; | ||
| 138 | |||
| 139 | 112 | ||
| 140 | 113 | ||
| 141 | var pdflist =""; | 114 | var pdflist =""; |
| 142 | 115 | var pdfChange =""; | |
| 143 | pdflist += "<div class=\"column\">"; | 116 | pdflist += "<div class=\"column\">"; |
| 144 | pdflist += ' <img src=\"http://pdf-customizer.synapsus.co//fileentry/getImage/' + json[0].folder + '/' + json[0].image + '\" width=\"300px\">'; | 117 | pdflist += ' <img src=\"http://pdf-customizer.synapsus.co/fileentry/getImage/' + json[0].folder + '/' + json[0].image + '\" width=\"300px\">'; |
| 145 | pdflist += "<\/div>"; | 118 | pdflist += "<\/div><br>"; |
| 146 | var pdfChange="<br>"; | ||
| 147 | pdfChange += "<form id=\"changes\" name=\"changes\" enctype=\"multipart/form-data\" action=\"#\" METHOD=\"POST\"><h4>" + json[0].name+"</h4>"; | 119 | pdfChange += "<form id=\"changes\" name=\"changes\" enctype=\"multipart/form-data\" action=\"#\" METHOD=\"POST\"><h4>" + json[0].name+"</h4>"; |
| 148 | pdfChange += " <input type=\"hidden\" id=\"id\" name=\"id\" value=\""+json[0].idPDF+"\">"; | 120 | pdfChange += " <input type=\"hidden\" id=\"id\" name=\"id\" value=\""+json[0].idPDF+"\">"; |
| 149 | for (i = 0; i < json.length; ++i) { | 121 | for (i = 0; i < json.length; ++i) { |
| 150 | if(json[i].change_type == "text"){ | 122 | if(json[i].change_type == "text"){ |
| 151 | |||
| 152 | |||
| 153 | pdfChange += " Text: <input id=\"content\" type=\"text\" name=\"content\" value=\""+json[i].content+"\">"; | 123 | pdfChange += " Text: <input id=\"content\" type=\"text\" name=\"content\" value=\""+json[i].content+"\">"; |
| 154 | |||
| 155 | |||
| 156 | ; | ||
| 157 | }if(json[i].change_type == "img"){ | 124 | }if(json[i].change_type == "img"){ |
| 158 | |||
| 159 | 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\" >"; | 125 | 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\" >"; |
| 160 | } | 126 | } |
| 161 | |||
| 162 | } | 127 | } |
| 163 | pdfChange += " <input type=\"submit\" onclick=' ' value=\"Submit\">"; | 128 | pdfChange += " <input type=\"submit\" onclick=' ' value=\"Submit\">"; |
| 164 | pdfChange += "<\/form>"; | 129 | pdfChange += "<\/form>"; |
| 165 | 130 | ||
| 166 | strVar2 += " <link rel=\"stylesheet\" href=\"http:\/\/dhbhdrzi4tiry.cloudfront.net\/cdn\/sites\/foundation.min.css\">"; | 131 | strVar2 += " <div class=\"callout primary\"><div class=\"row column\"><h1>Welcome to Synapsus Online PDF Editor<\/h1>"; |
| 167 | 132 | strVar2 += "<p class=\"lead\">Please make your changes or return <a href=\"#\" onclick=\"getJson("+user_id+");\">back to the list</a><\/p>"; | |
| 168 | strVar2 += " <div class=\"callout primary\">"; | 133 | strVar2 += " <\/div><\/div><div class=\"row small-up-2 medium-up-3 large-up-3\">"; |
| 169 | strVar2 += " <div class=\"row column\">"; | 134 | strVar2 += pdflist+"<div class=\"column\">"+pdfChange+"<\/div><\/div>"; |
| 170 | strVar2 += " <h1>Welcome to Synapsus Online PDF Editor<\/h1>"; | 135 | |
| 171 | strVar2 += " <p class=\"lead\">Please make your changes or return <a href=\"#\" onclick=\"getJson("+user_id+");\">back to the list</a><\/p>"; | 136 | |
| 172 | strVar2 += " <\/div>"; | ||
| 173 | strVar2 += " <\/div>"; | ||
| 174 | strVar2 += " <div class=\"row small-up-2 medium-up-3 large-up-3\">"; | ||
| 175 | strVar2 += pdflist+"<div class=\"column\">"+pdfChange+"<\/div>"; | ||
| 176 | strVar2 += " <\/div>"; | ||
| 177 | strVar2 += " <hr>"; | ||
| 178 | strVar2 += ""; | ||
| 179 | strVar2 += " <\/div>"; | ||
| 180 | strVar2 += " <\/div>"; | ||
| 181 | strVar2 += " <\/div>"; | ||
| 182 | strVar2 += " <\/div>"; | ||
| 183 | strVar2 += "<\/div>"; | ||
| 184 | strVar2 += ""; | ||
| 185 | strVar2 += "<script src=\"http:\/\/dhbhdrzi4tiry.cloudfront.net\/cdn\/sites\/foundation.js\"><\/script>"; | ||
| 186 | strVar2 += "<script>"; | ||
| 187 | strVar2 += " $(document).foundation();"; | ||
| 188 | strVar2 += "<\/script>"; | ||
| 189 | |||
| 190 | strVar2 += ""; | ||
| 191 | 137 | ||
| 192 | document.getElementById('contentArea').innerHTML =strVar2; | 138 | document.getElementById('contentArea').innerHTML =strVar2; |
| 193 | 139 | ... | ... |
public/js/interface.js
deleted
100644 → 0
| 1 | |||
| 2 | |||
| 3 | |||
| 4 | function pickPdfFromList(){ | ||
| 5 | |||
| 6 | var strVar=""; | ||
| 7 | strVar += "<link rel=\"stylesheet\" href=\"http:\/\/dhbhdrzi4tiry.cloudfront.net\/cdn\/sites\/foundation.min.css\">"; | ||
| 8 | strVar += " <link href=\"http:\/\/cdnjs.cloudflare.com\/ajax\/libs\/foundicons\/3.0.0\/foundation-icons.css\" rel=\"stylesheet\" type=\"text\/css\">"; | ||
| 9 | strVar += " <script src=\"https:\/\/code.jquery.com\/jquery-2.2.3.min.js\" integrity=\"sha256-a23g1Nt4dtEYOj7bR+vTu7+T8VP13humZFBJNIYoEJo=\" crossorigin=\"anonymous\"><\/script>"; | ||
| 10 | |||
| 11 | 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}]; | ||
| 12 | |||
| 13 | |||
| 14 | |||
| 15 | var i; | ||
| 16 | var pdflist =""; | ||
| 17 | for (i = 0; i < json.length; ++i) { | ||
| 18 | pdflist += "<div class=\"column\">"; | ||
| 19 | pdflist += ' <img class=\"thumbnail\" src="/Applications/MAMP/htdocs/pdfEdit/storage/app/public/'+json[i].folder+'/'+json[i].image+'" height=\"270px\">'; | ||
| 20 | pdflist += " <h5>"+json[i].name+"<\/h5>"; | ||
| 21 | pdflist += "<\/div>"; | ||
| 22 | } | ||
| 23 | |||
| 24 | |||
| 25 | strVar += " <link rel=\"stylesheet\" href=\"http:\/\/dhbhdrzi4tiry.cloudfront.net\/cdn\/sites\/foundation.min.css\">"; | ||
| 26 | strVar += "<div class=\"off-canvas-wrapper\">"; | ||
| 27 | strVar += " <div class=\"off-canvas-wrapper-inner\" data-off-canvas-wrapper>"; | ||
| 28 | strVar += " <div class=\"off-canvas position-left reveal-for-large\" id=\"my-info\" data-off-canvas data-position=\"left\">"; | ||
| 29 | strVar += " <div class=\"row column\">"; | ||
| 30 | strVar += " <br>"; | ||
| 31 | strVar += " <img class=\"thumbnail\" src=\"http:\/\/placehold.it\/550x350\">"; | ||
| 32 | strVar += " <\/div>"; | ||
| 33 | strVar += " <\/div>"; | ||
| 34 | strVar += " <div class=\"off-canvas-content\" data-off-canvas-content>"; | ||
| 35 | strVar += " <div class=\"title-bar hide-for-large\">"; | ||
| 36 | strVar += " <div class=\"title-bar-left\">"; | ||
| 37 | strVar += " <button class=\"menu-icon\" type=\"button\" data-open=\"my-info\"><\/button>"; | ||
| 38 | strVar += " <span class=\"title-bar-title\">Synapsus<\/span>"; | ||
| 39 | strVar += " <\/div>"; | ||
| 40 | strVar += " <\/div>"; | ||
| 41 | strVar += " <div class=\"callout primary\">"; | ||
| 42 | strVar += " <div class=\"row column\">"; | ||
| 43 | strVar += " <h1>Welcome to Synapsus Online PDF Editor<\/h1>"; | ||
| 44 | strVar += " <p class=\"lead\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.<\/p>"; | ||
| 45 | strVar += " <\/div>"; | ||
| 46 | strVar += " <\/div>"; | ||
| 47 | strVar += " <div class=\"row small-up-2 medium-up-3 large-up-4\">"; | ||
| 48 | strVar += pdflist; | ||
| 49 | strVar += " <\/div>"; | ||
| 50 | strVar += " <hr>"; | ||
| 51 | strVar += ""; | ||
| 52 | strVar += " <\/div>"; | ||
| 53 | strVar += " <\/div>"; | ||
| 54 | strVar += " <\/div>"; | ||
| 55 | strVar += " <\/div>"; | ||
| 56 | strVar += "<\/div>"; | ||
| 57 | strVar += ""; | ||
| 58 | strVar += "<script src=\"http:\/\/dhbhdrzi4tiry.cloudfront.net\/cdn\/sites\/foundation.js\"><\/script>"; | ||
| 59 | strVar += "<script>"; | ||
| 60 | strVar += " $(document).foundation();"; | ||
| 61 | strVar += "<\/script>"; | ||
| 62 | strVar += ""; | ||
| 63 | strVar += ""; | ||
| 64 | document.write(strVar); | ||
| 65 | |||
| 66 | } | ||
| 67 | |||
| 68 | function changePdfOptions(){ | ||
| 69 | |||
| 70 | var strVar2=""; | ||
| 71 | strVar2 += "<link rel=\"stylesheet\" href=\"http:\/\/dhbhdrzi4tiry.cloudfront.net\/cdn\/sites\/foundation.min.css\">"; | ||
| 72 | strVar2 += " <link href=\"http:\/\/cdnjs.cloudflare.com\/ajax\/libs\/foundicons\/3.0.0\/foundation-icons.css\" rel=\"stylesheet\" type=\"text\/css\">"; | ||
| 73 | strVar2 += " <script src=\"https:\/\/code.jquery.com\/jquery-2.2.3.min.js\" integrity=\"sha256-a23g1Nt4dtEYOj7bR+vTu7+T8VP13humZFBJNIYoEJo=\" crossorigin=\"anonymous\"><\/script>"; | ||
| 74 | |||
| 75 | 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"}]; | ||
| 76 | var pdflist =""; | ||
| 77 | |||
| 78 | pdflist += "<div class=\"column\">"; | ||
| 79 | pdflist += ' <img src=\"/Applications/MAMP/htdocs/pdfEdit/storage/app/public/'+json[0].folder+'/'+json[0].image+'\" width=\"300px\">'; | ||
| 80 | pdflist += "<\/div>"; | ||
| 81 | var pdfChange="<br>"; | ||
| 82 | pdfChange += "<form id=\"changes\" action=\"\"><h4>" + json[0].name+"</h4>"; | ||
| 83 | for (i = 0; i < json.length; ++i) { | ||
| 84 | if(json[i].change_type == "text"){ | ||
| 85 | |||
| 86 | |||
| 87 | pdfChange += " Text: <input id=\"content"+i+"\" type=\"text\" name=\"content"+i+"\" value=\""+json[i].content+"\">"; | ||
| 88 | |||
| 89 | |||
| 90 | |||
| 91 | }if(json[i].change_type == "img"){ | ||
| 92 | pdfChange += " <input type=\"hidden\" id=\"content"+i+"\" name=\"content"+i+"\" value=\""+json[i].content+"\">"; | ||
| 93 | 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+"\">"; | ||
| 94 | } | ||
| 95 | |||
| 96 | } | ||
| 97 | pdfChange += " <input type=\"submit\" value=\"Submit\">"; | ||
| 98 | pdfChange += "<\/form>"; | ||
| 99 | |||
| 100 | strVar2 += " <link rel=\"stylesheet\" href=\"http:\/\/dhbhdrzi4tiry.cloudfront.net\/cdn\/sites\/foundation.min.css\">"; | ||
| 101 | strVar2 += "<div class=\"off-canvas-wrapper\">"; | ||
| 102 | strVar2 += " <div class=\"off-canvas-wrapper-inner\" data-off-canvas-wrapper>"; | ||
| 103 | strVar2 += " <div class=\"off-canvas position-left reveal-for-large\" id=\"my-info\" data-off-canvas data-position=\"left\">"; | ||
| 104 | strVar2 += " <div class=\"row column\">"; | ||
| 105 | strVar2 += " <br>"; | ||
| 106 | strVar2 += " <img class=\"thumbnail\" src=\"http:\/\/placehold.it\/550x350\">"; | ||
| 107 | strVar2 += " <\/div>"; | ||
| 108 | strVar2 += " <\/div>"; | ||
| 109 | strVar2 += " <div class=\"off-canvas-content\" data-off-canvas-content>"; | ||
| 110 | strVar2 += " <div class=\"title-bar hide-for-large\">"; | ||
| 111 | strVar2 += " <div class=\"title-bar-left\">"; | ||
| 112 | strVar2 += " <button class=\"menu-icon\" type=\"button\" data-open=\"my-info\"><\/button>"; | ||
| 113 | strVar2 += " <span class=\"title-bar-title\">Synapsus<\/span>"; | ||
| 114 | strVar2 += " <\/div>"; | ||
| 115 | strVar2 += " <\/div>"; | ||
| 116 | strVar2 += " <div class=\"callout primary\">"; | ||
| 117 | strVar2 += " <div class=\"row column\">"; | ||
| 118 | strVar2 += " <h1>Welcome to Synapsus Online PDF Editor<\/h1>"; | ||
| 119 | strVar2 += " <p class=\"lead\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.<\/p>"; | ||
| 120 | strVar2 += " <\/div>"; | ||
| 121 | strVar2 += " <\/div>"; | ||
| 122 | strVar2 += " <div class=\"row small-up-2 medium-up-3 large-up-3\">"; | ||
| 123 | strVar2 += pdflist+"<div class=\"column\">"+pdfChange+"<\/div>"; | ||
| 124 | strVar2 += " <\/div>"; | ||
| 125 | strVar2 += " <hr>"; | ||
| 126 | strVar2 += ""; | ||
| 127 | strVar2 += " <\/div>"; | ||
| 128 | strVar2 += " <\/div>"; | ||
| 129 | strVar2 += " <\/div>"; | ||
| 130 | strVar2 += " <\/div>"; | ||
| 131 | strVar2 += "<\/div>"; | ||
| 132 | strVar2 += ""; | ||
| 133 | strVar2 += "<script src=\"http:\/\/dhbhdrzi4tiry.cloudfront.net\/cdn\/sites\/foundation.js\"><\/script>"; | ||
| 134 | strVar2 += "<script>"; | ||
| 135 | strVar2 += " $(document).foundation();"; | ||
| 136 | strVar2 += "<\/script>"; | ||
| 137 | strVar2 += ""; | ||
| 138 | strVar2 += ""; | ||
| 139 | |||
| 140 | document.write(strVar2); | ||
| 141 | } | ||
| 142 | |||
| 143 | |||
| 144 | |||
| 145 | |||
| 146 | |||
| 147 | |||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or sign in to post a comment