From 6da1f56879394a76ad11d75d4024620f1fbe7148 Mon Sep 17 00:00:00 2001 From: Sean Lip Date: Wed, 17 Aug 2016 16:31:41 -0700 Subject: [PATCH] Change below/above to after/before for 'paste' and 'mark spot' buttons. --- accessible/messages.js | 4 +-- accessible/workspace-tree.component.js | 44 +++++++++++++------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/accessible/messages.js b/accessible/messages.js index e9c858910..b45f26b2e 100644 --- a/accessible/messages.js +++ b/accessible/messages.js @@ -33,8 +33,8 @@ Blockly.Msg.CLEAR_WORKSPACE = 'Clear Workspace'; Blockly.Msg.BLOCK_ACTION_LIST = 'block action list'; Blockly.Msg.CUT_BLOCK = 'cut block'; Blockly.Msg.COPY_BLOCK = 'copy block'; -Blockly.Msg.PASTE_BELOW = 'paste below'; -Blockly.Msg.PASTE_ABOVE = 'paste above'; +Blockly.Msg.PASTE_BEFORE = 'paste before'; +Blockly.Msg.PASTE_AFTER = 'paste after'; Blockly.Msg.MARK_SPOT_BEFORE = 'mark spot before'; Blockly.Msg.MARK_SPOT_AFTER = 'mark spot after'; Blockly.Msg.MOVE_TO_MARKED_SPOT = 'move to marked spot'; diff --git a/accessible/workspace-tree.component.js b/accessible/workspace-tree.component.js index 0f465f3e1..0f391f6f8 100644 --- a/accessible/workspace-tree.component.js +++ b/accessible/workspace-tree.component.js @@ -239,12 +239,12 @@ blocklyApp.WorkspaceTreeComponent = ng.core this.notificationsService.setStatusMessage( this.getBlockDescription() + ' ' + Blockly.Msg.COPIED_BLOCK_MSG); }, - markSpotBelow_: function() { - this.clipboardService.markConnection(this.block.nextConnection); - }, - markSpotAbove_: function() { + markSpotBefore_: function() { this.clipboardService.markConnection(this.block.previousConnection); }, + markSpotAfter_: function() { + this.clipboardService.markConnection(this.block.nextConnection); + }, pasteToNextConnection_: function() { this.pasteToConnection_(this.block.nextConnection); }, @@ -270,17 +270,8 @@ blocklyApp.WorkspaceTreeComponent = ng.core return false; } }, { - baseIdKey: 'pasteBelow', - translationIdForText: 'PASTE_BELOW', - action: that.pasteToNextConnection_.bind(that), - isDisabled: function() { - return Boolean( - !that.block.nextConnection || - !that.isCompatibleWithClipboard(that.block.nextConnection)); - } - }, { - baseIdKey: 'pasteAbove', - translationIdForText: 'PASTE_ABOVE', + baseIdKey: 'pasteBefore', + translationIdForText: 'PASTE_BEFORE', action: that.pasteToPreviousConnection_.bind(that), isDisabled: function() { return Boolean( @@ -288,19 +279,28 @@ blocklyApp.WorkspaceTreeComponent = ng.core !that.isCompatibleWithClipboard(that.block.previousConnection)); } }, { - baseIdKey: 'markBelow', - translationIdForText: 'MARK_SPOT_BEFORE', - action: that.markSpotBelow_.bind(that), + baseIdKey: 'pasteAfter', + translationIdForText: 'PASTE_AFTER', + action: that.pasteToNextConnection_.bind(that), isDisabled: function() { - return !that.block.nextConnection; + return Boolean( + !that.block.nextConnection || + !that.isCompatibleWithClipboard(that.block.nextConnection)); } }, { - baseIdKey: 'markAbove', - translationIdForText: 'MARK_SPOT_AFTER', - action: that.markSpotAbove_.bind(that), + baseIdKey: 'markBefore', + translationIdForText: 'MARK_SPOT_BEFORE', + action: that.markSpotBefore_.bind(that), isDisabled: function() { return !that.block.previousConnection; } + }, { + baseIdKey: 'markAfter', + translationIdForText: 'MARK_SPOT_AFTER', + action: that.markSpotAfter_.bind(that), + isDisabled: function() { + return !that.block.nextConnection; + } }, { baseIdKey: 'moveToMarkedSpot', translationIdForText: 'MOVE_TO_MARKED_SPOT',