Skip to content

Commit

Permalink
feat: move context menu to separated template (#435)
Browse files Browse the repository at this point in the history
  • Loading branch information
dvs39 authored Oct 23, 2024
1 parent 080c802 commit 8058fad
Showing 1 changed file with 29 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,34 +22,10 @@
<div class="blade-content" ng-class="{'__large-wide': blade.isExpanded, '__normal': !blade.isExpanded}">
<div class="blade-inner">
<div class="inner-block">
<div class="table-wrapper" ng-init="setGridOptions('customerOrder-list-grid', getGridOptions())">
<div ui-grid="gridOptions" ui-grid-auto-resize ui-grid-save-state ui-grid-selection ui-grid-resize-columns ui-grid-move-columns ui-grid-pinning ui-grid-height></div>
<ul class="menu __context" role="menu" id="cor_menu">
<li class="menu-item" ng-click='selectNode(contextMenuEntity)'>
<i class="menu-ico fa fa-edit"></i> {{'platform.commands.manage' | translate}}
</li>
<li class="menu-item" ng-click='copy(contextMenuEntity.id)'>
<i class="menu-ico fa fa-copy"></i> {{'orders.blades.customerOrder-list.labels.copy-id' | translate}}
</li>
<li class="menu-item" ng-click='copy(contextMenuEntity.number)'>
<i class="menu-ico fa fa-copy"></i> {{'orders.blades.customerOrder-list.labels.copy-number' | translate}}
</li>

<li class="menu-item" ng-if="useIndexedSearch" ng-click='filterBy("CustomerName", contextMenuEntity.customerName)'>
<i class="menu-ico fa fa-filter"></i> {{'orders.blades.customerOrder-list.labels.filter-by' | translate}} `{{contextMenuEntity.customerName}}`
</li>
<li class="menu-item" ng-if="useIndexedSearch && contextMenuEntity.organizationName" ng-click='filterBy("OrganizationName", contextMenuEntity.organizationName)'>
<i class="menu-ico fa fa-filter"></i> {{'orders.blades.customerOrder-list.labels.filter-by' | translate}} `{{contextMenuEntity.organizationName}}`
</li>
<li class="menu-item" ng-if="useIndexedSearch" ng-click='filterBy("StoreId", contextMenuEntity.storeId)'>
<i class="menu-ico fa fa-filter"></i> {{'orders.blades.customerOrder-list.labels.filter-by' | translate}} `{{contextMenuEntity.storeId}}`
</li>

<li class="menu-item" ng-if='!blade.hideDelete' ng-click='deleteList([contextMenuEntity])' va-permission="order:delete">
<i class="menu-ico fas fa-trash-alt"></i> {{'platform.commands.delete' | translate}}
</li>
</ul>
</div>
<div class="table-wrapper" ng-init="setGridOptions('customerOrder-list-grid', getGridOptions())">
<div ui-grid="gridOptions" ui-grid-auto-resize ui-grid-save-state ui-grid-selection ui-grid-resize-columns ui-grid-move-columns ui-grid-pinning ui-grid-height></div>
<ng-include src="'order-list-context-menu.row.html'"></ng-include>
</div>
</div>
</div>
</div>
Expand All @@ -62,3 +38,28 @@
<i class="fa context-menu"></i>
</div>
</script>
<script type="text/ng-template" id="order-list-context-menu.row.html">
<ul class="menu __context" role="menu" id="cor_menu">
<li class="menu-item" ng-click='selectNode(contextMenuEntity)' id="menu_edit">
<i class="menu-ico fa fa-edit"></i> {{'platform.commands.manage' | translate}}
</li>
<li class="menu-item" ng-click='copy(contextMenuEntity.id)' id="menu_copyId">
<i class="menu-ico fa fa-copy"></i> {{'orders.blades.customerOrder-list.labels.copy-id' | translate}}
</li>
<li class="menu-item" ng-click='copy(contextMenuEntity.number)' id="menu_copyNumber">
<i class="menu-ico fa fa-copy"></i> {{'orders.blades.customerOrder-list.labels.copy-number' | translate}}
</li>
<li class="menu-item" ng-if="useIndexedSearch" ng-click='filterBy("CustomerName", contextMenuEntity.customerName)' id="menu_filterCustomerName">
<i class="menu-ico fa fa-filter"></i> {{'orders.blades.customerOrder-list.labels.filter-by' | translate}} `{{contextMenuEntity.customerName}}`
</li>
<li class="menu-item" ng-if="useIndexedSearch && contextMenuEntity.organizationName" ng-click='filterBy("OrganizationName", contextMenuEntity.organizationName)' id="menu_filterOrganizationName">
<i class="menu-ico fa fa-filter"></i> {{'orders.blades.customerOrder-list.labels.filter-by' | translate}} `{{contextMenuEntity.organizationName}}`
</li>
<li class="menu-item" ng-if="useIndexedSearch" ng-click='filterBy("StoreId", contextMenuEntity.storeId)' id="menu_filterStoreId">
<i class="menu-ico fa fa-filter"></i> {{'orders.blades.customerOrder-list.labels.filter-by' | translate}} `{{contextMenuEntity.storeId}}`
</li>
<li class="menu-item" ng-if='!blade.hideDelete' ng-click='deleteList([contextMenuEntity])' va-permission="order:delete" id="menu_delete">
<i class="menu-ico fas fa-trash-alt"></i> {{'platform.commands.delete' | translate}}
</li>
</ul>
</script>

0 comments on commit 8058fad

Please sign in to comment.