initial commit

This commit is contained in:
2024-04-29 13:12:44 +05:45
commit 34887303c5
19300 changed files with 5268802 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

View File

@@ -0,0 +1,86 @@
(function ($) {
$('table.posts #the-list, table.pages #the-list').sortable({
'items': 'tr',
'axis': 'y',
'helper': fixHelper,
'update': function (e, ui) {
$.post(ajaxurl, {
action: 'update-menu-order',
order: $('#the-list').sortable('serialize'),
});
}
});
$('table.tags #the-list').sortable({
'items': 'tr',
'axis': 'y',
'helper': fixHelper,
'update': function (e, ui) {
$.post(ajaxurl, {
action: 'update-menu-order-tags',
order: $('#the-list').sortable('serialize'),
});
}
});
var fixHelper = function (e, ui) {
ui.children().children().each(function () {
$(this).width($(this).width());
});
return ui;
};
/****
* Fix for table breaking
*/
jQuery(window).on( 'load', function () {
// make the array for the sizes
var td_array = new Array();
var i = 0;
jQuery('#the-list tr:first-child').find('td').each(function () {
td_array[i] = $(this).outerWidth();
i += 1;
});
jQuery('#the-list').find('tr').each(function () {
var j = 0;
$(this).find('td').each(function () {
var paddingx = parseInt($(this).css('padding-left').replace('px', '')) + parseInt($(this).css('padding-right').replace('px', ''));
$(this).width(td_array[j] - paddingx);
j += 1;
});
});
var y = 0;
// check if there are items in the table
if(jQuery('#the-list > tr.no-items').length == 0){
jQuery('#the-list').parent().find('thead').find('th').each(function () {
var paddingx = parseInt($(this).css('padding-left').replace('px', '')) + parseInt($(this).css('padding-right').replace('px', ''));
$(this).width(td_array[y] - paddingx);
y += 1;
});
var z = 0;
jQuery('#the-list').parent().find('tfoot').find('th').each(function () {
var paddingx = parseInt($(this).css('padding-left').replace('px', '')) + parseInt($(this).css('padding-right').replace('px', ''));
$(this).width(td_array[z] - paddingx);
z += 1;
});
}
});
/*****
* End table breaking fix
*/
})(jQuery)

View File

@@ -0,0 +1 @@
!function(s){s("table.posts #the-list, table.pages #the-list").sortable({items:"tr",axis:"y",helper:void 0,update:function(t,e){s.post(ajaxurl,{action:"update-menu-order",order:s("#the-list").sortable("serialize")})}}),s("table.tags #the-list").sortable({items:"tr",axis:"y",helper:void 0,update:function(t,e){s.post(ajaxurl,{action:"update-menu-order-tags",order:s("#the-list").sortable("serialize")})}});jQuery(window).on("load",function(){var i=new Array,t=0;jQuery("#the-list tr:first-child").find("td").each(function(){i[t]=s(this).outerWidth(),t+=1}),jQuery("#the-list").find("tr").each(function(){var e=0;s(this).find("td").each(function(){var t=parseInt(s(this).css("padding-left").replace("px",""))+parseInt(s(this).css("padding-right").replace("px",""));s(this).width(i[e]-t),e+=1})});var e,a=0;0==jQuery("#the-list > tr.no-items").length&&(jQuery("#the-list").parent().find("thead").find("th").each(function(){var t=parseInt(s(this).css("padding-left").replace("px",""))+parseInt(s(this).css("padding-right").replace("px",""));s(this).width(i[a]-t),a+=1}),e=0,jQuery("#the-list").parent().find("tfoot").find("th").each(function(){var t=parseInt(s(this).css("padding-left").replace("px",""))+parseInt(s(this).css("padding-right").replace("px",""));s(this).width(i[e]-t),e+=1}))})}(jQuery);

View File

@@ -0,0 +1,54 @@
jQuery(function( $ )
{
// if it is taxonomy page
if( adminpage == 'edit-tags-php' )
{
// make table rows sortable
$( '.wp-list-table.tags tbody' ).sortable({
items: 'tr:not(.inline-edit-row)',
cursor: 'move',
axis: 'y',
containment: 'table.widefat',
scrollSensitivity: 40,
stop: function( event, ui ) {
// array for the ids and positions
var rows = new Array([]);
// show "activity" with spinner
hsam_taxonomy_sort_activity_spinner( true );
$( '.wp-list-table.tags tbody tr:not(.inline-edit-row)' ).each( function( i, e ) {
var rowID = parseInt( $( e ).attr( 'id' ).substr( 4 ) );
rows[i] = rowID;
} );
// post rows for sorting
$.post( ajaxurl, { 'rows' : rows, 'action' : 'get_inline_boxes' }, function(response) {
// stop activity spinner
hsam_taxonomy_sort_activity_spinner( false );
});
}
});
}
/**
* Adds, shows or hides the activity status spinner
*/
function hsam_taxonomy_sort_activity_spinner( status ) {
var actions_table = $( '.tablenav .actions' );
if( actions_table.find( '.spinner' ).length === 0 && status === true ) {
// add spinner
actions_table.prepend( '<div class="spinner" style="display: inline;" />' );
}
else if ( status === true ) {
// show spinner
actions_table.find( '.spinner' ).show();
}
else {
// hide spinner
actions_table.find( '.spinner' ).hide();
}
}
} );

View File

@@ -0,0 +1 @@
jQuery(function(e){function s(n){var t=e(".tablenav .actions");0===t.find(".spinner").length&&!0===n?t.prepend('<div class="spinner" style="display: inline;" />'):!0===n?t.find(".spinner").show():t.find(".spinner").hide()}"edit-tags-php"==adminpage&&e(".wp-list-table.tags tbody").sortable({items:"tr:not(.inline-edit-row)",cursor:"move",axis:"y",containment:"table.widefat",scrollSensitivity:40,stop:function(n,t){var i=new Array([]);s(!0),e(".wp-list-table.tags tbody tr:not(.inline-edit-row)").each(function(n,t){t=parseInt(e(t).attr("id").substr(4));i[n]=t}),e.post(ajaxurl,{rows:i,action:"get_inline_boxes"},function(n){s(!1)})}})});