fix loading animation

This commit is contained in:
Jonas Heinrich 2017-08-11 19:05:39 +02:00
parent fba5aa6c8b
commit 0a1edbf246
3 changed files with 31 additions and 0 deletions

View File

@ -25,3 +25,6 @@ Where -t specifies the container id. If you further need to access the sqlite-da
```
docker run -v /tmp/dockerdata:/data/data -v /tmp/nextcloud-app-radio:/opt/nextcloud/apps/radio -d --name nextcloud -p 80:80 rootlogin/nextcloud
```
## Reporting bugs
You can report bugs in the public gitlab repository [here](https://git.project-insanity.org/onny/nextcloud-app-radio/issues) and for discussion you can find a section for the app in the offical Nextcloud forums [here](https://help.nextcloud.com/c/apps/radio).

View File

@ -185,6 +185,18 @@ $(function(){
var baseUrl = OC.generateUrl('/apps/radio');
$.get(baseUrl + '/stations', function ( fav_stations ) {
if (data.length == 0) {
$('#filestable').hide();
$('#emptycontent').addClass('hidden');
$('.nofilterresults').removeClass('hidden');
$('.loading').addClass('hidden');
} else {
$('#emptycontent').addClass('hidden');
$('#filestable').show();
$('.nofilterresults').addClass('hidden');
$('.loading').addClass('hidden');
};
$.each(data, function(i, station) {
var isstarred = ""
@ -227,6 +239,7 @@ $(function(){
if (stations.length == 0) {
$('#filestable').hide();
$('#emptycontent').removeClass('hidden');
$('.loading').addClass('hidden');
} else {
query_stations(stations);
};
@ -277,6 +290,12 @@ $(function(){
};
function switch_menu(type) {
$('#filestable').hide();
$('#emptycontent').addClass('hidden');
$('.nofilterresults').addClass('hidden');
$('.loading').removeClass('hidden');
clearTimeout(searchTimeout);
searchTimeout = setTimeout(function(){
$('#app-navigation').find('li').removeClass("active");

View File

@ -34,6 +34,15 @@
<div id="app-content-files" class="viewcontainer">
<!-- <div class="mask transparent icon-loading"></div> -->
<div class="nofilterresults emptycontent hidden">
<div class="icon-search"></div>
<h2><?php p($l->t('No stations found with this name')); ?></h2>
<p></p>
</div>
<div class="loading emptycontent hidden">
</div>
<div id="emptycontent" class="hidden">
<div class="icon-starred"></div>
<h2><?php p($l->t('No favorites yet')); ?></h2>