Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.x] Refine grids code to correct actions access and visibility (revised) #15919

Draft
wants to merge 39 commits into
base: 3.x
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
2fdb2b9
Updates batch 1
Nov 25, 2021
bed51b8
Code Refinements, Batch 1
Nov 29, 2021
0303997
Remove type declarations from class properties
Nov 29, 2021
0347792
Delete index.css
Jul 16, 2022
6fec418
Fix code quality issues
Sep 7, 2023
7b8d069
Update modMediaSource.php
Sep 7, 2023
b56ccea
Resolve conflicts
smg6511 May 7, 2024
0fe31ac
Updates batch 1
Nov 25, 2021
3a30c37
Code Refinements, Batch 1
Nov 29, 2021
44869ba
Resolve conflicts
smg6511 May 7, 2024
331f18e
Update modx.grid.role.js
smg6511 Sep 6, 2024
9978ec0
Update modx.grid.role.js
smg6511 Sep 6, 2024
b259e26
Revert edit and remove prop names and visibility
smg6511 Sep 6, 2024
2b0fa68
Base js updates and default lexicon update
smg6511 Sep 9, 2024
da701e1
Context area updates
smg6511 Sep 9, 2024
2cab251
Media Source are updates
smg6511 Sep 9, 2024
a330366
Namespaces updates
smg6511 Sep 9, 2024
ca69470
Finalize namespaces
smg6511 Sep 26, 2024
c942ec0
Finalize contexts
smg6511 Sep 26, 2024
49c759d
Finalize roles
smg6511 Sep 26, 2024
8799205
Finalize sources
smg6511 Sep 26, 2024
7adf926
Update modx.panel.user.group.js
smg6511 Sep 26, 2024
8a7f813
Update _utility.scss
smg6511 Sep 26, 2024
97cad9b
Update modx.panel.filetree.js
smg6511 Oct 21, 2024
638a142
Update modx.tree.js
smg6511 Oct 24, 2024
016eb81
Role updates
smg6511 Oct 29, 2024
4e8695d
Media Source updates
smg6511 Oct 29, 2024
0490769
Context updates
smg6511 Oct 29, 2024
5724f12
Update modx.grid.js
smg6511 Oct 29, 2024
9da688c
Update modx.panel.filetree.js
smg6511 Oct 29, 2024
426647d
More Context tweaks
smg6511 Oct 29, 2024
f4b53c4
Lexicon updates
smg6511 Oct 29, 2024
bfa828a
Dashboards updates
smg6511 Oct 29, 2024
edfe422
WIP Policies and Policy Templates
smg6511 Oct 29, 2024
8dbe031
Update modx.namespace.panel.js
smg6511 Oct 29, 2024
ca122b3
Update modx.grid.user.js
smg6511 Oct 29, 2024
d5c7316
Update utilities.js
smg6511 Oct 29, 2024
5dbf124
Update .eslintrc.js
smg6511 Oct 29, 2024
74285b1
CQ Fixups
smg6511 Oct 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
CQ Fixups
  • Loading branch information
smg6511 committed Oct 29, 2024
commit 74285b12bee5224bf6213931cd9780874aa6756d
2 changes: 1 addition & 1 deletion core/src/Revolution/Processors/Context/Get.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function beforeOutput()
if (empty($contextData['description'])) {
$limitTo[] = 'description';
}
}
}
$this->modx->lexicon->setTranslatedCoreDescriptors($contextData, 'context', 'name', $limitTo);
foreach ($contextData as $key => $value) {
$this->object->set($key, $value);
Expand Down
2 changes: 1 addition & 1 deletion core/src/Revolution/Processors/Context/GetList.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public function prepareRow(xPDOObject $object)
if (empty($contextData['description'])) {
$limitTo[] = 'description';
}
}
}
$this->modx->lexicon->setTranslatedCoreDescriptors($contextData, 'context', 'name', $limitTo);
}

Expand Down
6 changes: 4 additions & 2 deletions core/src/Revolution/modLexicon.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
*/
protected $_loadedTopics = [];

protected array $config;

/**
* Creates the modLexicon instance.
*
Expand Down Expand Up @@ -824,7 +826,7 @@
* db column name as the primary one, thus requiring use of its alias of 'template_name' to avoid conflicts
* @param array $limitToFields Transforms only the field(s) given in the given list
*/
public function setTranslatedCoreDescriptors(array &$objectData, string $objectSpec, string $namingKey = 'name', array $limitToFields = []): void

Check warning on line 829 in core/src/Revolution/modLexicon.php

View workflow job for this annotation

GitHub Actions / phpcs

Line exceeds 120 characters; contains 149 characters
{
$useTranslation = $this->modx->getOption('cultureKey') !== 'en';
$fallbackTopic = $objectSpec;
Expand Down Expand Up @@ -894,7 +896,7 @@
$valueIsLexiconKey = $objectData[$dataName . '_trans'] === $lexiconKey;
$hasTranslation = !empty($objectData[$dataName . '_trans']) && !$valueIsLexiconKey;
$objectData[$dataName . '_trans_missing'] = !$hasTranslation;

// Fall back to English entry when no translation is found for this field
if ($useTranslation && !$hasTranslation && empty($objectData[$dataName])) {
$en = $this->getFileTopic('en', 'core', $fallbackTopic);
Expand All @@ -910,12 +912,12 @@
*/
$value = $this->modx->lexicon($lexiconKey);
$valueIsLexiconKey = $value === $lexiconKey;

if ($useTranslation) {
$hasTranslation = !empty($value) && !$valueIsLexiconKey;
if ($hasTranslation) {
$objectData[$dataName] = $value;
} else if (empty($objectData[$dataName])) {

Check warning on line 920 in core/src/Revolution/modLexicon.php

View workflow job for this annotation

GitHub Actions / phpcs

Usage of ELSE IF is discouraged; use ELSEIF instead
// Fall back to English entry when no translation is found for this field
$en = $this->getFileTopic('en', 'core', $fallbackTopic);
$objectData[$dataName] = $en[$lexiconKey];
Expand Down
Loading