mirror of https://github.com/zulip/zulip.git
linkifiers: Disable dragging when a filter is applied.
Dragging while a filter is applied can be confusing because the reordering request won't succeed if the complete list of linkifiers is not provided.
This commit is contained in:
parent
b8a770d9c6
commit
255e382750
|
@ -133,7 +133,7 @@ export function populate_linkifiers(linkifiers_data) {
|
|||
ListWidget.create($linkifiers_table, linkifiers_data, {
|
||||
name: "linkifiers_list",
|
||||
get_item: ListWidget.default_get_item,
|
||||
modifier(linkifier) {
|
||||
modifier(linkifier, filter_value) {
|
||||
return render_admin_linkifier_list({
|
||||
linkifier: {
|
||||
pattern: linkifier.pattern,
|
||||
|
@ -141,6 +141,7 @@ export function populate_linkifiers(linkifiers_data) {
|
|||
id: linkifier.id,
|
||||
},
|
||||
can_modify: page_params.is_admin,
|
||||
can_drag: filter_value.length === 0,
|
||||
});
|
||||
},
|
||||
filter: {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{{#with linkifier}}
|
||||
<tr class="linkifier_row{{#if ../can_modify}} movable-row{{/if}}" data-linkifier-id="{{id}}">
|
||||
<tr class="linkifier_row{{#if (and ../can_modify ../can_drag)}} movable-row{{/if}}" data-linkifier-id="{{id}}">
|
||||
<td>
|
||||
{{#if ../can_modify}}
|
||||
{{#if (and ../can_modify ../can_drag)}}
|
||||
<i class="fa fa-ellipsis-v" aria-hidden="true"></i>
|
||||
<i class="fa fa-ellipsis-v" aria-hidden="true"></i>
|
||||
{{/if}}
|
||||
|
|
Loading…
Reference in New Issue