@@ -7,48 +23,75 @@
-
- - + +
-
- -
-
-
-
- avatar-blank -
+
+ +
+
+
+
+
-
- -

+
+
-

-

-
- -
+

- - +

+

+
+
-

- -

- - + + +
+

+ + +

+ + - -
+
+
+
- + - +
+
+ +
+
+ + +
+ + + + +
+
+ + + + +
+
+ + + + +
@@ -70,11 +113,9 @@
+
- - -
- + diff --git a/buddypress/members/single/settings/delete-account.php b/buddypress/members/single/settings/delete-account.php index bb503a15..55ef1f7c 100644 --- a/buddypress/members/single/settings/delete-account.php +++ b/buddypress/members/single/settings/delete-account.php @@ -13,7 +13,7 @@ -
+

diff --git a/buddypress/members/single/settings/general.php b/buddypress/members/single/settings/general.php index a2f7a800..95586cd5 100644 --- a/buddypress/members/single/settings/general.php +++ b/buddypress/members/single/settings/general.php @@ -14,7 +14,7 @@ - +
diff --git a/buddypress/members/single/settings/notifications.php b/buddypress/members/single/settings/notifications.php index 09ea3381..ebd9a416 100644 --- a/buddypress/members/single/settings/notifications.php +++ b/buddypress/members/single/settings/notifications.php @@ -13,7 +13,7 @@ - +
diff --git a/buddypress/members/single/sidebar.php b/buddypress/members/single/sidebar.php index c93c5a5b..c1f00589 100644 --- a/buddypress/members/single/sidebar.php +++ b/buddypress/members/single/sidebar.php @@ -1,11 +1,4 @@ post_name, 'my-' ) > -1 ) ) { $mobile_hide = true; @@ -22,68 +15,3 @@
- - - - - - $user_id, - 'per_page' => openlab_is_my_profile() ? 4 : 2, // Legacy. Not sure why - 'scope' => bp_is_user_friends() ? 'friends' : '', - 'show_hidden' => openlab_is_my_profile(), - 'primary_id' => false, -); -?> - - - - - - - -
- - - -
- -
- -
diff --git a/composer.lock b/composer.lock index d893756e..e019bfc6 100644 --- a/composer.lock +++ b/composer.lock @@ -146,28 +146,28 @@ }, { "name": "phpcompatibility/phpcompatibility-paragonie", - "version": "1.3.2", + "version": "1.3.3", "source": { "type": "git", "url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git", - "reference": "bba5a9dfec7fcfbd679cfaf611d86b4d3759da26" + "reference": "293975b465e0e709b571cbf0c957c6c0a7b9a2ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/bba5a9dfec7fcfbd679cfaf611d86b4d3759da26", - "reference": "bba5a9dfec7fcfbd679cfaf611d86b4d3759da26", + "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/293975b465e0e709b571cbf0c957c6c0a7b9a2ac", + "reference": "293975b465e0e709b571cbf0c957c6c0a7b9a2ac", "shasum": "" }, "require": { "phpcompatibility/php-compatibility": "^9.0" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7", + "dealerdirect/phpcodesniffer-composer-installer": "^1.0", "paragonie/random_compat": "dev-master", "paragonie/sodium_compat": "dev-master" }, "suggest": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", + "dealerdirect/phpcodesniffer-composer-installer": "^1.0 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." }, "type": "phpcodesniffer-standard", @@ -197,22 +197,37 @@ ], "support": { "issues": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie/issues", + "security": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie/security/policy", "source": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie" }, - "time": "2022-10-25T01:46:02+00:00" + "funding": [ + { + "url": "https://github.com/PHPCompatibility", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "time": "2024-04-24T21:30:46+00:00" }, { "name": "phpcompatibility/phpcompatibility-wp", - "version": "2.1.4", + "version": "2.1.5", "source": { "type": "git", "url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git", - "reference": "b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5" + "reference": "01c1ff2704a58e46f0cb1ca9d06aee07b3589082" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5", - "reference": "b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5", + "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/01c1ff2704a58e46f0cb1ca9d06aee07b3589082", + "reference": "01c1ff2704a58e46f0cb1ca9d06aee07b3589082", "shasum": "" }, "require": { @@ -220,10 +235,10 @@ "phpcompatibility/phpcompatibility-paragonie": "^1.0" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7" + "dealerdirect/phpcodesniffer-composer-installer": "^1.0" }, "suggest": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", + "dealerdirect/phpcodesniffer-composer-installer": "^1.0 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." }, "type": "phpcodesniffer-standard", @@ -252,35 +267,50 @@ ], "support": { "issues": "https://github.com/PHPCompatibility/PHPCompatibilityWP/issues", + "security": "https://github.com/PHPCompatibility/PHPCompatibilityWP/security/policy", "source": "https://github.com/PHPCompatibility/PHPCompatibilityWP" }, - "time": "2022-10-24T09:00:36+00:00" + "funding": [ + { + "url": "https://github.com/PHPCompatibility", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "time": "2024-04-24T21:37:59+00:00" }, { "name": "phpcsstandards/phpcsextra", - "version": "1.0.3", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHPCSExtra.git", - "reference": "7029c051cd310e2e17c6caea3429bfbe290c41ae" + "reference": "11d387c6642b6e4acaf0bd9bf5203b8cca1ec489" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/7029c051cd310e2e17c6caea3429bfbe290c41ae", - "reference": "7029c051cd310e2e17c6caea3429bfbe290c41ae", + "url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/11d387c6642b6e4acaf0bd9bf5203b8cca1ec489", + "reference": "11d387c6642b6e4acaf0bd9bf5203b8cca1ec489", "shasum": "" }, "require": { "php": ">=5.4", - "phpcsstandards/phpcsutils": "^1.0", - "squizlabs/php_codesniffer": "^3.7.1" + "phpcsstandards/phpcsutils": "^1.0.9", + "squizlabs/php_codesniffer": "^3.8.0" }, "require-dev": { "php-parallel-lint/php-console-highlighter": "^1.0", "php-parallel-lint/php-parallel-lint": "^1.3.2", - "phpcsstandards/phpcsdevcs": "^1.1.5", - "phpcsstandards/phpcsdevtools": "^1.2.0", - "phpunit/phpunit": "^4.5 || ^5.0 || ^6.0 || ^7.0" + "phpcsstandards/phpcsdevcs": "^1.1.6", + "phpcsstandards/phpcsdevtools": "^1.2.1", + "phpunit/phpunit": "^4.5 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" }, "type": "phpcodesniffer-standard", "extra": { @@ -315,35 +345,50 @@ ], "support": { "issues": "https://github.com/PHPCSStandards/PHPCSExtra/issues", + "security": "https://github.com/PHPCSStandards/PHPCSExtra/security/policy", "source": "https://github.com/PHPCSStandards/PHPCSExtra" }, - "time": "2023-03-28T17:48:27+00:00" + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "time": "2023-12-08T16:49:07+00:00" }, { "name": "phpcsstandards/phpcsutils", - "version": "1.0.6", + "version": "1.0.12", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHPCSUtils.git", - "reference": "ba259eaaefac118648e1263919b9530667ffcf01" + "reference": "87b233b00daf83fb70f40c9a28692be017ea7c6c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/ba259eaaefac118648e1263919b9530667ffcf01", - "reference": "ba259eaaefac118648e1263919b9530667ffcf01", + "url": "https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/87b233b00daf83fb70f40c9a28692be017ea7c6c", + "reference": "87b233b00daf83fb70f40c9a28692be017ea7c6c", "shasum": "" }, "require": { "dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7 || ^1.0", "php": ">=5.4", - "squizlabs/php_codesniffer": "^3.7.1 || 4.0.x-dev@dev" + "squizlabs/php_codesniffer": "^3.10.0 || 4.0.x-dev@dev" }, "require-dev": { "ext-filter": "*", "php-parallel-lint/php-console-highlighter": "^1.0", "php-parallel-lint/php-parallel-lint": "^1.3.2", "phpcsstandards/phpcsdevcs": "^1.1.6", - "yoast/phpunit-polyfills": "^1.0.5" + "yoast/phpunit-polyfills": "^1.1.0 || ^2.0.0" }, "type": "phpcodesniffer-standard", "extra": { @@ -388,22 +433,37 @@ "support": { "docs": "https://phpcsutils.com/", "issues": "https://github.com/PHPCSStandards/PHPCSUtils/issues", + "security": "https://github.com/PHPCSStandards/PHPCSUtils/security/policy", "source": "https://github.com/PHPCSStandards/PHPCSUtils" }, - "time": "2023-05-27T13:39:12+00:00" + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "time": "2024-05-20T13:34:27+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "3.7.2", + "version": "3.10.1", "source": { "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879" + "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", + "reference": "8f90f7a53ce271935282967f53d0894f8f1ff877" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ed8e00df0a83aa96acf703f8c2979ff33341f879", - "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/8f90f7a53ce271935282967f53d0894f8f1ff877", + "reference": "8f90f7a53ce271935282967f53d0894f8f1ff877", "shasum": "" }, "require": { @@ -413,11 +473,11 @@ "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" }, "bin": [ - "bin/phpcs", - "bin/phpcbf" + "bin/phpcbf", + "bin/phpcs" ], "type": "library", "extra": { @@ -432,22 +492,45 @@ "authors": [ { "name": "Greg Sherwood", - "role": "lead" + "role": "Former lead" + }, + { + "name": "Juliette Reinders Folmer", + "role": "Current lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" } ], "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", "keywords": [ "phpcs", "standards", "static analysis" ], "support": { - "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", - "source": "https://github.com/squizlabs/PHP_CodeSniffer", - "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues", + "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy", + "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki" }, - "time": "2023-02-22T23:07:41+00:00" + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "time": "2024-05-22T21:24:41+00:00" }, { "name": "wp-coding-standards/wpcs", @@ -455,29 +538,33 @@ "source": { "type": "git", "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", - "reference": "a328aff1e0b05e55e61a02b9f4faae6482cfc3ad" + "reference": "29488feb64b723674fe463e691a4f83682c2dd5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/a328aff1e0b05e55e61a02b9f4faae6482cfc3ad", - "reference": "a328aff1e0b05e55e61a02b9f4faae6482cfc3ad", + "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/29488feb64b723674fe463e691a4f83682c2dd5e", + "reference": "29488feb64b723674fe463e691a4f83682c2dd5e", "shasum": "" }, "require": { "ext-filter": "*", + "ext-libxml": "*", + "ext-tokenizer": "*", + "ext-xmlreader": "*", "php": ">=5.4", - "phpcsstandards/phpcsextra": "^1.0", - "phpcsstandards/phpcsutils": "^1.0.5", - "squizlabs/php_codesniffer": "^3.7.2" + "phpcsstandards/phpcsextra": "^1.2.1", + "phpcsstandards/phpcsutils": "^1.0.10", + "squizlabs/php_codesniffer": "^3.9.0" }, "require-dev": { "php-parallel-lint/php-console-highlighter": "^1.0.0", "php-parallel-lint/php-parallel-lint": "^1.3.2", "phpcompatibility/php-compatibility": "^9.0", "phpcsstandards/phpcsdevtools": "^1.2.0", - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" }, "suggest": { + "ext-iconv": "For improved results", "ext-mbstring": "For improved results" }, "default-branch": true, @@ -504,7 +591,13 @@ "source": "https://github.com/WordPress/WordPress-Coding-Standards", "wiki": "https://github.com/WordPress/WordPress-Coding-Standards/wiki" }, - "time": "2023-05-28T19:30:57+00:00" + "funding": [ + { + "url": "https://opencollective.com/php_codesniffer", + "type": "custom" + } + ], + "time": "2024-04-25T09:28:10+00:00" } ], "aliases": [], @@ -516,5 +609,5 @@ "prefer-lowest": false, "platform": [], "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/css/color-schemes/blue.css b/css/color-schemes/blue.css index 15ffdc6f..6d29ce65 100644 --- a/css/color-schemes/blue.css +++ b/css/color-schemes/blue.css @@ -4,7 +4,7 @@ Theme URL: https://commonsinabox.org Description: Commons In A Box theme, based on the OpenLab at City Tech. Author: The Commons In A Box OpenLab team Author URI: https://commonsinabox.org -Version: 1.5.1 +Version: 1.6.0 Text Domain: commons-in-a-box */ /**import bootstrap**/ @@ -7367,6 +7367,7 @@ blockquote .h6 { .pagination li a .fa, .pagination li span .fa { font-size: 16px; + line-height: 1; } .pagination li a:hover, .pagination li span:hover { @@ -7872,6 +7873,12 @@ body .font-size.font-18 { body.js .group-creator-empty-row { display: none; } +body .portfolio-profile-link-wrapper { + margin-top: 32px; +} +body .portfolio-profile-link-wrapper label { + font-weight: 600; +} body .group-creators-section { margin-bottom: 20px; margin-top: 20px; @@ -8387,6 +8394,17 @@ body label.passive { body label.block { display: block; } +.panel-avatar-privacy.loading .radio { + opacity: 0.5; + pointer-events: none; +} +.panel-avatar-privacy .panel-body legend { + margin-bottom: 1em; +} +.panel-avatar-privacy .panel-body .radio label { + font-weight: normal; + margin-right: 16px; +} /**shortcodes**/ .callout-list .row { margin-bottom: 34px; @@ -8461,6 +8479,7 @@ body form .checkbox-list-container { .ct-group-meta .site-path { display: table; padding-left: 25px; + white-space: nowrap; width: 90%; } .ct-group-meta .site-path span { @@ -9051,15 +9070,7 @@ body form .checkbox-list-container { margin-bottom: 25px; } .home-page .activity-list .activity-wrapper .activity-item .item-avatar { - height: 0; position: relative; - padding-top: 100%; -} -.home-page .activity-list .activity-wrapper .activity-item .item-avatar a { - position: absolute; - top: 0; - left: 0; - width: 100%; } @media (max-width: 767px) { .home-page .activity-list .activity-wrapper .activity-item .item-avatar { @@ -9096,6 +9107,15 @@ body form .checkbox-list-container { width: 100%; } } +.clickable-card.card-is-hovered { + border-color: #999999 !important; +} +.clickable-card .see-more { + text-decoration: underline; +} +.clickable-card .see-more:hover { + text-decoration: none; +} /**sidebar**/ @media (max-width: 767px) { .mobile-dropdown { @@ -9182,6 +9202,20 @@ body form .checkbox-list-container { color: #333333; text-decoration: none; } +.portfolio-profile-link-toggle-wrapper { + align-items: flex-start; + display: flex; + gap: 8px; + margin-left: 5%; + padding-bottom: 10px; +} +.portfolio-profile-link-toggle-wrapper label { + display: block; + font-weight: normal; + font-size: 12px; + padding-top: 3px; + margin-bottom: 0; +} .mobile-group-site-links { margin-top: 30px; } @@ -9865,11 +9899,34 @@ input#group-request-send { } } .group-members.group-list .group-item-wrapper { - height: 118px; + height: 128px; } .group-members.group-list .group-item-wrapper p { margin: 10px 0 7px; } +.group-members.group-list .group-item-membership-privacy { + margin-top: 15px; +} +.group-members.group-list .group-item-membership-privacy label { + font-size: 12px; + font-weight: 400; +} +.group-members.group-list .group-item-membership-privacy label:hover { + cursor: pointer; +} +.group-manage-members-pagination { + align-items: center; + display: flex; + gap: 10px; + justify-content: space-between; + margin-bottom: 10px; +} +@media screen and (max-width: 767px) { + .group-manage-members-pagination { + align-items: flex-start; + flex-direction: column; + } +} .group-manage-members.group-list.group-manage-requests .group-item .group-item-wrapper ul.group-member-actions { font-weight: normal; } @@ -9885,7 +9942,7 @@ input#group-request-send { height: 127px; } .group-manage-members.group-list .group-item .group-item-wrapper.members { - height: 318px; + height: auto; } .group-manage-members.group-list .group-item .group-item-wrapper.members .link-btn { margin-right: 3px; @@ -11102,6 +11159,13 @@ input.help-search { margin-top: 10px; } } +/* Private membership indicator */ +p.private-membership-indicator { + margin-top: 15px; + font-size: 12px; + font-weight: 400; + color: #666 !important; +} /**contact form**/ .wpcf7 .wpcf7-response-output { border: none; diff --git a/css/color-schemes/green.css b/css/color-schemes/green.css index e6d654bc..1b2b0fc7 100644 --- a/css/color-schemes/green.css +++ b/css/color-schemes/green.css @@ -4,7 +4,7 @@ Theme URL: https://commonsinabox.org Description: Commons In A Box theme, based on the OpenLab at City Tech. Author: The Commons In A Box OpenLab team Author URI: https://commonsinabox.org -Version: 1.5.1 +Version: 1.6.0 Text Domain: commons-in-a-box */ /**import bootstrap**/ @@ -7367,6 +7367,7 @@ blockquote .h6 { .pagination li a .fa, .pagination li span .fa { font-size: 16px; + line-height: 1; } .pagination li a:hover, .pagination li span:hover { @@ -7872,6 +7873,12 @@ body .font-size.font-18 { body.js .group-creator-empty-row { display: none; } +body .portfolio-profile-link-wrapper { + margin-top: 32px; +} +body .portfolio-profile-link-wrapper label { + font-weight: 600; +} body .group-creators-section { margin-bottom: 20px; margin-top: 20px; @@ -8387,6 +8394,17 @@ body label.passive { body label.block { display: block; } +.panel-avatar-privacy.loading .radio { + opacity: 0.5; + pointer-events: none; +} +.panel-avatar-privacy .panel-body legend { + margin-bottom: 1em; +} +.panel-avatar-privacy .panel-body .radio label { + font-weight: normal; + margin-right: 16px; +} /**shortcodes**/ .callout-list .row { margin-bottom: 34px; @@ -8461,6 +8479,7 @@ body form .checkbox-list-container { .ct-group-meta .site-path { display: table; padding-left: 25px; + white-space: nowrap; width: 90%; } .ct-group-meta .site-path span { @@ -9051,15 +9070,7 @@ body form .checkbox-list-container { margin-bottom: 25px; } .home-page .activity-list .activity-wrapper .activity-item .item-avatar { - height: 0; position: relative; - padding-top: 100%; -} -.home-page .activity-list .activity-wrapper .activity-item .item-avatar a { - position: absolute; - top: 0; - left: 0; - width: 100%; } @media (max-width: 767px) { .home-page .activity-list .activity-wrapper .activity-item .item-avatar { @@ -9096,6 +9107,15 @@ body form .checkbox-list-container { width: 100%; } } +.clickable-card.card-is-hovered { + border-color: #999999 !important; +} +.clickable-card .see-more { + text-decoration: underline; +} +.clickable-card .see-more:hover { + text-decoration: none; +} /**sidebar**/ @media (max-width: 767px) { .mobile-dropdown { @@ -9182,6 +9202,20 @@ body form .checkbox-list-container { color: #333333; text-decoration: none; } +.portfolio-profile-link-toggle-wrapper { + align-items: flex-start; + display: flex; + gap: 8px; + margin-left: 5%; + padding-bottom: 10px; +} +.portfolio-profile-link-toggle-wrapper label { + display: block; + font-weight: normal; + font-size: 12px; + padding-top: 3px; + margin-bottom: 0; +} .mobile-group-site-links { margin-top: 30px; } @@ -9865,11 +9899,34 @@ input#group-request-send { } } .group-members.group-list .group-item-wrapper { - height: 118px; + height: 128px; } .group-members.group-list .group-item-wrapper p { margin: 10px 0 7px; } +.group-members.group-list .group-item-membership-privacy { + margin-top: 15px; +} +.group-members.group-list .group-item-membership-privacy label { + font-size: 12px; + font-weight: 400; +} +.group-members.group-list .group-item-membership-privacy label:hover { + cursor: pointer; +} +.group-manage-members-pagination { + align-items: center; + display: flex; + gap: 10px; + justify-content: space-between; + margin-bottom: 10px; +} +@media screen and (max-width: 767px) { + .group-manage-members-pagination { + align-items: flex-start; + flex-direction: column; + } +} .group-manage-members.group-list.group-manage-requests .group-item .group-item-wrapper ul.group-member-actions { font-weight: normal; } @@ -9885,7 +9942,7 @@ input#group-request-send { height: 127px; } .group-manage-members.group-list .group-item .group-item-wrapper.members { - height: 318px; + height: auto; } .group-manage-members.group-list .group-item .group-item-wrapper.members .link-btn { margin-right: 3px; @@ -11102,6 +11159,13 @@ input.help-search { margin-top: 10px; } } +/* Private membership indicator */ +p.private-membership-indicator { + margin-top: 15px; + font-size: 12px; + font-weight: 400; + color: #666 !important; +} /**contact form**/ .wpcf7 .wpcf7-response-output { border: none; diff --git a/css/color-schemes/red.css b/css/color-schemes/red.css index 539cfb20..5803902e 100644 --- a/css/color-schemes/red.css +++ b/css/color-schemes/red.css @@ -4,7 +4,7 @@ Theme URL: https://commonsinabox.org Description: Commons In A Box theme, based on the OpenLab at City Tech. Author: The Commons In A Box OpenLab team Author URI: https://commonsinabox.org -Version: 1.5.1 +Version: 1.6.0 Text Domain: commons-in-a-box */ /**import bootstrap**/ @@ -7367,6 +7367,7 @@ blockquote .h6 { .pagination li a .fa, .pagination li span .fa { font-size: 16px; + line-height: 1; } .pagination li a:hover, .pagination li span:hover { @@ -7872,6 +7873,12 @@ body .font-size.font-18 { body.js .group-creator-empty-row { display: none; } +body .portfolio-profile-link-wrapper { + margin-top: 32px; +} +body .portfolio-profile-link-wrapper label { + font-weight: 600; +} body .group-creators-section { margin-bottom: 20px; margin-top: 20px; @@ -8387,6 +8394,17 @@ body label.passive { body label.block { display: block; } +.panel-avatar-privacy.loading .radio { + opacity: 0.5; + pointer-events: none; +} +.panel-avatar-privacy .panel-body legend { + margin-bottom: 1em; +} +.panel-avatar-privacy .panel-body .radio label { + font-weight: normal; + margin-right: 16px; +} /**shortcodes**/ .callout-list .row { margin-bottom: 34px; @@ -8461,6 +8479,7 @@ body form .checkbox-list-container { .ct-group-meta .site-path { display: table; padding-left: 25px; + white-space: nowrap; width: 90%; } .ct-group-meta .site-path span { @@ -9051,15 +9070,7 @@ body form .checkbox-list-container { margin-bottom: 25px; } .home-page .activity-list .activity-wrapper .activity-item .item-avatar { - height: 0; position: relative; - padding-top: 100%; -} -.home-page .activity-list .activity-wrapper .activity-item .item-avatar a { - position: absolute; - top: 0; - left: 0; - width: 100%; } @media (max-width: 767px) { .home-page .activity-list .activity-wrapper .activity-item .item-avatar { @@ -9096,6 +9107,15 @@ body form .checkbox-list-container { width: 100%; } } +.clickable-card.card-is-hovered { + border-color: #999999 !important; +} +.clickable-card .see-more { + text-decoration: underline; +} +.clickable-card .see-more:hover { + text-decoration: none; +} /**sidebar**/ @media (max-width: 767px) { .mobile-dropdown { @@ -9182,6 +9202,20 @@ body form .checkbox-list-container { color: #333333; text-decoration: none; } +.portfolio-profile-link-toggle-wrapper { + align-items: flex-start; + display: flex; + gap: 8px; + margin-left: 5%; + padding-bottom: 10px; +} +.portfolio-profile-link-toggle-wrapper label { + display: block; + font-weight: normal; + font-size: 12px; + padding-top: 3px; + margin-bottom: 0; +} .mobile-group-site-links { margin-top: 30px; } @@ -9865,11 +9899,34 @@ input#group-request-send { } } .group-members.group-list .group-item-wrapper { - height: 118px; + height: 128px; } .group-members.group-list .group-item-wrapper p { margin: 10px 0 7px; } +.group-members.group-list .group-item-membership-privacy { + margin-top: 15px; +} +.group-members.group-list .group-item-membership-privacy label { + font-size: 12px; + font-weight: 400; +} +.group-members.group-list .group-item-membership-privacy label:hover { + cursor: pointer; +} +.group-manage-members-pagination { + align-items: center; + display: flex; + gap: 10px; + justify-content: space-between; + margin-bottom: 10px; +} +@media screen and (max-width: 767px) { + .group-manage-members-pagination { + align-items: flex-start; + flex-direction: column; + } +} .group-manage-members.group-list.group-manage-requests .group-item .group-item-wrapper ul.group-member-actions { font-weight: normal; } @@ -9885,7 +9942,7 @@ input#group-request-send { height: 127px; } .group-manage-members.group-list .group-item .group-item-wrapper.members { - height: 318px; + height: auto; } .group-manage-members.group-list .group-item .group-item-wrapper.members .link-btn { margin-right: 3px; @@ -11102,6 +11159,13 @@ input.help-search { margin-top: 10px; } } +/* Private membership indicator */ +p.private-membership-indicator { + margin-top: 15px; + font-size: 12px; + font-weight: 400; + color: #666 !important; +} /**contact form**/ .wpcf7 .wpcf7-response-output { border: none; diff --git a/css/color-schemes/toolbar-blue.css b/css/color-schemes/toolbar-blue.css index e486b1d1..d54d5190 100644 --- a/css/color-schemes/toolbar-blue.css +++ b/css/color-schemes/toolbar-blue.css @@ -7576,6 +7576,9 @@ button.oplb-bs .close { .oplb-bs #wpadminbar #wp-toolbar #wp-admin-bar-my-account .ab-sub-wrapper p.actions { padding-top: 6px; } +.oplb-bs #wpadminbar #wp-toolbar #wp-admin-bar-my-account > .ab-item { + white-space: nowrap; +} @media (max-width: 767px) { .oplb-bs #wpadminbar #wp-toolbar #wp-admin-bar-dashboard-link a, .oplb-bs #wpadminbar #wp-toolbar #wp-admin-bar-new-content a, @@ -7637,6 +7640,7 @@ button.oplb-bs .close { .oplb-bs #wpadminbar #wp-toolbar #wp-admin-bar-bp-login, .oplb-bs #wpadminbar #wp-toolbar #wp-admin-bar-bp-register { background: #000; + white-space: nowrap; } .oplb-bs #wpadminbar #wp-toolbar #wp-admin-bar-bp-register, .oplb-bs #wpadminbar #wp-toolbar #wp-admin-bar-top-logout { diff --git a/css/color-schemes/toolbar-green.css b/css/color-schemes/toolbar-green.css index eb711548..2e93aabc 100644 --- a/css/color-schemes/toolbar-green.css +++ b/css/color-schemes/toolbar-green.css @@ -7576,6 +7576,9 @@ button.oplb-bs .close { .oplb-bs #wpadminbar #wp-toolbar #wp-admin-bar-my-account .ab-sub-wrapper p.actions { padding-top: 6px; } +.oplb-bs #wpadminbar #wp-toolbar #wp-admin-bar-my-account > .ab-item { + white-space: nowrap; +} @media (max-width: 767px) { .oplb-bs #wpadminbar #wp-toolbar #wp-admin-bar-dashboard-link a, .oplb-bs #wpadminbar #wp-toolbar #wp-admin-bar-new-content a, @@ -7637,6 +7640,7 @@ button.oplb-bs .close { .oplb-bs #wpadminbar #wp-toolbar #wp-admin-bar-bp-login, .oplb-bs #wpadminbar #wp-toolbar #wp-admin-bar-bp-register { background: #000; + white-space: nowrap; } .oplb-bs #wpadminbar #wp-toolbar #wp-admin-bar-bp-register, .oplb-bs #wpadminbar #wp-toolbar #wp-admin-bar-top-logout { diff --git a/css/color-schemes/toolbar-red.css b/css/color-schemes/toolbar-red.css index 8182c59f..e2692843 100644 --- a/css/color-schemes/toolbar-red.css +++ b/css/color-schemes/toolbar-red.css @@ -7576,6 +7576,9 @@ button.oplb-bs .close { .oplb-bs #wpadminbar #wp-toolbar #wp-admin-bar-my-account .ab-sub-wrapper p.actions { padding-top: 6px; } +.oplb-bs #wpadminbar #wp-toolbar #wp-admin-bar-my-account > .ab-item { + white-space: nowrap; +} @media (max-width: 767px) { .oplb-bs #wpadminbar #wp-toolbar #wp-admin-bar-dashboard-link a, .oplb-bs #wpadminbar #wp-toolbar #wp-admin-bar-new-content a, @@ -7637,6 +7640,7 @@ button.oplb-bs .close { .oplb-bs #wpadminbar #wp-toolbar #wp-admin-bar-bp-login, .oplb-bs #wpadminbar #wp-toolbar #wp-admin-bar-bp-register { background: #000; + white-space: nowrap; } .oplb-bs #wpadminbar #wp-toolbar #wp-admin-bar-bp-register, .oplb-bs #wpadminbar #wp-toolbar #wp-admin-bar-top-logout { diff --git a/event-organiser/calendar.php b/event-organiser/calendar.php index c4b0f3f5..6b2b9f52 100644 --- a/event-organiser/calendar.php +++ b/event-organiser/calendar.php @@ -33,7 +33,7 @@ if ( bp_is_user() ) { echo '
    '; - echo '
  • ' . esc_attr__( 'Download iCalendar file (Public)', 'bp-event-organiser' ) . '
  • '; + echo '
  • ' . esc_attr__( 'Download iCalendar file (Public)', 'bp-event-organiser' ) . '
  • '; if ( bp_is_my_profile() ) { echo '
  • ' . esc_html__( 'Download iCalendar file (Private)', 'bp-event-organiser' ) . '
  • '; diff --git a/functions.php b/functions.php index befabd59..7622f403 100644 --- a/functions.php +++ b/functions.php @@ -1,6 +1,6 @@ { + document.addEventListener( 'DOMContentLoaded', function() { + const panelAvatarPrivacy = document.getElementById( 'panel-avatar-privacy' ) + if ( ! panelAvatarPrivacy ) { + return; + } + + const avatarPrivacyRadios = document.querySelectorAll( '.avatar-visibility-radio' ); + if ( ! avatarPrivacyRadios ) { + return; + } + + Array.from( avatarPrivacyRadios ).forEach( ( radio ) => { + radio.addEventListener( 'change', () => { + panelAvatarPrivacy.classList.add( 'loading' ); + + const nonce = document.getElementById( 'openlab-avatar-privacy-nonce' )?.value; + const userId = document.getElementById( 'avatar-privacy-user-id' )?.value; + + // send to admin-ajax.php?action=openlab_avatar_privacy + const formData = new FormData(); + formData.append( 'visibility', radio.value ); + formData.append( 'nonce', nonce ); + formData.append( 'user_id', userId ); + formData.append( 'action', 'openlab_avatar_privacy' ); + + fetch( window.ajaxurl, { + method: 'POST', + body: formData, + } ) + .then( response => response.json() ) + .then( data => { + panelAvatarPrivacy.classList.remove( 'loading' ); + } ) + } ) + } ) + }) +})() diff --git a/js/avatar-upload.js b/js/avatar-upload.js index 5ee33e31..00e7f7fe 100644 --- a/js/avatar-upload.js +++ b/js/avatar-upload.js @@ -1,27 +1,27 @@ window.bp = window.bp || {}; -(function($){ +(function ($) { $( document ).ready( - function(){ + function () { $( '.avatar-upload-form' ).hide(); $( '#signup_submit' ).on( 'click', - function(){ + function () { window.onbeforeunload = null; } ); bp.Avatar.Attachment.on( 'change', - function( data ) { + function ( data ) { $( '#avatar-wrapper img' ).attr( 'src', data.attributes.url ); } ); bp.Uploader.filesQueue.on( 'reset', - function() { + function () { $( '.avatar-crop-submit' ).addClass( 'btn' ).addClass( 'btn-primary' ); } ); diff --git a/js/bpges.js b/js/bpges.js index 8b724606..14078985 100644 --- a/js/bpges.js +++ b/js/bpges.js @@ -1,12 +1,12 @@ -(function($){ +(function ($) { var $clicked, $statuses; $( document ).ready( - function() { + function () { $statuses = $( '.group-manage-members-bpges-status input[type="radio"]' ); $statuses.on( 'change', - function() { + function () { $clicked = $( this ); go_status( 'User email status updating...', 'error' ); @@ -17,11 +17,11 @@ { method: 'GET', url: $( this ).data( 'url' ), - success: function() { + success: function () { enable_radio_buttons(); go_status( 'User email status changed successfully', 'updated' ); }, - error: function(){ + error: function () { enable_radio_buttons(); go_status( 'Error updating the status. Please try again or contact us for help', 'error' ); } @@ -32,14 +32,14 @@ } ); - disable_radio_buttons = function() { + disable_radio_buttons = function () { $statuses.attr( 'disabled', 'disabled' ); }; - enable_radio_buttons = function() { + enable_radio_buttons = function () { $statuses.removeAttr( 'disabled' ); }; - go_status = function(status, type){ + go_status = function (status, type) { //clean up first $( '#group-create-body .bp-template-notice' ).remove(); diff --git a/js/customizer-preview.js b/js/customizer-preview.js index b659c0da..644fd072 100644 --- a/js/customizer-preview.js +++ b/js/customizer-preview.js @@ -1,6 +1,6 @@ -(function( $ ) { +(function ( $ ) { $( document ).ready( - function() { + function () { var fieldMap = { openlab_footer_left_heading: 'footer-left-heading', openlab_footer_left_content: 'footer-left-content', @@ -12,10 +12,10 @@ var elementId = fieldMap[ settingId ]; wp.customize( settingId, - function( value ) { + function ( value ) { var thisElId = elementId; value.bind( - function( newval ) { + function ( newval ) { document.getElementById( thisElId ).innerHTML = newval; } ); diff --git a/js/customizer.js b/js/customizer.js index 38c62525..e43a8c37 100644 --- a/js/customizer.js +++ b/js/customizer.js @@ -3,12 +3,12 @@ wp.customize.bind( 'ready', - function() { + function () { wp.customize( 'openlab_color_scheme', - function( setting ) { + function ( setting ) { $( '#customize-control-openlab_color_scheme label' ).each( - function( index, el ) { + function ( index, el ) { var $el = $( el ); var colorScheme = $el.find( 'input' ).val(); $el.addClass( 'color-scheme-' + colorScheme ); @@ -21,7 +21,7 @@ ); $( window ).load( - function(){ + function () { var editorIds = [ 'openlab_footer_left_content', 'openlab_footer_middle_content' ]; var setChange, textarea; for ( var i in editorIds ) { @@ -41,10 +41,10 @@ $( document ).on( 'tinymce-editor-init', - function( event, editor ) { + function ( event, editor ) { editor.on( 'change', - function(e){ + function (e) { tinyMCE.triggerSave(); $( '#' + editor.id ).trigger( 'change' ); } diff --git a/js/directory.js b/js/directory.js index e3ce61e6..88b0360d 100644 --- a/js/directory.js +++ b/js/directory.js @@ -1,12 +1,12 @@ -(function($){ +(function ($) { var $groupTypeCheckboxes, allSidebarFilters = []; $( document ).ready( - function(){ + function () { if ( 0 !== $( '.openlab-search-results' ).length ) { $( '.sidebar-filter input[type="checkbox"], .custom-select select' ).each( - function() { + function () { allSidebarFilters.push( this.id ); } ); @@ -18,12 +18,12 @@ } ); - calculateSelectedGroupTypes = function() { + calculateSelectedGroupTypes = function () { var allGroupTypes = []; var selectedGroupTypes = []; $groupTypeCheckboxes.each( - function(){ + function () { var thisGroupType = this; allGroupTypes.push( thisGroupType.value ); @@ -43,7 +43,7 @@ /** * Determines whether filters should be disabled based on select group types. */ - calculateFilterStates = function() { + calculateFilterStates = function () { var selectedGroupTypes = calculateSelectedGroupTypes(); var disabledFilters = {}; @@ -68,7 +68,7 @@ } allSidebarFilters.forEach( - function( sidebarFilterId ) { + function ( sidebarFilterId ) { var $el = $( '#' + sidebarFilterId ); var $elLabel = $( 'label[for="' + sidebarFilterId + '"]' ); diff --git a/js/group-contact.js b/js/group-contact.js index 65db9251..b78598c1 100644 --- a/js/group-contact.js +++ b/js/group-contact.js @@ -1,11 +1,11 @@ window.wp = window.wp || {}; -(function($){ - var OL_Group_Contacts = function() { +(function ($) { + var OL_Group_Contacts = function () { var $ac, $existing, nonce; $( document ).ready( - function() { + function () { // Toggle hide-if-js and hide-if-no-js. $( '.hide-if-js' ).hide(); $( '.hide-if-no-js' ).show(); @@ -18,7 +18,7 @@ window.wp = window.wp || {}; { source: ajaxurl + '?action=openlab_group_contact_autocomplete&nonce=' + nonce + '&group_id=' + group_id, minLength: 2, - select: function( event, ui ) { + select: function ( event, ui ) { // No dupes. if ( 0 == $( '#group-contact-member-' + ui.item.value ).length ) { create_list_item( ui.item.value, ui.item.label ); @@ -34,7 +34,7 @@ window.wp = window.wp || {}; $existing = OL_Group_Contact_Existing; $.each( $existing, - function( k, v ) { + function ( k, v ) { create_list_item( v.value, v.label ); } ); @@ -43,7 +43,7 @@ window.wp = window.wp || {}; $( '#group-contact-list' ).on( 'click', '.group-contact-remove', - function( event ) { + function ( event ) { event.preventDefault(); $( event.target ).closest( '.group-contact-member' ).remove(); } diff --git a/js/group-create.js b/js/group-create.js index 5411e1ea..0bbe8612 100644 --- a/js/group-create.js +++ b/js/group-create.js @@ -18,7 +18,7 @@ function showHide(id) { } jQuery( document ).ready( - function($){ + function ($) { var form, form_type, form_validated = false, @@ -57,20 +57,20 @@ jQuery( document ).ready( $( radioid ).prop( 'checked','checked' ); $( '.noo_radio' ).each( - function(i,v) { + function (i,v) { var thisval = $( v ).val(); var thisid = '#noo_' + thisval + '_options'; if ( noo == thisval) { $( thisid ).find( 'input' ).each( - function(index,element){ + function (index,element) { $( element ).removeClass( 'disabled-opt' ); $( element ).prop( 'disabled', false ).removeClass( 'disabled' ); } ); $( thisid ).find( 'select' ).each( - function(index,element){ + function (index,element) { if ($( element ).attr( 'type' ) !== 'radio') { $( element ).removeClass( 'disabled-opt' ); $( element ).prop( 'disabled', false ).removeClass( 'disabled' ); @@ -86,7 +86,7 @@ jQuery( document ).ready( } else { $( thisid ).find( 'input' ).each( - function(index,element){ + function (index,element) { if ($( element ).attr( 'type' ) !== 'radio') { $( element ).addClass( 'disabled-opt' ); $( element ).prop( 'disabled','disabled' ).addClass( 'disabled' ); @@ -95,7 +95,7 @@ jQuery( document ).ready( ); $( thisid ).find( 'select' ).each( - function(index,element){ + function (index,element) { if ($( element ).attr( 'type' ) !== 'radio') { $( element ).addClass( 'disabled-opt' ); $( element ).prop( 'disabled','disabled' ).addClass( 'disabled' ); @@ -173,7 +173,7 @@ jQuery( document ).ready( var siteIsExternal = ( $externalInput.length && $externalInput.is( ':checked' ) ) || ( $siteIsExternal.length && $siteIsExternal.val() > 0 ); var show = $setuptoggle.is( ':checked' ) || $( '#current-group-site' ).is( ':visible' ) || CBOXOL_Group_Create.group_type_requires_site; - console.log( show ); + if ( show && siteIsExternal ) { show = false; } @@ -204,7 +204,7 @@ jQuery( document ).ready( action: 'openlab_detect_feeds', 'site_url': eu }, - function(response) { + function (response) { var robj = $.parseJSON( response ); var efr = $( '#external-feed-results' ); @@ -288,7 +288,7 @@ jQuery( document ).ready( action: 'openlab_group_clone_fetch_details', group_id: group_id }, - success: function( response ) { + success: function ( response ) { var r = JSON.parse( response ); var $typeSelector; @@ -298,7 +298,7 @@ jQuery( document ).ready( // Categories $.each( r.categories, - function( index, catId ) { + function ( index, catId ) { $( 'input#group-category-' + catId ).prop( 'checked', true ); } ); @@ -306,7 +306,7 @@ jQuery( document ).ready( // Academic Units $.each( r.academic_unit_types, - function( index, unitType ) { + function ( index, unitType ) { $typeSelector = $( '.cboxol-academic-unit-selector-for-type-' + unitType ); if ( r.academic_units.hasOwnProperty( unitType ) ) { @@ -314,7 +314,7 @@ jQuery( document ).ready( $.each( unitsOfType, - function( key, unitValue ) { + function ( key, unitValue ) { $typeSelector.find( '#academic-unit-' + unitValue ).prop( 'checked', true ).trigger( 'change' ); } ); @@ -336,14 +336,14 @@ jQuery( document ).ready( } $( '.noo_radio' ).click( - function(el){ + function (el) { var whichid = $( el.target ).prop( 'id' ).split( '_' ).pop(); $( '.url-field-error' ).remove(); new_old_switch( whichid ); } ); - $.urlParam = function(name){ + $.urlParam = function (name) { var results = new RegExp( '[\\?&]' + name + '=([^&#]*)' ).exec( window.location.href ); return results === null ? 0 : results[1]; } @@ -375,7 +375,7 @@ jQuery( document ).ready( $create_or_clone.on( 'change', - function() { + function () { new_create_or_clone = 'create' == $( this ).val() ? 'off' : 'on'; toggle_clone_options( new_create_or_clone ); } @@ -386,7 +386,7 @@ jQuery( document ).ready( // Switching between groups to clone $( '#group-to-clone' ).on( 'change', - function() { + function () { fetch_clone_source_details( this.value ); } ); @@ -394,7 +394,7 @@ jQuery( document ).ready( /* AJAX validation for external RSS feeds */ $( '#find-feeds' ).on( 'click', - function(e) { + function (e) { e.preventDefault(); do_external_site_query( e ); } @@ -403,7 +403,7 @@ jQuery( document ).ready( /* "Set up a site" toggle */ $setuptoggle.on( 'click', - function(){ + function () { showHideAll(); showHideAssociatedSitePrivacy(); showHideMemberRoleSettings(); @@ -451,12 +451,12 @@ jQuery( document ).ready( $( '.domain-validate' ).on( 'change', - function( e ) { + function ( e ) { form_validated = false; } ).on( 'keyup', - function( e ) { + function ( e ) { $( e.target ).val( e.target.value.toLowerCase() ); } ); @@ -465,7 +465,7 @@ jQuery( document ).ready( // @todo this must be made dynamic $gc_submit.on( 'mouseover focus', - function() { + function () { if ( CBOXOL_Group_Create.is_course ) { var school_tech = document.getElementById( 'school_tech' ); var is_school_selected = $( '.school-inputs input:checked' ).length > 0; @@ -488,7 +488,7 @@ jQuery( document ).ready( * - Site URL is validated by AJAX. * - Name and Description use native validation. */ - validate_form = function( event ) { + validate_form = function ( event ) { event = ( event ? event : window.event ); if ( form_validated ) { @@ -504,7 +504,7 @@ jQuery( document ).ready( var $required_fields = $form.find( ':required' ); var hasEmptyRequiredFields = false; $required_fields.each( - function( k, v ) { + function ( k, v ) { if ( $( v ).val().trim() === '' ) { hasEmptyRequiredFields = true; return false; @@ -611,7 +611,7 @@ jQuery( document ).ready( action: 'openlab_validate_groupblog_url_handler', 'path': domain }, - function( response ) { + function ( response ) { if ( ! response.success ) { $( '.url-field-error' ).remove(); $( '#groupblog-url-error' ).remove(); diff --git a/js/group-documents.js b/js/group-documents.js index b8ce7660..5e32e84a 100644 --- a/js/group-documents.js +++ b/js/group-documents.js @@ -1,10 +1,10 @@ -(function($){ +(function ($) { $( document ).ready( - function() { + function () { // bp-group-documents uses JS to hide, but we use CSS, so we need to roll this back. setTimeout( - function() { + function () { $( '#bp-group-documents-upload-new' ).css( 'display', '' ); }, 250 @@ -13,7 +13,7 @@ $( document ).on( 'change', 'input.bp-group-documents-file-type', - function(e) { + function (e) { let wrapper = $( '.bp-group-documents-fields' ); if ( $( this ).val() === 'upload' ) { @@ -31,7 +31,7 @@ $( document ).on( 'submit', 'form#bp-group-documents-form', - function() { + function () { //check for pre-filled values, and remove before sumitting if ( $( 'input.bp-group-documents-new-category' ).val() == 'New Category...' ) { @@ -56,7 +56,7 @@ $( document ).on( 'click', '#bp-group-documents-upload-button', - function(e) { + function (e) { e.preventDefault(); $( '.submenu-item' ).removeClass( 'current-menu-item' ); $( '.submenu-item.item-add-new-file' ).addClass( 'current-menu-item' ); @@ -68,7 +68,7 @@ $( document ).on( 'click', '.submenu-item.item-add-new-file a', - function(e) { + function (e) { e.preventDefault(); if ( ! $( this ).hasClass( 'current-menu-item' ) ) { $( '.submenu-item' ).removeClass( 'current-menu-item' ); @@ -82,7 +82,7 @@ $( document ).on( 'click', '#btn-group-documents-cancel', - function(e) { + function (e) { e.preventDefault(); $( '#bp-group-documents' ).removeClass( 'is-edit-mode' ); $( '.submenu-item' ).removeClass( 'current-menu-item' ); @@ -94,7 +94,7 @@ $( document ).on( 'click', '#openlab-cancel-doc-reply', - function(e) { + function (e) { e.preventDefault(); $( '#cancel-comment-reply-link' )[0].click(); } diff --git a/js/group-url.js b/js/group-url.js index cf8fa0cf..d5c789b8 100644 --- a/js/group-url.js +++ b/js/group-url.js @@ -1,9 +1,9 @@ -(function($){ +(function ($) { var $errorFormat, $errorTaken, $nameField, $urlField, $urlFieldParent; var isValid, isTaken; $( document ).ready( - function(){ + function () { isValid = isAvailable = false; $ajaxStatus = $( '#group-url-status' ); $errorFormat = $( '#url-error-format' ); @@ -15,7 +15,7 @@ // Suggest based on name. $nameField.on( 'blur', - function() { + function () { // Don't bother with AJAX request, which is likely to be too slow for next field. if ( 0 === $urlField.val().length ) { var suggestedUrl = $nameField.val() @@ -33,7 +33,7 @@ // Format validation on keyup. $urlField.on( 'keyup', - function() { + function () { var url = $urlField.val(); // Force URL to lowercase. @@ -59,7 +59,7 @@ // Only run the AJAX request on blur. $urlField.on( 'blur', - function() { + function () { // No value? Nothing to check. if ( 0 === $urlField.val().length ) { return; @@ -81,7 +81,7 @@ name: $( 'group-name' ).val(), url: $urlField.val() }, - success: function( response ) { + success: function ( response ) { $urlFieldParent.removeClass( 'ajax-in-progress' ); $ajaxStatus.removeClass( 'fa-spinner fa-pulse' ); if ( response.success ) { @@ -98,7 +98,7 @@ } ); - var toggleError = function() { + var toggleError = function () { if ( isAvailable && isValid ) { $urlFieldParent.removeClass( 'has-error' ).removeClass( 'ajax-error' ); $ajaxStatus.addClass( 'fa-check' ).removeClass( 'fa-exclamation-circle' ); diff --git a/js/membership-privacy.js b/js/membership-privacy.js new file mode 100644 index 00000000..24aadb70 --- /dev/null +++ b/js/membership-privacy.js @@ -0,0 +1,40 @@ +/** + * This is the JavaScript related to the membership privacy functionality. + * + * @since 1.6.0 + */ +jQuery( document ).ready( + function ($) { + $( document ).on( + 'change', + 'input#membership_privacy', + function (e) { + let groupId = $( this ).attr( 'data-group_id' ); + let isPrivate = $( this ).is( ':checked' ); + + $.ajax( + { + url: ajaxurl, + method: 'POST', + dataType: 'json', + data: { + 'action': 'openlab_update_member_group_privacy', + 'group_id': groupId, + 'is_private': isPrivate, + 'nonce': $( '#openlab_hide_membership_nonce_' + groupId ).val() + }, + beforeSend: function () { + // Disable checkbox + $( 'input#membership_privacy' ).attr( 'disabled', true ); + }, + complete: function () { + // Enable checkbox + $( 'input#membership_privacy' ).attr( 'disabled', false ); + } + } + ); + } + ); + }, + (jQuery) +); diff --git a/js/register.js b/js/register.js index 319f953f..e68abe43 100644 --- a/js/register.js +++ b/js/register.js @@ -1,10 +1,10 @@ -(function($) { +(function ($) { // Parsley validation rules. window.Parsley.addValidator( 'lowercase', { - validateString: function( value ) { + validateString: function ( value ) { return value === value.toLowerCase(); }, messages: { @@ -16,7 +16,7 @@ window.Parsley.addValidator( 'nospecialchars', { - validateString: function( value ) { + validateString: function ( value ) { return ! value.match( /[^a-zA-Z0-9]/ ); }, messages: { @@ -29,7 +29,7 @@ window.Parsley.addValidator( 'iff', { - validateString: function( value, requirement, instance ) { + validateString: function ( value, requirement, instance ) { var $partner = $( requirement ); var isValid = $partner.val() == value; @@ -62,7 +62,7 @@ } jQuery( document ).ready( - function() { + function () { var $signup_form = $( '#signup_form' ); $signup_form.parsley( @@ -71,7 +71,7 @@ } ).on( 'field:error', - function( formInstance ) { + function ( formInstance ) { this.$element.parent( '.form-group' ) .addClass( 'has-error' ) .prepend( 'Please enter the following: ' ) @@ -79,7 +79,7 @@ } ).on( 'field:success', - function( formInstance ) { + function ( formInstance ) { this.$element.parent( '.form-group' ).removeClass( 'has-error' ); } ); @@ -93,7 +93,7 @@ $( 'body' ).on( 'keyup', '#signup_password', - function( e ) { + function ( e ) { var blacklistValues = []; var denylistLength = inputDenylist.length for ( var i = 0; i < denylistLength; i++ ) { @@ -156,7 +156,7 @@ action: 'openlab_validate_email', 'email': email }, - function( response ) { + function ( response ) { if ( response.success ) { $emaillabel.fadeOut( function () { @@ -202,7 +202,7 @@ $account_type_signup_code_field.on( 'blur', - function() { + function () { $signup_code_message .html( OLReg.strings.dashChecking ) .removeClass( 'signup-code-ok signup-code-bad' ) @@ -216,7 +216,7 @@ member_type: $account_type_field.val(), code: $account_type_signup_code_field.val() }, - success: function( response ) { + success: function ( response ) { if ( response.success ) { $signup_code_message.html( OLReg.strings.dashOK ) .removeClass( 'signup-code-checking signup-code-bad' ) @@ -271,7 +271,7 @@ if (document.getElementById( 'signup_submit' )) { $( '#signup_submit' ).on( 'click', - function(e){ + function (e) { var thisElem = $( this ); @@ -323,7 +323,7 @@ function refresh_field_ids() { field_ids = []; $( '.panel-body input' ).each( - function() { + function () { if ( 'field_' === this.id.substr( 0, 6 ) ) { field_ids.push( this.id.substr( 6 ) ); } diff --git a/js/utility.js b/js/utility.js index 96998fb8..bc4de434 100644 --- a/js/utility.js +++ b/js/utility.js @@ -23,6 +23,9 @@ OpenLab.utility.eventValidation(); OpenLab.utility.refreshActivity(); OpenLab.utility.initMemberRoleDefinitions(); + OpenLab.utility.adjustGridHeight(); + OpenLab.utility.initClickableCards(); + OpenLab.utility.initPortfolioProfileLinkToggle(); // Home page column adjustments. var groupTypeWidgets = $( '#home-right .activity-list' ); @@ -235,7 +238,7 @@ return partOfDay + hours + minutes / 60; }, - buildTime: function( date, time ) { + buildTime: function ( date, time ) { var d = new Date(); var dateParts = date.split( '-' ); d.setFullYear( dateParts[2] ); @@ -418,8 +421,7 @@ action: 'openlab_ajax_return_latest_activity', nonce: localVars.nonce }, - success: function (data, textStatus, XMLHttpRequest) - { + success: function (data, textStatus, XMLHttpRequest) { refreshActivity.removeClass( 'fa-spin' ); if (data === 'exit') { //for right now, do nothing @@ -457,22 +459,22 @@ $( '.academic-unit-type-select' ).on( 'select2:select', - function() { + function () { OpenLab.utility.updateAcademicUnitFilters(); } ); OpenLab.utility.updateAcademicUnitFilters(); }, - updateAcademicUnitFilters: function() { + updateAcademicUnitFilters: function () { var selectedSlugs = []; var $selectedUnits = $( '.academic-unit:selected' ); $selectedUnits.each( - function( k, v ) { + function ( k, v ) { if ( v.value.length > 0 ) { if ( 'all' === v.value ) { $( v ).siblings( '.academic-unit-nonempty' ).each( - function( k, v ) { + function ( k, v ) { selectedSlugs.push( v.value ); } ); @@ -488,7 +490,7 @@ $academicUnits.prop( 'disabled', true ).removeClass( 'academic-unit-enabled' ); $academicUnits.each( - function( k, v ) { + function ( k, v ) { var $thisFilter = $( v ); var thisParent = $thisFilter.data( 'parent' ); @@ -512,7 +514,7 @@ var $academicUnitSelectors = $( '.academic-unit-type-select select' ); $academicUnitSelectors.prop( 'disabled', false ); $academicUnitSelectors.each( - function( k, v ) { + function ( k, v ) { if ( $( v ).find( '.academic-unit-enabled' ).length === 0 ) { $( v ).prop( 'disabled', true ); } @@ -526,10 +528,10 @@ } }, - initMemberRoleDefinitions: function() { + initMemberRoleDefinitions: function () { $( '.member-role-definition-label' ).on( 'click', - function( e ) { + function ( e ) { $clicked = $( e.target ); $def = $clicked.closest( '.member-role-definition' ); @@ -539,6 +541,133 @@ ); }, + /** + * Until we can refactor the markup to use CSS grid, we need to adjust the height of + * certain elements that appear in a grid. + * + * @since 1.6.0 + */ + adjustGridHeight: function () { + const els = [ + document.querySelector( '#group-manage-members' ), + ] + + els.forEach( + // phpcs:disable + el => { + if ( ! el ) { + return; + } + + const gridItems = el.querySelectorAll( '.group-item-wrapper' ); + + // Find the tallest item. + let tallest = 0; + gridItems.forEach( + item => { + const height = item.offsetHeight; + if ( height > tallest ) { + tallest = height; + } + } + ); + + // Set the height of all items to the tallest. + gridItems.forEach( + item => { + item.style.height = tallest + 'px'; + } + ); + } + // phpcs:enable + ) + }, + + /** + * Initialize clickable cards. + * + * @since 1.6.0 + * + * @return {void} + */ + initClickableCards: function() { + const cards = document.querySelectorAll('.clickable-card'); + + Array.prototype.forEach.call(cards, card => { + let down, up; + const link = card.querySelector('.item-title a'); + + card.onmouseenter = (event) => card.classList.add('card-is-hovered') + card.onmouseleave = (event) => card.classList.remove('card-is-hovered') + + card.onmousedown = () => down = +new Date(); + card.onmouseup = (e) => { + let rightclick = false; + + // Old Netscape. + if (e.which && e.which === 3) { + rightclick = true; + + // Microsoft or W3C model. + } else if (e.button && e.button === 2) { + rightclick = true; + } + + if (rightclick) { + return; + } + + up = +new Date(); + if ((up - down) < 200) { + link.click(); + } + } + + card.style.cursor = 'pointer'; + }); + }, + + /** + * Initialize the portfolio profile link toggle. + * + * @since 1.6.0 + * @return {void} + */ + initPortfolioProfileLinkToggle: function() { + const toggleNodes = document.querySelectorAll('.portfolio-profile-link-toggle-checkbox'); + + if (toggleNodes.length > 0) { + const toggles = Array.from(toggleNodes); + toggles.forEach(toggle => { + toggle.addEventListener('change', (e) => { + const isChecked = toggle.checked; + + const toggleNonce = document.getElementById( 'openlab_portfolio_link_visibility_nonce_' + toggle.dataset.counter ); + + if ( ! toggleNonce ) { + return; + } + + const nonce = toggleNonce.value; + + const url = ajaxurl + '?action=openlab_portfolio_link_visibility&nonce=' + nonce + '&state=' + ( isChecked ? 'enabled' : 'disabled' ); + + toggle.closest( '.portfolio-profile-link-toggle-wrapper' ).classList.add( 'loading' ); + toggle.disabled = true; + + fetch(url, { + method: 'GET', + }) + .then(response => response.json()) + .then(data => { + toggle.closest( '.portfolio-profile-link-toggle-wrapper' ).classList.remove( 'loading' ); + toggle.disabled = false; + }) + }); + }) + } + }, + filterAjax: function () { //safety first @@ -576,8 +705,7 @@ school: school, nonce: nonce }, - success: function (data, textStatus, XMLHttpRequest) - { + success: function (data, textStatus, XMLHttpRequest) { console.log( 'school', school ); $( '#dept-select' ).removeAttr( 'disabled' ); $( '#dept-select' ).removeClass( 'processing' ); @@ -603,6 +731,9 @@ $( document ).ready( function () { + // Add js class to body. + $( 'body' ).addClass( 'js' ); + OpenLab.utility.init(); // Workshop fields on Contact Us @@ -755,7 +886,7 @@ $( '#bp-group-documents-folder-delete' ).on( 'click', - function( e ){ + function ( e ) { if ( confirm( localVars.strings.deleteFolder ) ) { return true; } @@ -967,7 +1098,7 @@ $( '#openlab-sort-my-groups' ).on( 'change', - function( event ) { + function ( event ) { var url = new URL( window.location.href ); var params = new window.URLSearchParams( window.location.search ); diff --git a/less/openlab-toolbar.less b/less/openlab-toolbar.less index d5464295..fe2af8b4 100644 --- a/less/openlab-toolbar.less +++ b/less/openlab-toolbar.less @@ -456,6 +456,10 @@ } } } + + & > .ab-item { + white-space: nowrap; + } } #wp-admin-bar-dashboard-link, #wp-admin-bar-new-content, @@ -509,6 +513,7 @@ #wp-admin-bar-bp-login, #wp-admin-bar-bp-register{ background: #000; + white-space: nowrap; } #wp-admin-bar-bp-register, #wp-admin-bar-top-logout{ diff --git a/lib/class-openlab-breadcrumb.php b/lib/class-openlab-breadcrumb.php index 9ef78ac1..3342ffc6 100644 --- a/lib/class-openlab-breadcrumb.php +++ b/lib/class-openlab-breadcrumb.php @@ -419,5 +419,4 @@ public function get_breadcrumb_link( $url, $title, $content, $sep = false ) { return $link; } - } diff --git a/lib/class-openlab-clone-course-site.php b/lib/class-openlab-clone-course-site.php index adb1f09f..b9cbde2e 100644 --- a/lib/class-openlab-clone-course-site.php +++ b/lib/class-openlab-clone-course-site.php @@ -109,7 +109,7 @@ protected function migrate_site_settings() { $mods = get_option( 'mods_' . $theme ); $mods = map_deep( $mods, - function( $v ) use ( $source_site_url, $source_site_upload_dir, $dest_site_url, $dest_site_upload_dir ) { + function ( $v ) use ( $source_site_url, $source_site_upload_dir, $dest_site_url, $dest_site_upload_dir ) { return str_replace( array( $source_site_url, $source_site_upload_dir ), array( $dest_site_url, $dest_site_upload_dir ), @@ -126,7 +126,7 @@ function( $v ) use ( $source_site_url, $source_site_upload_dir, $dest_site_url, if ( ! in_array( $key, $preserve_option, true ) ) { $value = map_deep( $value, - function( $v ) use ( $source_site_url, $source_site_upload_dir, $dest_site_url, $dest_site_upload_dir ) { + function ( $v ) use ( $source_site_url, $source_site_upload_dir, $dest_site_url, $dest_site_upload_dir ) { return str_replace( array( $source_site_url, $source_site_upload_dir ), array( $dest_site_url, $dest_site_upload_dir ), diff --git a/lib/course-clone.php b/lib/course-clone.php index 422d8bfa..4de6cbf9 100644 --- a/lib/course-clone.php +++ b/lib/course-clone.php @@ -259,7 +259,7 @@ function openlab_group_clone_details( $group_id ) { $retval['site_id'] = cboxol_get_group_site_id( $group_id ); $retval['site_url'] = get_blog_option( $retval['site_id'], 'home' ); - $retval['site_path'] = str_replace( bp_get_root_domain(), '', $retval['site_url'] ); + $retval['site_path'] = str_replace( bp_get_root_url(), '', $retval['site_url'] ); $retval['term'] = openlab_get_group_term( $group_id ); } @@ -386,7 +386,7 @@ function openlab_add_clone_button_to_profile() { */ add_filter( 'bp_before_groups_get_groups_parse_args', - function( $args ) { + function ( $args ) { $group_id = openlab_get_current_filter( 'descendant-of' ); if ( ! $group_id ) { return $args; diff --git a/lib/group-funcs.php b/lib/group-funcs.php index f4c42553..5649913d 100644 --- a/lib/group-funcs.php +++ b/lib/group-funcs.php @@ -142,6 +142,8 @@ function openlab_group_site_markup() { } } + $is_clone_create = $is_clone && bp_is_group_create(); + ?>
    @@ -217,12 +219,7 @@ function openlab_group_site_markup() { } $user_blogs = array_values( $user_blogs ); - if ( $group_type->get_is_portfolio() ) { - $portfolio_user_id = openlab_get_user_id_from_portfolio_group_id( $the_group_id ); - $suggested_path = openlab_suggest_portfolio_path( $portfolio_user_id ); - } else { - $suggested_path = groups_get_current_group()->slug; - } + $suggested_path = groups_get_current_group()->slug; ?>