Fixed errors with navigating from and to a channel, and some mobile looks

This commit is contained in:
Kasper Rynning-Tønnesen
2016-08-16 19:02:35 +02:00
parent 892f00e2f4
commit 5956090c9f
5 changed files with 14 additions and 16 deletions

View File

@@ -87,7 +87,7 @@ if(isset($_GET['chan'])){
<div class="section mega">
<div id="mega-background"></div>
<h5>Create a radio channel, collaborate and listen</h5>
<form class="channel-finder" onsubmit="return false;">
<form class="channel-finder">
<p class="prething">zoff.no/</p>
<input
class="input-field room-namer"
@@ -114,7 +114,7 @@ if(isset($_GET['chan'])){
</div>
<div class="section mobile-search">
<form class="row" id="base" method="get" onsubmit="return false;">
<form class="channel-finder-mobile row" id="base">
<div class="input-field col s12">
<input
class="input-field"

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -345,13 +345,12 @@ $(document).on("submit", ".channel-finder", function(e){
return false;
});
$(document).on("submit", "#base", function(e){
$(document).on("submit", ".channel-finder-mobile", function(e){
e.preventDefault();
Nochan.to_channel($("#search-mobile").val());
return false;
});
$(document).on("change", 'input[class=remote_switch_class]', function()
{
Hostcontroller.change_enabled(document.getElementsByName("remote_switch")[0].checked);
@@ -718,11 +717,11 @@ function onepage_load(){
$("main").attr("class", "center-align container");
$("body").attr("id", "");
$("body").attr("style", "");
$("header").html($($(e)[61]).html());
$($(e)[63]).insertAfter("header");
$($(e)[65]).insertAfter(".mega");
if(Helper.mobilecheck()) $("main").html($($(e)[69]).html());
else $("main").append($($($(e)[69]).html())[0]);
$("header").html($($(e)[59]).html());
$($(e)[61]).insertAfter("header");
$($(e)[63]).insertAfter(".mega");
if(Helper.mobilecheck()) $("main").html($($(e)[67]).html());
else $("main").append($($($(e)[67]).html())[0]);
$(".page-footer").removeClass("padding-bottom-extra");
$(".page-footer").removeClass("padding-bottom-novideo");
$("#favicon").attr("href", "static/images/favicon.png");

View File

@@ -247,16 +247,15 @@ var Nochan = {
window.chan = new_channel;
}
$(".mega").remove();
$(".mobile-search").remove();
$("main").attr("class", "container center-align main");
$("body").attr("id", "channelpage");
$("header").html($($(e)[61]).html());
$("header").html($($(e)[59]).html());
if($("#alreadychannel").length === 0 || Helper.mobilecheck() || Player.ytplayer === undefined){
$("main").html($($(e)[65]).html());
$("main").html($($(e)[63]).html());
} else {
var main = $($($($($(e)[65]).html())[0]).html());
var main = $($($($($(e)[63]).html())[0]).html());
$("#main-row").append($(main[2]).wrap("<div>").parent().html());
$("#video-container").append($($($(main[0]).html())[4]).wrap("<div>").parent().html());
$("#main-row").append("<div id='playbar'></div>");