From b51204cc1c67100e38efbf223a70151a7a2f9b06 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 5 Feb 2015 20:28:39 -0800 Subject: [PATCH] Add fieldsets and make them into tabs --- Marlin/configurator/css/configurator.css | 34 +++++++++++++++- Marlin/configurator/index.html | 51 ++++++++++++++---------- Marlin/configurator/js/configurator.js | 24 +++++++++++ 3 files changed, 86 insertions(+), 23 deletions(-) diff --git a/Marlin/configurator/css/configurator.css b/Marlin/configurator/css/configurator.css index 2409508e6a..418000deee 100644 --- a/Marlin/configurator/css/configurator.css +++ b/Marlin/configurator/css/configurator.css @@ -12,7 +12,7 @@ p { width: 80%; color: #FF0; } #help strong { color: #0DD; } img { display: none; } label, input, select, textarea { display: block; float: left; margin: 1px 0; } -label.newline, textarea { clear: both; } +label.newline, textarea, fieldset { clear: both; } label { width: 130px; height: 1em; padding: 10px 480px 10px 1em; margin-right: -470px; text-align: right; } input[type="text"], select { margin: 0.75em 0 0; } input[type="checkbox"], input[type="radio"], input[type="file"] { margin: 1em 0 0; } @@ -25,4 +25,34 @@ input:disabled { color: #BBB; } h1, h2, h3, h4, h5, h6 { clear: both; } h2 { margin: 0; padding: 1em 0 0; } #serial_stepper { padding-top: 0.75em; display: block; float: left; } -#SERIAL_PORT { display: none; } \ No newline at end of file +#SERIAL_PORT { display: none; } + +ul.tabs { display: inline; list-style: none; } +ul.tabs li { display: inline; } +ul.tabs li a, +ul.tabs li a.active:hover, +ul.tabs li a.active:active { + display: block; + float: left; + background: #666; + color: #CCC; + font-size: 150%; + border-radius: 0.25em 0.25em 0 0; + margin: 0 4px 0 0; + padding: 2px 4px; + text-decoration: none; + } +ul.tabs li a.active:link, +ul.tabs li a.active:visited { + background: #DDD; + color: #900; + cursor: default; + } +ul.tabs li a:hover, +ul.tabs li a:active { + background: #777; + color: #DDD; + } + +fieldset { display: none; border: 1px solid #AAA; border-radius: 1em; } +fieldset legend { display: none; } diff --git a/Marlin/configurator/index.html b/Marlin/configurator/index.html index aa2c106a69..66be7514c6 100644 --- a/Marlin/configurator/index.html +++ b/Marlin/configurator/index.html @@ -19,43 +19,52 @@
  • HELP - This is the help region
  • +
    +
    -
    +
    + Machine + +
    - + - - + + - + - + - + - + - + - - + + +
    - - - - +
    + Temperature + + + + - - + + - - + + - - + + +

    Marlin/Configuration.h

    
    diff --git a/Marlin/configurator/js/configurator.js b/Marlin/configurator/js/configurator.js
    index dd7de6f8e1..2dfa2d2178 100644
    --- a/Marlin/configurator/js/configurator.js
    +++ b/Marlin/configurator/js/configurator.js
    @@ -75,6 +75,30 @@ var configuratorApp = (function(){
         init: function() {
           self = this; // a 'this' for use when 'this' is something else
     
    +      // Make tabs for the fieldsets
    +      var $fset = $('#config_form fieldset');
    +      var $tabs = $('