[chrome-gnome-shell/release/v10.1: 2/7] options: disable update inputs by default



commit eeb2b679a8d1296d461d19483d27af9920f94d8e
Author: Yuri Konotopov <ykonotopov gnome org>
Date:   Mon Jun 12 20:22:20 2017 +0400

    options: disable update inputs by default

 extension/options.html |    6 +++---
 extension/options.js   |    3 +--
 2 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/extension/options.html b/extension/options.html
index 7b64c8b..a294ae2 100644
--- a/extension/options.html
+++ b/extension/options.html
@@ -30,8 +30,8 @@
                                                        <span class="notice wrapped update-notice" 
data-i18n="options_update_check_notice"></span>
                                                </dt>
                                                <dd>
-                                                       <label for='update_check_yes' 
data-i18n="yes"></label> <input type='radio' id='update_check_yes' name='update_check' />
-                                                       <label for='update_check_no' data-i18n="no"></label> 
<input type='radio' id='update_check_no' name='update_check' />
+                                                       <label for='update_check_yes' 
data-i18n="yes"></label> <input type='radio' id='update_check_yes' name='update_check' disabled='disabled' />
+                                                       <label for='update_check_no' data-i18n="no"></label> 
<input type='radio' id='update_check_no' name='update_check' disabled='disabled' />
 
                                                        <div class='notice'><span 
data-i18n="options_last_check"></span>: <span id="last_update_check" data-i18n="never"></span></div>
                                                </dd>
@@ -39,7 +39,7 @@
                                        <dl>
                                                <dt><label for='update_check_period' 
data-i18n="options_check_period"></label>:</dt>
                                                <dd>
-                                                       <input id='update_check_period' type='number' min="3" 
 /> <span data-i18n="hours"></span>
+                                                       <input id='update_check_period' type='number' min="3" 
disabled='disabled' /> <span data-i18n="hours"></span>
 
                                                        <div class='notice'><span 
data-i18n="options_next_check"></span>: <span id="next_update_check" data-i18n="never"></span></div>
                                                </dd>
diff --git a/extension/options.js b/extension/options.js
index 17b0feb..dd50dbc 100644
--- a/extension/options.js
+++ b/extension/options.js
@@ -108,8 +108,6 @@ function restore_options()
                                });
                        }
 
-                       $("[name='update_check'], #update_check_period").prop('disabled', 'disabled');
-
                        toggle_update_notice(true);
                }
 
@@ -120,6 +118,7 @@ function restore_options()
                        }
                        else
                        {
+                               $("input[name='update_check'], #update_check_period").removeAttr('disabled');
                                $('#update_check_period').val(items.updateCheckPeriod);
                                toggle_update_notice(false);
                                retrieveUpdateTimes();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]