Bug 1494337 - Do not display the 'triggers refresh' note if there's no option needing it r=ochameau
authorJulien Wajsberg <felash@gmail.com>
Thu, 27 Sep 2018 14:33:41 +0000
changeset 486909 fc8298adbd8aff7796184feb669284c75e804469
parent 486908 0a76f7bedb472286df1ce291c2a892993407f88f
child 486910 44e5267358ebe8a413ce727f3aa20122d58a503e
push id246
push userfmarier@mozilla.com
push dateSat, 13 Oct 2018 00:15:40 +0000
reviewersochameau
bugs1494337
milestone64.0a1
Bug 1494337 - Do not display the 'triggers refresh' note if there's no option needing it r=ochameau Depends on D6923 Differential Revision: https://phabricator.services.mozilla.com/D6920
devtools/client/framework/toolbox-options.js
devtools/client/framework/toolbox-options.xhtml
--- a/devtools/client/framework/toolbox-options.js
+++ b/devtools/client/framework/toolbox-options.js
@@ -462,16 +462,20 @@ OptionsPanel.prototype = {
     if (this.target.activeTab && !this.target.chrome) {
       const [ response ] = await this.target.client.attachTarget(this.target.activeTab._actor);
       this._origJavascriptEnabled = !response.javascriptEnabled;
       this.disableJSNode.checked = this._origJavascriptEnabled;
       this.disableJSNode.addEventListener("click", this._disableJSClicked);
     } else {
       // Hide the checkbox and label
       this.disableJSNode.parentNode.style.display = "none";
+
+      const triggersPageRefreshLabel =
+        this.panelDoc.getElementById("triggers-page-refresh-label");
+      triggersPageRefreshLabel.style.display = "none";
     }
   },
 
   updateCurrentTheme: function() {
     const currentTheme = GetPref("devtools.theme");
     const themeBox = this.panelDoc.getElementById("devtools-theme-box");
     const themeRadioInput = themeBox.querySelector(`[value=${currentTheme}]`);
 
--- a/devtools/client/framework/toolbox-options.xhtml
+++ b/devtools/client/framework/toolbox-options.xhtml
@@ -184,15 +184,16 @@
             <span>&options.enableChrome.label5;</span>
           </label>
           <label title="&options.enableRemote.tooltip2;">
             <input type="checkbox"
                    data-pref="devtools.debugger.remote-enabled"/>
             <span>&options.enableRemote.label3;</span>
           </label>
           <span class="options-citation-label theme-comment"
+                id="triggers-page-refresh-label"
           >&options.context.triggersPageRefresh;</span>
       </fieldset>
     </div>
 
   </form>
   </body>
 </html>