From 9c0adae3cd9ee73d405df0291ad99ba401e444e5 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 6 Feb 2015 17:57:31 -0800 Subject: [PATCH] Scroll to setting position in file when edited MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Animate scrolling to the edited item’s position - Sanity check file drops and show warnings - Fix form init / refresh on new configuration drop - Document the API methods that get/set defines --- Marlin/configurator/js/configurator.js | 245 +++++++++++++++++-------- 1 file changed, 164 insertions(+), 81 deletions(-) diff --git a/Marlin/configurator/js/configurator.js b/Marlin/configurator/js/configurator.js index 87464e7e93..68ce56dcc4 100644 --- a/Marlin/configurator/js/configurator.js +++ b/Marlin/configurator/js/configurator.js @@ -59,13 +59,16 @@ var configuratorApp = (function(){ // private variables and functions go here var self, pi2 = Math.PI * 2, + has_boards = false, has_config = false, has_config_adv = false, boards_file = 'boards.h', config_file = 'Configuration.h', config_adv_file = 'Configuration_adv.h', $config = $('#config_text'), $config_adv = $('#config_adv_text'), boards_list = {}, - therms_list = {}; + therms_list = {}, + total_config_lines, + total_config_adv_lines; // Return this anonymous object as configuratorApp return { @@ -75,6 +78,9 @@ var configuratorApp = (function(){ init: function() { self = this; // a 'this' for use when 'this' is something else + // Set up the form + this.setupConfigForm(); + // Make tabs for the fieldsets var $fset = $('#config_form fieldset'); var $tabs = $('