Chromium Code Reviews| Index: chrome/browser/resources/snippets_internals.html |
| diff --git a/chrome/browser/resources/snippets_internals.html b/chrome/browser/resources/snippets_internals.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f537e30d2105b31c5fd7fcbfc1ec5ac4cc203b81 |
| --- /dev/null |
| +++ b/chrome/browser/resources/snippets_internals.html |
| @@ -0,0 +1,149 @@ |
| +<!-- |
| +Copyright 2016 The Chromium Authors. All rights reserved. |
| +Use of this source code is governed by a BSD-style license that can be |
| +found in the LICENSE file. |
| +--> |
| +<!DOCTYPE html> |
| +<html> |
| +<head> |
| +<meta charset="utf-8"> |
| +<if expr="is_android or is_ios"> |
| +<meta name="viewport" content="width=device-width, initial-scale=1.0, |
| + maximum-scale=1.0, user-scalable=no"> |
|
Bernhard Bauer
2016/04/14 16:50:24
Indent this line four spaces.
jkrcal
2016/04/15 14:11:50
Done.
|
| +</if> |
| +<title>Snippets Internals</title> |
| +<link rel="stylesheet" href="chrome://resources/css/text_defaults.css"> |
| +<link rel="stylesheet" href="snippets_internals.css"> |
| +<script src="chrome://resources/js/cr.js"></script> |
| +<script src="chrome://resources/js/jstemplate_compiled.js"></script> |
| +<script src="chrome://resources/js/util.js"></script> |
| +<script src="snippets_internals.js"></script> |
| +</head> |
| + |
| +<body> |
| +<div id="info"> |
| + <div class="section" jsskip="true"> |
|
Bernhard Bauer
2016/04/14 16:50:24
What's the jsskip for?
jkrcal
2016/04/15 14:11:50
It informs the jstemplate library that it can skip
Bernhard Bauer
2016/04/18 14:01:34
Eh, it strikes me a bit as premature optimization
jkrcal
2016/04/18 15:02:06
Done (removed).
|
| + <h2>Properties</h2> |
| + <table class="section-details"> |
| + <tr> |
| + <td class="name">Snippets enabled</td> |
| + <td id="flag-snippets" class="value"></td> |
| + </tr> |
| + <tr> |
| + <td class="name">Snippets restricted to hosts</td> |
| + <td id="switch-restrict-to-hosts" class="value"></td> |
| + </tr> |
| + </table> |
| + </div> |
| + |
| + <div id="snippets" class="section"> |
| + <h2>Snippets <span class="detail">(click for details)</span></h2> |
| + <table class="section-details"> |
| + <tr jsselect="list" style="display:none"> |
| + <td class="title-link"> |
| + <span class="snippet-title" jsvalues="myid:id"> |
|
Bernhard Bauer
2016/04/14 16:50:24
"myid" is not very meaningful. "snippet-id" maybe?
jkrcal
2016/04/15 14:11:50
Done.
|
| + <span jscontent="title"></span> |
| + >> |
| + </span> |
| + <div jsvalues="id:id" class="snippet-detail snippet-hidden"> |
| + <table> |
| + <tr> |
| + <td>Validity |
| + <td class="expiry"> |
| + <span class="date" jscontent="published"></span> – |
| + <span class="date" jscontent="expires"></span> |
| + <tr> |
| + <td>Site title |
| + <td jscontent="siteTitle"> |
| + <tr> |
| + <td>Text |
| + <td jscontent="snippet"> |
| + <tr> |
| + <td>URL |
| + <td><a class="url" jsvalues="href:url" jscontent="url"></a> |
| + <tr> |
| + <td>Favicon |
| + <td> |
| + <a class="url" jsvalues="href:faviconUrl" |
| + jscontent="faviconUrl"></a> |
|
Bernhard Bauer
2016/04/14 16:50:24
This should be indented four spaces.
jkrcal
2016/04/15 14:11:50
Done.
|
| + <tr> |
| + <td>Salient image |
| + <td> |
| + <a class="url" jsvalues="href:salientImageUrl" |
|
Bernhard Bauer
2016/04/14 16:50:24
Would it make more sense to show the image inline?
jkrcal
2016/04/15 14:11:50
I think for debugging it is more important to see
|
| + jscontent="salientImageUrl"></a> |
| + </table> |
| + </div> |
| + </td> |
| + </tr> |
| + </table> |
| + <div class="detail" id="snippets-empty" jsskip="1"></div> |
| + <div class="forms" jsskip="1"> |
| + <input id="submit-clear" type="submit" value="Clear the list"> |
| + </div> |
| + <div class="forms" jsskip="1"> |
| + <input id="submit-download" type="submit" value="Add snippets"> |
| + from hosts <input id="hosts-input" type="text"> |
| + <div class="detail"> |
| + e.g. "www.wired.com www.bbc.co.uk", |
|
Bernhard Bauer
2016/04/14 16:50:24
You could make this a hint text (placeholder="..."
jkrcal
2016/04/15 14:11:50
Done.
|
| + <span id="hosts-help"></span>. |
| + </div> |
| + </div> |
| + </div> |
| + |
| + <div id="discarded-snippets" class="section"> |
|
Bernhard Bauer
2016/04/14 16:50:24
This is another disadvantage of having discarded s
jkrcal
2016/04/15 14:11:50
I was not aware of Polymer, just used the same lib
Marc Treib
2016/04/15 15:51:32
Nah, IMO it's not worth switching. Maybe the next
|
| + <h2>Discarded snippets <span class="detail">(click for details)</span></h2> |
| + <table class="section-details"> |
| + <tr jsselect="list" style="display:none"> |
| + <td class="title-link"> |
| + <span class="discarded-snippet-title" jsvalues="myid:id"> |
| + <span jscontent="title"></span> |
| + >> |
| + </span> |
| + <div jsvalues="id:id" class="snippet-detail snippet-hidden"> |
| + <table> |
| + <tr> |
| + <td>Validity |
| + <td class="expiry"> |
| + <span class="date" jscontent="published"></span> – |
| + <span class="date" jscontent="expires"></span> |
| + <tr> |
| + <td>Text |
| + <td jscontent="snippet"> |
| + <tr> |
| + <td>URL |
| + <td><a class="url" jsvalues="href:url" jscontent="url"></a> |
| + <tr> |
| + <td>Favicon |
| + <td> |
| + <a class="url" jsvalues="href:faviconUrl" |
| + jscontent="faviconUrl"></a> |
|
Bernhard Bauer
2016/04/18 14:01:34
This should be indented four more spaces (it's par
jkrcal
2016/04/18 15:02:06
This is not the last version of the file, it has c
|
| + <tr> |
| + <td>Salient image |
| + <td> |
| + <a class="url" jsvalues="href:salientImageUrl" |
| + jscontent="salientImageUrl"></a> |
| + </table> |
| + </div> |
| + </td> |
| + </tr> |
| + </table> |
| + <div class="detail" id="discarded-snippets-empty" jsskip="1"></div> |
| + <div class="forms" jsskip="1"> |
| + <input id="discarded-snippets-clear" type="submit" value="Clear list"> |
| + </div> |
| + </div> |
| + |
| + <div id="hosts" class="section"> |
| + <h2>Suggestion hosts</h2> |
| + <table class="section-details"> |
| + <tr jsselect="list"> |
| + <td jscontent="url"></td> |
| + </tr> |
| + </table> |
| + <div class="detail" id="hosts-empty" jsskip="1"></div> |
| + </div> |
| +</div> |
| + |
| +</body> |
| +</html> |
| + |