From fc8c510ae4c8137ee53c74e0878e8ae6bdbb58de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lucas?= Date: Mon, 22 Jul 2013 21:27:32 +0200 Subject: [PATCH] Add a waiting icon while the mail is sent. re #53 --- templates/default/bookdetail.html | 2 +- util.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/default/bookdetail.html b/templates/default/bookdetail.html index 53add58..f082eb6 100644 --- a/templates/default/bookdetail.html +++ b/templates/default/bookdetail.html @@ -10,7 +10,7 @@ {{~it.book.datas:data:i}} {{=data.format}} {{? data.mail == 1}} - + {{?}}
{{~}} diff --git a/util.js b/util.js index 338574f..f737751 100644 --- a/util.js +++ b/util.js @@ -51,6 +51,7 @@ function elapsed () { } function retourMail(data, textStatus, jqXHR ) { + $("#mailButton :first-child").removeClass ("icon-spinner icon-spin").addClass ("icon-envelope"); alert (data); } @@ -64,6 +65,7 @@ function sendToMailAddress (component, dataid) { if (currentData.databaseId) { url = url + '?db=' + currentData.databaseId; } + $("#mailButton :first-child").removeClass ("icon-envelope").addClass ("icon-spinner icon-spin"); $.ajax ({'url': url, 'type': 'post', 'data': { 'data': dataid, 'email': email }, 'success': retourMail}); }