Skip to content

Commit 1e95ea2

Browse files
committed
Remove description field, CSS, and JS
1 parent 8f6be99 commit 1e95ea2

3 files changed

Lines changed: 1 addition & 31 deletions

File tree

editor.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,6 @@ <h2><i class="fa fa-unlock-alt"></i> <strong>{{ title }}</strong></h2>
230230
<div id="script-name" class="flex1" contenteditable
231231
tabindex="10">
232232
</div>
233-
<div id="script-description" contenteditable
234-
tabindex="11">
235-
</div>
236233
</div>
237234
</div>
238235
<div class="hbox flex1">

python-main.js

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -126,21 +126,11 @@ function web_editor(config) {
126126
// Indicates if there are unsaved changes to the content of the editor.
127127
var dirty = false;
128128

129-
// Sets the description associated with the code displayed in the UI.
130-
function setDescription(x) {
131-
$("#script-description").text(x);
132-
}
133-
134129
// Sets the name associated with the code displayed in the UI.
135130
function setName(x) {
136131
$("#script-name").text(x);
137132
}
138133

139-
// Gets the description associated with the code displayed in the UI.
140-
function getDescription() {
141-
return $("#script-description").text();
142-
}
143-
144134
// Gets the name associated with the code displayed in the UI.
145135
function getName() {
146136
return $("#script-name").text();
@@ -240,21 +230,17 @@ function web_editor(config) {
240230
$('#button-decrypt-link').click(function() {
241231
var password = $('#passphrase').val();
242232
setName(EDITOR.decrypt(password, message.n));
243-
setDescription(EDITOR.decrypt(password, message.c));
244233
EDITOR.setCode(EDITOR.decrypt(password, message.s));
245234
vex.close();
246235
EDITOR.focus();
247236
});
248237
} else if(migration != null){
249238
setName(migration.meta.name);
250-
setDescription(migration.meta.comment);
251239
EDITOR.setCode(migration.source);
252240
EDITOR.focus();
253241
} else {
254242
// If there's no name, default to something sensible.
255-
setName("microbit");
256-
// If there's no description, default to something sensible.
257-
setDescription("A MicroPython script");
243+
setName("microbit")
258244
// A sane default starting point for a new script.
259245
EDITOR.setCode(config.translate.code.start);
260246
}
@@ -392,15 +378,13 @@ function web_editor(config) {
392378
var reader = new FileReader();
393379
if (ext == 'py') {
394380
setName(f.name.replace('.py', ''));
395-
setDescription(config.translate.drop.python);
396381
reader.onload = function(e) {
397382
EDITOR.setCode(e.target.result);
398383
};
399384
reader.readAsText(f);
400385
EDITOR.ACE.gotoLine(EDITOR.ACE.session.getLength());
401386
} else if (ext == 'hex') {
402387
setName(f.name.replace('.hex', ''));
403-
setDescription(config.translate.drop.hex);
404388
reader.onload = function(e) {
405389
var code = upyhex.extractPyStrFromIntelHex(
406390
e.target.result);
@@ -533,7 +517,6 @@ function web_editor(config) {
533517
// Name
534518
qs_array.push('n=' + EDITOR.encrypt(password, getName()));
535519
// Comment
536-
qs_array.push('c=' + EDITOR.encrypt(password, getDescription()));
537520
// Source
538521
qs_array.push('s=' + EDITOR.encrypt(password, EDITOR.getCode()));
539522
// Hint
@@ -569,15 +552,13 @@ function web_editor(config) {
569552
var reader = new FileReader();
570553
if (ext == 'py') {
571554
setName(file.name.replace('.py', ''));
572-
setDescription(config.translate.drop.python);
573555
reader.onload = function(e) {
574556
EDITOR.setCode(e.target.result);
575557
};
576558
reader.readAsText(file);
577559
EDITOR.ACE.gotoLine(EDITOR.ACE.session.getLength());
578560
} else if (ext == 'hex') {
579561
setName(file.name.replace('.hex', ''));
580-
setDescription(config.translate.drop.hex);
581562
reader.onload = function(e) {
582563
var code = upyhex.extractPyStrFromIntelHex(e.target.result);
583564
if (code.length < 8192) {

static/css/style.css

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,6 @@ body, input {
113113
border-radius: 0.5rem;
114114
}
115115

116-
#script-description {
117-
display: none; /* TODO: FIXME: remove this field */
118-
color: #336699;
119-
padding-bottom: 0.2rem;
120-
overflow: hidden;
121-
max-height: 22px;
122-
}
123-
124116
#script-icons > *:not(:first-child) {
125117
display: inline-block;
126118
cursor: pointer;

0 commit comments

Comments
 (0)