diff --git a/appinfo/app.php b/appinfo/app.php index c8963fe..8c1ba22 100755 --- a/appinfo/app.php +++ b/appinfo/app.php @@ -23,8 +23,6 @@ * */ -OCP\App::registerAdmin( 'radio', 'settings' ); - OCP\App::addNavigationEntry( array( 'id' => 'radio', 'order' => 74, diff --git a/appinfo/routes.php b/appinfo/routes.php index ef20c69..c368069 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -8,8 +8,6 @@ /** @var $this \OCP\Route\IRouter */ $this->create('radio_index', '/') ->actionInclude('radio/index.php'); -$this->create('radio_ajax_seturl', 'ajax/seturl.php') - ->actionInclude('radio/ajax/seturl.php'); return [ 'resources' => [ diff --git a/index.php b/index.php index ca97156..cb1da9c 100755 --- a/index.php +++ b/index.php @@ -26,8 +26,6 @@ // Check if we are a user OCP\User::checkLoggedIn(); -$somesetting = OCP\Config::getSystemValue( "somesetting", '' ); OCP\App::setActiveNavigationEntry( 'radio' ); $tmpl = new OCP\Template( 'radio', 'main', 'user' ); -$tmpl->assign( 'somesetting', $somesetting ); $tmpl->printPage(); diff --git a/js/main.js b/js/main.js index f5a82dd..1a8a347 100644 --- a/js/main.js +++ b/js/main.js @@ -5,6 +5,10 @@ $(window).on('load', function(){ play_station(stationid); }); + function station_fav(stationid){ + alert("faving"); + }; + function play_station(stationid){ $.ajax({ method: "GET", @@ -23,7 +27,7 @@ $(window).on('load', function(){ $.each(data, function(i, station) { $('tbody').append('\ \ - \ + \ \ Favorite\ \ @@ -39,7 +43,7 @@ $(window).on('load', function(){ } function get_station_ids(){ - return ["89920","44707"] + return ["89920","44707","91101","85755","45281","78011","91102"] }; function render_stations(station_ids){ @@ -114,5 +118,15 @@ $(window).on('load', function(){ switch_menu(2); }); + function mySearch(query){ + alert('test'); + }; + + OC.Plugins.register('OCA.Search', { + attach: function(search) { + search.setFilter('radio', mySearch); + } + }); + switch_menu(0); }); diff --git a/settings.php b/settings.php deleted file mode 100755 index 24c07ee..0000000 --- a/settings.php +++ /dev/null @@ -1,11 +0,0 @@ -assign('url', OCP\Config::getSystemValue( "somesetting", '' )); - -return $tmpl->fetchPage(); diff --git a/templates/main.php b/templates/main.php index 66ec327..ff1e285 100755 --- a/templates/main.php +++ b/templates/main.php @@ -24,16 +24,10 @@
-
- -
-
- -
- -
-
+ +
+ +
diff --git a/templates/settings.php b/templates/settings.php deleted file mode 100755 index ffe05fb..0000000 --- a/templates/settings.php +++ /dev/null @@ -1,8 +0,0 @@ -
-
-

t('App Template'));?>

- -
- -
-