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

@ -0,0 +1,226 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<div class="col-sm-8 col-sm-pull-4">
<div class="like-toggle-icon-container floating">
<button class="like-toggle-icon" title="❤ Toggle Like!"></button>
<span class="like-count">0</span>
</div>
<div class="blog">
<div class="blog-item">
<img class="img-fluid img-blog" src="" width="100%" alt="" />
<div class="blog-content">
<div class="entry-meta">
<span>
<i class="far fa-user"></i>
<span id="author-name"></span>
</span>
<span style="cursor:pointer" data-toggle="tooltip" data-placement="bottom">
<i class="far fa-calendar"></i>
</span>
<span style="cursor:pointer" data-toggle="tooltip" data-placement="bottom">
<i class="far fa-edit"></i>
</span>
<span>
<i class="far fa-folder-open"></i>
<span id="categoryName"></span>
</span>
<span style="cursor:pointer" data-toggle="tooltip" data-placement="bottom" title="<?= lang('blog_approximate_reading_time') ?>">
<i class="far fa-clock"></i>
0 min
</span>
<span>
<a rel="gotoid" href="#comments">
<i class="far fa-comment"></i>
0
</a>
</span>
<span>
<a href="#" style="cursor:pointer">
<i class="far fa-heart"></i>
<span class="like-count">0</span>
</a>
</span>
</div>
<h1 class="post-title"><?= $title ?></h1>
<h2 class="post-subtitle"><?= $desc ?></h2>
</div>
</div>
<div class="blog-item">
<div class="blog-content">
<div class="blog-post">
<?= $content ?>
</div>
</div>
</div>
<div class="blog-item">
<div class="blog-content">
<div class="row">
<div class="col-sm-6">
<h3>
<i class="fa fa-tags"></i>
Tags
</h3>
<div class="tags" id="tags">
</div>
</div>
<div class="col-sm-6">
<h3>
<i class="far fa-user"></i> Über
</h3>
</div>
</div>
</div>
</div>
<div class="blog-item">
<div class="blog-content">
<div class="container">
<h3>
<i class="far fa-hand-point-right"></i> <?= lang('blog_articels'); ?></h3>
<div class="recommended-articles row">
<!-- --><?php //foreach ($randomPosts as $item) { ?>
<!-- <div class="col-sm-4">-->
<!-- <div class="card">-->
<!-- --><?php //if ($item['postImage'] != ''): ?>
<!-- <a href="--><?//= base_url('blog/post/' . $item['postUrl']) ?><!--">-->
<!-- <img src="--><?//= $item['postImage'] ?><!--?w=200" alt="--><?//= $item['postTitle'] ?><!--" class="card-img-top">-->
<!-- </a>-->
<!-- --><?php //endif; ?>
<!-- <div class="card-body">-->
<!-- <a href="--><?//= base_url('blog/post/' . $item['postUrl']) ?><!--">-->
<!-- <h5 class="card-title">--><?//= $item['postTitle'] ?><!--</h5>-->
<!-- </a>-->
<!-- <small class="card-text">-->
<!-- <i class="far fa-user"></i>-->
<!-- <a href="--><?//= base_url('user/' . $item['postAuthorUsername']) ?><!--">-->
<!-- --><?//= $item['postAuthorDisplayname'] ?>
<!-- </a>-->
<!-- </small>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- --><?php //} ?>
</div>
</div>
</div>
</div>
<div class="blog-item">
<div class="blog-content">
<div class="container">
<div id="comments">
<h3>
<!-- <i class="far fa-comments"></i> --><?//= lang('blog_comments') ?><!-- (-->
<!-- <span class="comment-count">--><?//= $commentCount; ?><!--</span>-->
)
</h3>
<ul class="comment-list" id="comment-list">
</ul>
</div>
</div>
</div>
</div>
<!-- <div class="blog-item">-->
<!-- <div class="blog-content">-->
<!-- <div id="comment-form">-->
<!-- <h3>-->
<!-- <i class="far fa-comment"></i>-->
<!-- --><?//= lang('blog_comment_new'); ?><!--</h3>-->
<!-- <div id="notice-container"></div>-->
<!-- --><?php //if (!empty($_SESSION['user'])): ?>
<!-- <form class="form-horizontal" id="commentForm">-->
<!-- <div class="form-group">-->
<!-- <div class="col-sm-12">-->
<!-- <textarea rows="4" class="form-control" name="comment"-->
<!-- placeholder="--><?//= lang('blog_comment') ?><!--"-->
<!-- required id="commentField" wrap="soft"></textarea>-->
<!-- <input id="reply-id" name="reply-id" value="new" type="hidden">-->
<!-- </div>-->
<!-- </div>-->
<!-- <button type="submit"-->
<!-- class="btn btn-green btn-lg col-sm-12"-->
<!-- id="addComment">--><?//= lang('blog_comment_send'); ?><!--</button>-->
<!-- </form>-->
<!-- --><?php //else: ?>
<!-- <h4>--><?//= lang('blog_comment_required_login') ?><!--</h4>-->
<!-- <a href="/login" class="btn btn-green btn-lg col-sm-12">--><?//= lang('login') ?><!--</a>-->
<!-- --><?php //endif; ?>
<!-- </div>-->
<!-- <!--/#comment-form-->-->
<!-- </div>-->
<!-- <!--/#comments-->-->
<!-- </div>-->
<!-- --><?php //if (!empty($prevPost)):
// $prevPost = $prevPost[0]; ?>
<!-- <div class="blog-item col-xs-6" style="width:calc(50% - 5px);">-->
<!-- <a href="--><?//= base_url('blog/post/' . $prevPost['postUrl']) ?><!--">-->
<!-- <div class="pull-left"-->
<!-- style="background: url(--><?//= $prevPost['postImage'] ?>/*?w=150) center;background-size:cover;width:100px;height:100px;border-radius: 4px;margin:10px 0;"></div>*/
/* <div class="float-right" style="width: calc(100% - 110px)">*/
/* <h5>*/
/* <i class="fa fa-arrow-left"></i> */<?//= lang('blog_previous_article') ?><!--</h5>-->
<!-- <h4 style="font-size:20px">--><?//= $prevPost['postTitle'] ?><!--</h4>-->
<!-- </div>-->
<!-- </a>-->
<!-- </div>-->
<!-- --><?php //endif; ?>
<!-- --><?php //if (!empty($nextPost)):
// $nextPost = $nextPost[0]; ?>
<!-- <div class="blog-item col-xs-6 float-right" style="width:calc(50% - 5px);">-->
<!-- <a href="--><?//= base_url('blog/post/' . $nextPost['postUrl']) ?><!--">-->
<!-- <div class="float-right"-->
<!-- style="background: url(--><?//= $nextPost['postImage'] ?>/*?w=150) center;background-size:cover;width:100px;height:100px;border-radius: 4px;margin:10px 0;"></div>*/
/* <div class="pull-left" style="width: calc(100% - 110px);text-align:right;">*/
/* <h5>*/<?//= lang('blog_next_article') ?>
<!-- <i class="fa fa-arrow-right"></i>-->
<!-- </h5>-->
<!-- <h4 style="font-size:20px">--><?//= $nextPost['postTitle'] ?><!--</h4>-->
<!-- </div>-->
<!-- </a>-->
<!-- </div>-->
<!-- --><?php //endif; ?>
<!-- <!--/.blog-item-->-->
<!-- --><?php //endif; ?>
</div>
</div>
<!--/.col-md-8-->
</div>
</section>
<!-- Login-Modal -->
<div class="modal fade" id="loginModal" tabindex="-1" role="dialog" aria-labelledby="meinModalLabel">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="meinModalLabel">Du musst dafür angemeldet sein!</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Schließen">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Um diese Aktion auszufühen, musst du dich mit deinem Account angemeldet haben.<br>
Solltest du noch kein Besitzer eines <?= lang('website_name') ?>-Accounts sein, kannst du
kostenfrei
einen solchen
erstellen.</p>
<p>
<a href="/faq#accounts" target="_blank">Was bringt mir ein Account?</a>
</p>
</div>
<div class="modal-footer">
<a href="/login" class="btn btn-primary">Anmelden</a>
<a href="/login/register" class="btn btn-green">Registrieren</a>
</div>
</div>
</div>
</div>

