Skip to content

Commit

Permalink
Merge pull request phpbb#5081 from hubaishan/ticket/15492
Browse files Browse the repository at this point in the history
[ticket/15492] Fix permission role combobox in RTL
  • Loading branch information
marc1706 committed Feb 14, 2018
2 parents f29784e + 8c89194 commit 7dca3f4
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
11 changes: 11 additions & 0 deletions phpBB/adm/style/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -2459,6 +2459,9 @@ fieldset.permissions .padding {
text-align: left;
}

.rtl .dropdown li {
text-align: right;
}
.wrap .dropdown li, .dropdown.wrap li {
white-space: normal;
}
Expand All @@ -2473,6 +2476,10 @@ fieldset.permissions .padding {
width: 250px;
}

.rtl .roles-options > .dropdown {
right: auto;
}

.roles-options {
-webkit-user-select: none;
-moz-user-select: none;
Expand All @@ -2491,6 +2498,10 @@ fieldset.permissions .padding {
background: url('../images/arrow_down.gif') no-repeat 245px .7em;
}

.rtl .roles-options > span {
background: url('../images/arrow_down.gif') no-repeat 7px .7em;
}

.roles-options li {
list-style: none;
}
Expand Down
2 changes: 1 addition & 1 deletion phpBB/adm/style/permission_mask.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ <h3>{p_mask.NAME}<!-- IF p_mask.S_LOCAL --> <span class="small"> [{p_mask.L_ACL_
<dt style="width: 20%"><label for="role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}">{L_ROLE}{L_COLON}</label></dt>
{% if p_mask.f_mask.role_options %}
<dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 20%">
<div class="dropdown-container dropdown-right dropdown-button-control roles-options" data-alt-text="{LA_ROLE_DESCRIPTION}">
<div class="dropdown-container dropdown-{S_CONTENT_FLOW_END} dropdown-button-control roles-options" data-alt-text="{LA_ROLE_DESCRIPTION}">
<select id="role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}" name="role[{p_mask.f_mask.UG_ID}][{p_mask.f_mask.FORUM_ID}]">{p_mask.f_mask.S_ROLE_OPTIONS}</select>
<span title="Roles" class="button icon-button tools-icon dropdown-trigger dropdown-select">{L_NO_ROLE_ASSIGNED}</span>
<div class="dropdown hidden">
Expand Down
15 changes: 11 additions & 4 deletions phpBB/adm/style/tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,17 @@ phpbb.positionTooltip = function ($element) {
$element = $element.parent();
offset = $element.offset();

$('#_tooltip_container').css({
top: offset.top + 30,
left: offset.left - 205
});
if ($('body').hasClass('rtl')) {
$('#_tooltip_container').css({
top: offset.top + 30,
left: offset.left + 255
});
} else {
$('#_tooltip_container').css({
top: offset.top + 30,
left: offset.left - 205
});
}
};

/**
Expand Down
2 changes: 2 additions & 0 deletions phpBB/assets/javascript/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -1331,6 +1331,8 @@ phpbb.toggleDropdown = function() {
$this.css({
marginLeft: 0,
left: 0,
marginRight: 0,
right: 0,
maxWidth: (windowWidth - 4) + 'px'
});

Expand Down

0 comments on commit 7dca3f4

Please sign in to comment.