Changed way of backdrop rotation

This commit is contained in:
Kasper Rynning-Tønnesen
2017-01-28 19:41:13 +01:00
parent 6563f0c09f
commit def2846e97
4 changed files with 21 additions and 15 deletions

View File

@@ -419,8 +419,11 @@ input[type=text]:focus:not([readonly]) + label, input[type=password]:focus:not([
.pin{ .pin{
position: absolute; position: absolute;
right:10px; top: 15px;
right: 15px;
width: 25px;
font-size: 25px; font-size: 25px;
text-align: right;
} }
.field-settings{ .field-settings{

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -54,15 +54,16 @@ var Frontpage = {
if(pinned !== undefined){ if(pinned !== undefined){
lists.unshift(pinned); lists.unshift(pinned);
} }
if(!Helper.mobilecheck())
Frontpage.add_backdrop(lists, 0);
pre_card = $(channel_list); pre_card = $(channel_list);
Helper.log("------------"); Helper.log("------------");
Helper.log(pre_card); Helper.log(pre_card);
Helper.log("-------------"); Helper.log("-------------");
if(!Helper.mobilecheck())
Frontpage.add_backdrop(lists, 0);
for(var x in lists) for(var x in lists)
{ {
@@ -101,11 +102,13 @@ var Frontpage = {
num++; num++;
//if(num>19)break; //if(num>19)break;
} }
lists.sort(Frontpage.sortFunction_active); var options_list = lists.slice();
options_list = options_list.sort(Frontpage.sortFunction_active);
//num = 0; //num = 0;
for(var x in lists){ for(var x in options_list){
if(lists[x].count > 5 && Math.floor((new Date).getTime()/1000) - lists[x].accessed < 604800){ if(options_list[x].count > 5 && Math.floor((new Date).getTime()/1000) - options_list[x].accessed < 604800){
var chan = lists[x].channel; var chan = options_list[x].channel;
output+="<option value='"+chan+"'> "; output+="<option value='"+chan+"'> ";
} }
} }
@@ -158,7 +161,7 @@ var Frontpage = {
}, },
add_backdrop: function(list, i) { add_backdrop: function(list, i) {
if(i >= list.length || i >= 8) i = 0; if(i >= list.length || i >= 20) i = 0;
var id = list[i].id; var id = list[i].id;