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

Open
wants to merge 23 commits into
base: 3.x
Choose a base branch
from
Open
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
178 changes: 96 additions & 82 deletions _build/templates/default/sass/_forms.scss

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion _build/templates/default/sass/_utility.scss
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@
}
}


/* Instead of writing the same code for every nav bar */
@mixin navigation-list {
list-style-type: none;
Expand Down Expand Up @@ -212,3 +211,13 @@
}
}
}

@mixin textLink {
color: $colorSplash;
text-decoration-style: dotted;
text-decoration-color: scale-color($colorSplash, $lightness: 50%);
&:hover {
color: $black;
border-bottom-color: scale-color($black, $lightness: 40%);
}
}
108 changes: 74 additions & 34 deletions _build/templates/default/sass/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,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 @@ -442,7 +442,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 @@ -475,7 +475,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 @@ -540,6 +540,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 @@ -552,14 +560,11 @@ 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;
smg6511 marked this conversation as resolved.
Show resolved Hide resolved
}
}

.x-editable-column {
Expand Down Expand Up @@ -909,6 +914,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 @@ -922,8 +958,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 @@ -932,22 +968,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 @@ -1181,7 +1217,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 @@ -1417,38 +1453,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 @@ -1460,19 +1494,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 @@ -1873,6 +1907,12 @@ iframe[classname="x-hidden"] {
user-select: text !important;
}

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

/* Lightbox */
#ux-lightbox {
left: 0;
Expand Down Expand Up @@ -1905,7 +1945,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 @@ -1994,7 +2034,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
8 changes: 8 additions & 0 deletions core/lexicon/en/context.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,31 @@
* @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_reserved'] = 'The Context key you chose is reserved for system use only. Please specify a different key.';
$_lang['context_err_save'] = 'An error occurred while saving the Context.';
$_lang['context_id'] = 'Ctx ID';
$_lang['context_key'] = 'Context Key';
$_lang['context_management_message'] = 'Manage site Contexts.';
$_lang['context_reserved_general_desc'] = 'Note that this is a protected, built-in Context. The values shown below are for informational purposes only. Its settings and assigned User Group(s) are, however, editable by users with the appropriate permissions.';
$_lang['context_settings'] = 'Context Settings';
$_lang['context_settings_desc'] = 'Here you can set settings specific to this Context. Context settings will override any System Settings with the same key. <b>Each setting will be available via the [[++key]] placeholder.</b>';
$_lang['context_with_key_not_found'] = 'Context with key %s not found!';
Expand Down
2 changes: 2 additions & 0 deletions core/lexicon/en/default.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
$_lang['confirm_delete_message'] = 'Are you sure you want to delete this message?';
$_lang['confirm_remove'] = 'Are you sure you want to delete this item?';
$_lang['confirm_remove_locks'] = 'Users sometimes close their browser while editing documents, templates, snippets or parsers, possibly leaving the item they were editing in locked state. By pressing OK you can delete ALL locks currently in place.<br /><br />Proceed?';
$_lang['confirm_remove_multiple'] = 'Are you sure you want to delete the selected items?';
$_lang['confirm_undelete'] = 'Any children documents deleted at the same time as this document will also be undeleted, but children documents deleted at an earlier time will still be deleted.';
$_lang['confirm_unpublish'] = 'Un-publishing this document now will delete any (un)publishing dates that may have been set. If you wish to set or keep publish or unpublish dates, please choose to edit the document instead.\n\nProceed?';
$_lang['console'] = 'Console';
Expand All @@ -92,6 +93,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
2 changes: 1 addition & 1 deletion core/lexicon/en/namespace.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
$_lang['namespace_name_desc'] = 'Specify a name for the Namespace here.';
$_lang['namespace_path'] = 'Core Path';
$_lang['namespace_path_desc'] = 'Specify an absolute path to the core for this Namespace here. You may use placeholders like {core_path}. Example: {core_path}components/democomponent/';
$_lang['namespace_remove_confirm'] = 'Are you sure you want to delete "[[+name]]" namespace and all related content?';
$_lang['namespace_remove_confirm'] = 'Are you sure you want to delete the "[[+name]]" namespace and all related content?';
$_lang['namespace_remove_multiple_confirm'] = 'Are you sure you want to delete these namespaces and all their related content?';
$_lang['namespaces'] = 'Namespaces';
$_lang['namespaces_desc'] = 'Namespaces are global identifiers for packages and components, registering their vehicles, lexicon entries and resources all together.';
5 changes: 5 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 All @@ -30,6 +34,7 @@
$_lang['source_properties.intro_msg'] = 'Manage the properties for this Source below.';
$_lang['source_remove_confirm'] = 'Are you sure you want to delete this Media Source? This might break any TVs you have assigned to this source.';
$_lang['source_remove_multiple_confirm'] = 'Are you sure you want to delete these Media Sources? This might break any TVs you have assigned to these sources.';
$_lang['source_reserved_general_desc'] = 'Note that this is a protected, built-in Media Source. The values shown below are for informational purposes only. Its properties and assigned User Group(s) are, however, editable by users with the appropriate permissions.';
$_lang['source_type'] = 'Source Type';
$_lang['source_type_desc'] = 'The type, or driver, of the Media Source. The Source will use this driver to connect to when gathering its data. For example: File System will grab files from the file system. S3 will get files from an S3 bucket.';
$_lang['source_type.file'] = 'File System';
Expand Down
10 changes: 8 additions & 2 deletions core/lexicon/en/user.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
* @package modx
* @subpackage lexicon
*/
$_lang['_role_member_description'] = 'The lowest-authority role, usually a user of the site but not of the manager.';
$_lang['_role_member_name'] = 'Member';
$_lang['_role_superuser_description'] = 'The highest-authority role, for manager users with complete control over all aspects of the site.';
$_lang['_role_superuser_name'] = 'Super User';
$_lang['active'] = 'Active';
$_lang['address'] = 'Address';
$_lang['administrator'] = 'Administrator';
Expand Down Expand Up @@ -41,11 +45,12 @@
$_lang['role_err_ae'] = 'A role already exists with that name.';
$_lang['role_err_duplicate'] = 'An error occurred while duplicating the role.';
$_lang['role_err_has_users'] = 'There are users with this role. It cannot be deleted.';
$_lang['role_err_name_reserved'] = 'The role name “[[+reservedName]]” is reserved. Please choose another name.';
$_lang['role_err_nf'] = 'Role not found.';
$_lang['role_err_nfs'] = 'Role not found with id: [[+role]]';
$_lang['role_err_ns'] = 'Role not specified!';
$_lang['role_err_ns_authority'] = 'Please specify an authority level for this role.';
$_lang['role_err_ns_name'] = 'Please specify a name for the role.';
$_lang['role_err_ns_name'] = 'Please specify a name for this role.';
$_lang['role_err_remove'] = 'An error occurred while trying to delete the role.';
$_lang['role_err_remove_admin'] = 'The role you are trying to delete is the admin role. This role cannot be deleted!';
$_lang['role_remove'] = 'Delete Role';
Expand Down Expand Up @@ -75,6 +80,7 @@
$_lang['user_country'] = 'Country';
$_lang['user_dob'] = 'Date of birth';
$_lang['user_doesnt_exist'] = 'User does not exist';
$_lang['user_edit_account'] = 'Edit User’s Account';
$_lang['user_edit_self_msg'] = 'You may need to log out and log in again after saving to fully update your information.</strong><br>Also, should you choose to generate a new password for yourself, it will be sent to you through email.';
$_lang['user_email'] = 'Email address';
$_lang['user_err_access_permissions_save'] = 'An error occurred while saving user access permissions.';
Expand Down Expand Up @@ -178,7 +184,7 @@
$_lang['user_remove_confirm'] = 'Are you sure you want to delete this user? This is irreversible!';
$_lang['user_remove_multiple_confirm'] = 'Are you sure you want to delete these users? This is irreversible!';
$_lang['user_remote_data_msg'] = 'Edit remote user data here.';
$_lang['user_role_update'] = 'Edit User Role';
$_lang['user_role_update'] = 'Change User’s Role';
$_lang['user_setting_err_remove'] = 'An error occurred while trying to delete user settings.';
$_lang['user_setting_err_save'] = 'An error occurred while saving user settings.';
$_lang['user_settings'] = 'User Settings';
Expand Down
Loading
Loading