From 0b3cfe0e74553beea2a73718c46946ab650fd980 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Sat, 5 Aug 2017 23:56:35 +0200 Subject: [PATCH] use 0x01 for seps in labels string so users can use pipe if they want to --- html_orig/_debug_replacements.php | 3 ++- html_orig/js/app.js | 2 +- html_orig/jssrc/term.js | 2 +- html_orig/pages/term.php | 2 +- user/cgi_main.c | 16 ++++------------ user/screen.c | 2 +- 6 files changed, 10 insertions(+), 17 deletions(-) diff --git a/html_orig/_debug_replacements.php b/html_orig/_debug_replacements.php index 93fdf77..3ae5e3e 100644 --- a/html_orig/_debug_replacements.php +++ b/html_orig/_debug_replacements.php @@ -6,13 +6,14 @@ * are given to JavaScript, to avoid syntax errors with %% */ return [ - '%term_title%' => 'ESP8266 Wireless Terminal', + '%term_title%' => 'ESPTerm local debug', '%btn1%' => '1', '%btn2%' => '2', '%btn3%' => '3', '%btn4%' => '', '%btn5%' => '5', + '%labels_seq%' => 'TESPTerm local debug1235', '%screenData%' => '  HELLOx NRE3',//'\u000b\u0001\u001b\u0001\u0001\u0001\u0001\u0001\f\u0005\u0001\u0010\u0003HELLOx\u0002\u000b\u0001\u0001N\u0001RE\u00023\u0001', //, /*'{ diff --git a/html_orig/js/app.js b/html_orig/js/app.js index 3417498..838421a 100644 --- a/html_orig/js/app.js +++ b/html_orig/js/app.js @@ -1408,7 +1408,7 @@ var Screen = (function () { } function _load_labels(str) { - var pieces = str.split('|'); + var pieces = str.split('\x01'); qs('h1').textContent = pieces[0]; qsa('#buttons button').forEach(function(x, i) { var s = pieces[i+1].trim(); diff --git a/html_orig/jssrc/term.js b/html_orig/jssrc/term.js index 3155c57..217e8ba 100644 --- a/html_orig/jssrc/term.js +++ b/html_orig/jssrc/term.js @@ -216,7 +216,7 @@ var Screen = (function () { } function _load_labels(str) { - var pieces = str.split('|'); + var pieces = str.split('\x01'); qs('h1').textContent = pieces[0]; qsa('#buttons button').forEach(function(x, i) { var s = pieces[i+1].trim(); diff --git a/html_orig/pages/term.php b/html_orig/pages/term.php index f7507d1..9ba70c7 100644 --- a/html_orig/pages/term.php +++ b/html_orig/pages/term.php @@ -32,7 +32,7 @@ - +