From 6034bc24e1b2e69cc102226d18886828484d6961 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Sat, 5 Aug 2017 13:21:11 +0200 Subject: [PATCH] add and remove favorites --- css/main.css | 28 ++++++++++++---- db/stationmapper.php | 4 +-- js/main.js | 78 ++++++++++++++++++++++++++++++++------------ templates/main.php | 2 +- 4 files changed, 81 insertions(+), 31 deletions(-) diff --git a/css/main.css b/css/main.css index 132b85f..329fc41 100644 --- a/css/main.css +++ b/css/main.css @@ -7,15 +7,29 @@ background-position: center; display: inline;; } + #volumeslider{ width: 120px; display: inline-block; margin-top: 0px; margin-left: 10px; } + .play{background: url('../img/play.png') no-repeat;} .pause{background: url('../img/pause.png') no-repeat;} +.icon-stationfav { + width: 22px; + height: 22px; + margin-right: 5px; + margin-bottom: 5px; + position: absolute; + background-image: url('../img/fav.png'); + background-repeat: no-repeat; + background-size: contain; + background-position: center; + line-height: 100%; +} /* SETTINGS */ #files-setting-showhidden { @@ -250,7 +264,7 @@ table td.filename .thumbnail { display: inline-block; width: 32px; height: 32px; - margin-left: 8px; + margin-left: 25px; margin-top: 9px; cursor: pointer; float: left; @@ -263,11 +277,11 @@ table td.filename .thumbnail { table td.filename input.filename { width: 70%; margin-top: 9px; - margin-left: 48px; + /*margin-left: 48px;*/ cursor: text; } .has-favorites table td.filename input.filename { - margin-left: 52px; + /*margin-left: 52px;*/ } table td.filename a, table td.login, table td.logout, table td.download, table td.upload, table td.create, table td.delete { padding:3px 8px 8px 3px; } @@ -277,7 +291,7 @@ table td.filename .nametext, .uploadtext, .modified, .column-last>span:first-chi position: relative; overflow: hidden; text-overflow: ellipsis; - width: 110px; + /*width: 110px;*/ } /* TODO fix usability bug (accidental file/folder selection) */ @@ -291,8 +305,8 @@ table td.filename .nametext { height: 100%; } .has-favorites #fileList td.filename a.name { - left: 50px; - margin-right: 50px; + left: 0px; + margin-right: 0px; } .hide-hidden-files #fileList tr.hidden-file, @@ -667,7 +681,7 @@ table.dragshadow { width:auto; } table.dragshadow td.filename { - padding-left:60px; + /* padding-left:60px; */ padding-right:16px; height: 36px; } diff --git a/db/stationmapper.php b/db/stationmapper.php index 164b0c0..02e3450 100644 --- a/db/stationmapper.php +++ b/db/stationmapper.php @@ -1,12 +1,12 @@ \ - \ - \ - \ + \ + \ + \ Favorite\ \ + \ + \ \ @@ -52,14 +93,9 @@ $(function(){ }); } - function get_station_ids(){ + function action_load_favorites(){ var stations = [] var baseUrl = OC.generateUrl('/apps/radio'); - var station = { - "id": 16, - "stationid": "89920", - "active": true - }; $.get(baseUrl + '/stations', function ( data ) { for (var station in data) { stations.push(data[station]["stationid"]); @@ -117,7 +153,7 @@ $(function(){ break; case 2: $('li.nav-favorite').addClass('active'); - get_station_ids(); + action_load_favorites(); break; } } diff --git a/templates/main.php b/templates/main.php index 594495d..7e3e641 100755 --- a/templates/main.php +++ b/templates/main.php @@ -34,7 +34,7 @@ -
+