Archived
1
0

Remove console.logs

This commit is contained in:
Marcel
2018-12-30 18:44:45 +01:00
parent c16fed9b50
commit ce9d215098
13 changed files with 231 additions and 47 deletions

View File

@@ -8,7 +8,6 @@ $(document).ready(function () {
$("#comment-list").html("<h2><i class='fa fa-cog fa-spin'></i> Loading Comments</h2>");
},
success: function (data) {
console.log(data);
$("#comment-list").html(data);
},
error: function () {
@@ -17,7 +16,6 @@ $(document).ready(function () {
});
$('.blog .info-box').each((el) => {
console.log(el);
});
});
@@ -69,8 +67,6 @@ var addComment = function () {
$('#addComment').attr('disabled', '');
},
success: function (data) {
console.log(data);
if (data.type === 'success') {
$('#commentField').val('');
$('#notice-container').html('<div class="alert alert-success" role="alert">Dein Kommentar wurde <b>erfolgreich</b> gesendet!</div>');
@@ -92,8 +88,7 @@ var addComment = function () {
}
},
error: function (data) {
console.log(data);
$('#notice-container').html('<div class="alert alert-danger" role="alert"><b>Error:</b> Comment couldn\'t be sent caused by an unkown error! Please try again later or contact the admin to get help!</div>')
$('#notice-container').html('<div class="alert alert-danger" role="alert"><b>Error:</b> Comment couldn\'t be sent caused by an unkown error! Please try again later or contact the admin to get help!</div>');
$('div.loading-container', item).css('background-color', '#ff4136');
$('div.loading-container i', item).removeClass('fa-cog').removeClass('fa-spin').addClass('fa-exclamation').css("color", '#fff');
$(item).delay(3000).fadeOut(2000);
@@ -132,4 +127,4 @@ function likeDislike(postID) {
}
}
});
};
}

View File

