Commit 807b3f97 authored by Agami4's avatar Agami4
Browse files

Merge branch '1.3.x' of git.drupal.org:project/socialbase into...

Merge branch '1.3.x' of git.drupal.org:project/socialbase into bugfix/3243164-ui-improvements-data-policy-info-block-mobile
parents b266f32b 847e9e3f
......@@ -402,11 +402,6 @@ form:not(.layout-builder-configure-block) .form-inline {
}
form:not(.layout-builder-configure-block).group-form .field--widget-options-buttons .fieldgroup .fieldset-wrapper, form:not(.layout-builder-configure-block).node-form .field--widget-options-buttons .fieldgroup .fieldset-wrapper {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
margin: 5px -.75rem -8px;
}
......@@ -418,11 +413,6 @@ form:not(.layout-builder-configure-block).group-form .field--widget-options-butt
form:not(.layout-builder-configure-block).group-form .field--widget-options-buttons .fieldgroup#edit-field-group-allowed-visibility--wrapper #edit-field-group-allowed-visibility,
form:not(.layout-builder-configure-block).group-form .field--widget-options-buttons .fieldgroup#edit-field-social-idea-phases--wrapper #edit-field-social-idea-phases, form:not(.layout-builder-configure-block).node-form .field--widget-options-buttons .fieldgroup#edit-field-group-allowed-visibility--wrapper #edit-field-group-allowed-visibility,
form:not(.layout-builder-configure-block).node-form .field--widget-options-buttons .fieldgroup#edit-field-social-idea-phases--wrapper #edit-field-social-idea-phases {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
margin: 5px -.75rem -8px;
padding: 0 .75rem;
}
......@@ -441,14 +431,6 @@ form:not(.layout-builder-configure-block).group-form .field--widget-options-butt
flex-direction: column;
}
form:not(.layout-builder-configure-block).group-form .field--widget-options-buttons .fieldgroup#edit-field-group-allowed-visibility--wrapper #edit-field-group-allowed-visibility, form:not(.layout-builder-configure-block).node-form .field--widget-options-buttons .fieldgroup#edit-field-group-allowed-visibility--wrapper #edit-field-group-allowed-visibility {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
form:not(.layout-builder-configure-block) .switch * {
-webkit-user-select: none;
-moz-user-select: none;
......
......@@ -132,12 +132,13 @@
.popover-title {
margin: 0;
padding: 8px 14px;
padding: 21px 1rem 11px;
font-size: 0.875rem;
font-weight: 700;
}
.popover-content {
padding: 9px 14px;
padding: 10px 1rem;
}
.popover > .arrow, .popover > .arrow:after {
......@@ -218,17 +219,6 @@
margin-right: 0.3em;
}
@media (min-width: 976px) {
.gin--vertical-toolbar .popover {
margin-left: 72px;
}
.gin--vertical-toolbar .popover > .arrow {
margin-left: -103px;
}
}
@media (min-width: 976px) and (max-width: 1199px) {
.gin--vertical-toolbar .popover {
left: 0 !important;
}
.gin--vertical-toolbar .popover {
z-index: 10000;
}
This diff is collapsed.
<svg width="20" height="18" viewBox="0 0 20 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.5.5h-14C1.538.5.75 1.288.75 2.25v10.5c0 .963.788 1.75 1.75 1.75h7.875v-1.75H2.5V4l7 4.375L16.5 4v4.375h1.75V2.25c0-.962-.788-1.75-1.75-1.75zm-7 6.125l-7-4.375h14l-7 4.375zm6.125 3.5l3.5 3.5-3.5 3.5V14.5h-3.5v-1.75h3.5v-2.625z" fill="#4D4D4D"/></svg>
\ No newline at end of file
<svg width="14" height="19" viewBox="0 0 14 19" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.167 6.583h-.834V4.917c0-2.3-1.866-4.167-4.166-4.167A4.168 4.168 0 0 0 3 4.917v1.666h-.833C1.25 6.583.5 7.333.5 8.25v8.333c0 .917.75 1.667 1.667 1.667h10c.916 0 1.666-.75 1.666-1.667V8.25c0-.917-.75-1.667-1.666-1.667zm-5 7.5c-.917 0-1.667-.75-1.667-1.666 0-.917.75-1.667 1.667-1.667.916 0 1.666.75 1.666 1.667 0 .916-.75 1.666-1.666 1.666zm2.583-7.5H4.583V4.917a2.586 2.586 0 0 1 2.584-2.584A2.586 2.586 0 0 1 9.75 4.917v1.666z" fill="#4D4D4D"/></svg>
\ No newline at end of file
<svg width="18" height="15" viewBox="0 0 18 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M5.875 11.875L8.5 9.303a8.173 8.173 0 0 0-.875-.053c-2.336 0-7 1.172-7 3.5v1.75H8.5l-2.625-2.625zM7.625 7.5c1.934 0 3.5-1.566 3.5-3.5S9.559.5 7.625.5a3.499 3.499 0 0 0-3.5 3.5c0 1.934 1.566 3.5 3.5 3.5zM11.536 14.938L8.5 11.874l1.225-1.234 1.811 1.82 4.489-4.524 1.225 1.234-5.714 5.767z" fill="#4D4D4D"/></svg>
\ No newline at end of file
......@@ -307,8 +307,6 @@
.field--widget-options-buttons {
.fieldgroup {
.fieldset-wrapper {
display: flex;
flex-wrap: wrap;
margin: 5px -.75rem -8px;
> .radio {
......@@ -319,8 +317,6 @@
&#edit-field-group-allowed-visibility--wrapper #edit-field-group-allowed-visibility,
&#edit-field-social-idea-phases--wrapper #edit-field-social-idea-phases {
display: flex;
flex-wrap: wrap;
margin: 5px -.75rem -8px;
padding: 0 .75rem;
......@@ -333,11 +329,6 @@
&#edit-field-social-idea-phases--wrapper #edit-field-social-idea-phases {
flex-direction: column;
}
&#edit-field-group-allowed-visibility--wrapper #edit-field-group-allowed-visibility {
display: flex;
flex-wrap: wrap;
}
}
}
}
......@@ -94,12 +94,13 @@
.popover-title {
margin: 0; // reset heading margin
padding: 8px 14px;
padding: 21px 1rem 11px;
font-size: 0.875rem;
font-weight: 700;
}
.popover-content {
padding: 9px 14px;
padding: 10px 1rem;
}
// Arrows
......@@ -185,19 +186,7 @@
// Popover styles if gin vertical toolbar is active.
.gin--vertical-toolbar {
.popover {
@media (min-width: 976px) {
margin-left: 72px;
> .arrow {
margin-left: -103px;
}
}
@media(min-width: 976px) and (max-width: 1199px) {
left: 0 !important;
}
z-index: 10000;
}
}
<svg width="20" height="18" viewBox="0 0 20 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16.5 0.5H2.5C1.5375 0.5 0.75 1.2875 0.75 2.25V12.75C0.75 13.7125 1.5375 14.5 2.5 14.5H10.375V12.75H2.5V4L9.5 8.375L16.5 4V8.375H18.25V2.25C18.25 1.2875 17.4625 0.5 16.5 0.5ZM9.5 6.625L2.5 2.25H16.5L9.5 6.625ZM15.625 10.125L19.125 13.625L15.625 17.125V14.5H12.125V12.75H15.625V10.125Z" fill="#4D4D4D"/>
</svg>
<svg width="14" height="19" viewBox="0 0 14 19" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12.1667 6.58333H11.3333V4.91667C11.3333 2.61667 9.46667 0.75 7.16667 0.75C4.86667 0.75 3 2.61667 3 4.91667V6.58333H2.16667C1.25 6.58333 0.5 7.33333 0.5 8.25V16.5833C0.5 17.5 1.25 18.25 2.16667 18.25H12.1667C13.0833 18.25 13.8333 17.5 13.8333 16.5833V8.25C13.8333 7.33333 13.0833 6.58333 12.1667 6.58333ZM7.16667 14.0833C6.25 14.0833 5.5 13.3333 5.5 12.4167C5.5 11.5 6.25 10.75 7.16667 10.75C8.08333 10.75 8.83333 11.5 8.83333 12.4167C8.83333 13.3333 8.08333 14.0833 7.16667 14.0833ZM9.75 6.58333H4.58333V4.91667C4.58333 3.49167 5.74167 2.33333 7.16667 2.33333C8.59167 2.33333 9.75 3.49167 9.75 4.91667V6.58333Z" fill="#4D4D4D"/>
</svg>
<svg width="18" height="15" viewBox="0 0 18 15" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.875 11.875L8.5 9.3025C8.15875 9.2675 7.905 9.25 7.625 9.25C5.28875 9.25 0.625 10.4225 0.625 12.75V14.5H8.5L5.875 11.875ZM7.625 7.5C9.55875 7.5 11.125 5.93375 11.125 4C11.125 2.06625 9.55875 0.5 7.625 0.5C5.69125 0.5 4.125 2.06625 4.125 4C4.125 5.93375 5.69125 7.5 7.625 7.5Z" fill="#4D4D4D"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.5363 14.9375L8.5 11.875L9.725 10.6413L11.5363 12.4613L16.025 7.9375L17.25 9.17125L11.5363 14.9375Z" fill="#4D4D4D"/>
</svg>
......@@ -85,6 +85,28 @@ function _socialbase_get_visibility_icon($title) {
return $icon;
}
function _socialbase_get_join_method_icon($title) {
// Set the materialize icon.
switch ($title) {
case 'Open to join':
$icon = 'join_open';
break;
case 'Request to join':
$icon = 'join_close';
break;
case 'Invite only':
$icon = 'invite';
break;
default:
$icon = strtolower(Html::escape($title));
}
return $icon;
}
/**
* Get comment count for a node.
*/
......
......@@ -19,17 +19,23 @@ class FormElementLabel extends BaseFormElementLabel {
* {@inheritdoc}
*/
public function preprocessElement(Element $element, Variables $variables) {
if (isset($element['#id'])) {
if ((isset($element['#render_icon']) && $element['#render_icon']) ||
strpos($element['#id'], 'field-visibility') !== FALSE) {
strpos($element['#id'], 'field-visibility') !== FALSE ||
strpos($element['#id'], 'field-join-method') !== FALSE) {
if (isset($element['#attributes']['title'])) {
$description = $element['#attributes']['title'];
$element['#attributes'] = [];
$variables['description'] = $description;
}
// Set the materialize icon.
$variables['icon'] = _socialbase_get_visibility_icon($element['#title']);
if (strpos($element['#id'], 'join-method') !== FALSE) {
$variables['icon'] = _socialbase_get_join_method_icon($element['#title']);
}
else {
$variables['icon'] = _socialbase_get_visibility_icon($element['#title']);
}
}
if ($element['#id'] == 'edit-message-0-value') {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment