Skip to content

Commit

Permalink
ENGCOM-6546: Fix #14913 - bookmark views become uneditable after dele…
Browse files Browse the repository at this point in the history
…ting the first bookmark view #26263
  • Loading branch information
VladimirZaets authored Jan 8, 2020
2 parents 4c796c1 + e38e43d commit 537344e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
<span class="admin__action-dropdown-text" translate="activeView.label"/>
</button>
<ul class="admin__action-dropdown-menu">
<repeat args="foreach: viewsArray, item: '$view'">
<li css="_edit: isEditing($view().index)" outerClick="endEdit.bind($data, $view().index)" template="viewTmpl"/>
</repeat>
<!-- ko foreach: { data: viewsArray, as: '$view'} -->
<li css="_edit: $parent.isEditing($view.index)" outerClick="$parent.endEdit.bind($parent, $view.index)" template="$parent.viewTmpl"/>
<!-- /ko -->
<li visible="hasChanges" outerClick="hideCustom.bind($data)"
css="
_edit: customVisible,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,36 @@
* See COPYING.txt for license details.
*/
-->
<div class="action-dropdown-menu-item-edit" if="$view().editable">
<div class="action-dropdown-menu-item-edit" if="$view.editable">
<input
class="admin__control-text"
data-bind="
value: $view().value,
hasFocus: isEditing($view().index),
value: $view.value,
hasFocus: $parent.isEditing($view.index),
autoselect,
attr: {
placeholder: $view().label
placeholder: $view.label
},
keyboard: {
13: updateAndSave.bind($data, $view().index),
27: endEdit.bind($data, $view().index)
13: $parent.updateAndSave.bind($parent, $view.index),
27: $parent.endEdit.bind($parent, $view.index)
}"
type="text">
<button class="action-submit" type="button" attr="title: $t('Save all changes')" click="updateAndSave.bind($data, $view().index)">
<button class="action-submit" type="button" attr="title: $t('Save all changes')" click="$parent.updateAndSave.bind($parent, $view.index)">
<span translate="'Submit'"/>
</button>
<div class="action-dropdown-menu-item-actions">
<button class="action-delete" type="button" attr="title: $t('Delete bookmark')" click="removeView.bind($data, $view().index)">
<button class="action-delete" type="button" attr="title: $t('Delete bookmark')" click="$parent.removeView.bind($parent, $view.index)">
<span translate="'Delete'"/>
</button>
</div>
</div>

<div class="action-dropdown-menu-item">
<a href="" class="action-dropdown-menu-link" translate="$view().label" click="applyView.bind($data, $view().index)" closeCollapsible/>
<a href="" class="action-dropdown-menu-link" translate="$view.label" click="$parent.applyView.bind($parent, $view.index)" closeCollapsible/>

<div class="action-dropdown-menu-item-actions" if="$view().editable">
<button class="action-edit" type="button" attr="title: $t('Edit bookmark')" click="editView.bind($data, $view().index)">
<div class="action-dropdown-menu-item-actions" if="$view.editable">
<button class="action-edit" type="button" attr="title: $t('Edit bookmark')" click="$parent.editView.bind($parent, $view.index)">
<span translate="'Edit'"/>
</button>
</div>
Expand Down

0 comments on commit 537344e

Please sign in to comment.