diff --git a/accessible/app.component.js b/accessible/app.component.js
index 3a79c328c..9d8e7e494 100644
--- a/accessible/app.component.js
+++ b/accessible/app.component.js
@@ -33,6 +33,7 @@ blocklyApp.AppView = ng.core.Component({
+
@@ -47,7 +48,8 @@ blocklyApp.AppView = ng.core.Component({
`,
directives: [
blocklyApp.ToolboxComponent, blocklyApp.WorkspaceComponent,
- blocklyApp.BlockOptionsModalComponent, blocklyApp.SidebarComponent],
+ blocklyApp.BlockOptionsModalComponent, blocklyApp.SidebarComponent,
+ blocklyApp.ToolboxModalComponent],
pipes: [blocklyApp.TranslatePipe],
// All services are declared here, so that all components in the
// application use the same instance of the service.
@@ -56,7 +58,7 @@ blocklyApp.AppView = ng.core.Component({
blocklyApp.ClipboardService, blocklyApp.NotificationsService,
blocklyApp.TreeService, blocklyApp.UtilsService,
blocklyApp.AudioService, blocklyApp.BlockOptionsModalService,
- blocklyApp.KeyboardInputService]
+ blocklyApp.KeyboardInputService, blocklyApp.ToolboxModalService]
})
.Class({
constructor: [
diff --git a/accessible/block-options-modal.component.js b/accessible/block-options-modal.component.js
index 7bbeb946d..0aeb69969 100644
--- a/accessible/block-options-modal.component.js
+++ b/accessible/block-options-modal.component.js
@@ -51,36 +51,7 @@ blocklyApp.BlockOptionsModalComponent = ng.core.Component({
`,
- pipes: [blocklyApp.TranslatePipe],
- styles: [
- `.blocklyModalCurtain {
- background-color: rgba(0,0,0,0.4);
- height: 100%;
- left: 0;
- overflow: auto;
- position: fixed;
- top: 0;
- width: 100%;
- z-index: 1;
- }
- `, `
- .blocklyModal {
- background-color: #fefefe;
- border: 1px solid #888;
- margin: 15% auto;
- max-width: 600px;
- padding: 20px;
- width: 60%;
- }
- `, `
- .blocklyModalButtonContainer {
- margin: 10px 0;
- }
- `, `
- .blocklyModal .activeButton {
- border: 1px solid blue;
- }
- `]
+ pipes: [blocklyApp.TranslatePipe]
})
.Class({
constructor: [
diff --git a/accessible/block-options-modal.service.js b/accessible/block-options-modal.service.js
index b064766a8..7411acb96 100644
--- a/accessible/block-options-modal.service.js
+++ b/accessible/block-options-modal.service.js
@@ -26,7 +26,11 @@
blocklyApp.BlockOptionsModalService = ng.core.Class({
constructor: [function() {
this.actionButtonsInfo = [];
- this.preShowHook = null;
+ this.preShowHook = function() {
+ throw Error(
+ 'A pre-show hook must be defined for the block options modal ' +
+ 'before it can be shown.');
+ };
this.modalIsShown = false;
this.onHideCallback = null;
}],
diff --git a/accessible/media/accessible.css b/accessible/media/accessible.css
index 038668126..77918fa90 100644
--- a/accessible/media/accessible.css
+++ b/accessible/media/accessible.css
@@ -10,7 +10,7 @@
float: left;
margin-left: 10px;
margin-top: 20px;
- width: 150px;
+ width: 200px;
}
.blocklyAriaLiveStatus {
@@ -35,3 +35,28 @@
.blocklyDropdownListItem[aria-selected="true"] button {
font-weight: bold;
}
+
+.blocklyModalCurtain {
+ background-color: rgba(0,0,0,0.4);
+ height: 100%;
+ left: 0;
+ overflow: auto;
+ position: fixed;
+ top: 0;
+ width: 100%;
+ z-index: 1;
+}
+.blocklyModal {
+ background-color: #fefefe;
+ border: 1px solid #888;
+ margin: 15% auto;
+ max-width: 600px;
+ padding: 20px;
+ width: 60%;
+}
+.blocklyModalButtonContainer {
+ margin: 10px 0;
+}
+.blocklyModal .activeButton {
+ border: 1px solid blue;
+}
diff --git a/accessible/sidebar.component.js b/accessible/sidebar.component.js
index 2c259ea70..9d70afbbe 100644
--- a/accessible/sidebar.component.js
+++ b/accessible/sidebar.component.js
@@ -37,6 +37,10 @@ blocklyApp.SidebarComponent = ng.core.Component({
{{buttonConfig.text}}
+