crmDashboard - Fix deleting item from 2nd column
authorcolemanw <coleman@civicrm.org>
Mon, 29 Jan 2024 20:41:51 +0000 (15:41 -0500)
committercolemanw <coleman@civicrm.org>
Tue, 30 Jan 2024 13:45:17 +0000 (08:45 -0500)
ang/crmDashboard/Dashboard.html

index f0d044501c2df209e8f3b681b7bb0918ccfd2ec3..ddf086b3b440adc7e11e4c693398a56c29e28918 100644 (file)
@@ -18,9 +18,9 @@
     </div>
   </fieldset>
   <div class="crm-flex-box">
-    <div ng-repeat="column in $ctrl.columns" class="crm-flex-{{2 + $index}} crm-dashboard-droppable" ng-model="column" ui-sortable="$ctrl.sortableOptions">
+    <div ng-repeat="(colIndex, column) in $ctrl.columns" class="crm-flex-{{2 + colIndex}} crm-dashboard-droppable" ng-model="column" ui-sortable="$ctrl.sortableOptions">
       <div ng-repeat="dashlet in column" class="crm-dashlet">
-        <crm-dashlet dashlet="dashlet" remove="$ctrl.removeDashlet($parent.$index, $index)" fullscreen="$ctrl.showFullscreen(dashlet)" ng-if="$ctrl.fullscreenDashlet !== dashlet.name"></crm-dashlet>
+        <crm-dashlet dashlet="dashlet" remove="$ctrl.removeDashlet(colIndex, $index)" fullscreen="$ctrl.showFullscreen(dashlet)" ng-if="$ctrl.fullscreenDashlet !== dashlet.name"></crm-dashlet>
       </div>
     </div>
   </div>