Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nextcloud-app-radio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
41
Issues
41
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
onny
nextcloud-app-radio
Commits
fba5aa6c
Commit
fba5aa6c
authored
Aug 11, 2017
by
onny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix no favorites screen
parent
6a447f01
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
24 deletions
+38
-24
js/main.js
js/main.js
+31
-24
templates/main.php
templates/main.php
+7
-0
No files found.
js/main.js
View file @
fba5aa6c
...
...
@@ -85,6 +85,29 @@ $(function(){
};
});
/* Playbutton click */
$
(
'
#playbutton
'
).
click
(
function
()
{
var
music
=
document
.
getElementById
(
'
player
'
);
if
(
music
.
paused
&&
$
(
"
#player
"
).
attr
(
"
src
"
)
!=
""
)
{
music
.
play
();
}
else
{
music
.
pause
();
}
});
/* Click on menus */
$
(
'
a.nav-icon-files
'
).
click
(
function
()
{
switch_menu
(
0
);
});
$
(
'
a.nav-icon-recent
'
).
click
(
function
()
{
switch_menu
(
1
);
});
$
(
'
a.nav-icon-favorites
'
).
click
(
function
()
{
switch_menu
(
2
);
});
/* ==============
// ACTIONS //
/===============*/
...
...
@@ -165,7 +188,7 @@ $(function(){
$
.
each
(
data
,
function
(
i
,
station
)
{
var
isstarred
=
""
for
(
var
fav_station
in
fav_stations
)
{
if
(
fav_stations
[
fav_station
][
"
stationid
"
]
==
station
[
'
id
'
])
{
isstarred
=
"
starred
"
;
...
...
@@ -201,7 +224,12 @@ $(function(){
for
(
var
station
in
data
)
{
stations
.
push
(
data
[
station
][
"
stationid
"
]);
};
query_stations
(
stations
);
if
(
stations
.
length
==
0
)
{
$
(
'
#filestable
'
).
hide
();
$
(
'
#emptycontent
'
).
removeClass
(
'
hidden
'
);
}
else
{
query_stations
(
stations
);
};
});
};
...
...
@@ -268,19 +296,7 @@ $(function(){
break
;
}
},
500
);
}
$
(
'
a.nav-icon-files
'
).
click
(
function
()
{
switch_menu
(
0
);
});
$
(
'
a.nav-icon-recent
'
).
click
(
function
()
{
switch_menu
(
1
);
});
$
(
'
a.nav-icon-favorites
'
).
click
(
function
()
{
switch_menu
(
2
);
});
};
function
mySearch
(
query
){
if
(
query
!=
""
)
{
...
...
@@ -299,15 +315,6 @@ $(function(){
}
});
$
(
'
#playbutton
'
).
click
(
function
()
{
var
music
=
document
.
getElementById
(
'
player
'
);
if
(
music
.
paused
&&
$
(
"
#player
"
).
attr
(
"
src
"
)
!=
""
)
{
music
.
play
();
}
else
{
music
.
pause
();
}
});
$
(
'
#volumeslider
'
).
slider
({
orientation
:
"
horizontal
"
,
value
:
player
.
volume
,
...
...
templates/main.php
View file @
fba5aa6c
...
...
@@ -33,6 +33,13 @@
<div
id=
"app-content"
>
<div
id=
"app-content-files"
class=
"viewcontainer"
>
<!-- <div class="mask transparent icon-loading"></div> -->
<div
id=
"emptycontent"
class=
"hidden"
>
<div
class=
"icon-starred"
></div>
<h2>
<?php
p
(
$l
->
t
(
'No favorites yet'
));
?>
</h2>
<p>
<?php
p
(
$l
->
t
(
'Stations you mark as favorite will show up here'
));
?>
</p>
</div>
<table
id=
"filestable"
data-preview-x=
"32"
data-preview-y=
"32"
>
<thead>
<tr>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment