Skip to content

Commit

Permalink
Merge pull request #394 from codepress/release/4.7.1
Browse files Browse the repository at this point in the history
Release/4.7.1
  • Loading branch information
DGStefan authored Jan 9, 2024
2 parents e847d8b + 14edf65 commit 9bd70cb
Show file tree
Hide file tree
Showing 11 changed files with 676 additions and 170 deletions.
2 changes: 1 addition & 1 deletion assets/css/table.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/table.js

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions classes/ApplyFilter/QueryTotalNumber.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace AC\ApplyFilter;

class QueryTotalNumber
{

public function apply_filter(int $limit = 250): int
{
return (int)apply_filters('ac/select/query/limit', $limit);
}

}
4 changes: 2 additions & 2 deletions codepress-admin-columns.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
Plugin Name: Admin Columns
Version: 4.7
Version: 4.7.1
Description: Customize columns on the administration screens for post(types), pages, media, comments, links and users with an easy to use drag-and-drop interface.
Author: AdminColumns.com
Author URI: https://www.admincolumns.com
Expand Down Expand Up @@ -37,7 +37,7 @@
}

define('AC_FILE', __FILE__);
define('AC_VERSION', '4.7');
define('AC_VERSION', '4.7.1');

require_once __DIR__ . '/classes/Dependencies.php';

Expand Down
56 changes: 30 additions & 26 deletions languages/codepress-admin-columns.pot
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2023 Admin Columns
# Copyright (C) 2024 Admin Columns
# This file is distributed under the same license as the Admin Columns package.
msgid ""
msgstr ""
Expand All @@ -8,15 +8,15 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Language-Team: Admin Columns <info@admincolumns.com>\n"
"Last-Translator: Codepress <info@codepress.nl\n"
"POT-Creation-Date: 2023-12-06 10:06+0000\n"
"POT-Creation-Date: 2024-01-09 09:08+0000\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
"X-Poedit-SearchPath-0: .\n"
"X-Poedit-SearchPathExcluded-0: *.js\n"
"X-Poedit-SourceCharset: UTF-8\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: classes/ColumnGroups.php:12, classes/Settings/Column/CustomFieldType.php:203, classes/Settings/Column/Image.php:72, classes/Settings/Column/Separator.php:35, templates/admin/help-tab/custom-fields.php:6, classes/Helper/Select/Generic/GroupFormatter/BlogSite.php:20, classes/Helper/Select/Generic/GroupFormatter/VisibilityType.php:17
#: classes/ColumnGroups.php:12, templates/admin/list-screen-settings-mockup.php:132, classes/Settings/Column/CustomFieldType.php:203, classes/Settings/Column/Image.php:72, classes/Settings/Column/Separator.php:35, templates/admin/help-tab/custom-fields.php:6, classes/Helper/Select/Generic/GroupFormatter/BlogSite.php:20, classes/Helper/Select/Generic/GroupFormatter/VisibilityType.php:17
msgid "Default"
msgstr ""

Expand Down Expand Up @@ -392,95 +392,99 @@ msgstr ""
msgid "Table Views"
msgstr ""

#: templates/admin/list-screen-settings-mockup.php:14, templates/admin/list-screen-settings-mockup.php:37
#: templates/admin/list-screen-settings-mockup.php:14, templates/admin/list-screen-settings-mockup.php:49
msgid "optional"
msgstr ""

#: templates/admin/list-screen-settings-mockup.php:21
#: templates/admin/list-screen-settings-mockup.php:23
msgid "Unlock with Admin Columns Pro"
msgstr ""

#: templates/admin/list-screen-settings-mockup.php:23, templates/admin/modal-pro.php:41
#: templates/admin/list-screen-settings-mockup.php:29, templates/admin/modal-pro.php:41
msgid "Upgrade"
msgstr ""

#: templates/admin/list-screen-settings-mockup.php:29
#: templates/admin/list-screen-settings-mockup.php:35
msgid "Conditionals"
msgstr ""

#: templates/admin/list-screen-settings-mockup.php:30
#: templates/admin/list-screen-settings-mockup.php:36
msgid "Make this table view available only for specific users or roles."
msgstr ""

#: templates/admin/list-screen-settings-mockup.php:36, classes/Settings/Column/User.php:89
#: templates/admin/list-screen-settings-mockup.php:47, classes/Settings/Column/User.php:89
msgid "Roles"
msgstr ""

#: templates/admin/list-screen-settings-mockup.php:48
#: templates/admin/list-screen-settings-mockup.php:60
msgid "Table Elements"
msgstr ""

#: templates/admin/list-screen-settings-mockup.php:49
#: templates/admin/list-screen-settings-mockup.php:61
msgid "Show or hide elements from the table list screen."
msgstr ""

#: templates/admin/list-screen-settings-mockup.php:57
#: templates/admin/list-screen-settings-mockup.php:72
msgid "Inline Edit"
msgstr ""

#: templates/admin/list-screen-settings-mockup.php:58, templates/tooltip/bulk-editing.php:27
#: templates/admin/list-screen-settings-mockup.php:73, templates/tooltip/bulk-editing.php:27
msgid "Bulk Edit"
msgstr ""

#: templates/admin/list-screen-settings-mockup.php:59
#: templates/admin/list-screen-settings-mockup.php:74
msgid "Filters"
msgstr ""

#: templates/admin/list-screen-settings-mockup.php:60, templates/tooltip/filtering.php:16, templates/admin/page/settings-section-pro-cta.php:29
#: templates/admin/list-screen-settings-mockup.php:75, templates/tooltip/filtering.php:16, templates/admin/page/settings-section-pro-cta.php:29
msgid "Smart Filters"
msgstr ""

#: templates/admin/list-screen-settings-mockup.php:61, templates/tooltip/export.php:7, classes/Settings/Column/Pro/Export.php:11
#: templates/admin/list-screen-settings-mockup.php:76, templates/tooltip/export.php:7, classes/Settings/Column/Pro/Export.php:11
msgid "Export"
msgstr ""

#: templates/admin/list-screen-settings-mockup.php:62, templates/admin/page/settings-section-pro-cta.php:146
#: templates/admin/list-screen-settings-mockup.php:77, templates/admin/page/settings-section-pro-cta.php:146
msgid "Add Row"
msgstr ""

#: templates/admin/list-screen-settings-mockup.php:63
#: templates/admin/list-screen-settings-mockup.php:78
msgid "Status (Quick Links)"
msgstr ""

#: templates/admin/list-screen-settings-mockup.php:64
#: templates/admin/list-screen-settings-mockup.php:79
msgid "Search"
msgstr ""

#: templates/admin/list-screen-settings-mockup.php:65
#: templates/admin/list-screen-settings-mockup.php:80
msgid "Bulk Actions"
msgstr ""

#: templates/admin/list-screen-settings-mockup.php:80
#: templates/admin/list-screen-settings-mockup.php:98
msgid "Preferences"
msgstr ""

#: templates/admin/list-screen-settings-mockup.php:81
#: templates/admin/list-screen-settings-mockup.php:99
msgid "Set default settings that users will see when they visit the list table."
msgstr ""

#: templates/admin/list-screen-settings-mockup.php:87, templates/admin/page/settings-section-pro-cta.php:92
#: templates/admin/list-screen-settings-mockup.php:108, templates/admin/page/settings-section-pro-cta.php:92
msgid "Horizontal Scrolling"
msgstr ""

#: templates/admin/list-screen-settings-mockup.php:101, templates/settings/setting-label-icons.php:223, templates/tooltip/sorting-include-empty.php:9, templates/tooltip/sorting.php:7, classes/Settings/Column/Pro/Sorting.php:11
#: templates/admin/list-screen-settings-mockup.php:126, templates/settings/setting-label-icons.php:223, templates/tooltip/sorting-include-empty.php:9, templates/tooltip/sorting.php:7, classes/Settings/Column/Pro/Sorting.php:11
msgid "Sorting"
msgstr ""

#: templates/admin/list-screen-settings-mockup.php:119
#: templates/admin/list-screen-settings-mockup.php:135
msgid "Ascending"
msgstr ""

#: templates/admin/list-screen-settings-mockup.php:144
msgid "Pre-applied Filters"
msgstr ""

#: templates/admin/list-screen-settings-mockup.php:123
#: templates/admin/list-screen-settings-mockup.php:149
msgid "No public saved filters available."
msgstr ""

Expand Down
5 changes: 5 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,11 @@ You can find a list of the available actions and filters (and examples on how to

== Changelog ==

= 4.7.1 =
Release Date: January 9th, 2024

* [Fixed] When the edit columns button was disabled, a styled container was displayed

= 4.7 =
Release Date: December 6th, 2023

Expand Down
2 changes: 2 additions & 0 deletions src/js/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,6 @@ AC_SERVICES.addListener(EventConstants.TABLE.READY, (event: TableEventPayload) =
document.querySelectorAll<HTMLElement>('[data-component="ac-json"]').forEach(el => {
new JsonViewer(el);
})

event.table.Actions?.refresh();
});
13 changes: 12 additions & 1 deletion src/js/table/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,26 @@ export default class Actions {
return this.container;
}

toggle( show: boolean = true ){
if( show ){
this.getElement().classList.remove( '-hidden' )
} else {
this.getElement().classList.add( '-hidden' )
}

}

refresh() {
this.buttons.getButtons().forEach(button => {
if (button.isHidden()) {
button.getElement().getElement().remove();
} else {
this.container.querySelector('.ac-table-actions-buttons')?.append(button.getElement().getElement());
}

});

this.toggle( this.buttons.getButtons().length !== 0 )

}

}
Loading

0 comments on commit 9bd70cb

Please sign in to comment.