summaryrefslogtreecommitdiffstats
path: root/net/base/dir_header.html
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-07 20:04:11 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-07 20:04:11 +0000
commit0c3ad1b9608cdfa1d9648ce6e0bcf6443a444411 (patch)
tree3e6ae8f56b9bb2602c993faa91172fbf0efe0253 /net/base/dir_header.html
parent9d207f652542ffdefe16af057b86d9fabd5cf214 (diff)
downloadchromium_src-0c3ad1b9608cdfa1d9648ce6e0bcf6443a444411.zip
chromium_src-0c3ad1b9608cdfa1d9648ce6e0bcf6443a444411.tar.gz
chromium_src-0c3ad1b9608cdfa1d9648ce6e0bcf6443a444411.tar.bz2
Including icons for FTP and file:// directory listings. This is not the final
solution but rather an initial improvement on the current page. As a method of retrieving the platform specific icons, I am investigating the possibility of adding an open browser standard for the implementation of a icon:// URL scheme that would be Web accessible. See http://goo.gl/gaZE. For this patch, we simply use 3 different icons: file, folder and parent folder. These icons are embedded in the template using data URIs. Patch by Pierre-Antoine LaFayette, original review: http://codereview.chromium.org/543184 BUG=24421 TEST=none Review URL: http://codereview.chromium.org/573052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38332 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/dir_header.html')
-rw-r--r--net/base/dir_header.html80
1 files changed, 70 insertions, 10 deletions
diff --git a/net/base/dir_header.html b/net/base/dir_header.html
index 0383147..51ebf16 100644
--- a/net/base/dir_header.html
+++ b/net/base/dir_header.html
@@ -1,5 +1,7 @@
<!DOCTYPE html>
+
<html>
+
<head>
<script>
@@ -15,9 +17,13 @@ function addRow(name, url, isdir, size, date_modified) {
var row = document.createElement("tr");
var file_cell = document.createElement("td");
var link = document.createElement("a");
+
+ link.className = isdir ? "icon dir" : "icon file";
+
if (name == "..") {
link.href = root + "..";
link.innerText = document.getElementById("parentDirText").innerText;
+ link.className = "icon up";
size = "";
date_modified = "";
} else {
@@ -59,24 +65,78 @@ function onListingParsingError() {
}
</script>
-<title id="title"></title>
<style>
- h1 { white-space: nowrap; }
- td.detailsColumn { text-align: right; padding-left: 30px; white-space: nowrap; }
- #listingParsingErrorBox { border: 1px solid black; background: #fae691; padding: 10px; display: none }
+
+ h1 {
+ border-bottom: 1px solid #c0c0c0;
+ margin-bottom: 10px;
+ padding-bottom: 10px;
+ white-space: nowrap;
+ }
+
+ table {
+ border-collapse: collapse;
+ }
+
+ tr.header {
+ font-weight: bold;
+ }
+
+ td.detailsColumn {
+ padding-left: 2em;
+ text-align: right;
+ white-space: nowrap;
+ }
+
+ a.icon {
+ padding-left: 1.5em;
+ text-decoration: none;
+ }
+
+ a.icon:hover {
+ text-decoration: underline;
+ }
+
+ a.file {
+ background : url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAABnRSTlMAAAAAAABupgeRAAABHUlEQVR42o2RMW7DIBiF3498iHRJD5JKHurL+CRVBp+i2T16tTynF2gO0KSb5ZrBBl4HHDBuK/WXACH4eO9/CAAAbdvijzLGNE1TVZXfZuHg6XCAQESAZXbOKaXO57eiKG6ft9PrKQIkCQqFoIiQFBGlFIB5nvM8t9aOX2Nd18oDzjnPgCDpn/BH4zh2XZdlWVmWiUK4IgCBoFMUz9eP6zRN75cLgEQhcmTQIbl72O0f9865qLAAsURAAgKBJKEtgLXWvyjLuFsThCSstb8rBCaAQhDYWgIZ7myM+TUBjDHrHlZcbMYYk34cN0YSLcgS+wL0fe9TXDMbY33fR2AYBvyQ8L0Gk8MwREBrTfKe4TpTzwhArXWi8HI84h/1DfwI5mhxJamFAAAAAElFTkSuQmCC ") left top no-repeat;
+ }
+
+ a.dir {
+ 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;
+ }
+
+ a.up {
+ 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;
+ }
+
+ #listingParsingErrorBox {
+ border: 1px solid black;
+ background: #fae691;
+ padding: 10px;
+ display: none;
+ }
</style>
+
+<title id="title"></title>
+
</head>
+
<body>
+
<div id="listingParsingErrorBox" i18n-values=".innerHTML:listingParsingErrorBoxText"></div>
+
<span id="parentDirText" style="display:none" i18n-content="parentDirText"></span>
+
<h1 id="header" i18n-content="header"></h1>
-<hr/>
+
<table id="table">
-<tr style="font-weight: bold">
- <td i18n-content="headerName"></td>
- <td class="detailsColumn" i18n-content="headerSize"></td>
- <td class="detailsColumn" i18n-content="headerDateModified"></td>
-</tr>
+ <tr class="header">
+ <td i18n-content="headerName"></td>
+ <td class="detailsColumn" i18n-content="headerSize"></td>
+ <td class="detailsColumn" i18n-content="headerDateModified"></td>
+ </tr>
</table>
+
</body>
+
</html>