mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Removed all global functions
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
<div class="brand-logo truncate zbrand">
|
||||
<a href="/" class="hide-on-large-only">Zöff</a>
|
||||
<span class="hide-on-large-only">/</span>
|
||||
<span id="chan" class="chan clickable" title="Show big URL" onclick="show()"><?php echo(ucfirst($list));?></span>
|
||||
<span id="chan" class="chan clickable" title="Show big URL"><?php echo(ucfirst($list));?></span>
|
||||
</div>
|
||||
|
||||
<ul class="title-container">
|
||||
@@ -123,9 +123,9 @@
|
||||
<div class="search-title truncate"></div>
|
||||
<span class="result_info"></span>
|
||||
|
||||
<a href="#add" class="waves-effect waves-orange btn-flat add-many" title="Add several videos">
|
||||
<div class="waves-effect waves-orange btn-flat" id="add-many" title="Add several videos">
|
||||
<i class="mdi-av-playlist-add"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -221,7 +221,7 @@
|
||||
</span>
|
||||
</span>
|
||||
<div class="card-action center-align list-remove hide">
|
||||
<a title="Remove song" id="del" onclick="vote('id','del')" class="waves-effect btn-flat clickable">Delete</a>
|
||||
<a title="Remove song" id="del" class="waves-effect btn-flat clickable">Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -779,14 +779,14 @@ nav ul li:hover, nav ul li.active {
|
||||
margin: 15px 20px;
|
||||
}
|
||||
.result{height:100px;margin-left:40px;}
|
||||
.add-many{
|
||||
#add-many{
|
||||
float:right;
|
||||
color:white;
|
||||
}
|
||||
.add-many:hover{
|
||||
#add-many:hover{
|
||||
color:orange;
|
||||
}
|
||||
.add-many i{ line-height: 36px !important;}
|
||||
#add-many i{ line-height: 36px !important;}
|
||||
#results{
|
||||
background-color: rgba(0,0,0,0.8);
|
||||
margin-top: -27px;
|
||||
|
||||
4
static/dist/main.min.js
vendored
4
static/dist/main.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -219,10 +219,12 @@ var List = {
|
||||
song.find(".list-title").text(video_title);
|
||||
song.find(".list-title").attr("title", video_title);
|
||||
song.find(".list-votes").text(video_votes);
|
||||
song.find(".vote-container").attr("onclick", "vote('"+video_id+"','pos')");
|
||||
//song.find(".vote-container").attr("onclick", "vote('"+video_id+"','pos')");
|
||||
song.find(".vote-container").attr("data-video-id", video_id);
|
||||
song.find(".list-image").attr(image_attr,video_thumb);
|
||||
song.find("#list-song").attr("id", video_id);
|
||||
song.find("#del").attr("onclick", "vote('"+video_id+"', 'del')");
|
||||
song.find("#del").attr("data-video-id", video_id);
|
||||
//song.find("#del").attr("onclick", "vote('"+video_id+"', 'del')");
|
||||
|
||||
return song.html();
|
||||
},
|
||||
|
||||
@@ -53,9 +53,9 @@ socket.on("get_list", function(){
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
window.vote = List.vote;
|
||||
window.submit = Search.submit;
|
||||
window.submitAndClose = Search.submitAndClose;
|
||||
//window.vote = List.vote;
|
||||
//window.submit = Search.submit;
|
||||
//window.submitAndClose = Search.submitAndClose;
|
||||
|
||||
if(!localStorage["list_update"] || localStorage["list_update"] != "13.06.15")
|
||||
{
|
||||
@@ -98,7 +98,6 @@ $(document).ready(function()
|
||||
document.getElementById("search").blur();
|
||||
Youtube.readyLooks();
|
||||
}else{
|
||||
|
||||
Chat.setup_chat_listener(chan);
|
||||
Chat.allchat_listener();
|
||||
Hostcontroller.host_listener();
|
||||
@@ -243,6 +242,7 @@ $(".chat-tab").click(function(){
|
||||
$("#text-chat-input").focus();
|
||||
});
|
||||
|
||||
|
||||
$("#skip").on("click", function(){
|
||||
List.skip();
|
||||
});
|
||||
@@ -283,3 +283,29 @@ $("#closeSettings").on("click", function()
|
||||
{
|
||||
Admin.hide_settings();
|
||||
});
|
||||
|
||||
$("#results").on( "click", "#temp-results", function(e){
|
||||
if($(e.target).html() != $("<i class='mdi-av-playlist-add'></i>").html()){
|
||||
var id = $(this).attr("data-video-id");
|
||||
var title = $(this).attr("data-video-title");
|
||||
var length = $(this).attr("data-video-length")
|
||||
Search.submitAndClose(id, title, length);
|
||||
}
|
||||
});
|
||||
|
||||
$("#results").on( "click", "#add-many", function(e){
|
||||
var id = $(this).attr("data-video-id");
|
||||
var title = $(this).attr("data-video-title");
|
||||
var length = $(this).attr("data-video-length")
|
||||
Search.submit(id, title, length);
|
||||
});
|
||||
|
||||
$("#wrapper").on( "click", ".vote-container", function(e){
|
||||
var id = $(this).attr("data-video-id");
|
||||
List.vote(id, "pos");
|
||||
});
|
||||
|
||||
$("#wrapper").on( "click", "#del", function(e){
|
||||
var id = $(this).attr("data-video-id");
|
||||
List.vote(id, "del");
|
||||
});
|
||||
@@ -81,8 +81,14 @@ var Search = {
|
||||
songs.find(".search-title").text(title);
|
||||
songs.find(".result_info").text(duration);
|
||||
songs.find(".thumb").attr("data-original", thumb);
|
||||
songs.find(".add-many").attr("onclick", "submit('"+id+"','"+enc_title+"',"+secs+");");
|
||||
$($(songs).find("div")[0]).attr("onclick", "submitAndClose('"+id+"','"+enc_title+"',"+secs+");");
|
||||
//songs.find(".add-many").attr("onclick", "submit('"+id+"','"+enc_title+"',"+secs+");");
|
||||
songs.find("#add-many").attr("data-video-id", id);
|
||||
songs.find("#add-many").attr("data-video-title", enc_title);
|
||||
songs.find("#add-many").attr("data-video-length", secs);
|
||||
//$($(songs).find("div")[0]).attr("onclick", "submitAndClose('"+id+"','"+enc_title+"',"+secs+");");
|
||||
songs.find("#temp-results").attr("data-video-id", id);
|
||||
songs.find("#temp-results").attr("data-video-title", enc_title);
|
||||
songs.find("#temp-results").attr("data-video-length", secs);
|
||||
//$($(songs).find("div")[0]).attr("id", id)
|
||||
output += songs.html();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user