%h3{:style => 'text-align:center;'} %a{:href => '/'} GroupDocs Ruby SDK Samples \- Sample19 .samplecontent{:style => 'padding:10px;'} %i This sample will show how to Compare documents using Ruby SDK %br/ %br/ %span.documentation %a{:href => '/docs/sample19.html'} Builtin documentation for this sample %br/ %br/ %p You entered: %p UserId = #{(defined? userId) ? userId : ''} %p PrivateKey = #{(defined? privateKey) ? privateKey : ''} %p Source File ID = #{(defined? sourceFileId) ? sourceFileId : ''} %p Target File ID = #{(defined? targetFileId) ? targetFileId : ''} %p Callback Url = #{(defined? callback) ? callback : ''} %p %font{:color => 'red'} #{(defined? err) ? err : ''} %br/ #requestForm{:style => 'padding:20px; border:1px solid black;'} %p Enter data for request and press "Make request" button %form{:action => '/sample19', :method => 'post'} %label{:for => 'clientId'} GroupDocs ClientID %br/ %input{:type=>'text', :name=>'clientId'} %br/ %label{:for => 'privateKey'} GroupDocs PrivateKey %br/ %input{:type=>'text', :name=>'privateKey'} %br/ %label{:for => 'sourceFileId'} Source File ID %br/ %input{:type=>'text', :name=>'sourceFileId'} %br/ %label{:for => 'targetFileId'} Target File ID %br/ %input{:type=>'text', :name=>'targetFileId'} %br/ %label{:for=>'callback'} Callback URL %span.optional (Optional) %br/ %font{:color=>'grey'} (For test Callback you can use this URL: http://groupdocs-ruby-samples.herokuapp.com/sample19/compere_callback) %input{:type=>'text', :size=>'70', :value=>"#{(defined? callback) ? callback : ''}", :name=>'callback'} %br/ %label{:for => 'basePath'} Base Path %span{:class => 'optional'} (Optional) %br/ %input{:type=>'text', :name=>'basePath'} %br/ %br/ %input{:type => 'submit', :value => 'Make request'}/ %span{:id=>'results_status', :style=>'color:red;display:none;'} (Please wait for ajax response) %br/ %div{:style => 'padding:20px; border:1px solid black;'} %p Result: %iframe{:id=>'downloadframe', :style=>'display:none'} #{(defined? iframe) ? iframe : ''} = partial :_others_samples %script{:src=>'//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'} :javascript function check() { $.get('/sample19/check', function(data) { $('#results_status').fadeOut("slow"); $('#downloadframe').attr("src", "/sample19/downloads/" + data); }, 'text'); } $(function($){ callback = $("input[name=callback]").val(); if(callback !== "") { $('#results_status').fadeIn("slow"); setTimeout(check, 5000) } });