groupdocs 1.5.3 → 1.5.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +0 -1
- data/README.md +2 -0
- data/examples/api-samples/public/docs/annotation-sample.html +167 -57
- data/examples/api-samples/public/docs/docco.css +459 -151
- data/examples/api-samples/public/docs/envelope-sample.html +373 -131
- data/examples/api-samples/public/docs/sample1.html +126 -26
- data/examples/api-samples/public/docs/sample10.html +213 -50
- data/examples/api-samples/public/docs/sample11.html +319 -87
- data/examples/api-samples/public/docs/sample12.html +165 -40
- data/examples/api-samples/public/docs/sample13.html +166 -41
- data/examples/api-samples/public/docs/sample14.html +142 -30
- data/examples/api-samples/public/docs/sample15.html +127 -27
- data/examples/api-samples/public/docs/sample16.html +125 -25
- data/examples/api-samples/public/docs/sample17.html +188 -37
- data/examples/api-samples/public/docs/sample18.html +614 -157
- data/examples/api-samples/public/docs/sample19.html +221 -59
- data/examples/api-samples/public/docs/sample2.html +142 -30
- data/examples/api-samples/public/docs/sample20.html +176 -51
- data/examples/api-samples/public/docs/sample21.html +287 -66
- data/examples/api-samples/public/docs/sample22.html +224 -53
- data/examples/api-samples/public/docs/sample23.html +256 -0
- data/examples/api-samples/public/docs/sample24.html +143 -0
- data/examples/api-samples/public/docs/sample25.html +429 -0
- data/examples/api-samples/public/docs/sample26.html +113 -0
- data/examples/api-samples/public/docs/sample27.html +433 -0
- data/examples/api-samples/public/docs/sample28.html +185 -0
- data/examples/api-samples/public/docs/sample29.html +175 -0
- data/examples/api-samples/public/docs/sample3.html +172 -34
- data/examples/api-samples/public/docs/sample30.html +144 -0
- data/examples/api-samples/public/docs/sample31.html +734 -0
- data/examples/api-samples/public/docs/sample4.html +204 -52
- data/examples/api-samples/public/docs/sample5.html +241 -63
- data/examples/api-samples/public/docs/sample6.html +209 -48
- data/examples/api-samples/public/docs/sample7.html +155 -43
- data/examples/api-samples/public/docs/sample8.html +235 -62
- data/examples/api-samples/public/docs/sample9.html +200 -49
- data/examples/api-samples/public/templates/merge_field1_doc.docx +0 -0
- data/examples/api-samples/public/templates/merge_field2_doc.docx +0 -0
- data/examples/api-samples/samples/sample23.rb +54 -0
- data/examples/api-samples/samples/sample24.rb +30 -0
- data/examples/api-samples/samples/sample25.rb +4 -4
- data/examples/api-samples/samples/sample26.rb +25 -0
- data/examples/api-samples/samples/sample27.rb +100 -0
- data/examples/api-samples/samples/sample28.rb +47 -0
- data/examples/api-samples/samples/sample29.rb +52 -0
- data/examples/api-samples/samples/sample30.rb +39 -0
- data/examples/api-samples/samples/sample31.rb +204 -0
- data/examples/api-samples/samples/sample5.rb +5 -3
- data/examples/api-samples/samples/sample6.rb +2 -0
- data/examples/api-samples/views/_others_samples.haml +12 -0
- data/examples/api-samples/views/index.haml +12 -0
- data/examples/api-samples/views/layout.haml +1 -0
- data/examples/api-samples/views/sample1.haml +3 -2
- data/examples/api-samples/views/sample10.haml +3 -2
- data/examples/api-samples/views/sample11.haml +4 -0
- data/examples/api-samples/views/sample12.haml +4 -0
- data/examples/api-samples/views/sample13.haml +4 -0
- data/examples/api-samples/views/sample14.haml +4 -0
- data/examples/api-samples/views/sample15.haml +4 -0
- data/examples/api-samples/views/sample16.haml +4 -0
- data/examples/api-samples/views/sample17.haml +4 -0
- data/examples/api-samples/views/sample19.haml +4 -0
- data/examples/api-samples/views/sample2.haml +3 -2
- data/examples/api-samples/views/sample20.haml +4 -0
- data/examples/api-samples/views/sample21.haml +4 -0
- data/examples/api-samples/views/sample22.haml +4 -0
- data/examples/api-samples/views/sample23.haml +87 -0
- data/examples/api-samples/views/sample24.haml +44 -0
- data/examples/api-samples/views/sample26.haml +54 -0
- data/examples/api-samples/views/sample27.haml +122 -0
- data/examples/api-samples/views/sample28.haml +47 -0
- data/examples/api-samples/views/sample29.haml +70 -0
- data/examples/api-samples/views/sample3.haml +3 -2
- data/examples/api-samples/views/sample30.haml +46 -0
- data/examples/api-samples/views/sample31.haml +114 -0
- data/examples/api-samples/views/sample4.haml +3 -2
- data/examples/api-samples/views/sample5.haml +3 -2
- data/examples/api-samples/views/sample6.haml +3 -2
- data/examples/api-samples/views/sample7.haml +3 -2
- data/examples/api-samples/views/sample8.haml +3 -2
- data/examples/api-samples/views/sample9.haml +3 -2
- data/examples/viewer/Gemfile +1 -1
- data/groupdocs.gemspec +3 -3
- data/lib/groupdocs/datasource.rb +22 -0
- data/lib/groupdocs/document.rb +493 -43
- data/lib/groupdocs/document/annotation.rb +73 -0
- data/lib/groupdocs/job.rb +82 -1
- data/lib/groupdocs/post.rb +83 -0
- data/lib/groupdocs/questionnaire.rb +41 -0
- data/lib/groupdocs/signature.rb +342 -0
- data/lib/groupdocs/signature/envelope.rb +56 -0
- data/lib/groupdocs/signature/form.rb +47 -5
- data/lib/groupdocs/signature/shared/field_methods.rb +37 -0
- data/lib/groupdocs/storage/file.rb +83 -0
- data/lib/groupdocs/subscription.rb +218 -0
- data/lib/groupdocs/user.rb +422 -1
- data/lib/groupdocs/version.rb +1 -1
- data/spec/groupdocs/job_spec.rb +4 -5
- data/spec/groupdocs/user_spec.rb +157 -0
- data/spec/support/json/annotation_resize.json +11 -0
- data/spec/support/json/annotation_text_color.json +10 -0
- data/spec/support/json/annotation_text_info.json +11 -0
- data/spec/support/json/document_content_get.json +8 -0
- data/spec/support/json/document_edit_lock_get.json +10 -0
- data/spec/support/json/document_editlock_remove.json +8 -0
- data/spec/support/json/document_page_html_urls_get.json +14 -0
- data/spec/support/json/document_password_set.json +19 -0
- data/spec/support/json/document_representations.json +25 -0
- data/spec/support/json/document_shared_documents_get.json +32 -0
- data/spec/support/json/document_tags_get.json +9 -0
- data/spec/support/json/document_tags_remove.json +8 -0
- data/spec/support/json/document_tags_set.json +8 -0
- data/spec/support/json/document_user_status_set.json +12 -0
- data/spec/support/json/job_documents.json +103 -35
- data/spec/support/json/job_xml_get.json +30 -0
- data/spec/support/json/jobs_documents.json +40 -0
- data/spec/support/json/user_get_profile.json +73 -0
- metadata +49 -177
@@ -0,0 +1,122 @@
|
|
1
|
+
%h3{:style => 'text-align:center;'}
|
2
|
+
%a{:href => '/'} GroupDocs Ruby SDK Samples
|
3
|
+
\- Sample27
|
4
|
+
.samplecontent{:style => 'padding:10px;'}
|
5
|
+
%span.description
|
6
|
+
%i
|
7
|
+
This sample will show how to create your own questionary using forms and show the result document using Ruby SDK
|
8
|
+
%br/
|
9
|
+
%br/
|
10
|
+
|
11
|
+
%span.documentation
|
12
|
+
%a{:href => '/docs/sample27.html'} Docs for this sample
|
13
|
+
|
14
|
+
%br/
|
15
|
+
%br/
|
16
|
+
%p
|
17
|
+
The data you provided:
|
18
|
+
%p
|
19
|
+
ClientID = #{(defined? userId) ? userId : ''}
|
20
|
+
%p
|
21
|
+
PrivateKey = #{(defined? privateKey) ? privateKey : ''}
|
22
|
+
%p
|
23
|
+
Sex = #{(defined? sex) ? sex : ''}
|
24
|
+
%p
|
25
|
+
Age = #{(defined? age) ? age : ''}
|
26
|
+
%p
|
27
|
+
Sunrise = #{(defined? sunrise) ? sunrise : ''}
|
28
|
+
%p
|
29
|
+
Name = #{(defined? name) ? name : ''}
|
30
|
+
%p
|
31
|
+
Result file type = #{(defined? type) ? type : ''}
|
32
|
+
%p
|
33
|
+
%font{:color => 'red'} #{(defined? err) ? err : ''}
|
34
|
+
|
35
|
+
%span.documentation
|
36
|
+
%a{:href => '/templates/merge_field1_doc.docx'} Document with merge fields sample
|
37
|
+
%br/
|
38
|
+
%br/
|
39
|
+
#requestForm{:style => 'padding:20px; border:1px solid black;'}
|
40
|
+
%p Enter data for request and press "Assembly" button
|
41
|
+
%form{:action => '/sample27', :enctype => 'multipart/form-data', :method => 'post'}
|
42
|
+
%label{:for => 'client_id'} GroupDocs ClientID
|
43
|
+
%br/
|
44
|
+
%input{:type=>'text', :name=>'client_id'}
|
45
|
+
%br/
|
46
|
+
%label{:for => 'private_key'} GroupDocs PrivateKey
|
47
|
+
%br/
|
48
|
+
%input{:type=>'text', :name=>'private_key'}
|
49
|
+
%br/
|
50
|
+
|
51
|
+
|
52
|
+
%div.guid_radio
|
53
|
+
%input{:type=>'radio', :name=>'source', :value=>'guid', :checked=>'checked'} File ID (GUID)
|
54
|
+
%br/
|
55
|
+
%input{:type=>'radio', :name=>'source', :value=>'local'}Upload local file
|
56
|
+
%br/
|
57
|
+
%input{:type=>'radio', :name=>'source', :value=>'url'}Upload file from URL
|
58
|
+
%br/
|
59
|
+
|
60
|
+
%div.guid_field
|
61
|
+
%label{:for=>'fileId', :id=>'guid'} File ID (GUID)
|
62
|
+
%br/
|
63
|
+
%input{:type=>'text', :name=>'fileId'}
|
64
|
+
|
65
|
+
%div.guid_field{:style=>'display:none;'}
|
66
|
+
%label{:for=>'file'} Upload local file
|
67
|
+
%br/
|
68
|
+
%input{:type=>'file', :name=>'file'}
|
69
|
+
|
70
|
+
%div.guid_field{:style=>'display:none;'}
|
71
|
+
%label{:for=>'url', :id=>'url'} Upload file from URL
|
72
|
+
%br/
|
73
|
+
%input{:type=>'text', :name=>'url'}
|
74
|
+
%div{:style => 'background-color:#e5e5e5;border:3px double gray;width:700px;padding:3px;font-size:10pt;'}
|
75
|
+
%label{:for=>'name'} What is your name?
|
76
|
+
%br/
|
77
|
+
%input{:type=>'text', :name=>'name'}
|
78
|
+
%br/
|
79
|
+
%label{:for=>'sex'} What is your sex?
|
80
|
+
%input{:type=>'checkbox', :name=>'sex', :value=>'man'}Man
|
81
|
+
%input{:type=>'checkbox', :name=>'sex', :value=>'woman'}Woman
|
82
|
+
%br/
|
83
|
+
%br/
|
84
|
+
%label{:for=>'age'} Do you have 21 years old?
|
85
|
+
%select{:name=>'age'}
|
86
|
+
%option{:value=>'Yes'}Yes
|
87
|
+
%option{:value=>'No'}No
|
88
|
+
%br/
|
89
|
+
%br/
|
90
|
+
%label{:for=>'sunrise'} Do you have 21 years old?
|
91
|
+
%select{:name=>'sunrise'}
|
92
|
+
%option{:value=>'Yes'}Yes
|
93
|
+
%option{:value=>'No'}No
|
94
|
+
%br/
|
95
|
+
%br/
|
96
|
+
%br/
|
97
|
+
%br/
|
98
|
+
%label{:for=>'type'}Select type of the result file
|
99
|
+
%select{:name=>'type'}
|
100
|
+
%option{:value=>'DOC'}DOC
|
101
|
+
%option{:value=>'DOCX'}DOCX
|
102
|
+
%option{:value=>'PDF'}PDF
|
103
|
+
%input{:type => 'submit', :value => 'Assembly'}
|
104
|
+
|
105
|
+
|
106
|
+
%div{:style => 'padding:20px; border:1px solid black;'}
|
107
|
+
%p
|
108
|
+
#{(defined? file_name) ? "<a href='/downloads/#{file_name}'>Download converted file</a>" : ''}
|
109
|
+
#{(defined? iframe) ? iframe : ''}
|
110
|
+
|
111
|
+
= partial :_others_samples
|
112
|
+
|
113
|
+
|
114
|
+
:javascript
|
115
|
+
$(function($){
|
116
|
+
|
117
|
+
$('.guid_radio input').change(function(){
|
118
|
+
var elementIndex = $(this).parent().children('input').index($(this));
|
119
|
+
$('.guid_field').hide();
|
120
|
+
$('.guid_field').eq(elementIndex).show();
|
121
|
+
});
|
122
|
+
});
|
@@ -0,0 +1,47 @@
|
|
1
|
+
%h3{:style => 'text-align:center;'}
|
2
|
+
%a{:href => '/'} GroupDocs Ruby SDK Samples
|
3
|
+
\- Sample28
|
4
|
+
.samplecontent{:style => 'padding:10px;'}
|
5
|
+
%i This sample will show how to delete all annotations from document using Ruby SDK
|
6
|
+
%br/
|
7
|
+
%br/
|
8
|
+
%span.documentation
|
9
|
+
%a{:href => '/docs/sample28.html'} Builtin documentation for this sample
|
10
|
+
%br/
|
11
|
+
%br/
|
12
|
+
%p
|
13
|
+
You entered:
|
14
|
+
%p
|
15
|
+
UserId = #{(defined? userId) ? userId : ''}
|
16
|
+
%p
|
17
|
+
PrivateKey = #{(defined? privateKey) ? privateKey : ''}
|
18
|
+
%p
|
19
|
+
FileId = #{(defined? fileId) ? fileId : ''}
|
20
|
+
%p
|
21
|
+
%font{:color => 'red'} #{(defined? err) ? err : ''}
|
22
|
+
%br/
|
23
|
+
#requestForm{:style => 'padding:20px; border:1px solid black;'}
|
24
|
+
%p Enter data for request and press "Make request" button
|
25
|
+
%form{:action => '/sample28', :method => 'post'}
|
26
|
+
%label{:for => 'client_id'} GroupDocs ClientID
|
27
|
+
%br/
|
28
|
+
%input{:type=>'text', :name=>'client_id'}
|
29
|
+
%br/
|
30
|
+
%label{:for => 'private_key'} GroupDocs PrivateKey
|
31
|
+
%br/
|
32
|
+
%input{:type=>'text', :name=>'private_key'}
|
33
|
+
%br/
|
34
|
+
%label{:for => 'file_id'} GroupDocs FileID
|
35
|
+
%br/
|
36
|
+
%input{:type=>'text', :name=>'fileId'}
|
37
|
+
%br/
|
38
|
+
%br/
|
39
|
+
%input{:type => 'submit', :value => 'Delete all annotations'}/
|
40
|
+
%div{:style => 'padding:20px; border:1px solid black;'}
|
41
|
+
%p
|
42
|
+
Results:
|
43
|
+
%br/
|
44
|
+
%font{:color => 'green'}#{(defined? messages) ? messages : ''}
|
45
|
+
%br/
|
46
|
+
|
47
|
+
= partial :_others_samples
|
@@ -0,0 +1,70 @@
|
|
1
|
+
%script{:type => 'text/javascript', :src => '//api.filepicker.io/v1/filepicker.js'}
|
2
|
+
%h3{:style => 'text-align:center;'}
|
3
|
+
%a{:href => '/'}GroupDocs Ruby SDK Samples
|
4
|
+
\- Sample29
|
5
|
+
|
6
|
+
|
7
|
+
.samplecontent{:style => 'padding:10px;'}
|
8
|
+
%i This sample will show how to use Filepicker.io to upload document and get it's URL using Ruby SDK
|
9
|
+
%br/
|
10
|
+
%br/
|
11
|
+
%span.documentation
|
12
|
+
%a{:href => '/docs/sample29.html'} Builtin documentation for this sample
|
13
|
+
%br/
|
14
|
+
%br/
|
15
|
+
%p
|
16
|
+
%font{:color => 'red'} #{(defined? err) ? err : ''}
|
17
|
+
#requestForm{:style => 'padding:20px; border:1px solid black;'}
|
18
|
+
%p Click "Pick file" to select file which will be uploaded and shown in iframe
|
19
|
+
%form{:name => 'gdform', :action => '/sample29', :enctype => 'multipart/form-data', :method => 'post'}
|
20
|
+
%label{:for => 'client_id'} GroupDocs Client ID
|
21
|
+
%br/
|
22
|
+
%input{:type=>'text', :name=>'client_id'}
|
23
|
+
%br/
|
24
|
+
%label{:for => 'server_type'} Base path
|
25
|
+
%br/
|
26
|
+
%input{:type=>'text', :name=>'server_type', :id => 'server_type'}
|
27
|
+
%br/
|
28
|
+
%input{:id => 'gdButton', :type => 'filepicker', :data => {'fp-store-access' => "public", 'fp-apikey' => "AjhtkJk6rRLWQxanzZAFVz", 'fp-store-path' => "files/"}, :value => 'Upload file', :onChange => "upload(event.fpfile.url)", :style => 'display: block'}
|
29
|
+
%span{:id => 'results_status', :style => 'color:red;display:none;' } (Please wait for ajax response)
|
30
|
+
%div{:id => 'iframeDiv', :style => 'padding:20px; border:1px solid black; display: none;'}
|
31
|
+
%iframe{:id=>"iframe", :frameborder=>"0", :width=>"800", :height=>"650", :src=>""}
|
32
|
+
= partial :_others_samples
|
33
|
+
|
34
|
+
:javascript
|
35
|
+
function upload(url) {
|
36
|
+
form = document.forms.gdform;
|
37
|
+
var preLoad = document.getElementById("results_status");
|
38
|
+
preLoad.style.display = "block";
|
39
|
+
document.getElementById("gdButton").style.display = "none";
|
40
|
+
xhttp=new XMLHttpRequest();
|
41
|
+
xhttp.onreadystatechange= function() {
|
42
|
+
|
43
|
+
if (xhttp.readyState==4 && xhttp.status==200){
|
44
|
+
result = eval( "("+xhttp.responseText+")" );
|
45
|
+
iframe = result.iframe;
|
46
|
+
error = result['error'];
|
47
|
+
|
48
|
+
if (iframe != null) {
|
49
|
+
var button = document.getElementById("gdButton").style.display = "block";
|
50
|
+
var preLoad = document.getElementById("results_status");
|
51
|
+
preLoad.style.display = "none";
|
52
|
+
var iframeDiv = document.getElementById("iframeDiv");
|
53
|
+
var iframeShow = document.getElementById("iframe");
|
54
|
+
iframeShow.setAttribute("src", iframe);
|
55
|
+
iframeDiv.style.display = "block";
|
56
|
+
} else if (error != null) {
|
57
|
+
var message = '<span style="color:red;>' + error + '</span>';
|
58
|
+
iframe.style.display = "block";
|
59
|
+
|
60
|
+
}
|
61
|
+
|
62
|
+
}
|
63
|
+
}
|
64
|
+
|
65
|
+
xhttp.open('POST','/sample29',true);
|
66
|
+
xhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
|
67
|
+
var str= 'url=' + url + '&basePath=' + document.forms.gdform.server_type.value + '&clientId=' + document.forms.gdform.client_id.value;
|
68
|
+
xhttp.send(str);
|
69
|
+
|
70
|
+
}
|
@@ -4,8 +4,9 @@
|
|
4
4
|
.samplecontent{:style => 'padding:10px;'}
|
5
5
|
%i This sample will show how to use StorageApi to upload test file to GroupDocs account using Ruby SDK
|
6
6
|
%br/
|
7
|
-
%
|
8
|
-
%
|
7
|
+
%br/
|
8
|
+
%span.documentation
|
9
|
+
%a{:href => '/docs/sample3.html'} Builtin documentation for this sample
|
9
10
|
%br/
|
10
11
|
%br/
|
11
12
|
%p
|
@@ -0,0 +1,46 @@
|
|
1
|
+
%h3{:style => 'text-align:center;'}
|
2
|
+
%a{:href => '/'} GroupDocs Ruby SDK Samples
|
3
|
+
\- Sample30
|
4
|
+
.samplecontent{:style => 'padding:10px;'}
|
5
|
+
%i This sample will show how to delete file from GroupDocs Storage using Ruby SDK
|
6
|
+
%br/
|
7
|
+
%br/
|
8
|
+
%span.documentation
|
9
|
+
%a{:href => '/docs/sample30.html'} Builtin documentation for this sample
|
10
|
+
%br/
|
11
|
+
%br/
|
12
|
+
%p
|
13
|
+
You entered:
|
14
|
+
%p
|
15
|
+
UserId = #{(defined? userId) ? userId : ''}
|
16
|
+
%p
|
17
|
+
PrivateKey = #{(defined? privateKey) ? privateKey : ''}
|
18
|
+
%p
|
19
|
+
FileId = #{(defined? name) ? name : ''}
|
20
|
+
%p
|
21
|
+
%font{:color => 'red'} #{(defined? err) ? err : ''}
|
22
|
+
%br/
|
23
|
+
#requestForm{:style => 'padding:20px; border:1px solid black;'}
|
24
|
+
%p Enter data for request and press "Make request" button
|
25
|
+
%form{:action => '/sample30', :method => 'post'}
|
26
|
+
%label{:for => 'client_id'} GroupDocs ClientID
|
27
|
+
%br/
|
28
|
+
%input{:type=>'text', :name=>'client_id'}
|
29
|
+
%br/
|
30
|
+
%label{:for => 'private_key'} GroupDocs PrivateKey
|
31
|
+
%br/
|
32
|
+
%input{:type=>'text', :name=>'private_key'}
|
33
|
+
%br/
|
34
|
+
%label{:for => 'name'} GroupDocs File Name
|
35
|
+
%br/
|
36
|
+
%input{:type=>'text', :name=>'name'}
|
37
|
+
%br/
|
38
|
+
%br/
|
39
|
+
%input{:type => 'submit', :value => 'Delete'}/
|
40
|
+
%div{:style => 'padding:20px; border:1px solid black;'}
|
41
|
+
%p Results:
|
42
|
+
%br/
|
43
|
+
%font{:color => 'green'}#{(defined? message) ? message : ''}
|
44
|
+
%br/
|
45
|
+
|
46
|
+
= partial :_others_samples
|
@@ -0,0 +1,114 @@
|
|
1
|
+
%h3{:style => 'text-align:center;'}
|
2
|
+
%a{:href => '/'} GroupDocs Ruby SDK Samples
|
3
|
+
\- Sample31
|
4
|
+
.samplecontent{:style => 'padding:10px;'}
|
5
|
+
%span.description
|
6
|
+
%i
|
7
|
+
This sample will show how to dinamically create your own questionary using forms and build signature form from the result document using Ruby SDK
|
8
|
+
%br/
|
9
|
+
%br/
|
10
|
+
%span.documentation
|
11
|
+
%a{:href => '/docs/sample31.html'} Builtin documentation for this sample
|
12
|
+
%br/
|
13
|
+
%br/
|
14
|
+
%p
|
15
|
+
You entered:
|
16
|
+
%p
|
17
|
+
ClientID = #{(defined? userId) ? userId : ''}
|
18
|
+
%p
|
19
|
+
PrivateKey = #{(defined? privateKey) ? privateKey : ''}
|
20
|
+
%p
|
21
|
+
Template file GUID = #{(defined? template_guid) ? template_guid : ''}
|
22
|
+
%p
|
23
|
+
Name = #{(defined? name) ? name : ''}
|
24
|
+
%p
|
25
|
+
Email = #{(defined? email) ? email : ''}
|
26
|
+
%p
|
27
|
+
Country = #{(defined? country) ? country : ''}
|
28
|
+
%p
|
29
|
+
City = #{(defined? city) ? city : ''}
|
30
|
+
%p
|
31
|
+
Street = #{(defined? street) ? street : ''}
|
32
|
+
%p
|
33
|
+
%font{:color => 'red'} #{(defined? err) ? err : ''}
|
34
|
+
%br/
|
35
|
+
#requestForm{:style => 'padding:20px; border:1px solid black;'}
|
36
|
+
%p Enter data for request and press "Make request" button
|
37
|
+
%form{:action => '/sample31', :enctype => 'multipart/form-data', :method => 'post'}
|
38
|
+
%label{:for => 'client_id'} GroupDocs ClientID
|
39
|
+
%br/
|
40
|
+
%input{:type=>'text', :name=>'client_id'}
|
41
|
+
%br/
|
42
|
+
%label{:for => 'private_key'} GroupDocs PrivateKey
|
43
|
+
%br/
|
44
|
+
%input{:type=>'text', :name=>'private_key'}
|
45
|
+
%br/
|
46
|
+
%label{:for => 'template_guid'} Template file GUID
|
47
|
+
%br/
|
48
|
+
%input{:type=>'text', :name=>'template_guid'}
|
49
|
+
%br/
|
50
|
+
%label{:for => 'email'} Email
|
51
|
+
%br/
|
52
|
+
%input{:type=>'text', :name=>'email'}
|
53
|
+
%br/
|
54
|
+
%label{:for => 'name'} Name
|
55
|
+
%br/
|
56
|
+
%input{:type=>'text', :name=>'name'}
|
57
|
+
%br/
|
58
|
+
%label{:for => 'last_name'} Last Name
|
59
|
+
%br/
|
60
|
+
%input{:type=>'text', :name=>'last_name'}
|
61
|
+
%br/
|
62
|
+
%label{:for => 'country'} Country
|
63
|
+
%br/
|
64
|
+
%input{:type=>'text', :name=>'country'}
|
65
|
+
%br/
|
66
|
+
%label{:for => 'city'} City
|
67
|
+
%br/
|
68
|
+
%input{:type=>'text', :name=>'city'}
|
69
|
+
%br/
|
70
|
+
%label{:for => 'street'} Street
|
71
|
+
%br/
|
72
|
+
%input{:type=>'text', :name=>'street'}
|
73
|
+
%br/
|
74
|
+
%label{:for=>'callback'}
|
75
|
+
Callback URL
|
76
|
+
%span.optional (Optional)
|
77
|
+
%br/
|
78
|
+
%font{:color=>'grey'} (For test Callback you can use this URL: http://groupdocs-ruby-samples.herokuapp.com/sample31/callback)
|
79
|
+
%input{:type=>'text', :size=>'70', :value=>"#{(defined? callback) ? callback : ''}", :name=>'callback'}
|
80
|
+
|
81
|
+
%br/
|
82
|
+
%br/
|
83
|
+
|
84
|
+
%input{:type => 'submit', :value => 'Make request'}
|
85
|
+
%span{:id=>'results_status', :style=>'color:red;display:none;'} (Please wait for ajax response)
|
86
|
+
%br/
|
87
|
+
%a{:href=>'/templates/merge_feid2_doc.docx'} Download sample Docx file
|
88
|
+
%br/
|
89
|
+
%br/
|
90
|
+
%div{:style => 'padding:20px; border:1px solid black;'}
|
91
|
+
%p Results:
|
92
|
+
%iframe{:id=>'downloadframe', :style=>'display:none'}
|
93
|
+
#{(defined? iframe) ? iframe : ''}
|
94
|
+
|
95
|
+
= partial :_others_samples
|
96
|
+
|
97
|
+
%script{:src=>'//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'}
|
98
|
+
:javascript
|
99
|
+
function check() {
|
100
|
+
$.get('/sample31/check', function(data) {
|
101
|
+
$('#results_status').fadeOut("slow");
|
102
|
+
$('#downloadframe').attr("src", "/sample31/downloads/" + data);
|
103
|
+
}, 'text');
|
104
|
+
}
|
105
|
+
|
106
|
+
$(function($){
|
107
|
+
callbackUrl = $("input[name=callback]").val();
|
108
|
+
|
109
|
+
if(callbackUrl !== "") {
|
110
|
+
$('#results_status').fadeIn("slow");
|
111
|
+
setTimeout(check, 5000)
|
112
|
+
}
|
113
|
+
|
114
|
+
});
|
@@ -4,8 +4,9 @@
|
|
4
4
|
.samplecontent{:style => 'padding:10px;'}
|
5
5
|
%i This sample will show how to download particular file from GroupDocs account using Ruby SDK
|
6
6
|
%br/
|
7
|
-
%
|
8
|
-
%
|
7
|
+
%br/
|
8
|
+
%span.documentation
|
9
|
+
%a{:href => '/docs/sample4.html'} Builtin documentation for this sample
|
9
10
|
%br/
|
10
11
|
%br/
|
11
12
|
%p
|
@@ -4,8 +4,9 @@
|
|
4
4
|
.samplecontent{:style => 'padding:10px;'}
|
5
5
|
%i This sample will show how to Copy/Move particular file in your GroupDocs account using Ruby SDK
|
6
6
|
%br/
|
7
|
-
%
|
8
|
-
%
|
7
|
+
%br/
|
8
|
+
%span.documentation
|
9
|
+
%a{:href => '/docs/sample26.html'} Builtin documentation for this sample
|
9
10
|
%br/
|
10
11
|
%br/
|
11
12
|
%p
|
@@ -4,8 +4,9 @@
|
|
4
4
|
.samplecontent{:style => 'padding:10px;'}
|
5
5
|
%i This sample will show how to add provided signature to provided document using Ruby SDK. Signed file will be uploaded to GroupDocs account and its GUID will be returned and embed into webpage with GroupDocs Ebedded Viewer.
|
6
6
|
%br/
|
7
|
-
%
|
8
|
-
%
|
7
|
+
%br/
|
8
|
+
%span.documentation
|
9
|
+
%a{:href => '/docs/sample6.html'} Builtin documentation for this sample
|
9
10
|
%br/
|
10
11
|
%br/
|
11
12
|
%p
|