Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions app/assets/javascripts/cites_trade/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,16 @@ $(document).ready(function(){
href = '/' + locale + '/cites_trade/exports/download?' + q;
$link.attr('href', href).click();
window.location.href = $link.attr("href");

const $button = $('#button_report').attr('disabled', 'disabled');
const $message = $('#download_status_loading').show();

window.setTimeout(
function () {
$button.removeAttr('disabled');
$message.hide();
}, 10e3
)
}

function handleDownloadRequest (ignoreWarning) {
Expand Down
10 changes: 9 additions & 1 deletion app/assets/stylesheets/cites_trade/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,15 @@ font-style:italic;
height:16px;
}

/* STANDARD */button:hover, .buttons a:hover{
/* STANDARD */
button {
/**
* UA stylesheet sets this to 2, and we don't want the border width to change
* on hover
*/
border-width: 1px;
}
button:hover:not(:disabled), .buttons a:hover{
background-color:#dff4ff;
border:1px solid #c2e1ef;
color:#336699;
Expand Down
23 changes: 16 additions & 7 deletions app/views/cites_trade/home/download.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,22 @@
</td></tr>
<tr>
<td>
<div align="right">
<button style="float:left; margin-top:12px" id='button_report' value=" Get report ">
<%= image_tag "cites_trade/page.gif", alt: "" %>
<%= t('get_report') %>
</button>
<a id='view_genie' href="" style="display:none"></a>
<a id='download_genie' href="#" style="display:none"></a>
<div style="align:left; margin-top:12px">
<div>
<button id='button_report' value=" Get report ">
<%= image_tag "cites_trade/page.gif", alt: "" %>
<%= t('get_report') %>
</button>
<a id='view_genie' href="" style="display:none"></a>
<a id='download_genie' href="#" style="display:none"></a>
</div>
<div
id='download_status_loading'
style="margin-top:6px; display: none"
>
<%= image_tag "cites_trade/spinner.gif", alt: "" %>
<%= t('downloading_report') %>
</div>
</div>

<p><br><br></p>
Expand Down
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ en:
comparative_tabulations: "Comparative Tabulations"
trade_tabulations: "Gross/Net Trade Tabulations"
get_report: "Get report"
downloading_report: "Your file is being prepared and will be downloaded shortly"
new_search: "New Search"

from: "From"
Expand Down
1 change: 1 addition & 0 deletions config/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ es:
comparative_tabulations: "Tabulaciónes Comparativas"
trade_tabulations: " Tabulaciones del Comercio Bruto/Neto"
get_report: "Obtener el informe"
downloading_report: "Your file is being prepared and will be downloaded shortly" # TODO: translate
new_search: "Nueva Búsqueda"

from: "De"
Expand Down
1 change: 1 addition & 0 deletions config/locales/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ fr:
comparative_tabulations: "Tabulations Comparatives"
trade_tabulations: "Tabulations du Commerce Brut/Net"
get_report: "Obtenir le rapport"
downloading_report: "Your file is being prepared and will be downloaded shortly" # TODO: translate
new_search: "Nouvelle Recherche"

from: "De"
Expand Down