FIX: uses the new <DropdownMenu /> component (#569)
This commit is contained in:
parent
b796ae3fcc
commit
5e75baa5f6
|
@ -1,3 +1,4 @@
|
|||
< 3.3.0.beta2-dev: b796ae3fcc89b48cf777de5ee3a4c21aada9271e
|
||||
< 3.3.0.beta1-dev: 56b0de3896361b6a87523537c8f5b450d2fe0807
|
||||
3.2.0: 33c43ca51ac7b7baa8a309a269dcf8685b8bd638
|
||||
< 3.2.0.beta2-dev: ac930c509e2a5b0c37b84bcea28d332e686add95
|
||||
|
|
|
@ -2,6 +2,7 @@ import Component from "@glimmer/component";
|
|||
import { action } from "@ember/object";
|
||||
import { inject as service } from "@ember/service";
|
||||
import DButton from "discourse/components/d-button";
|
||||
import DropdownMenu from "discourse/components/dropdown-menu";
|
||||
import icon from "discourse-common/helpers/d-icon";
|
||||
import i18n from "discourse-common/helpers/i18n";
|
||||
import DMenu from "float-kit/components/d-menu";
|
||||
|
@ -38,27 +39,25 @@ export default class AssignedToPost extends Component {
|
|||
{{/if}}
|
||||
</a>
|
||||
|
||||
<DMenu @icon="ellipsis-h" class="btn-flat more-button">
|
||||
<div class="popup-menu">
|
||||
<ul>
|
||||
<li>
|
||||
<DButton
|
||||
@action={{this.unassign}}
|
||||
@icon="user-plus"
|
||||
@label="discourse_assign.unassign.title"
|
||||
class="popup-menu-btn"
|
||||
/>
|
||||
</li>
|
||||
<li>
|
||||
<DButton
|
||||
@action={{this.editAssignment}}
|
||||
@icon="group-plus"
|
||||
@label="discourse_assign.reassign.title_w_ellipsis"
|
||||
class="popup-menu-btn"
|
||||
/>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<DMenu @icon="ellipsis-h" class="btn-flat more-button" @autofocus={{true}}>
|
||||
<DropdownMenu as |dropdown|>
|
||||
<dropdown.item>
|
||||
<DButton
|
||||
@action={{this.unassign}}
|
||||
@icon="user-plus"
|
||||
@label="discourse_assign.unassign.title"
|
||||
class="btn-transparent"
|
||||
/>
|
||||
</dropdown.item>
|
||||
<dropdown.item>
|
||||
<DButton
|
||||
@action={{this.editAssignment}}
|
||||
@icon="group-plus"
|
||||
@label="discourse_assign.reassign.title_w_ellipsis"
|
||||
class="btn-transparent"
|
||||
/>
|
||||
</dropdown.item>
|
||||
</DropdownMenu>
|
||||
</DMenu>
|
||||
</template>
|
||||
}
|
||||
|
|
|
@ -819,6 +819,7 @@ export default {
|
|||
: BulkAssign;
|
||||
|
||||
api.addBulkActionButton({
|
||||
id: "assign-topics",
|
||||
label: "topics.bulk.assign",
|
||||
icon: "user-plus",
|
||||
class: "btn-default assign-topics",
|
||||
|
@ -829,6 +830,7 @@ export default {
|
|||
});
|
||||
|
||||
api.addBulkActionButton({
|
||||
id: "unassign-topics",
|
||||
label: "topics.bulk.unassign",
|
||||
icon: "user-times",
|
||||
class: "btn-default unassign-topics",
|
||||
|
|
|
@ -4,19 +4,19 @@ module PageObjects
|
|||
module Components
|
||||
class TopicListHeader < PageObjects::Components::Base
|
||||
def has_assign_topics_button?
|
||||
page.has_css?(bulk_select_dropdown_item("topics.bulk.assign"))
|
||||
page.has_css?(bulk_select_dropdown_item("assign-topics"))
|
||||
end
|
||||
|
||||
def click_assign_topics_button
|
||||
find(bulk_select_dropdown_item("topics.bulk.assign")).click
|
||||
find(bulk_select_dropdown_item("assign-topics")).click
|
||||
end
|
||||
|
||||
def has_unassign_topics_button?
|
||||
page.has_css?(bulk_select_dropdown_item("topics.bulk.unassign"))
|
||||
page.has_css?(bulk_select_dropdown_item("unassign-topics"))
|
||||
end
|
||||
|
||||
def click_unassign_topics_button
|
||||
find(bulk_select_dropdown_item("topics.bulk.unassign")).click
|
||||
find(bulk_select_dropdown_item("unassign-topics")).click
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue