Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / net / base / dir_header.html
blobc75637bfff02f8d67627a6d02100b4e3679427d6
1 <!DOCTYPE html>
3 <html i18n-values="dir:textdirection;lang:language">
5 <head>
6 <meta charset="utf-8">
7 <meta name="google" value="notranslate">
9 <script>
10 function addRow(name, url, isdir, size, date_modified) {
11 if (name == ".")
12 return;
14 var root = document.location.pathname;
15 if (root.substr(-1) !== "/")
16 root += "/";
18 var table = document.getElementById("table");
19 var row = document.createElement("tr");
20 var file_cell = document.createElement("td");
21 var link = document.createElement("a");
23 link.className = isdir ? "icon dir" : "icon file";
25 if (name == "..") {
26 link.href = root + "..";
27 link.innerText = document.getElementById("parentDirText").innerText;
28 link.className = "icon up";
29 size = "";
30 date_modified = "";
31 } else {
32 if (isdir) {
33 name = name + "/";
34 url = url + "/";
35 size = "";
36 } else {
37 link.draggable = "true";
38 link.addEventListener("dragstart", onDragStart, false);
40 link.innerText = name;
41 link.href = root + url;
43 file_cell.appendChild(link);
45 row.appendChild(file_cell);
46 row.appendChild(createCell(size));
47 row.appendChild(createCell(date_modified));
49 table.appendChild(row);
52 function onDragStart(e) {
53 var el = e.srcElement;
54 var name = el.innerText.replace(":", "");
55 var download_url_data = "application/octet-stream:" + name + ":" + el.href;
56 e.dataTransfer.setData("DownloadURL", download_url_data);
57 e.dataTransfer.effectAllowed = "copy";
60 function createCell(text) {
61 var cell = document.createElement("td");
62 cell.setAttribute("class", "detailsColumn");
63 cell.innerText = text;
64 return cell;
67 function start(location) {
68 var header = document.getElementById("header");
69 header.innerText = header.innerText.replace("LOCATION", location);
71 document.getElementById("title").innerText = header.innerText;
74 function onListingParsingError() {
75 var box = document.getElementById("listingParsingErrorBox");
76 box.innerHTML = box.innerHTML.replace("LOCATION", encodeURI(document.location)
77 + "?raw");
78 box.style.display = "block";
80 </script>
82 <style>
84 h1 {
85 border-bottom: 1px solid #c0c0c0;
86 margin-bottom: 10px;
87 padding-bottom: 10px;
88 white-space: nowrap;
91 table {
92 border-collapse: collapse;
95 tr.header {
96 font-weight: bold;
99 td.detailsColumn {
100 -webkit-padding-start: 2em;
101 text-align: end;
102 white-space: nowrap;
105 a.icon {
106 -webkit-padding-start: 1.5em;
107 text-decoration: none;
110 a.icon:hover {
111 text-decoration: underline;
114 a.file {
115 background : url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAABnRSTlMAAAAAAABupgeRAAABHUlEQVR42o2RMW7DIBiF3498iHRJD5JKHurL+CRVBp+i2T16tTynF2gO0KSb5ZrBBl4HHDBuK/WXACH4eO9/CAAAbdvijzLGNE1TVZXfZuHg6XCAQESAZXbOKaXO57eiKG6ft9PrKQIkCQqFoIiQFBGlFIB5nvM8t9aOX2Nd18oDzjnPgCDpn/BH4zh2XZdlWVmWiUK4IgCBoFMUz9eP6zRN75cLgEQhcmTQIbl72O0f9865qLAAsURAAgKBJKEtgLXWvyjLuFsThCSstb8rBCaAQhDYWgIZ7myM+TUBjDHrHlZcbMYYk34cN0YSLcgS+wL0fe9TXDMbY33fR2AYBvyQ8L0Gk8MwREBrTfKe4TpTzwhArXWi8HI84h/1DfwI5mhxJamFAAAAAElFTkSuQmCC ") left top no-repeat;
118 a.dir {
119 background : url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAd5JREFUeNqMU79rFUEQ/vbuodFEEkzAImBpkUabFP4ldpaJhZXYm/RiZWsv/hkWFglBUyTIgyAIIfgIRjHv3r39MePM7N3LcbxAFvZ2b2bn22/mm3XMjF+HL3YW7q28YSIw8mBKoBihhhgCsoORot9d3/ywg3YowMXwNde/PzGnk2vn6PitrT+/PGeNaecg4+qNY3D43vy16A5wDDd4Aqg/ngmrjl/GoN0U5V1QquHQG3q+TPDVhVwyBffcmQGJmSVfyZk7R3SngI4JKfwDJ2+05zIg8gbiereTZRHhJ5KCMOwDFLjhoBTn2g0ghagfKeIYJDPFyibJVBtTREwq60SpYvh5++PpwatHsxSm9QRLSQpEVSd7/TYJUb49TX7gztpjjEffnoVw66+Ytovs14Yp7HaKmUXeX9rKUoMoLNW3srqI5fWn8JejrVkK0QcrkFLOgS39yoKUQe292WJ1guUHG8K2o8K00oO1BTvXoW4yasclUTgZYJY9aFNfAThX5CZRmczAV52oAPoupHhWRIUUAOoyUIlYVaAa/VbLbyiZUiyFbjQFNwiZQSGl4IDy9sO5Wrty0QLKhdZPxmgGcDo8ejn+c/6eiK9poz15Kw7Dr/vN/z6W7q++091/AQYA5mZ8GYJ9K0AAAAAASUVORK5CYII= ") left top no-repeat;
122 a.up {
123 background : url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmlJREFUeNpsU0toU0EUPfPysx/tTxuDH9SCWhUDooIbd7oRUUTMouqi2iIoCO6lceHWhegy4EJFinWjrlQUpVm0IIoFpVDEIthm0dpikpf3ZuZ6Z94nrXhhMjM3c8895977BBHB2PznK8WPtDgyWH5q77cPH8PpdXuhpQT4ifR9u5sfJb1bmw6VivahATDrxcRZ2njfoaMv+2j7mLDn93MPiNRMvGbL18L9IpF8h9/TN+EYkMffSiOXJ5+hkD+PdqcLpICWHOHc2CC+LEyA/K+cKQMnlQHJX8wqYG3MAJy88Wa4OLDvEqAEOpJd0LxHIMdHBziowSwVlF8D6QaicK01krw/JynwcKoEwZczewroTvZirlKJs5CqQ5CG8pb57FnJUA0LYCXMX5fibd+p8LWDDemcPZbzQyjvH+Ki1TlIciElA7ghwLKV4kRZstt2sANWRjYTAGzuP2hXZFpJ/GsxgGJ0ox1aoFWsDXyyxqCs26+ydmagFN/rRjymJ1898bzGzmQE0HCZpmk5A0RFIv8Pn0WYPsiu6t/Rsj6PauVTwffTSzGAGZhUG2F06hEc9ibS7OPMNp6ErYFlKavo7MkhmTqCxZ/jwzGA9Hx82H2BZSw1NTN9Gx8ycHkajU/7M+jInsDC7DiaEmo1bNl1AMr9ASFgqVu9MCTIzoGUimXVAnnaN0PdBBDCCYbEtMk6wkpQwIG0sn0PQIUF4GsTwLSIFKNqF6DVrQq+IWVrQDxAYQC/1SsYOI4pOxKZrfifiUSbDUisif7XlpGIPufXd/uvdvZm760M0no1FZcnrzUdjw7au3vu/BVgAFLXeuTxhTXVAAAAAElFTkSuQmCC ") left top no-repeat;
126 html[dir=rtl] a {
127 background-position-x: right;
130 #listingParsingErrorBox {
131 border: 1px solid black;
132 background: #fae691;
133 padding: 10px;
134 display: none;
136 </style>
138 <title id="title"></title>
140 </head>
142 <body>
144 <div id="listingParsingErrorBox" i18n-values=".innerHTML:listingParsingErrorBoxText"></div>
146 <span id="parentDirText" style="display:none" i18n-content="parentDirText"></span>
148 <h1 id="header" i18n-content="header"></h1>
150 <table id="table">
151 <tr class="header">
152 <td i18n-content="headerName"></td>
153 <td class="detailsColumn" i18n-content="headerSize"></td>
154 <td class="detailsColumn" i18n-content="headerDateModified"></td>
155 </tr>
156 </table>
158 </body>
160 </html>