Tooltip code, widescreen layout, hide auto-expands

Slightly better layout for wide screens.
This commit is contained in:
Scott Lahteine 2015-02-19 03:11:16 -08:00
parent f238c7428d
commit 335b7680c9
3 changed files with 20 additions and 10 deletions

View file

@ -655,6 +655,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
// REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARDUINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C // REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARDUINO library folder: https://github.com/kiyoshigawa/LiquidCrystal_I2C
//#define RA_CONTROL_PANEL //#define RA_CONTROL_PANEL
// @section hidden
//automatic expansion //automatic expansion
#if defined (MAKRPANEL) #if defined (MAKRPANEL)
#define DOGLCD #define DOGLCD
@ -778,6 +780,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#endif #endif
#endif #endif
// @section lcd
// default LCD contrast for dogm-like LCD displays // default LCD contrast for dogm-like LCD displays
#ifdef DOGLCD #ifdef DOGLCD
# ifndef DEFAULT_LCD_CONTRAST # ifndef DEFAULT_LCD_CONTRAST

View file

@ -25,7 +25,7 @@ body { margin: 0; padding: 0; background: #56A; color: #000; font-family: monosp
#main { #main {
max-width: 1000px; max-width: 1000px;
margin: 0 auto; margin: 0 auto;
padding: 0 4%; width: 92%; padding: 0 2%; width: 96%;
} }
h1, h2, h3, h4, h5, h6 { clear: both; } h1, h2, h3, h4, h5, h6 { clear: both; }
@ -83,7 +83,7 @@ fieldset {
label, input, select, textarea { display: block; float: left; margin: 1px 0; } label, input, select, textarea { display: block; float: left; margin: 1px 0; }
label.newline, textarea, fieldset { clear: both; } label.newline, textarea, fieldset { clear: both; }
label { label {
width: 140px; /* label area */ width: 120px; /* label area */
height: 1em; height: 1em;
padding: 10px 460px 10px 1em; padding: 10px 460px 10px 1em;
margin-right: -450px; margin-right: -450px;
@ -292,3 +292,12 @@ a.download {
text-decoration: none; text-decoration: none;
} }
@media all and (min-width: 1100px) {
#main { max-width: 10000px; }
fieldset { float: left; width: 50%; height: auto; }
#config_text, #config_adv_text { float: right; clear: right; width: 45%; }
}

View file

@ -938,24 +938,21 @@ var configuratorApp = (function(){
// Success? // Success?
if (info.type) { if (info.type) {
// Get the end-of-line comment, if there is one // Get the end-of-line comment, if there is one
var tooltip = ''; var tooltip = '', eoltip = '';
findDef = new RegExp('.*#define[ \\t].*/[/*]+[ \\t]*(.*)'); findDef = new RegExp('.*#define[ \\t].*/[/*]+[ \\t]*(.*)');
if (info.line.search(findDef) >= 0) if (info.line.search(findDef) >= 0)
tooltip = info.line.replace(findDef, '$1'); eoltip = tooltip = info.line.replace(findDef, '$1');
// Get all the comments immediately before the item // Get all the comments immediately before the item
var r, s; var r, s;
findDef = new RegExp('(([ \\t]*(//|#)[^\n]+\n){1,4})([ \\t]*\n)?' + info.line.regEsc(), 'g'); findDef = new RegExp('(([ \\t]*(//|#)[^\n]+\n){1,4})' + info.line.regEsc(), 'g');
if (r = findDef.exec(txt)) { if (r = findDef.exec(txt)) {
// Get the text of the found comments // Get the text of the found comments
findDef = new RegExp('^[ \\t]*//+[ \\t]*(.*)[ \\t]*$', 'gm'); findDef = new RegExp('^[ \\t]*//+[ \\t]*(.*)[ \\t]*$', 'gm');
while((s = findDef.exec(r[1])) !== null) { while((s = findDef.exec(r[1])) !== null) {
var tip = s[1].replace(/[ \\t]*(={5,}|@section[ \\t]+\w+)[ \\t]*/g, ''); var tip = s[1].replace(/[ \\t]*(={5,}|(#define[ \\t]+.*|@section[ \\t]+\w+))[ \\t]*/g, '');
if (tip.length) { if (tip.length) {
if (tip.match(/^#define[ \\t]/) != null) { if (tip.match(/^#define[ \\t]/) != null) tooltip = eoltip;
tooltip = '';
break;
}
// JSON data? Save as select options // JSON data? Save as select options
if (!info.options && tip.match(/:[\[{]/) != null) { if (!info.options && tip.match(/:[\[{]/) != null) {
// TODO // TODO