@@ -5,7 +5,6 @@ function loadPlayer() {
url: '/tools/csgo/data/' + $('#player-id').text(),
method: 'GET',
success: function (result) {
console.log(result);
var playerName = $('#player-name');
if (result.player_exists) {
$('#player-id').text(result.id);

View File

@@ -250,13 +250,10 @@ $('#new-category-submit').click(function () {
display_name: display_name
},
success: function (data) {
console.log(data);
var duplicates = $('select[name="category"] option[value="' + data + '"]').eq(0);
if (jQuery.isEmptyObject(duplicates)) {
console.log('test');
$('select[name="category"]').append('<option value="' + data + '" selected="">' + display_name + '</option>');
} else {
console.log('kein guter Test');
duplicates.attr('selected', '');
}
}
@@ -456,7 +453,6 @@ $('#deleteModal').on('show.bs.modal', function (event) {
function deletePostFinally(id, url, selector) {
var row = $("#" + selector + "-" + id);
console.log(row);
$.ajax({
url: url,
method: 'POST',
@@ -597,8 +593,6 @@ function loadNotificationsAsync() {
url: '/Main/getNotifications',
method: 'post',
success: (data) => {
console.log(data);
if (data.status === 'success') {
for (let notification of data.notifications) {
$('#notificationMenu').append(`

View File

@@ -4,8 +4,6 @@ $('#statusModal').on('show.bs.modal', (e) => {
const id = btn.data('id');
const state = btn.data('state');
console.log(id, state);
const modal = $('#statusModal');
$('#feedbackState option').each(() => {
$(this).removeAttr('disabled').removeAttr('selected');
@@ -34,9 +32,6 @@ function archiveFeedback(id) {
id
},
success: (result) => {
// result = JSON.parse(result);
console.log(result);
if (result.type === 'success') {
setTimeout(() => {
row.find('#loader').css({

View File

@@ -183,8 +183,6 @@ $(document).ready(function () {
passwordCon = $('.passConfirm').val(),
url = window.location.href;
console.log(url);
$.ajax({
url: url,
method: 'POST',
@@ -193,7 +191,6 @@ $(document).ready(function () {
passwordConfirm: passwordCon
},
success: function (data) {
console.log(data);
setTimeout(function () {
$('.loading-msg i').removeClass('active');
}, 1000);
@@ -215,7 +212,6 @@ $(document).ready(function () {
},
error: function (data) {
// TODO
console.log(data);
}
});
}
@@ -282,7 +278,6 @@ $(document).ready(function () {
},
error: function (data) {
// TODO
console.log(data);
}
});
}
@@ -300,7 +295,6 @@ function registerAccount(username, email, password, passwordRepeat) {
passwordRepeat: passwordRepeat
},
success: function (data) {
console.log(data);
setTimeout(function () {
$('.loading-msg i').removeClass('active');
}, 1000);
@@ -352,7 +346,6 @@ function registerAccount(username, email, password, passwordRepeat) {
}, 1650);
},
error: function (data) {
console.log(data);
const registerResult = {
state: false,
messages: [],

View File

@@ -8,7 +8,6 @@ $('#input input').keyup(function(event){
}
});
$(function() {
console.log('test');
generateNickname();
});
@@ -41,7 +40,6 @@ function generateNickname() {
$('#generate').button('loading');
},
success: function(data) {
console.log(data);
if(data !== "MySQL Error") {
$('#nickname').val(data);
$('#history').append(`<li class="list-group-item">${data}</li>`);

View File

@@ -35,7 +35,6 @@ function loadEntries() {
firstRun = false;
running = false;
},
error: console.log
});
}
}

View File

@@ -14,9 +14,7 @@ function searchEntries() {
const rank = $('#searchForRank').val();
const lang = $('#searchForLang').data('value');
const country = $('#searchForCountry').data('value');
console.log(rank);
if (!s_running && ((s_itemsLeft || val_changed) && (query.val().length > 0 || (type === 'type-users' && (rank !== '' || lang !== '' || country !== ''))))) {
console.log(rank);
$.ajax({
url: '/posts/getSearchPosts',
data: {
@@ -59,7 +57,6 @@ function searchEntries() {
val_changed = false;
},
error: console.log
});
}
}
@@ -163,7 +160,6 @@ function initUserSearch() {
url: '/posts/getAvailableCountries',
success: (data) => {
const countrySelect = $('#searchForCountry').find('.dropdown-menu');
console.log(data);
for(let country of data.countries) {
countrySelect.append(`
<a href="#" class="dropdown-item" data-value="${country.country}">
@@ -180,7 +176,6 @@ function initUserSearch() {
$('#searchForCountry').find('.dropdown-item[data-value=' + urlAttribute + ']').click();
}
},
error: console.log
});
$.ajax({
@@ -203,7 +198,6 @@ function initUserSearch() {
$('#searchForLang').find('.dropdown-item[data-value=' + urlAttribute + ']').click();
}
},
error: console.log
});
}

View File

@@ -35,7 +35,6 @@ $('#birthdate-year').change(function () {
function updateMonthSelection() {
const defaultMonth = parseInt($('#birthdate-month').attr('data-default')) || 0;
console.log(defaultMonth);
$('#birthdate-month option').eq(defaultMonth).attr('selected', 'selected');
}
@@ -47,7 +46,6 @@ function updateDaySelection() {
}
const defaultDay = parseInt($('#birthdate-day').attr('data-default')) || 0;
console.log(defaultDay);
$('#birthdate-day option').eq(defaultDay).attr('selected', 'selected');
}

View File

@@ -6,7 +6,6 @@ $(document).ready(function () {
initSubHeaderOffsetTop = $('#profile-sub-header').offset().top;
$('section[data-type="background"]').each(function () {
// console.log(parallaxActive);
var $bgobj = $(this);
$bgobj.css('height', parseFloat($('#profile-sub-header').css('top')) - $(window).scrollTop() - 60);
$(window).scroll(function () {
@@ -23,12 +22,12 @@ $(document).ready(function () {
});
});
$('section[data-type="foreground"]').each(function () {
var $bgobj = $(this);
const $bgobj = $(this);
$(window).scroll(function () {
if (parallaxActive) {
var yPos = -($(window).scrollTop() / $bgobj.data('speed'));
var coords = '50% ' + yPos + 'px';
const yPos = -($(window).scrollTop() / $bgobj.data('speed'));
const coords = '50% ' + yPos + 'px';
$bgobj.css({backgroundPosition: coords});
$bgobj.css('transform', 'translate3d(0,' + yPos + 'px, 0)')
}
@@ -79,7 +78,6 @@ function sendFollowerRequest() {
url: "/user/switchFollowing",
method: "POST",
success: function (data) {
console.log(data);
switch (data.code) {
case 0:
$('#mustBeLoggedInModal').modal('show');
@@ -97,7 +95,6 @@ function sendFollowerRequest() {
break;
}
},
error: console.log
});
}

View File

@@ -34,11 +34,9 @@ $(window).load(function () {
let sortBy = $(this).attr('data-sort');
let sortAsc = $(this).attr('data-asc') === 'true';
console.log(sortAsc);
if (prevSort.attr('data-sort') === sortBy) {
sortAsc = !sortAsc;
$(this).attr('data-asc', sortAsc);
console.log(sortAsc);
}
if (sortAsc) {
@@ -85,6 +83,5 @@ function autoHeight() {
$(document).ready(function() {
$('.vote-btn').each((el) => {
console.log(el);
});
});

View File

@@ -21,7 +21,6 @@ function loadPostData() {
addReplyButtonListener();
addPostMediaListener();
},
error: console.log
});
}