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
420d0a39
authored
2016-05-18 10:02:29 -0400
by
Jeff Balicki
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
er
1 parent
e0b2e00a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
public/files/js/interface.js
public/files/js/interface.js
View file @
420d0a3
...
...
@@ -5,7 +5,7 @@
var
settings
=
{
"async"
:
true
,
"crossDomain"
:
true
,
"url"
:
"http://
localhost:8888/pdf-customizer/public
/api/authenticate"
,
"url"
:
"http://
pdf-customizer.synapsus.co
/api/authenticate"
,
"method"
:
"POST"
,
"headers"
:
{
"authorization"
:
"Basic amVmZkBnb3RlbnppbmcuY29tOjUxODg2Mg=="
,
...
...
@@ -47,7 +47,7 @@ $.ajax(settings).done(function (response) {
jQuery
(
document
).
ready
(
function
(
$
)
{
$
.
getJSON
(
"http://
localhost:8888/pdf-customizer/public
/api/v1/get-list/"
+
user_id
,
function
(
data
)
{
$
.
getJSON
(
"http://
pdf-customizer.synapsus.co
/api/v1/get-list/"
+
user_id
,
function
(
data
)
{
// Get the element with id summary and set the inner text to the result.
var
json
=
JSON
.
stringify
(
data
);
pickPdfFromList
(
json
);
...
...
@@ -63,7 +63,7 @@ $.ajax(settings).done(function (response) {
jQuery
(
document
).
ready
(
function
(
$
)
{
$
.
getJSON
(
"http://
localhost:8888/pdf-customizer/public
/api/v1/get-pdf/"
+
id
,
function
(
data
)
{
$
.
getJSON
(
"http://
pdf-customizer.synapsus.co
/api/v1/get-pdf/"
+
id
,
function
(
data
)
{
// Get the element with id summary and set the inner text to the result.
var
json
=
JSON
.
stringify
(
data
);
...
...
@@ -90,7 +90,7 @@ $.ajax(settings).done(function (response) {
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://
localhost:8888/pdf-customizer/public
/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>"
;
}
...
...
@@ -145,7 +145,7 @@ function changePdfOptions(json){
var
pdflist
=
""
;
pdflist
+=
"<div class=\"column\">"
;
pdflist
+=
' <img src=\"http://
localhost:8888/pdf-customizer/public
/fileentry/getImage/'
+
json
[
0
].
folder
+
'/'
+
json
[
0
].
image
+
'\" width=\"300px\">'
;
pdflist
+=
' <img src=\"http://
pdf-customizer.synapsus.co/
/fileentry/getImage/'
+
json
[
0
].
folder
+
'/'
+
json
[
0
].
image
+
'\" width=\"300px\">'
;
pdflist
+=
"<\/div>"
;
var
pdfChange
=
"<br>"
;
pdfChange
+=
"<form id=\"changes\" name=\"changes\" enctype=\"multipart/form-data\" action=\"#\" METHOD=\"POST\"><h4>"
+
json
[
0
].
name
+
"</h4>"
;
...
...
@@ -230,7 +230,7 @@ strVar2 += "";
});
$
.
ajax
({
url
:
'http://
localhost:8888/Forms
/wp-content/plugins/pdf-customizer-plugin/admin/uploadfile.php?files'
,
url
:
'http://
contact.gotenzing.com
/wp-content/plugins/pdf-customizer-plugin/admin/uploadfile.php?files'
,
type
:
'POST'
,
data
:
data
,
cache
:
false
,
...
...
@@ -273,7 +273,7 @@ strVar2 += "";
jQuery
(
document
).
ready
(
function
(
$
)
{
$
.
getJSON
(
"http://
localhost:8888/pdf-customizer/public
/api/v1/get-pdf/"
+
id
.
value
,
function
(
dataReturnd
)
{
$
.
getJSON
(
"http://
pdf-customizer.synapsus.co
/api/v1/get-pdf/"
+
id
.
value
,
function
(
dataReturnd
)
{
// Get the element with id summary and set the inner text to the result.
var
json
=
dataReturnd
;
//console.log(json);
...
...
@@ -305,7 +305,7 @@ strVar2 += "";
$
.
ajax
({
url
:
"http://
localhost:8888/pdf-customizer/public
/api/update"
,
url
:
"http://
pdf-customizer.synapsus.co
/api/update"
,
type
:
"POST"
,
dataType
:
'json'
,
data
:
jsonReturn
,
...
...
@@ -319,7 +319,7 @@ strVar2 += "";
async
:
true
,
success
:
function
(
data
)
{
document
.
getElementById
(
'contentArea'
).
innerHTML
=
'<a href="http://
localhost:8888/pdf-customizer/public
/fileentry/getPDF/'
+
json
[
0
].
folder
+
'/new_'
+
json
[
0
].
file
+
'" download="'
+
json
[
0
].
file
+
'" >Download Here</a>'
;
document
.
getElementById
(
'contentArea'
).
innerHTML
=
'<a href="http://
pdf-customizer.synapsus.co
/fileentry/getPDF/'
+
json
[
0
].
folder
+
'/new_'
+
json
[
0
].
file
+
'" download="'
+
json
[
0
].
file
+
'" >Download Here</a>'
;
},
error
:
function
(
xhr
,
ajaxOptions
,
thrownError
)
{
//Add these parameters to display the required response
alert
(
xhr
.
status
);
...
...
Please
register
or
sign in
to post a comment