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

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

Issue 638953002: Supervised user interstitial: Small style changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
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 15 matching lines...) Expand all
26 $('avatar-img').style.content = makeImageSet(avatarURL1x, avatarURL2x); 26 $('avatar-img').style.content = makeImageSet(avatarURL1x, avatarURL2x);
27 $('avatar-img').hidden = false; 27 $('avatar-img').hidden = false;
28 $('error-img').hidden = true; 28 $('error-img').hidden = true;
29 var secondAvatarURL1x = loadTimeData.getString('secondAvatarURL1x'); 29 var secondAvatarURL1x = loadTimeData.getString('secondAvatarURL1x');
30 var secondAvatarURL2x = loadTimeData.getString('secondAvatarURL2x'); 30 var secondAvatarURL2x = loadTimeData.getString('secondAvatarURL2x');
31 if (secondAvatarURL1x) { 31 if (secondAvatarURL1x) {
32 $('second-avatar-img').style.content = 32 $('second-avatar-img').style.content =
33 makeImageSet(secondAvatarURL1x, secondAvatarURL2x); 33 makeImageSet(secondAvatarURL1x, secondAvatarURL2x);
34 $('second-avatar-img').hidden = false; 34 $('second-avatar-img').hidden = false;
35 // The avatar images should overlap a bit. 35 // The avatar images should overlap a bit.
36 $('avatar-img').style.left = '10px'; 36 $('avatar-img').style.left = '6px';
37 $('avatar-img').style.zIndex = '1'; 37 $('avatar-img').style.zIndex = '1';
38 $('second-avatar-img').style.left = '-10px'; 38 $('second-avatar-img').style.left = '-6px';
39 } 39 }
40 } 40 }
41 $('back-button').onclick = function(event) { 41 $('back-button').onclick = function(event) {
42 sendCommand('back'); 42 sendCommand('back');
43 }; 43 };
44 } 44 }
45 45
46 /** 46 /**
47 * Updates the interstitial to show that the request was sent. 47 * Updates the interstitial to show that the request was sent.
48 */ 48 */
49 function updateAfterRequestSent() { 49 function updateAfterRequestSent() {
50 $('error-img').hidden = true; 50 $('error-img').hidden = true;
51 $('request-access-button').hidden = true; 51 $('request-access-button').hidden = true;
52 $('block-page-message').hidden = true; 52 $('block-page-message').hidden = true;
53 $('request-sent-message').hidden = false; 53 $('request-sent-message').hidden = false;
54 if ($('avatar-img').hidden) { 54 if ($('avatar-img').hidden) {
55 $('request-sent-message').style.marginTop = '40px'; 55 $('request-sent-message').style.marginTop = '40px';
56 } 56 }
57 } 57 }
58 58
59 document.addEventListener('DOMContentLoaded', initialize); 59 document.addEventListener('DOMContentLoaded', initialize);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698