]> arthur.barton.de Git - netdata.git/commitdiff
fix for "On Focus" / "Always" being refreshing the page without applying the change...
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Wed, 6 Apr 2016 13:02:04 +0000 (16:02 +0300)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Wed, 6 Apr 2016 13:02:04 +0000 (16:02 +0300)
web/index.html

index 2a3b8b5c3058c1a515efe3a9acc6c4b7b47bb9f4..08e4839da5cd08d4e87b6bb9b39a3111fd6f3f1d 100644 (file)
                var netdataTheme = getTheme('slate');
 
                function setTheme(theme) {
+                       if(theme === netdataTheme) return false;
+
                        return saveLocalStorage('netdataTheme', theme);
                }
        </script>
                                        <!-- Tab panes -->
                                        <div class="tab-content">
                                                <div role="tabpanel" class="tab-pane active" id="settings_performance">
-                                                       <form id="optionsForm" method="get" class="form-horizontal">
+                                                       <form id="optionsForm1" method="get" class="form-horizontal">
                                                                <div class="form-group">
                                                                        <table>
                                                                        <tr class="option-row">
                                                        </form>
                                                </div>
                                                <div role="tabpanel" class="tab-pane" id="settings_sync">
-                                                       <form id="optionsForm" method="get" class="form-horizontal">
+                                                       <form id="optionsForm2" method="get" class="form-horizontal">
                                                                <div class="form-group">
                                                                        <table>
                                                                        <tr class="option-row">
                                                        </form>
                                                </div>
                                                <div role="tabpanel" class="tab-pane" id="settings_visual">
-                                                       <form id="optionsForm" method="get" class="form-horizontal">
+                                                       <form id="optionsForm3" method="get" class="form-horizontal">
                                                                <div class="form-group">
                                                                        <table>
                                                                        <tr class="option-row">
@@ -1817,7 +1819,7 @@ function finalizePage() {
 
        // this has to be the last
        // it reloads the page
-       $('#netdata_theme_control').change(function()           {
+       $('#netdata_theme_control').change(function() {
                if(setTheme($(this).prop('checked')?'slate':'default'))
                        location.reload();
        });