diff --git a/platform/commonUI/edit/bundle.js b/platform/commonUI/edit/bundle.js index 60da900176..1094abb864 100644 --- a/platform/commonUI/edit/bundle.js +++ b/platform/commonUI/edit/bundle.js @@ -245,7 +245,9 @@ define([ "key": "cancel", "category": "conclude-editing", "implementation": CancelAction, - "name": "Cancel", + // Because we use the name as label for edit buttons and mct-control buttons need + // the label to be set to undefined in order to not apply the labeled CSS rule. + "name": undefined, "cssclass": "icon-x no-label", "description": "Discard changes made to these objects.", "depends": [] diff --git a/platform/commonUI/edit/res/templates/edit-action-buttons.html b/platform/commonUI/edit/res/templates/edit-action-buttons.html index 4bc020612f..2af47b6878 100644 --- a/platform/commonUI/edit/res/templates/edit-action-buttons.html +++ b/platform/commonUI/edit/res/templates/edit-action-buttons.html @@ -25,7 +25,7 @@ @@ -42,11 +42,12 @@ - - {{currentAction.getMetadata().name}} - + + \ No newline at end of file diff --git a/platform/commonUI/edit/src/controllers/EditActionController.js b/platform/commonUI/edit/src/controllers/EditActionController.js index 7c33799ebb..ba91b63e9d 100644 --- a/platform/commonUI/edit/src/controllers/EditActionController.js +++ b/platform/commonUI/edit/src/controllers/EditActionController.js @@ -61,6 +61,12 @@ define( $scope.otherEditActions = $scope.action ? $scope.action.getActions(OTHERS_ACTION_CONTEXT) : []; + + // Required because Angular does not allow 'bind' + // in expressions. + $scope.actionPerformer = function (action) { + return action.perform.bind(action); + }; } // Update set of actions whenever the action capability