View File

@ -8,7 +8,6 @@ $(document).ready(function () {
$("#comment-list").html("<h2><i class='fa fa-cog fa-spin'></i> Loading Comments</h2>"); $("#comment-list").html("<h2><i class='fa fa-cog fa-spin'></i> Loading Comments</h2>");
}, },
success: function (data) { success: function (data) {
console.log(data);
$("#comment-list").html(data); $("#comment-list").html(data);
}, },
error: function () { error: function () {
@ -17,7 +16,6 @@ $(document).ready(function () {
}); });
$('.blog .info-box').each((el) => { $('.blog .info-box').each((el) => {
console.log(el);
}); });
}); });
@ -69,8 +67,6 @@ var addComment = function () {
$('#addComment').attr('disabled', ''); $('#addComment').attr('disabled', '');
}, },
success: function (data) { success: function (data) {
console.log(data);
if (data.type === 'success') { if (data.type === 'success') {
$('#commentField').val(''); $('#commentField').val('');
$('#notice-container').html('<div class="alert alert-success" role="alert">Dein Kommentar wurde <b>erfolgreich</b> gesendet!</div>'); $('#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) { 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', item).css('background-color', '#ff4136');
$('div.loading-container i', item).removeClass('fa-cog').removeClass('fa-spin').addClass('fa-exclamation').css("color", '#fff'); $('div.loading-container i', item).removeClass('fa-cog').removeClass('fa-spin').addClass('fa-exclamation').css("color", '#fff');
$(item).delay(3000).fadeOut(2000); $(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(), url: '/tools/csgo/data/' + $('#player-id').text(),
method: 'GET', method: 'GET',
success: function (result) { success: function (result) {
console.log(result);
var playerName = $('#player-name'); var playerName = $('#player-name');
if (result.player_exists) { if (result.player_exists) {
$('#player-id').text(result.id); $('#player-id').text(result.id);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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