mirror of
https://github.com/google/blockly.git
synced 2026-01-18 06:17:12 +01:00
Remove copy/paste buttons.
This commit is contained in:
@@ -34,13 +34,6 @@ blocklyApp.ToolboxTreeComponent = ng.core
|
||||
[attr.aria-level]="level">
|
||||
<label #toolboxBlockSummary [id]="idMap['toolboxBlockSummary']">{{getBlockDescription()}}</label>
|
||||
<ol role="group" *ngIf="displayBlockMenu">
|
||||
<li [id]="idMap['blockCopy']" role="treeitem" *ngIf="!isWorkspaceEmpty()"
|
||||
[attr.aria-labelledBy]="generateAriaLabelledByAttr(idMap['blockCopyButton'], 'blockly-button')"
|
||||
[attr.aria-level]="level + 1">
|
||||
<button [id]="idMap['blockCopyButton']" (click)="copyToClipboard()" tabindex="-1">
|
||||
{{'COPY_TO_CLIPBOARD'|translate}}
|
||||
</button>
|
||||
</li>
|
||||
<li [id]="idMap['sendToSelected']" role="treeitem" *ngIf="!isWorkspaceEmpty()"
|
||||
[attr.aria-label]="getAriaLabelForCopyToMarkedSpotButton()"
|
||||
[attr.aria-level]="level + 1"
|
||||
|
||||
@@ -162,41 +162,6 @@ blocklyApp.WorkspaceTreeComponent = ng.core
|
||||
// Generate a list of action buttons.
|
||||
var that = this;
|
||||
this.actionButtonsInfo = [{
|
||||
baseIdKey: 'copy',
|
||||
translationIdForText: 'COPY_BLOCK',
|
||||
action: function() {
|
||||
that.clipboardService.copy(that.block);
|
||||
that.notificationsService.setStatusMessage(
|
||||
that.getBlockDescription() + ' ' + Blockly.Msg.COPIED_BLOCK_MSG);
|
||||
},
|
||||
isDisabled: function() {
|
||||
return false;
|
||||
}
|
||||
}, {
|
||||
baseIdKey: 'pasteBefore',
|
||||
translationIdForText: 'PASTE_BEFORE',
|
||||
action: function() {
|
||||
that.treeService.pasteToConnection(
|
||||
that.block, that.block.previousConnection);
|
||||
},
|
||||
isDisabled: function() {
|
||||
return Boolean(
|
||||
!that.block.previousConnection ||
|
||||
!that.isCompatibleWithClipboard(that.block.previousConnection));
|
||||
}
|
||||
}, {
|
||||
baseIdKey: 'pasteAfter',
|
||||
translationIdForText: 'PASTE_AFTER',
|
||||
action: function() {
|
||||
that.treeService.pasteToConnection(
|
||||
that.block, that.block.nextConnection);
|
||||
},
|
||||
isDisabled: function() {
|
||||
return Boolean(
|
||||
!that.block.nextConnection ||
|
||||
!that.isCompatibleWithClipboard(that.block.nextConnection));
|
||||
}
|
||||
}, {
|
||||
baseIdKey: 'markBefore',
|
||||
translationIdForText: 'MARK_SPOT_BEFORE',
|
||||
action: that.markSpotBefore_.bind(that),
|
||||
@@ -237,15 +202,6 @@ blocklyApp.WorkspaceTreeComponent = ng.core
|
||||
isDisabled: function() {
|
||||
return false;
|
||||
}
|
||||
}, {
|
||||
baseIdKey: 'paste',
|
||||
translationIdForText: 'PASTE_INSIDE',
|
||||
action: function(connection) {
|
||||
that.treeService.pasteToConnection(that.block, connection);
|
||||
},
|
||||
isDisabled: function(connection) {
|
||||
return !that.isCompatibleWithClipboard(connection);
|
||||
}
|
||||
}];
|
||||
|
||||
// Make a list of all the id keys.
|
||||
|
||||
Reference in New Issue
Block a user