diff --git a/plugins/UserCountry/templates/admin.js b/plugins/UserCountry/templates/admin.js index ad93d525944715486cea6d7124ac69691021e49e..0acc24798475e78788682213e2087fa02c944632 100755 --- a/plugins/UserCountry/templates/admin.js +++ b/plugins/UserCountry/templates/admin.js @@ -10,7 +10,9 @@ $(document).ready(function() { $('.current-location-provider').change(function() { if (!$(this).is(':checked')) return; // only handle radio buttons that get checked - var loading = $('.loadingPiwik', $(this).parent()); + var parent = $(this).parent(), + loading = $('.loadingPiwik', parent), + ajaxSuccess = $('.ajaxSuccess', parent); loading.show(); $.ajax({ @@ -26,6 +28,11 @@ $(document).ready(function() { error: piwikHelper.ajaxHandleError, // Callback when the request fails success: function() { loading.hide(); + ajaxSuccess.fadeIn(1000, function() { + setTimeout(function() { + ajaxSuccess.fadeOut(1000); + }, 500); + }); } }); }); diff --git a/plugins/UserCountry/templates/adminIndex.tpl b/plugins/UserCountry/templates/adminIndex.tpl index ba7edcd7b989dd49614889954a8569619e04a69d..1d8eb9236b53b75481cc0e9621c294fae7c10a0d 100755 --- a/plugins/UserCountry/templates/adminIndex.tpl +++ b/plugins/UserCountry/templates/adminIndex.tpl @@ -21,6 +21,7 @@ <input class="current-location-provider" name="current-location-provider" value="{$id}" type="radio" {if $currentProviderId eq $id}checked="checked"{/if} id="provider_input_{$id}" style="cursor:pointer" {if $provider.status neq 1}disabled="disabled"{/if}/> <label for="provider_input_{$id}" style="font-size:1.2em">{$provider.title|translate}</label><br/> <span class='loadingPiwik' style='display:none'><img src='./themes/default/images/loading-blue.gif' /></span> + <span class="ajaxSuccess" style='display:none'>{'General_Done'|translate}</span> </p> <p style="margin-left:.5em"> <strong><em>