From ce9d2150982cb5bd9e3d03e88cc7ba02fc389845 Mon Sep 17 00:00:00 2001 From: Marcel Date: Sun, 30 Dec 2018 18:44:45 +0100 Subject: [PATCH] Remove console.logs --- application/views/admin/blog_post_preview.php | 226 ++++++++++++++++++ assets/js/blog.js | 9 +- assets/js/csgo.js | 1 - assets/js/custom.js | 6 - assets/js/feedback.js | 5 - assets/js/login.js | 7 - assets/js/nickname.js | 2 - assets/js/post_feed.js | 1 - assets/js/post_search.js | 6 - assets/js/profile_edit.js | 2 - assets/js/profile_page.js | 9 +- assets/js/projects.js | 3 - assets/js/single-post-page.js | 1 - 13 files changed, 231 insertions(+), 47 deletions(-) create mode 100644 application/views/admin/blog_post_preview.php diff --git a/application/views/admin/blog_post_preview.php b/application/views/admin/blog_post_preview.php new file mode 100644 index 0000000..3dff79c --- /dev/null +++ b/application/views/admin/blog_post_preview.php @@ -0,0 +1,226 @@ + + +
+ + +
+
+ +
+ +

+

+
+
+
+
+
+ +
+
+
+
+
+
+
+

+ + Tags +

+
+
+
+
+

+ Über +

+
+
+
+
+ +
+
+
+

+

+ +
+
+
+ +
+
+
+
+

+ + + ) +

+
    +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +--> + +--> + + + + + +/*?w=150) center;background-size:cover;width:100px;height:100px;border-radius: 4px;margin:10px 0;">
*/ +/*
*/ +/*
*/ +/* */ + + + + + + + + + +/*?w=150) center;background-size:cover;width:100px;height:100px;border-radius: 4px;margin:10px 0;">
*/ +/*
*/ +/*
*/ + + + + + + + +--> + +
+
+ + + + + + diff --git a/assets/js/blog.js b/assets/js/blog.js index 9c84e45..4f9e28c 100644 --- a/assets/js/blog.js +++ b/assets/js/blog.js @@ -8,7 +8,6 @@ $(document).ready(function () { $("#comment-list").html("

Loading Comments

"); }, 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(''); @@ -92,8 +88,7 @@ var addComment = function () { } }, error: function (data) { - console.log(data); - $('#notice-container').html('') + $('#notice-container').html(''); $('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) { } } }); -}; +} diff --git a/assets/js/csgo.js b/assets/js/csgo.js index e14d1d4..1dd8415 100644 --- a/assets/js/csgo.js +++ b/assets/js/csgo.js @@ -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); diff --git a/assets/js/custom.js b/assets/js/custom.js index 69b53a6..b57feb0 100644 --- a/assets/js/custom.js +++ b/assets/js/custom.js @@ -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(''); } 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(` diff --git a/assets/js/feedback.js b/assets/js/feedback.js index 8c0c1a5..5d53335 100644 --- a/assets/js/feedback.js +++ b/assets/js/feedback.js @@ -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({ diff --git a/assets/js/login.js b/assets/js/login.js index 65eca2f..fc493e1 100644 --- a/assets/js/login.js +++ b/assets/js/login.js @@ -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: [], diff --git a/assets/js/nickname.js b/assets/js/nickname.js index 2f61ecc..c71f3ac 100644 --- a/assets/js/nickname.js +++ b/assets/js/nickname.js @@ -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(`
  • ${data}
  • `); diff --git a/assets/js/post_feed.js b/assets/js/post_feed.js index a662554..ca59843 100644 --- a/assets/js/post_feed.js +++ b/assets/js/post_feed.js @@ -35,7 +35,6 @@ function loadEntries() { firstRun = false; running = false; }, - error: console.log }); } } diff --git a/assets/js/post_search.js b/assets/js/post_search.js index ac303aa..7ff61b9 100644 --- a/assets/js/post_search.js +++ b/assets/js/post_search.js @@ -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(` @@ -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 }); } diff --git a/assets/js/profile_edit.js b/assets/js/profile_edit.js index 7822a2e..b0a3e09 100644 --- a/assets/js/profile_edit.js +++ b/assets/js/profile_edit.js @@ -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'); } diff --git a/assets/js/profile_page.js b/assets/js/profile_page.js index 80beaae..7b6dd44 100644 --- a/assets/js/profile_page.js +++ b/assets/js/profile_page.js @@ -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 }); } diff --git a/assets/js/projects.js b/assets/js/projects.js index af2b190..fc70143 100644 --- a/assets/js/projects.js +++ b/assets/js/projects.js @@ -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); }); }); \ No newline at end of file diff --git a/assets/js/single-post-page.js b/assets/js/single-post-page.js index a3dca50..2fc7099 100644 --- a/assets/js/single-post-page.js +++ b/assets/js/single-post-page.js @@ -21,7 +21,6 @@ function loadPostData() { addReplyButtonListener(); addPostMediaListener(); }, - error: console.log }); }