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