Skip to content

Commit 5aec6e1

Browse files
committed
Grey out (show as disabled) the snippets when in blocks mode.
1 parent dcffbe2 commit 5aec6e1

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

python-main.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,7 @@ function web_editor(config) {
493493
blockly.hide();
494494
$('#editor').attr('title', '');
495495
editor.ACE.setReadOnly(false);
496+
$("#command-snippet").removeClass('disabled');
496497
$("#command-snippet").off('click');
497498
$("#command-snippet").click(function () {
498499
doSnippets();
@@ -509,6 +510,7 @@ function web_editor(config) {
509510
$("#command-snippet").click(function () {
510511
alert(config.translate.alerts.snippets);
511512
});
513+
$("#command-snippet").addClass('disabled');
512514
blockly.show();
513515
blockly.css('width', '33%');
514516
blockly.css('height', '100%');

static/css/style.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,18 @@ body, input {
248248
min-width: 90px;
249249
}
250250

251+
.disabled div.roundsymbol {
252+
border-color: #AAA;
253+
}
254+
255+
.disabled i {
256+
color: #AAA;
257+
}
258+
259+
.disabled div.roundlabel {
260+
color: #AAA;
261+
}
262+
251263
.roundsymbol {
252264
width: 4rem;
253265
height: 4rem;

0 commit comments

Comments
 (0)