130520 User search and wetcat theme
This commit is contained in:
@ -22,6 +22,11 @@ $('body').on('click', '#emoji', function(e) {
|
||||
$(this).closest(".element").find('.picker').css("display","block");
|
||||
});
|
||||
|
||||
$('body').on('click', '#contact', function(e) {
|
||||
$(this).closest(".element").find('.contactpicker').css("display","none");
|
||||
$(this).closest(".element").find('.contactpicker').css("display","block");
|
||||
});
|
||||
|
||||
$('body').on('click', '.emoji', function(e) {
|
||||
var code = $(this).attr("title");
|
||||
console.log(code);
|
||||
@ -29,9 +34,16 @@ $('body').on('click', '.emoji', function(e) {
|
||||
$(this).closest(".element").find("#status").val(boxtxt + ":"+code+":");
|
||||
});
|
||||
|
||||
$('body').on('click', '.contact', function(e) {
|
||||
var code = $(this).attr("title");
|
||||
console.log(code);
|
||||
boxtxt = $(this).closest(".element").find("#status").val();
|
||||
$(this).closest(".element").find("#status").val(boxtxt + " "+code);
|
||||
});
|
||||
|
||||
$('body').on('click', '.close', function(e) {
|
||||
$(this).closest('.element').find('.emojilist').html("");
|
||||
$(this).closest(".element").find('.picker').css("display","none");
|
||||
$(this).next().html("");
|
||||
$(this).parent('div').css("display","none");
|
||||
});
|
||||
|
||||
$(document).on("change paste keyup","#emojisearch",function () {
|
||||
@ -43,6 +55,15 @@ $(document).on("change paste keyup","#emojisearch",function () {
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on("change paste keyup","#contactsearch",function () {
|
||||
var val = $(this).val();
|
||||
var list = $(this).closest('.element').find('.contactlist');
|
||||
console.log(val);
|
||||
$.get("action.php?a=true&contact=" + val, function(data) {
|
||||
list.html(data);
|
||||
});
|
||||
});
|
||||
|
||||
// Open Lightbox
|
||||
$('body').on('click', '.open-lightbox', function(e) {
|
||||
e.preventDefault();
|
||||
@ -186,8 +207,6 @@ $('body').on('click', '.unblock', function() {
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
$('body').on('click', '.autl', function() {
|
||||
var id = $(this).attr('id');
|
||||
var list = $(this).attr('list');
|
||||
@ -307,15 +326,6 @@ $('.container').on('mouseleave', '.preview', function(event) {
|
||||
$('.container').find('.previewpost').fadeOut(300, function() { $(this).remove(); });
|
||||
});
|
||||
|
||||
/*
|
||||
$('body').on('mouseleave', '.userinfo', function() {
|
||||
var id = $(this).attr('id');
|
||||
$.when($('#' + id + '.userinfo').fadeOut()).then(function() {
|
||||
$('#' + id + '.userinfo').remove();
|
||||
});
|
||||
});
|
||||
* */
|
||||
|
||||
var getUrlParameter = function getUrlParameter(sParam) {
|
||||
var sPageURL = window.location.search.substring(1),
|
||||
sURLVariables = sPageURL.split('&'),
|
||||
@ -392,7 +402,6 @@ $('body').on('click', '.loadmore', function() {
|
||||
loadmore();
|
||||
});
|
||||
|
||||
|
||||
function newPosts() {
|
||||
var thread = getUrlParameter('thread');
|
||||
if (typeof thread !== 'undefined') {
|
||||
@ -442,35 +451,6 @@ window.setInterval(function() {
|
||||
newPosts();
|
||||
}, 25000);
|
||||
|
||||
/*
|
||||
$('body').on('click', '#settings #send', function() {
|
||||
$('#settings #send').after('<img id="loading" src="img/loading.gif">');
|
||||
var params = {
|
||||
attach: $('#settings input[name=attach]:checked').val(),
|
||||
explicit: $('#settings input[name=explicit]:checked').val(),
|
||||
replies: $('#settings select[name=replies]').val(),
|
||||
reblog: $('#settings input[name=reblog]:checked').val(),
|
||||
mtwords: $('#settings textarea[name=mtwords]').val(),
|
||||
videoloop: $('#settings input[name=videoloop]:checked').val(),
|
||||
text: $('#settings input[name=text]:checked').val(),
|
||||
theme: $('#settings').find('select[name=theme]').val(),
|
||||
fg: $('#settings').find('input[name=fg]').val(),
|
||||
bg: $('#settings').find('input[name=bg]').val(),
|
||||
tx: $('#settings').find('input[name=tx]').val(),
|
||||
lc: $('#settings').find('input[name=lc]').val(),
|
||||
bc: $('#settings').find('input[name=bc]').val(),
|
||||
bw: $('#settings').find('input[name=bw]').val(),
|
||||
br: $('#settings').find('input[name=br]').val()
|
||||
};
|
||||
$.get("?action=settings&ajax=1&" + $.param(params), function(data) {
|
||||
$('#settings #loading').remove();
|
||||
$('#settings #send').after('<b id="saved">Settings Saved</b>');
|
||||
$('#settings #saved').delay(1000).fadeOut("slow");
|
||||
window.location.reload(true);
|
||||
});
|
||||
});
|
||||
*/
|
||||
|
||||
function themecheck(name){
|
||||
if(name.value == "custom"){
|
||||
$('#customtheme').css("display","block");
|
||||
@ -510,5 +490,9 @@ function timeSince(date) {
|
||||
if (interval >= 1) {
|
||||
return interval + " minute"+(interval > 1 ? "s" : "");
|
||||
}
|
||||
|
||||
if (interval < 0) {
|
||||
return " just now";
|
||||
}
|
||||
return Math.floor(seconds) + " seconds";
|
||||
}
|
Reference in New Issue
Block a user