Skip to content

Commit 6507c62

Browse files
microbit-sammicrobit-carlos
authored andcommitted
Remove description field, CSS, and JS (#98)
* Remove description field, CSS, and JS * Remove comment about comment/description
1 parent 5ebd885 commit 6507c62

File tree

3 files changed

+0
-31
lines changed

3 files changed

+0
-31
lines changed

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 class="vbox action" id="script-box">
231231
<label for="script-name">Script Name</label>
232232
<input id="script-name" class="flex1">
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: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -143,21 +143,11 @@ function web_editor(config) {
143143
// Indicates if there are unsaved changes to the content of the editor.
144144
var dirty = false;
145145

146-
// Sets the description associated with the code displayed in the UI.
147-
function setDescription(x) {
148-
$("#script-description").text(x);
149-
}
150-
151146
// Sets the name associated with the code displayed in the UI.
152147
function setName(x) {
153148
$("#script-name").val(x);
154149
}
155150

156-
// Gets the description associated with the code displayed in the UI.
157-
function getDescription() {
158-
return $("#script-description").text();
159-
}
160-
161151
// Gets the name associated with the code displayed in the UI.
162152
function getName() {
163153
return $("#script-name").val();
@@ -276,21 +266,17 @@ function web_editor(config) {
276266
$('#button-decrypt-link').click(function() {
277267
var password = $('#passphrase').val();
278268
setName(EDITOR.decrypt(password, message.n));
279-
setDescription(EDITOR.decrypt(password, message.c));
280269
EDITOR.setCode(EDITOR.decrypt(password, message.s));
281270
vex.close();
282271
EDITOR.focus();
283272
});
284273
} else if(migration != null){
285274
setName(migration.meta.name);
286-
setDescription(migration.meta.comment);
287275
EDITOR.setCode(migration.source);
288276
EDITOR.focus();
289277
} else {
290278
// If there's no name, default to something sensible.
291279
setName("microbit");
292-
// If there's no description, default to something sensible.
293-
setDescription("A MicroPython script");
294280
// A sane default starting point for a new script.
295281
EDITOR.setCode(config.translate.code.start);
296282
}
@@ -428,15 +414,13 @@ function web_editor(config) {
428414
var reader = new FileReader();
429415
if (ext == 'py') {
430416
setName(f.name.replace('.py', ''));
431-
setDescription(config.translate.drop.python);
432417
reader.onload = function(e) {
433418
EDITOR.setCode(e.target.result);
434419
};
435420
reader.readAsText(f);
436421
EDITOR.ACE.gotoLine(EDITOR.ACE.session.getLength());
437422
} else if (ext == 'hex') {
438423
setName(f.name.replace('.hex', ''));
439-
setDescription(config.translate.drop.hex);
440424
reader.onload = function(e) {
441425
var code = '';
442426
var showAlert = false;
@@ -575,8 +559,6 @@ function web_editor(config) {
575559
var qs_array = [];
576560
// Name
577561
qs_array.push('n=' + EDITOR.encrypt(password, getName()));
578-
// Comment
579-
qs_array.push('c=' + EDITOR.encrypt(password, getDescription()));
580562
// Source
581563
qs_array.push('s=' + EDITOR.encrypt(password, EDITOR.getCode()));
582564
// Hint
@@ -612,15 +594,13 @@ function web_editor(config) {
612594
var reader = new FileReader();
613595
if (ext == 'py') {
614596
setName(file.name.replace('.py', ''));
615-
setDescription(config.translate.drop.python);
616597
reader.onload = function(e) {
617598
EDITOR.setCode(e.target.result);
618599
};
619600
reader.readAsText(file);
620601
EDITOR.ACE.gotoLine(EDITOR.ACE.session.getLength());
621602
} else if (ext == 'hex') {
622603
setName(file.name.replace('.hex', ''));
623-
setDescription(config.translate.drop.hex);
624604
reader.onload = function(e) {
625605
var code = '';
626606
var showAlert = false;

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)