Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(289)

Side by Side Diff: chrome/browser/resources/supervised_user_block_interstitial.js

Issue 1617293002: Putting the feedback section of the block interstitial to the correct place based on the mocks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Using i18n-values Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/resources/supervised_user_block_interstitial.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 function sendCommand(cmd) { 5 function sendCommand(cmd) {
6 window.domAutomationController.setAutomationId(1); 6 window.domAutomationController.setAutomationId(1);
7 window.domAutomationController.send(cmd); 7 window.domAutomationController.send(cmd);
8 } 8 }
9 9
10 function makeImageSet(url1x, url2x) { 10 function makeImageSet(url1x, url2x) {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 $('request-access-button').classList.add('hidden-on-mobile'); 60 $('request-access-button').classList.add('hidden-on-mobile');
61 }; 61 };
62 $('hide-details-link').onclick = function(event) { 62 $('hide-details-link').onclick = function(event) {
63 $('details').hidden = true; 63 $('details').hidden = true;
64 $('show-details-link').hidden = false; 64 $('show-details-link').hidden = false;
65 $('hide-details-link').hidden = true; 65 $('hide-details-link').hidden = true;
66 $('information-container').classList.remove('hidden-on-mobile'); 66 $('information-container').classList.remove('hidden-on-mobile');
67 $('request-access-button').classList.remove('hidden-on-mobile'); 67 $('request-access-button').classList.remove('hidden-on-mobile');
68 }; 68 };
69 if (loadTimeData.getBoolean('showFeedbackLink')) { 69 if (loadTimeData.getBoolean('showFeedbackLink')) {
70 $('feedback').hidden = false;
70 $('feedback-link').onclick = function(event) { 71 $('feedback-link').onclick = function(event) {
71 sendCommand('feedback'); 72 sendCommand('feedback');
72 }; 73 };
73 } else { 74 } else {
74 $('feedback-link').style.display = 'none'; 75 $('feedback').hidden = true;
Bernhard Bauer 2016/01/28 14:00:42 Actually, do we need this if the link starts out a
atanasova 2016/01/28 14:32:57 I went with the second suggestion, trying to keep
75 } 76 }
76 } 77 }
77 78
78 /** 79 /**
79 * Updates the interstitial to show that the request failed or was sent. 80 * Updates the interstitial to show that the request failed or was sent.
80 * @param {boolean} isSuccessful Whether the request was successful or not. 81 * @param {boolean} isSuccessful Whether the request was successful or not.
81 */ 82 */
82 function setRequestStatus(isSuccessful) { 83 function setRequestStatus(isSuccessful) {
83 $('block-page-message').hidden = true; 84 $('block-page-message').hidden = true;
84 if (isSuccessful) { 85 if (isSuccessful) {
85 $('request-failed-message').hidden = true; 86 $('request-failed-message').hidden = true;
86 $('request-sent-message').hidden = false; 87 $('request-sent-message').hidden = false;
87 $('show-details-link').hidden = true; 88 $('show-details-link').hidden = true;
88 $('hide-details-link').hidden = true; 89 $('hide-details-link').hidden = true;
89 $('details').hidden = true; 90 $('details').hidden = true;
90 $('back-button').hidden = false; 91 $('back-button').hidden = false;
91 $('request-access-button').hidden = true; 92 $('request-access-button').hidden = true;
92 } else { 93 } else {
93 $('request-failed-message').hidden = false; 94 $('request-failed-message').hidden = false;
94 $('request-access-button').hidden = false; 95 $('request-access-button').hidden = false;
95 } 96 }
96 } 97 }
97 98
98 document.addEventListener('DOMContentLoaded', initialize); 99 document.addEventListener('DOMContentLoaded', initialize);
OLDNEW
« no previous file with comments | « chrome/browser/resources/supervised_user_block_interstitial.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698