Commit 0a1edbf2 authored by onny's avatar onny

fix loading animation

parent fba5aa6c
......@@ -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).
......@@ -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");
......
......@@ -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>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment