Fixed some errors with placeholder from frontpage

This commit is contained in:
Kasper Rynning-Tønnesen
2016-04-18 16:00:34 +02:00
parent abeafa3f1b
commit b6067f6956
6 changed files with 312 additions and 304 deletions

View File

@@ -30,7 +30,7 @@
Loading... Loading...
</li> </li>
<li class="search-container hide" id="search-wrapper"> <li class="search-container hide" id="search-wrapper">
<input id="search" class="search_input" type="text" title="Search for songs..." placeholder="Find song on youtube" onsubmit="null;" autocomplete="off" /> <input id="search" class="search_input" type="text" title="Search for songs..." placeholder="Find song on YouTube..." onsubmit="null;" autocomplete="off" />
</li> </li>
</ul> </ul>

View File

@@ -91,7 +91,7 @@ if(isset($_GET['chan'])){
<input <input
class="input-field room-namer" class="input-field room-namer"
type="text" type="text"
id="search" id="searchFrontpage"
name="chan" name="chan"
placeholder="chill" placeholder="chill"
title="Type channel name here to create or listen to a channel. Only alphanumerical chars. [a-zA-Z0-9]+" title="Type channel name here to create or listen to a channel. Only alphanumerical chars. [a-zA-Z0-9]+"

View File

@@ -1573,17 +1573,17 @@ nav ul li:hover, nav ul li.active {
height:50% !important; height:50% !important;
} }
#search::-webkit-input-placeholder { /* WebKit browsers */ #search::-webkit-input-placeholder, #searchFrontpage::-webkit-input-placeholder { /* WebKit browsers */
color: #FFF; color: #FFF;
} }
#search:-moz-placeholder { /* Mozilla Firefox 4 to 18 */ #search:-moz-placeholder, #searchFrontpage:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
color: #FFF; color: #FFF;
opacity: 1; opacity: 1;
} }
#search::-moz-placeholder { /* Mozilla Firefox 19+ */ #search::-moz-placeholder, #searchFrontpage::-moz-placeholder { /* Mozilla Firefox 19+ */
color: #FFF; color: #FFF;
opacity: 1; opacity: 1;
} }
#search:-ms-input-placeholder { /* Internet Explorer 10+ */ #search:-ms-input-placeholder, #searchFrontpage:-ms-input-placeholder { /* Internet Explorer 10+ */
color: #FFF; color: #FFF;
} }

View File

@@ -1326,6 +1326,7 @@ function init(){
}); });
/*setInterval(function(){ /*setInterval(function(){
timer--; timer--;
if(timer===0){ if(timer===0){
@@ -1336,6 +1337,7 @@ function init(){
$("#embed-button").css("display", "inline-block"); $("#embed-button").css("display", "inline-block");
$("#embed-area").val('<embed src="https://zoff.no/embed.html#' + chan.toLowerCase() + '&autplay" width="600px" height="300px">'); $("#embed-area").val('<embed src="https://zoff.no/embed.html#' + chan.toLowerCase() + '&autplay" width="600px" height="300px">');
$("#search").attr("placeholder", "Find song on YouTube...");
} }
@@ -1750,7 +1752,7 @@ var Nochan = {
document.getElementById("searches").innerHTML = output; document.getElementById("searches").innerHTML = output;
//Materialize.fadeInImage('#channels'); //Materialize.fadeInImage('#channels');
$("#channels").fadeIn(800); $("#channels").fadeIn(800);
$("#search").focus(); $("#searchFrontpage").focus();
}, },
sortFunction: function(a, b) { sortFunction: function(a, b) {
@@ -1786,11 +1788,13 @@ var Nochan = {
if(Nochan.blob_list[i] !== undefined){ if(Nochan.blob_list[i] !== undefined){
//$(".room-namer").css("opacity", 0); //$(".room-namer").css("opacity", 0);
setTimeout(function(){ setTimeout(function(){
if(frontpage){
$("#mega-background").css("background", "url(data:image/png;base64,"+Nochan.blob_list[i]+")"); $("#mega-background").css("background", "url(data:image/png;base64,"+Nochan.blob_list[i]+")");
$("#mega-background").css("background-size" , "200%"); $("#mega-background").css("background-size" , "200%");
$("#mega-background").css("opacity", 1); $("#mega-background").css("opacity", 1);
$("#search").attr("placeholder", list[i][3]); $("#searchFrontpage").attr("placeholder", list[i][3]);
//$(".room-namer").css("opacity", 1); //$(".room-namer").css("opacity", 1);
}
},500); },500);
}else{ }else{
@@ -1810,7 +1814,7 @@ var Nochan = {
$("#mega-background").css("background", "url(data:image/png;base64,"+data+")"); $("#mega-background").css("background", "url(data:image/png;base64,"+data+")");
$("#mega-background").css("background-size" , "200%"); $("#mega-background").css("background-size" , "200%");
$("#mega-background").css("opacity", 1); $("#mega-background").css("opacity", 1);
$("#search").attr("placeholder", list[i][3]); $("#searchFrontpage").attr("placeholder", list[i][3]);
//$(".room-namer").css("opacity", 1); //$(".room-namer").css("opacity", 1);
},500); },500);
//then append the result where ever you want like //then append the result where ever you want like
@@ -1823,7 +1827,7 @@ var Nochan = {
$("#mega-background").css("background", "url("+img.src+")"); $("#mega-background").css("background", "url("+img.src+")");
$("#mega-background").css("background-size" , "200%"); $("#mega-background").css("background-size" , "200%");
$("#mega-background").css("opacity", 1); $("#mega-background").css("opacity", 1);
$("#search").attr("placeholder", list[i][3]); $("#searchFrontpage").attr("placeholder", list[i][3]);
}; };
} }
@@ -1898,7 +1902,7 @@ var Nochan = {
$("body").attr("id", "channelpage"); $("body").attr("id", "channelpage");
$("header").html($($(e)[57]).html()); $("header").html($($(e)[57]).html());
$("main").html($($(e)[61]).html()); $("main").html($($(e)[61]).html());
$("#search").attr("placeholder", "Find song on youtube"); $("#search").attr("placeholder", "Find song on YouTube...");
if($("#alreadychannel").length == 1){ if($("#alreadychannel").length == 1){
window.init(); window.init();
}else{ }else{

View File

@@ -217,6 +217,7 @@ function init(){
}); });
/*setInterval(function(){ /*setInterval(function(){
timer--; timer--;
if(timer===0){ if(timer===0){
@@ -227,6 +228,7 @@ function init(){
$("#embed-button").css("display", "inline-block"); $("#embed-button").css("display", "inline-block");
$("#embed-area").val('<embed src="https://zoff.no/embed.html#' + chan.toLowerCase() + '&autplay" width="600px" height="300px">'); $("#embed-area").val('<embed src="https://zoff.no/embed.html#' + chan.toLowerCase() + '&autplay" width="600px" height="300px">');
$("#search").attr("placeholder", "Find song on YouTube...");
} }

View File

@@ -93,7 +93,7 @@ var Nochan = {
document.getElementById("searches").innerHTML = output; document.getElementById("searches").innerHTML = output;
//Materialize.fadeInImage('#channels'); //Materialize.fadeInImage('#channels');
$("#channels").fadeIn(800); $("#channels").fadeIn(800);
$("#search").focus(); $("#searchFrontpage").focus();
}, },
sortFunction: function(a, b) { sortFunction: function(a, b) {
@@ -129,11 +129,13 @@ var Nochan = {
if(Nochan.blob_list[i] !== undefined){ if(Nochan.blob_list[i] !== undefined){
//$(".room-namer").css("opacity", 0); //$(".room-namer").css("opacity", 0);
setTimeout(function(){ setTimeout(function(){
if(frontpage){
$("#mega-background").css("background", "url(data:image/png;base64,"+Nochan.blob_list[i]+")"); $("#mega-background").css("background", "url(data:image/png;base64,"+Nochan.blob_list[i]+")");
$("#mega-background").css("background-size" , "200%"); $("#mega-background").css("background-size" , "200%");
$("#mega-background").css("opacity", 1); $("#mega-background").css("opacity", 1);
$("#search").attr("placeholder", list[i][3]); $("#searchFrontpage").attr("placeholder", list[i][3]);
//$(".room-namer").css("opacity", 1); //$(".room-namer").css("opacity", 1);
}
},500); },500);
}else{ }else{
@@ -153,7 +155,7 @@ var Nochan = {
$("#mega-background").css("background", "url(data:image/png;base64,"+data+")"); $("#mega-background").css("background", "url(data:image/png;base64,"+data+")");
$("#mega-background").css("background-size" , "200%"); $("#mega-background").css("background-size" , "200%");
$("#mega-background").css("opacity", 1); $("#mega-background").css("opacity", 1);
$("#search").attr("placeholder", list[i][3]); $("#searchFrontpage").attr("placeholder", list[i][3]);
//$(".room-namer").css("opacity", 1); //$(".room-namer").css("opacity", 1);
},500); },500);
//then append the result where ever you want like //then append the result where ever you want like
@@ -166,7 +168,7 @@ var Nochan = {
$("#mega-background").css("background", "url("+img.src+")"); $("#mega-background").css("background", "url("+img.src+")");
$("#mega-background").css("background-size" , "200%"); $("#mega-background").css("background-size" , "200%");
$("#mega-background").css("opacity", 1); $("#mega-background").css("opacity", 1);
$("#search").attr("placeholder", list[i][3]); $("#searchFrontpage").attr("placeholder", list[i][3]);
}; };
} }
@@ -241,7 +243,7 @@ var Nochan = {
$("body").attr("id", "channelpage"); $("body").attr("id", "channelpage");
$("header").html($($(e)[57]).html()); $("header").html($($(e)[57]).html());
$("main").html($($(e)[61]).html()); $("main").html($($(e)[61]).html());
$("#search").attr("placeholder", "Find song on youtube"); $("#search").attr("placeholder", "Find song on YouTube...");
if($("#alreadychannel").length == 1){ if($("#alreadychannel").length == 1){
window.init(); window.init();
}else{ }else{