diff --git a/README.md b/README.md index dbdf9af..fd64637 100644 --- a/README.md +++ b/README.md @@ -1,6 +1 @@ -* https://doc.owncloud.org/server/9.0/developer_manual/app/tutorial.html -* https://github.com/owncloud/app-tutorial#tutorial -* http://127.0.0.1/index.php/settings/apps - -* https://mvigil-cs263-technology-project.readthedocs.io/en/latest/apptutorial.html -* docker run -v /home/onny/projects/owncloud-app-radio:/var/www/html/apps/radio -d -p 80:80 owncloud:latestdocker run -v /home/onny/projects/owncloud-app-radio:/var/www/html/apps/radio -d -p 80:80 owncloud:latest +This experimental app uses the radio-browser.info api and offers radio stations right in your Nextcloud! diff --git a/css/main.css b/css/main.css index 5cdad3b..e3b418a 100644 --- a/css/main.css +++ b/css/main.css @@ -1,8 +1,15 @@ -body { +* { + box-sizing: border-box; + -webkit-box-sizing:border-box; + -moz-box-sizing: border-box; +} + +#radiocontainer { + width: 100%; padding: 20px; } -input { +#radioquery { width: 100%; margin-bottom: 20px; } diff --git a/js/main.js b/js/main.js index f9a23b4..dd7b33f 100644 --- a/js/main.js +++ b/js/main.js @@ -9,14 +9,19 @@ $(window).on('load', function(){ function show_result(data){ $("tbody > tr").remove(); $.each(data, function(i, station) { - $('tbody').append(''+station['name']+''); + $('tbody').append('\ + \ + \ + '+station['name']+'\ + \ + '); }); } function search(query){ $.ajax({ method: "POST", - url: 'http://www.radio-browser.info/webservice/json/stations/search', + url: 'https://www.radio-browser.info/webservice/json/stations/search', data: { name: query }, @@ -25,9 +30,8 @@ $(window).on('load', function(){ }); }; - $('form').submit(function() { - var query = $('input').val(); + $('#radiosearch').submit(function() { + var query = $('#radioquery').val(); search(query); - return false; }); }); diff --git a/templates/main.php b/templates/main.php index 04d2d8f..67741e6 100755 --- a/templates/main.php +++ b/templates/main.php @@ -3,9 +3,10 @@ script('radio', 'main'); ?> - -
- +
+ + + @@ -19,4 +20,8 @@
+ + + +