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 #15915

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
228 changes: 116 additions & 112 deletions _build/templates/default/sass/_forms.scss

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions _build/templates/default/sass/_utility.scss
Original file line number Diff line number Diff line change
Expand Up @@ -212,3 +212,13 @@
}
}
}

@mixin textLink {
color: $colorSplash;
text-decoration: none;
border-bottom: 1px dotted scale-color($colorSplash, $lightness: 50%);
&:hover {
color: $black;
border-bottom-color: scale-color($black, $lightness: 40%);
}
}
129 changes: 87 additions & 42 deletions _build/templates/default/sass/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ hr {
}

.wait {
background: transparent url($imgPath + "style/wait.gif") no-repeat scroll
center 55px;
background: transparent url($imgPath+"style/wait.gif") no-repeat scroll center
55px;
color: $darkestGray;
font-size: 15px;
font-weight: bold;
Expand Down Expand Up @@ -441,7 +441,7 @@ textarea.x-form-field {
bottom: 0;
display: block;
content: " ";
background: transparent url($imgPath + "restyle/dragndrop.svg") no-repeat
background: transparent url($imgPath+"restyle/dragndrop.svg") no-repeat
center;
background-size: 50% 50%;
opacity: 0.1;
Expand Down Expand Up @@ -474,7 +474,7 @@ textarea.x-form-field {
}

#modx-panel-packages.drag-n-drop:before {
background: transparent url($imgPath + "restyle/dragndrop.svg") no-repeat top;
background: transparent url($imgPath+"restyle/dragndrop.svg") no-repeat top;
background-size: 50% 30%;
z-index: 0;
}
Expand Down Expand Up @@ -539,6 +539,14 @@ textarea.x-form-field {
}

/* grids */

.modx-protected-row {
.x-grid3-cell-inner {
font-style: italic;
color: $colorSplash;
}
}

.x-small-editor .x-form-field {
font-size: 12px !important;
}
Expand All @@ -551,26 +559,28 @@ textarea.x-form-field {
color: #999 !important;
}

a.x-grid-link {
color: $colorSplash;
text-decoration: underline;
}

a.x-grid-link:hover,
a.x-grid-link:focus {
text-decoration: none;
.x-grid-link {
@include textLink;
&.simulated-link {
cursor: pointer;
}
}

.x-editable-column {
cursor: pointer;
&:hover,
&:focus {
color: $colorSplash;
> div::after {
@include awesome-font;
content: fa-content($fa-var-pen);
margin: 0 0.5em;
cursor: default;
&:not(.editor-disabled) {
cursor: pointer;
&:hover,
&:focus {
color: $colorSplash;
> div {
&::after {
@include awesome-font;
content: fa-content($fa-var-pen);
margin: 0 0.5em;
color: $colorSplash;
}
}
}
}
}
Expand Down Expand Up @@ -823,6 +833,37 @@ a.x-grid-link:focus {
}

/* rowactions */
.x-grid3-row {
&.disable-selection,
&.disable-selection.x-grid3-row-selected {
.x-grid3-row-checker {
position: relative;
&::before,
&::after {
color: $disabledTextColor;
}
&::before {
content: '\f0c8';
}
&::after {
content: '\f715';
font-size: 6px;
position: absolute;
left: 50%;
top: 50%;
margin-left: 2px;
margin-top: 1px;
transform: translate(-50%, -50%) rotate(98deg);
font-weight: 600;
font-family: 'Font Awesome 5 Free';
}
&:hover {
cursor: default;
}
}
}
}

.ux-row-action-cell .x-grid3-cell-inner {
padding: 1px 0 0 0;
}
Expand All @@ -836,8 +877,8 @@ a.x-grid-link:focus {
}

.ux-row-action-item span {
background: transparent url($imgPath + "style/go-next.png") no-repeat scroll
1px 4px;
background: transparent url($imgPath+"style/go-next.png") no-repeat scroll 1px
4px;
display: inline !important;
line-height: 24px;
margin: 0 5px;
Expand All @@ -846,22 +887,22 @@ a.x-grid-link:focus {
}

.icon-uninstall span {
background: url($imgPath + "style/delete.png") no-repeat scroll 1px 4px
background: url($imgPath+"style/delete.png") no-repeat scroll 1px 4px
transparent;
}

.package-details span {
background: url($imgPath + "style/info.png") no-repeat scroll 1px 4px
background: url($imgPath+"style/info.png") no-repeat scroll 1px 4px
transparent;
}

.package-download span {
background: url($imgPath + "style/download.png") no-repeat scroll 1px 4px
background: url($imgPath+"style/download.png") no-repeat scroll 1px 4px
transparent;
}

.package-installed span {
background: url($imgPath + "style/accept.png") no-repeat scroll 1px 4px
background: url($imgPath+"style/accept.png") no-repeat scroll 1px 4px
transparent;
}

Expand Down Expand Up @@ -1095,7 +1136,7 @@ a.x-grid-link:focus {
}

.x-rbtn td {
background-image: url($imgPath + "restyle/icons/rbtn.gif");
background-image: url($imgPath+"restyle/icons/rbtn.gif");
background-repeat: no-repeat;
border: 0 none;
height: 21px;
Expand Down Expand Up @@ -1331,38 +1372,36 @@ iframe[classname="x-hidden"] {

/* file upload, is this the old legacy (single file) uploader? */
.ext-ux-uploaddialog-addbtn {
background: url($imgPath + "restyle/fileup/file-add.gif") no-repeat left
center !important;
background: url($imgPath+"restyle/fileup/file-add.gif") no-repeat left center !important;
}

.ext-ux-uploaddialog-removebtn {
background: url($imgPath + "restyle/fileup/file-remove.gif") no-repeat left
background: url($imgPath+"restyle/fileup/file-remove.gif") no-repeat left
center !important;
}

.ext-ux-uploaddialog-resetbtn {
background: url($imgPath + "restyle/fileup/reset.gif") no-repeat left center !important;
background: url($imgPath+"restyle/fileup/reset.gif") no-repeat left center !important;
}

.ext-ux-uploaddialog-uploadstartbtn {
background: url($imgPath + "restyle/fileup/upload-start.gif") no-repeat left
background: url($imgPath+"restyle/fileup/upload-start.gif") no-repeat left
center !important;
}

.ext-ux-uploaddialog-uploadstopbtn {
background: url($imgPath + "restyle/fileup/upload-stop.gif") no-repeat left
background: url($imgPath+"restyle/fileup/upload-stop.gif") no-repeat left
center !important;
}

.ext-ux-uploaddialog-indicator-stoped {
background: url($imgPath + "restyle/fileup/done.gif") no-repeat center center;
background: url($imgPath+"restyle/fileup/done.gif") no-repeat center center;
height: 16px;
width: 16px;
}

.ext-ux-uploaddialog-indicator-processing {
background: url($imgPath + "restyle/fileup/loading.gif") no-repeat center
center;
background: url($imgPath+"restyle/fileup/loading.gif") no-repeat center center;
height: 16px;
width: 16px;
}
Expand All @@ -1374,19 +1413,19 @@ iframe[classname="x-hidden"] {
}

.ext-ux-uploaddialog-state-0 {
background-image: url($imgPath + "restyle/fileup/uncheck.gif");
background-image: url($imgPath+"restyle/fileup/uncheck.gif");
}

.ext-ux-uploaddialog-state-1 {
background-image: url($imgPath + "restyle/fileup/check.gif");
background-image: url($imgPath+"restyle/fileup/check.gif");
}

.ext-ux-uploaddialog-state-2 {
background-image: url($imgPath + "restyle/fileup/failed.gif");
background-image: url($imgPath+"restyle/fileup/failed.gif");
}

.ext-ux-uploaddialog-state-3 {
background-image: url($imgPath + "restyle/fileup/file-uploading.gif");
background-image: url($imgPath+"restyle/fileup/file-uploading.gif");
}

/* tree grid */
Expand Down Expand Up @@ -1699,6 +1738,12 @@ iframe[classname="x-hidden"] {
user-select: text !important;
}

.x-selectable {
&.simulated-link * {
@include textLink;
}
}

/* Lightbox */
#ux-lightbox {
left: 0;
Expand Down Expand Up @@ -1731,7 +1776,7 @@ iframe[classname="x-hidden"] {
}

#ux-lightbox-loading {
background: url($imgPath + "style/loading.gif") no-repeat scroll center 15%
background: url($imgPath+"style/loading.gif") no-repeat scroll center 15%
transparent;
height: 25%;
left: 0;
Expand Down Expand Up @@ -1820,7 +1865,7 @@ iframe[classname="x-hidden"] {
}

#ux-lightbox-data #ux-lightbox-navClose {
background: transparent url($imgPath + "style/close.png") no-repeat scroll 0 0;
background: transparent url($imgPath+"style/close.png") no-repeat scroll 0 0;
float: right;
height: 16px;
outline: medium none;
Expand Down
7 changes: 7 additions & 0 deletions core/lexicon/en/context.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,24 @@
* @package modx
* @subpackage lexicon
*/
$_lang['_context_mgr_description'] = 'The default manager or administration context for content management activity.';
$_lang['_context_mgr_name'] = 'Manager';
$_lang['_context_web_description'] = 'The default front-end context for your website.';
$_lang['_context_web_name'] = 'Website';
$_lang['context'] = 'Context';
$_lang['context_add'] = 'Add Context';
$_lang['context_data'] = 'Context Data';
$_lang['context_edit'] = 'Edit this context';
$_lang['context_err_ae'] = 'A Context with that name already exists.';
$_lang['context_err_create'] = 'An error occurred while creating the Context.';
$_lang['context_err_duplicate'] = 'An error occurred while trying to duplicate the Context.';
$_lang['context_err_load_data'] = 'Error loading context data.';
$_lang['context_err_name_reserved'] = 'The context name “[[+reservedName]]” is reserved. Please choose another name.';
$_lang['context_err_nf'] = 'Context not found!';
$_lang['context_err_nfs'] = 'Context not found with key: [[+key]]';
$_lang['context_err_ns'] = 'Context not specified.';
$_lang['context_err_ns_key'] = 'Please specify a valid key for the Context.';
$_lang['context_err_ns_name'] = 'Please specify a valid name for the Context.';
$_lang['context_err_remove'] = 'An error occurred while trying to delete the Context.';
$_lang['context_err_save'] = 'An error occurred while saving the Context.';
$_lang['context_id'] = 'Ctx ID';
Expand Down
1 change: 1 addition & 0 deletions core/lexicon/en/default.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
$_lang['create_user_group'] = 'Create User Group';
$_lang['created'] = 'Created';
$_lang['createdon'] = 'Creation date';
$_lang['creator'] = 'Creator';
$_lang['current'] = 'Current';
$_lang['dashboard'] = 'Dashboard';
$_lang['data_err_load'] = 'Error loading data.';
Expand Down
6 changes: 5 additions & 1 deletion core/lexicon/en/policy.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
$_lang['policy_desc_template'] = 'The Policy Template used for this Policy. Policies get their Permission lists from their Template.';
$_lang['policy_desc_lexicon'] = 'Optional. The Lexicon Topic that this Policy uses to translate the Permissions it owns.';
$_lang['policy_duplicate_confirm'] = 'Are you sure you want to duplicate this policy and all of its data?';
$_lang['policy_edit'] = 'Edit this policy';
$_lang['policy_err_ae'] = 'A Policy already exists with the name `[[+name]]`. Please select another name.';
$_lang['policy_err_nf'] = 'Policy not found.';
$_lang['policy_err_ns'] = 'Policy not specified.';
Expand All @@ -44,17 +45,19 @@
$_lang['policy_property_remove'] = 'Delete Access Policy Property';
$_lang['policy_property_specify_name'] = 'Please specify a policy property name:';
$_lang['policy_remove_confirm'] = 'Are you sure you want to delete this Access Policy?';
$_lang['policy_remove_multiple'] = 'Delete Policies';
$_lang['policy_remove_multiple'] = 'Delete Selected Policies';
$_lang['policy_remove_multiple_confirm'] = 'Are you sure you want to delete these Access Policies? This is irreversible.';
$_lang['policy_template'] = 'Policy Template';
$_lang['policy_template_desc'] = 'A Policy Template defines which Permissions will show up in the Permissions grid when editing a specific Policy. You can add or remove specific Permissions from this template below. Note that removing a Permission from a Template will remove it from any Policies that use this Template.';
$_lang['policy_template_desc_name'] = 'The name of the Access Policy Template';
$_lang['policy_template_desc_description'] = 'Optional. A short description of the Access Policy Template. Also you might use lexicon keys here.';
$_lang['policy_template_edit'] = 'Edit this policy template';
$_lang['policy_template_lexicon'] = 'Lexicon Topic';
$_lang['policy_template_desc_lexicon'] = 'Optional. The Lexicon Topic that this Policy Template uses to translate the Permissions it owns.';
$_lang['policy_template_desc_template_group'] = 'The Policy Template Group to use. This is used when selecting Policies from a dropdown menu; usually they are filtered by template group. Select an appropriate group for your Policy Template.';
$_lang['policy_template_duplicate_confirm'] = 'Are you sure you want to duplicate this Policy Template?';
$_lang['policy_template_err_ae'] = 'A Policy Template already exists with the name `[[+name]]`. Please select another name.';
$_lang['policy_template_err_name_ns'] = 'A name is required for this Policy Template.';
$_lang['policy_template_err_nf'] = 'Policy Template not found.';
$_lang['policy_template_err_ns'] = 'Policy Template not specified.';
$_lang['policy_template_err_remove'] = 'An error occurred while trying to delete the Policy Template.';
Expand All @@ -77,6 +80,7 @@
$_lang['policy_template_context_desc'] = 'Context Policy Template with all attributes.';
$_lang['policy_template_namespace_desc'] = 'Namespace Policy Template with all attributes.';
$_lang['policy_template_group_administrator_desc'] = 'All admin policy templates.';
$_lang['policy_template_group_err_ns'] = 'A group must be assigned for this Policy Template.';
$_lang['policy_template_group_object_desc'] = 'All Resource-based policy templates.';
$_lang['policy_template_group_resource_desc'] = 'All Object-based policy templates.';
$_lang['policy_template_group_element_desc'] = 'All Element-based policy templates.';
Expand Down
4 changes: 4 additions & 0 deletions core/lexicon/en/source.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
* @package modx
* @subpackage lexicon
*/
$_lang['_source_filesystem_description'] = 'The default manager source containing all files this installation of MODX has access to.';
$_lang['_source_filesystem_name'] = 'Filesystem';
$_lang['access'] = 'Access Permissions';
$_lang['base_path'] = 'Base Path';
$_lang['base_path_relative'] = 'Base Path Relative?';
Expand All @@ -20,7 +22,9 @@
$_lang['source_access_remove_confirm'] = 'Are you sure you want to delete Access to this Source for this User Group?';
$_lang['source_access_update'] = 'Edit Access';
$_lang['source_description_desc'] = 'A short description of the Media Source.';
$_lang['source_edit'] = 'Edit the settings for this source';
$_lang['source_err_ae_name'] = 'A Media Source with that name already exists! Please specify a new name.';
$_lang['source_err_name_reserved'] = 'The source name “[[+reservedName]]” is reserved. Please choose another name.';
$_lang['source_err_nf'] = 'Media Source not found!';
$_lang['source_err_init'] = 'Could not initialize "[[+source]]" Media Source!';
$_lang['source_err_nfs'] = 'No Media Source can be found with the id: [[+id]].';
Expand Down
Loading