Chromium Code Reviews| Index: chrome/browser/resources/options/hotword_search_setting_indicator.js |
| diff --git a/chrome/browser/resources/options/hotword_search_setting_indicator.js b/chrome/browser/resources/options/hotword_search_setting_indicator.js |
| index e51b17274dcd5424211f55c1ce851c121af4f2e6..035a1d317abd667f319e0d852088cb0bd415d9f8 100644 |
| --- a/chrome/browser/resources/options/hotword_search_setting_indicator.js |
| +++ b/chrome/browser/resources/options/hotword_search_setting_indicator.js |
| @@ -61,6 +61,14 @@ cr.define('options', function() { |
| }, |
| /** |
| + * Assigns a value to the help link variable. |
| + * @param {string} helpLink The text that links to a troubleshooting page. |
| + */ |
| + set helpLink(helpLinkText) { |
| + this.helpLink_ = helpLinkText; |
| + }, |
| + |
| + /** |
| * Toggles showing and hiding the error message bubble. An empty |
| * |errorText_| indicates that there is no error message. So the bubble |
| * only be shown if |errorText_| has a value. |
| @@ -76,44 +84,28 @@ cr.define('options', function() { |
| var self = this; |
| // Create the DOM tree for the bubble content. |
| - var action = document.createElement('button'); |
| - action.classList.add('default-button'); |
| - action.classList.add('controlled-setting-bubble-action'); |
| - action.textContent = loadTimeData.getString('hotwordRetryDownloadButton'); |
| - action.addEventListener('click', function(event) { |
| - self.retryDownload_(); |
| - }); |
| - |
| - var buttonStrip = document.createElement('div'); |
| - buttonStrip.classList.add('button-strip'); |
| - buttonStrip.reversed = true; |
| - buttonStrip.appendChild(action); |
| - |
| - var actionContainer = document.createElement('div'); |
| - actionContainer.classList.add('action-area'); |
| - actionContainer.appendChild(buttonStrip); |
| - |
| var closeButton = document.createElement('div'); |
| closeButton.classList.add('close-button'); |
| var text = document.createElement('p'); |
| - text.textContent = this.errorText_; |
| + text.innerHTML = this.errorText_; |
|
James Hawkins
2014/05/19 02:54:28
text.textContent
rpetterson
2014/05/19 17:39:17
When I use textContent rather than innerHTML, the
James Hawkins
2014/05/21 15:07:22
Ah, I see. The message from generated resources h
|
| + |
| + var help = document.createElement('p'); |
| + help.innerHTML = this.helpLink_; |
|
James Hawkins
2014/05/19 02:54:28
Same here. But this should probably be an anchor
|
| + |
| + var textDiv = document.createElement('div'); |
| + textDiv.appendChild(text); |
| + textDiv.appendChild(help); |
| var container = document.createElement('div'); |
| container.appendChild(closeButton); |
| - container.appendChild(text); |
| - container.appendChild(actionContainer); |
| + container.appendChild(textDiv); |
| var content = document.createElement('div'); |
| content.appendChild(container); |
| OptionsPage.showBubble(content, this.image, this, this.location); |
| }, |
| - |
| - retryDownload_: function() { |
| - chrome.send('requestHotwordSetupRetry'); |
| - OptionsPage.hideBubble(); |
| - }, |
| }; |
| // Export |