Chromium Code Reviews| Index: chrome/browser/resources/safe_browsing_malware_block_v2.html |
| diff --git a/chrome/browser/resources/safe_browsing_malware_block_v2.html b/chrome/browser/resources/safe_browsing_malware_block_v2.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..90339d230cdc8698df4b3c868d58def9993f3570 |
| --- /dev/null |
| +++ b/chrome/browser/resources/safe_browsing_malware_block_v2.html |
| @@ -0,0 +1,225 @@ |
| +<html id="template_root" jsvalues="dir:textdirection"> |
|
Dan Beam
2012/08/21 21:54:15
where is the <!DOCTYPE>?
csilv
2012/08/21 21:59:40
This file does not comply with current webui style
mattm
2012/08/22 02:10:48
Done.
mattm
2012/08/22 02:10:48
Done.
|
| +<head> |
| +<title jscontent="title"></title> |
| +<style> |
|
Dan Beam
2012/08/21 21:54:15
this should be a separate CSS file
mattm
2012/08/22 02:10:48
Done.
|
| +body { |
| + background-color:#8C0000; |
| + background-image: url("safe_browsing/images/stripe.png"); |
| + font-family:Arial,Helvetica,sans-serif; |
| + margin:0px; |
| +} |
| +.cell { |
| + padding:40px; |
| +} |
| +.box { |
| + width:700px; |
|
Dan Beam
2012/08/21 21:54:15
none of this CSS adheres to the style guide, move
mattm
2012/08/22 02:10:48
Done.
|
| + background-color:white; |
| + color:black; |
| + font-size:10pt; |
| + line-height:16pt; |
| + text-align:left; |
| + padding:20px; |
| + position:relative; |
| + -webkit-box-shadow:3px 3px 8px #200; |
| + -webkit-border-radius:5px; |
| +} |
| +html[dir='rtl'] .box { |
| + text-align:right; |
|
Dan Beam
2012/08/21 21:54:15
use text-align: start; in the non-RTL version and
mattm
2012/08/22 02:10:48
Done.
|
| +} |
| +.right { |
|
Dan Beam
2012/08/21 21:54:15
you should use start/end and styles that work with
mattm
2012/08/22 02:10:48
Done.
|
| + float:right; |
| +} |
| +.logo { |
| + max-height:54px; |
| + padding:15px; |
| +} |
| +.title { |
| + margin:0px 90px 0px 20px; |
| + font-size:14pt; |
| + margin-bottom:6pt; |
| + font-weight:bold; |
| + color:#333333; |
| +} |
| +.main { |
| + margin:5px 210px 10px 20px; |
| + color:#4B4B4D; |
| + font-size:14px; |
| +} |
| +.dropdown { |
| + margin: 0px 40px 0px 20px; |
| + color:#4B4B4D; |
| + font-size:12px; |
| +} |
| +.footer { |
| + margin: 0px 20px 0px 15px; |
| + color:#4B4B4D; |
| + font-size:12px; |
| +} |
| +.learnmorelink { |
| + font-size:12px; |
| +} |
| +.submission { |
| + margin:15px 5px 15px 0px; |
| + padding:0px; |
| +} |
| +input { |
| + margin:0px; |
| +} |
| +.checkboxtext { |
| + font-size:12px; |
| + color:#4B4B4D; |
| +} |
| +.blue { |
| + background: -webkit-linear-gradient(#709AF1, #6C94F0 44%, #5F84EE); |
| + border: 1px solid #3574CB; |
| + border-bottom: 1px solid #3574CB; |
| + border-radius: 3px; |
| + -webkit-box-shadow: inset 0 1px 0 0 #81A9F3, 0px 1px 2px rgba(0,0,0,0.2); |
| + color: #fff; |
| + font-family: arial, helvetica, sans-serif; |
| + font-size: 14px; |
| + font-weight: bold; |
| + line-height: 1; |
| + padding: 11px 38px 10px 38px; |
| + text-align: center; |
| + text-shadow: 0 -1px 0 #4865e4; |
| + cursor: pointer; |
| + text-decoration: none; |
| + display: inline-block; |
| +} |
| +.blue:hover, .blue:focus { |
| + background: -webkit-linear-gradient(#A5BCF5, #6C94F0 70%, #5F84EE); |
| + border: 1px solid #3574CB; |
| + border-bottom: 1px solid #3574CB; |
| + -webkit-box-shadow: inset 0 1px 0 0 #81A9F3, 0px 1px 2px rgba(0,0,0,0.3);; |
| +} |
| +.blue:active { |
| + background: -webkit-linear-gradient(#709AF1, #6C94F0 44%, #5F84EE); |
| + border: 1px solid #3574CB; |
| + border-top:1px solid #3574CB; |
| + border-bottom:1px solid #3574CB; |
| + -webkit-box-shadow: inset 1px 1px 1px 1px rgba(0, 0, 0, 0.1); |
| +} |
| +.blue:focus { |
| + border: 1px solid #000; |
| +} |
| +.hr { |
| + margin: 0px 20px 0px 20px; |
| +} |
| +a { |
| + color: #1154CC; |
| +} |
| +a:link { |
| + text-decoration: none; |
| +} |
| +a:visited { |
| + text-decoration: none; |
| +} |
| +a:hover { |
| + text-decoration: underline; |
| +} |
| +a:active { |
| + text-decoration: underline; |
| +} |
| +.checkbox { |
| + position: relative; |
| + margin: 0px 80px 0px 5px |
| +} |
| +.checkbox input { |
| + margin-top: 5px; |
| + margin-left: 1px; |
| + position: absolute; |
| +} |
| +.checkbox span { |
| + -webkit-margin-start: 21px; |
| + display: inline-block; |
| +} |
| +</style> |
| + |
| +<script> |
|
Dan Beam
2012/08/21 21:54:15
this should be a separate .js file
mattm
2012/08/22 02:10:48
Done.
|
| + function sendCommand(cmd) { |
| + window.domAutomationController.setAutomationId(1); |
| + window.domAutomationController.send(cmd); |
| + } |
| + |
| + function savePreference() { |
| + var checkBox = document.getElementById('checkreport'); |
| + if (checkBox.checked) { |
| + sendCommand('doReport'); |
| + } else { |
| + sendCommand('dontReport'); |
| + } |
| + } |
| + |
| + function seeMore() { |
| + if (document.getElementById('see_less_text').style.display == 'none') { |
|
Dan Beam
2012/08/21 21:54:15
this should use $() from src/chrome/browser/resour
mattm
2012/08/22 02:10:48
Done.
|
| + document.getElementById('see_more_text').style.display = 'none'; |
| + document.getElementById('see_less_text').style.display = 'inline'; |
| + document.getElementById('see_more_contents').style.display = 'block'; |
| + sendCommand('expandedSeeMore'); |
| + } else { |
| + document.getElementById('see_more_text').style.display = 'inline'; |
| + document.getElementById('see_less_text').style.display = 'none'; |
| + document.getElementById('see_more_contents').style.display = 'none'; |
| + } |
| + } |
| +</script> |
| +</head> |
| +<body oncontextmenu="return false;"> |
|
Dan Beam
2012/08/21 21:54:15
no inline handlers, make these in the JS instead.
mattm
2012/08/22 02:10:48
Done.
|
| + |
| +<table width="100%" cellspacing="0" cellpadding="0"> |
| + <td class="cell" valign="middle" align="center"> |
| + <div class="box"> |
| + <div><img src="../../app/theme/%DISTRIBUTION%/product_logo_name_108.png" class="logo"></div> |
|
Dan Beam
2012/08/21 21:54:15
all lines should be less than 80 columns
mattm
2012/08/22 02:10:48
Done.
|
| + |
| + <div class="title" i18n-content="headLine"></div> |
| + <div class="right"><img src="safe_browsing/images/malware_icon_v2.jpg" |
| + width=200 height=200 alt="Malware Icon" /></div> |
| + <div class="main" i18n-values=".innerHTML:description1"></div> |
| + <div class="main" i18n-content="description2"></div> |
| + <div class="main"> |
| + <span i18n-content="description3"></span> |
| + <a class="learnmorelink" href="" i18n-content="learnMore" |
| + onclick="sendCommand('learnMore2'); return false;" |
|
Dan Beam
2012/08/21 21:54:15
4 \s indent
mattm
2012/08/22 02:10:48
Done.
|
| + onmousedown="return false;"></a> |
| + </div> |
| + |
| + <div class="main"> |
| + <form class="submission"> |
| + <button id="back" class="blue" i18n-content="back_button" |
| + onclick="sendCommand('takeMeBack')"></button> |
| + <br> |
| + </form> |
| + </div> |
| + |
| + <div style="clear: both;"></div> |
|
Dan Beam
2012/08/21 21:54:15
all styles should be in the CSS
mattm
2012/08/22 02:10:48
Done.
|
| + |
| + <div id="see_more_contents" style="display: none"> |
| + <div class="dropdown" i18n-values=".innerHTML:description4"></div> |
| + <div class="dropdown"> |
| + <a href="" i18n-content="details" jsdisplay="displayShowDiagnostic" |
| + onclick="sendCommand('showDiagnostic'); return false;" |
| + onmousedown="return false;"></a> |
| + </div> |
| + </div> |
| + |
| + <hr class="hr"> |
|
Dan Beam
2012/08/21 21:54:15
hr.hr makes little to no sense to me
mattm
2012/08/22 02:10:48
Done.
|
| + <div class="footer"> |
| + <a class="right" href="" onclick="seeMore(); return false;" |
|
Dan Beam
2012/08/21 21:54:15
use preventDefault() instead of return false; and
mattm
2012/08/22 02:10:48
Done.
|
| + onmousedown="return false;"> |
| + <span id="see_more_text" i18n-content="seeMore"></span> |
| + <span id="see_less_text" i18n-content="seeLess" style="display: none"></span> |
| + </a> |
| + <div class="checkbox" jsdisplay="displaycheckbox"> |
| + <label for="checkreport"> |
| + <input id="checkreport" name="checked" type="checkbox" |
| + jsvalues=".checked:boxchecked" onclick="savePreference()"> |
| + <span class="checkboxtext" i18n-values=".innerHTML:confirm_text"></span> |
| + </label> |
| + </div> |
| + </div> |
| + </div> |
| + </td> |
| +</table> |
| +</body> |
| +</html> |