diff --git a/embedding/config/basebrowser-installer-win.pkg b/embedding/config/basebrowser-installer-win.pkg index 3d6ced51136..e079fc3cedb 100644 --- a/embedding/config/basebrowser-installer-win.pkg +++ b/embedding/config/basebrowser-installer-win.pkg @@ -257,6 +257,7 @@ res\entityTables\transliterate.properties res\fonts\fontEncoding.properties ; needed for ftp:// dir listings etc +res\html\folder.png res\html\gopher-audio.gif res\html\gopher-binary.gif res\html\gopher-find.gif diff --git a/embedding/config/basebrowser-win b/embedding/config/basebrowser-win index 8fdc66004e4..d0f974761d0 100644 --- a/embedding/config/basebrowser-win +++ b/embedding/config/basebrowser-win @@ -273,6 +273,7 @@ res\entityTables\transliterate.properties res\fonts\fontEncoding.properties ; needed for ftp:// dir listings etc +res\html\folder.png res\html\gopher-audio.gif res\html\gopher-binary.gif res\html\gopher-find.gif diff --git a/layout/build/layout.pkg b/layout/build/layout.pkg index 9f24f0df778..03db044c379 100644 --- a/layout/build/layout.pkg +++ b/layout/build/layout.pkg @@ -42,6 +42,7 @@ dist/bin/res/arrowd.gif dist/bin/res/ua.css dist/bin/res/broken-image.gif dist/bin/res/loading-image.gif +dist/bin/res/html/folder.png dist/bin/res/html/gopher-audio.gif dist/bin/res/html/gopher-binary.gif dist/bin/res/html/gopher-find.gif diff --git a/layout/generic/Makefile.in b/layout/generic/Makefile.in index 17ba7ec7086..0da6d305249 100644 --- a/layout/generic/Makefile.in +++ b/layout/generic/Makefile.in @@ -170,6 +170,7 @@ CPPSRCS += \ endif RESOURCES_HTML = \ + $(srcdir)/folder.png \ $(srcdir)/gopher-audio.gif \ $(srcdir)/gopher-binary.gif \ $(srcdir)/gopher-find.gif \ diff --git a/layout/generic/folder.png b/layout/generic/folder.png new file mode 100755 index 00000000000..6fa6c159050 Binary files /dev/null and b/layout/generic/folder.png differ diff --git a/netwerk/locales/en-US/necko.properties b/netwerk/locales/en-US/necko.properties index 34647235a5a..762359f2b68 100644 --- a/netwerk/locales/en-US/necko.properties +++ b/netwerk/locales/en-US/necko.properties @@ -58,6 +58,11 @@ RepostFormData=This web page is being redirected to a new location. Would you li # Directory listing strings DirTitle=Index of %1$S DirGoUp=Up to higher level directory +ShowHidden=Show hidden objects +DirColName=Name +DirColSize=Size +DirColMTime=Last Modified +DirFileLabel=File: #Gopher Search Prompt GopherPromptTitle=Search diff --git a/netwerk/streamconv/converters/nsIndexedToHTML.cpp b/netwerk/streamconv/converters/nsIndexedToHTML.cpp index 05d2f44a975..3f83996c510 100644 --- a/netwerk/streamconv/converters/nsIndexedToHTML.cpp +++ b/netwerk/streamconv/converters/nsIndexedToHTML.cpp @@ -22,6 +22,7 @@ * Contributor(s): * Bradley Baetz * Christopher A. Aillon + * Dão Gottwald * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or @@ -49,7 +50,6 @@ #include "nsURLHelper.h" #include "nsCRT.h" #include "nsIPlatformCharset.h" -#include "nsInt64.h" NS_IMPL_ISUPPORTS4(nsIndexedToHTML, nsIDirIndexListener, @@ -57,15 +57,13 @@ NS_IMPL_ISUPPORTS4(nsIndexedToHTML, nsIRequestObserver, nsIStreamListener) -static void ConvertNonAsciiToNCR(const nsAString& in, nsAFlatString& out) +static void AppendNonAsciiToNCR(const nsAString& in, nsAFlatString& out) { nsAString::const_iterator start, end; in.BeginReading(start); in.EndReading(end); - out.Truncate(); - while (start != end) { if (*start < 128) { out.Append(*start++); @@ -148,7 +146,7 @@ nsIndexedToHTML::OnStartRequest(nsIRequest* request, nsISupports *aContext) { rv = mParser->OnStartRequest(request, aContext); if (NS_FAILED(rv)) return rv; - nsCAutoString baseUri,titleUri; + nsCAutoString baseUri, titleUri; rv = uri->GetAsciiSpec(baseUri); if (NS_FAILED(rv)) return rv; titleUri = baseUri; @@ -165,6 +163,7 @@ nsIndexedToHTML::OnStartRequest(nsIRequest* request, nsISupports *aContext) { PRBool isScheme = PR_FALSE; PRBool isSchemeFile = PR_FALSE; + PRBool isSchemeGopher = PR_FALSE; if (NS_SUCCEEDED(uri->SchemeIs("ftp", &isScheme)) && isScheme) { // ftp urls don't always end in a / @@ -229,7 +228,7 @@ nsIndexedToHTML::OnStartRequest(nsIRequest* request, nsISupports *aContext) { rv = mParser->SetEncoding("UTF-8"); NS_ENSURE_SUCCESS(rv, rv); - } else if (NS_SUCCEEDED(uri->SchemeIs("gopher", &isScheme)) && isScheme) { + } else if (NS_SUCCEEDED(uri->SchemeIs("gopher", &isSchemeGopher)) && isSchemeGopher) { mExpectAbsLoc = PR_TRUE; } else if (NS_SUCCEEDED(uri->SchemeIs("jar", &isScheme)) && isScheme) { nsCAutoString path; @@ -265,31 +264,234 @@ nsIndexedToHTML::OnStartRequest(nsIRequest* request, nsISupports *aContext) { } nsString buffer; - buffer.AssignLiteral("\n" + "\n\n" + "\n" + "\n" + "\n"); - buffer.AppendLiteral("\"?>\n" - "\n"); + if (!isSchemeGopher) { + buffer.AppendLiteral("\n"); + } + buffer.AppendLiteral(" innerUri = NS_GetInnermostURI(uri); + if (!innerUri) + return NS_ERROR_UNEXPECTED; + nsCOMPtr fileURL(do_QueryInterface(innerUri)); + //XXX bug 388553: can't use skinnable icons here due to security restrictions + if (fileURL) { + //buffer.AppendLiteral("chrome://global/skin/dirListing/local.png"); + buffer.AppendLiteral("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB" + "AAAAAQCAYAAAAf8/9hAAAABGd BTUEAANbY1E9YMgAAAfRJR" + "EFUeNrFUk1IVFEU/t7MfU2pMRiGLVxYhGCgEoIbyZVGtFJXt" + "hIDQ7BlgtvQpQs1NWgTA5YbscjZZLQNZkRpnEBFRR0sf9FG5" + "zne9969z/PuvAHHEN114Xv33nfP+c453znA/15a9C1qhPS3c" + "S4cYaPQtgHCmmlhvqkHo2QjLyP4WN44+azgTk3Ow9Rg/URyK" + "y7hIOiRwrawTMSLHe/wJkvMHAdF/uB9wOzPIXj8cqQZvrLzA" + "RsGnhdP0P6ekHJJmGGgIcB8kKaZa2p9/jffay9Q+QDNdOokG" + "CoD109a9EnzKyhmwotzneAjCEUgrBOAp5GIRZD6Sy8sCEEVC" + "pGBdHd17wArrMXUkLaaTu1id30RHgHHn1gUvhsVePjU1Sd5Q" + "Qp+wLFI1zxsLU3jS1/jBuOU+fHhAZI7e6hq6aVwUTK0LyghA" + "Meh0rVqzIZ7EE+gW2WwGQ+htPYVmJ4ggt+5TlKJRJGFapxEC" + "ZZnx5yVXzPfh7/iB9N1qtlewK17r0n5cdVsUEng1CXBM47Zx" + "Ypw4q9D5FP70bc5ULo4ZjfzgbuPuqDxeaJ/kjHUPZxbUhj4G" + "R7G5s5hKDyDVfp1xKisWGS0tSqge9PmwVX/7D2L7X2Euj+g3" + "5sDrrmJEW4TAq5Mlw+DGmHDa5WVdWBXdD5LosQ5BeW364651" + "CZwAAAAAElFTkSuQmCC"); + } else { + //buffer.AppendLiteral("chrome://global/skin/dirListing/remote.png"); + buffer.AppendLiteral("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB" + "AAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAohJRE" + "FUeNqFU0tPE2EUPTMtr5G2DBCNYrVKxAXgKwgLNlYCiWGhG3" + "eICxNZuXBl/AEQggsNO4Jxb0gwokYxGmNgIRuMSRcGbMAoVV" + "NgBqSveX3e+01LwEicyZ37Te/cc859VMF/rrm5uWvkOm3bhu" + "M4YM9mWZaRyWTeKXslJhKJi5FIpL1QKMQqKjQUKAmeB8FBIa" + "DrNZiefmkE90i+Qq6DGPVwOIyl5RXJ7nkCnvAISMAlMALXgz" + "MzM1fpY42smixEFjEMQ+eEVCq1U7L06+sGAXno7rkkfwum0+" + "lMPN7VZZobkl3wLVilkMYvxIlaPYJnU0/R3HJWsnOMFIBLqO" + "LkOw/n6ahAoa4o/kN6tt+bmxi5eV4yfpz/ANd1cbD3sq+gxM" + "of6rV1UFUVCplaND4zgPB8xpZTbfIs/B5A5frpnQBUBAKBXa" + "YWPV/cPGZMh5bwyHwgyyopqODxKKqCQDC4zS49l6Cqfm8I4P" + "uhqYHlRWrmVppVjDEAR3VuCJfAjMcP7ENsv4aj9ZWI1lVKMF" + "8Br4GN7ubryFsFCchTYQWeWqyTLbnw78UKqAFYngOXS/EsOa" + "lSCfmysiCGb5yR47FtB9msz1BeXkZlCLl9qkKJtBuu5yLvWH" + "KMUoGu6yvJ5KJGi9PI4zFNkwCycvPW1tbkyNLHpgfyjo2G2h" + "PgZW6sb8attxcGclEqfafM0dHRjqamprYqrbo1FKrBi+dPkM" + "vlJil0OnlkciRadxKthzvx/ssbpMxfOPejt//v/0K8oSEaqw" + "6FSIGLvr5+jI+PxYeGhu5S7F7PfVNsWTnMfp7FwmBWeYVP2A" + "Wwurr6bWLicay0/1SGoWna11L89e2fSvvwhlgYzG0r/wN/4X" + "tnm2x4eQAAAABJRU5ErkJggg=="); + } + buffer.AppendLiteral("\">\n"); // Anything but a gopher url needs to end in a /, // otherwise we end up linking to file:///foo/dirfile - buffer.AppendLiteral("<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head><title>"); - - nsXPIDLString title; - if (!mTextToSubURI) { mTextToSubURI = do_GetService(NS_ITEXTTOSUBURI_CONTRACTID, &rv); if (NS_FAILED(rv)) return rv; @@ -318,6 +520,7 @@ nsIndexedToHTML::OnStartRequest(nsIRequest* request, nsISupports *aContext) { htmlEscSpec.Adopt(nsEscapeHTML2(unEscapeSpec.get(), unEscapeSpec.Length())); + nsXPIDLString title; const PRUnichar* formatTitle[] = { htmlEscSpec.get() }; @@ -330,11 +533,9 @@ nsIndexedToHTML::OnStartRequest(nsIRequest* request, nsISupports *aContext) { // we want to convert string bundle to NCR // to ensure they're shown in any charsets - nsAutoString strNCR; - ConvertNonAsciiToNCR(title, strNCR); - buffer.Append(strNCR); + AppendNonAsciiToNCR(title, buffer); - buffer.AppendLiteral(""); + buffer.AppendLiteral("\n"); // If there is a quote character in the baseUri, then // lets not add a base URL. The reason for this is that @@ -352,21 +553,14 @@ nsIndexedToHTML::OnStartRequest(nsIRequest* request, nsISupports *aContext) { // add a base href. buffer.AppendLiteral("\n"); + buffer.AppendLiteral("\">\n"); } else { NS_ERROR("broken protocol handler didn't escape double-quote."); } - buffer.AppendLiteral("\n" - "\n\n

"); + buffer.AppendLiteral("\n\n

"); const PRUnichar* formatHeading[] = { htmlEscSpec.get() @@ -378,26 +572,68 @@ nsIndexedToHTML::OnStartRequest(nsIRequest* request, nsISupports *aContext) { getter_Copies(title)); if (NS_FAILED(rv)) return rv; - ConvertNonAsciiToNCR(title, strNCR); - buffer.Append(strNCR); - buffer.AppendLiteral("

\n
\n"); - - //buffer.AppendLiteral("\n"); + AppendNonAsciiToNCR(title, buffer); + buffer.AppendLiteral("\n"); if (!parentStr.IsEmpty()) { nsXPIDLString parentText; rv = mBundle->GetStringFromName(NS_LITERAL_STRING("DirGoUp").get(), getter_Copies(parentText)); if (NS_FAILED(rv)) return rv; - - ConvertNonAsciiToNCR(parentText, strNCR); - buffer.AppendLiteral("\n"); + AppendNonAsciiToNCR(parentText, buffer); + buffer.AppendLiteral("

\n"); } + if (isSchemeFile) { + nsXPIDLString showHiddenText; + rv = mBundle->GetStringFromName(NS_LITERAL_STRING("ShowHidden").get(), + getter_Copies(showHiddenText)); + if (NS_FAILED(rv)) return rv; + + buffer.AppendLiteral("

\n"); + } + + if (!isSchemeGopher) { + buffer.AppendLiteral("
NameSizeLast modified
"); - buffer.Append(strNCR); - buffer.AppendLiteral("
\n"); + + nsXPIDLString columnText; + + buffer.AppendLiteral(" \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n"); + } else { + buffer.AppendLiteral("
"); + + rv = mBundle->GetStringFromName(NS_LITERAL_STRING("DirColName").get(), + getter_Copies(columnText)); + if (NS_FAILED(rv)) return rv; + AppendNonAsciiToNCR(columnText, buffer); + buffer.AppendLiteral(""); + + rv = mBundle->GetStringFromName(NS_LITERAL_STRING("DirColSize").get(), + getter_Copies(columnText)); + if (NS_FAILED(rv)) return rv; + AppendNonAsciiToNCR(columnText, buffer); + buffer.AppendLiteral(""); + + rv = mBundle->GetStringFromName(NS_LITERAL_STRING("DirColMTime").get(), + getter_Copies(columnText)); + if (NS_FAILED(rv)) return rv; + AppendNonAsciiToNCR(columnText, buffer); + buffer.AppendLiteral("
\n"); + } + buffer.AppendLiteral(" \n"); + // Push buffer to the listener now, so the initial HTML will not // be parsed in OnDataAvailable(). @@ -418,7 +654,7 @@ nsIndexedToHTML::OnStopRequest(nsIRequest* request, nsISupports *aContext, nsresult aStatus) { if (NS_SUCCEEDED(aStatus)) { nsString buffer; - buffer.AssignLiteral("

\n"); + buffer.AssignLiteral("\n"); aStatus = FormatInputStream(request, aContext, buffer); } @@ -516,16 +752,79 @@ nsIndexedToHTML::OnIndexAvailable(nsIRequest *aRequest, return NS_ERROR_NULL_POINTER; nsString pushBuffer; - pushBuffer.AppendLiteral("\n GetDescription(getter_Copies(description)); + if (description.First() == PRUnichar('.')) + pushBuffer.AppendLiteral(" class=\"hidden-object\""); + + pushBuffer.AppendLiteral(">\n GetType(&type); - if (type == nsIDirIndex::TYPE_SYMLINK) { - pushBuffer.AppendLiteral(" class=\"symlink\""); + switch (type) { + case nsIDirIndex::TYPE_SYMLINK: + pushBuffer.AppendInt(0); + break; + case nsIDirIndex::TYPE_DIRECTORY: + pushBuffer.AppendInt(1); + break; + case nsIDirIndex::TYPE_FILE: + case nsIDirIndex::TYPE_UNKNOWN: + pushBuffer.AppendInt(2); + break; } + PRUnichar* escaped = nsEscapeHTML2(description.get(), description.Length()); + pushBuffer.Append(escaped); + + pushBuffer.AppendLiteral("\"> 31) { + nsCOMPtr channel = do_QueryInterface(aRequest); + nsCOMPtr uri; + rv = channel->GetURI(getter_AddRefs(uri)); + if (NS_FAILED(rv)) return rv; + + // No need to do this for Gopher, as the table has only one column in that case + PRBool isSchemeGopher = PR_FALSE; + if (!(NS_SUCCEEDED(uri->SchemeIs("gopher", &isSchemeGopher)) && isSchemeGopher)) { + //XXX this potentially truncates after a combining char (bug 391472) + description.Truncate(30); + if (NS_IS_HIGH_SURROGATE(description.Last())) + description.Truncate(description.Length()-1); + + escapedShort.Adopt(nsEscapeHTML2(description.get(), description.Length())); + // add HORIZONTAL ELLIPSIS (U+2026) + escapedShort.AppendLiteral("…"); + pushBuffer.AppendLiteral(" title=\""); + pushBuffer.Append(escaped); + pushBuffer.AppendLiteral("\""); + } + } + if (escapedShort.IsEmpty()) + escapedShort.Assign(escaped); + nsMemory::Free(escaped); pushBuffer.AppendLiteral(" href=\""); - nsXPIDLCString loc; aIndex->GetLocation(getter_Copies(loc)); @@ -570,67 +869,70 @@ nsIndexedToHTML::OnIndexAvailable(nsIRequest *aRequest, AppendUTF8toUTF16(escapeBuf, pushBuffer); - pushBuffer.AppendLiteral("\">"); - switch (type) { - case nsIDirIndex::TYPE_DIRECTORY: - case nsIDirIndex::TYPE_SYMLINK: - pushBuffer.AppendLiteral("resource://gre/res/html/gopher-menu.gif\" alt=\"Directory: "); - break; - case nsIDirIndex::TYPE_FILE: - case nsIDirIndex::TYPE_UNKNOWN: - pushBuffer.AppendLiteral("resource://gre/res/html/gopher-unknown.gif\" alt=\"File: "); - break; - } - pushBuffer.AppendLiteral("\"/>"); + if (type == nsIDirIndex::TYPE_FILE || type == nsIDirIndex::TYPE_UNKNOWN) { + pushBuffer.AppendLiteral("\"");GetDescription(getter_Copies(tmp)); - PRUnichar* escaped = nsEscapeHTML2(tmp.get(), tmp.Length()); - pushBuffer.Append(escaped); - nsMemory::Free(escaped); - - pushBuffer.AppendLiteral("\n "); - - PRInt64 size; - aIndex->GetSize(&size); - - if (nsUint64(PRUint64(size)) != nsUint64(LL_MAXUINT) && - type != nsIDirIndex::TYPE_DIRECTORY && - type != nsIDirIndex::TYPE_SYMLINK) { - nsAutoString sizeString; - FormatSizeString(size, sizeString); - pushBuffer.Append(sizeString); + nsXPIDLString altText; + rv = mBundle->GetStringFromName(NS_LITERAL_STRING("DirFileLabel").get(), + getter_Copies(altText)); + if (NS_FAILED(rv)) return rv; + AppendNonAsciiToNCR(altText, pushBuffer); + pushBuffer.AppendLiteral("\">"); } - pushBuffer.AppendLiteral("\n "); + pushBuffer.Append(escapedShort); + pushBuffer.AppendLiteral("\n "); + } else { + PRInt64 size; + aIndex->GetSize(&size); + + if (PRUint64(size) != LL_MAXUINT) { + pushBuffer.AppendLiteral(" sortable-data=\""); + pushBuffer.AppendInt(size); + pushBuffer.AppendLiteral("\">"); + nsAutoString sizeString; + FormatSizeString(size, sizeString); + pushBuffer.Append(sizeString); + } else { + pushBuffer.AppendLiteral(">"); + } + } + pushBuffer.AppendLiteral("\n GetLastModified(&t); if (t == -1) { - pushBuffer.AppendLiteral("\n "); + pushBuffer.AppendLiteral(">\n "); } else { + pushBuffer.AppendLiteral(" sortable-data=\""); + pushBuffer.AppendInt(t); + pushBuffer.AppendLiteral("\">"); nsAutoString formatted; - nsAutoString strNCR; // use NCR to show date in any doc charset mDateTime->FormatPRTime(nsnull, kDateFormatShort, kTimeFormatNone, t, formatted); - ConvertNonAsciiToNCR(formatted, strNCR); - pushBuffer.Append(strNCR); + AppendNonAsciiToNCR(formatted, pushBuffer); pushBuffer.AppendLiteral("\n "); mDateTime->FormatPRTime(nsnull, kDateFormatNone, kTimeFormatSeconds, t, formatted); - ConvertNonAsciiToNCR(formatted, strNCR); - pushBuffer.Append(strNCR); + // use NCR to show date in any doc charset + AppendNonAsciiToNCR(formatted, pushBuffer); } - pushBuffer.AppendLiteral("\n\n"); + pushBuffer.AppendLiteral("\n"); return FormatInputStream(aRequest, aCtxt, pushBuffer); } @@ -653,11 +955,10 @@ nsIndexedToHTML::OnInformationAvailable(nsIRequest *aRequest, void nsIndexedToHTML::FormatSizeString(PRInt64 inSize, nsString& outSizeString) { - nsInt64 size(inSize); outSizeString.Truncate(); - if (size > nsInt64(0)) { + if (inSize > PRInt64(0)) { // round up to the nearest Kilobyte - PRInt64 upperSize = (size + nsInt64(1023)) / nsInt64(1024); + PRInt64 upperSize = (inSize + PRInt64(1023)) / PRInt64(1024); outSizeString.AppendInt(upperSize); outSizeString.AppendLiteral(" KB"); } diff --git a/toolkit/themes/pinstripe/global/dirListing/dirListing.css b/toolkit/themes/pinstripe/global/dirListing/dirListing.css new file mode 100755 index 00000000000..ba9cd72bb30 --- /dev/null +++ b/toolkit/themes/pinstripe/global/dirListing/dirListing.css @@ -0,0 +1,114 @@ +:root { + background-color: -moz-dialog; + color: -moz-dialogtext; + font: message-box; +} + +body { + border: 1px solid ThreeDShadow; + -moz-border-radius: 10px; + padding: 3em; + min-width: 13em; + max-width: 52em; + margin: 4em auto; + background-color: -moz-field; + color: -moz-fieldtext; +} + +h1 { + font-size: 160%; + margin: 0 0 .6em; + border-bottom: 1px solid ThreeDLightShadow; + font-weight: normal; +} + +a { + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +p { + font-size: 110%; +} + +#UI_goUp { + margin-top: 0; + float: left; +} + +#UI_showHidden { + margin-top: 0; + float: right; +} + +#UI_showHidden:not(:hover) { + color: graytext; +} + +table { + clear: both; + width: 90%; + margin: 0 auto; +} + +thead { + font-size: 130%; +} + +th { + font-weight: normal; +} + +th:first-child , +th:first-child + th { + padding-right: 2em; +} + +table[order] th:hover { + text-decoration: underline; +} + +tbody > tr:not(:hover) > td:not(:first-child) { + color: graytext; +} + +/* let 'Size' and 'Last Modified' take only as much space as they need and 'Name' all the rest */ +td:first-child + td , +td:first-child + td + td , +td:last-child { + width: 0; +} + +.up , +.dir , +.symlink , +.file { + padding: 0 .5em; + margin-left: 20px; +} + +.up::before , +.dir::before , +.file > img { + margin-right: 4px; + margin-left: -20px; + opacity: .6; + vertical-align: middle; +} + +.up::before { + content: url(chrome://global/skin/dirListing/up.png); +} + +.dir::before { + content: url(chrome://global/skin/dirListing/folder.png); +} + +.up:hover::before , +tr:hover > td > a::before , +tr:hover > td > .file > img { + opacity: 1; +} diff --git a/toolkit/themes/pinstripe/global/dirListing/folder.png b/toolkit/themes/pinstripe/global/dirListing/folder.png new file mode 100755 index 00000000000..b11a80bb90f Binary files /dev/null and b/toolkit/themes/pinstripe/global/dirListing/folder.png differ diff --git a/toolkit/themes/pinstripe/global/dirListing/local.png b/toolkit/themes/pinstripe/global/dirListing/local.png new file mode 100755 index 00000000000..2d1332eda3e Binary files /dev/null and b/toolkit/themes/pinstripe/global/dirListing/local.png differ diff --git a/toolkit/themes/pinstripe/global/dirListing/remote.png b/toolkit/themes/pinstripe/global/dirListing/remote.png new file mode 100755 index 00000000000..85d931ddaa5 Binary files /dev/null and b/toolkit/themes/pinstripe/global/dirListing/remote.png differ diff --git a/toolkit/themes/pinstripe/global/dirListing/up.png b/toolkit/themes/pinstripe/global/dirListing/up.png new file mode 100755 index 00000000000..3ab5987572b Binary files /dev/null and b/toolkit/themes/pinstripe/global/dirListing/up.png differ diff --git a/toolkit/themes/pinstripe/global/jar.mn b/toolkit/themes/pinstripe/global/jar.mn index 739b67739ab..5dbe214fd8c 100644 --- a/toolkit/themes/pinstripe/global/jar.mn +++ b/toolkit/themes/pinstripe/global/jar.mn @@ -108,6 +108,11 @@ classic.jar: + skin/classic/global/console/console-error-caret.gif (console/console-error-caret.gif) + skin/classic/global/console/console-error-dash.gif (console/console-error-dash.gif) + skin/classic/global/console/console.css (console/console.css) ++ skin/classic/global/dirListing/dirListing.css (dirListing/dirListing.css) ++ skin/classic/global/dirListing/folder.png (dirListing/folder.png) ++ skin/classic/global/dirListing/local.png (dirListing/local.png) ++ skin/classic/global/dirListing/remote.png (dirListing/remote.png) ++ skin/classic/global/dirListing/up.png (dirListing/up.png) + skin/classic/global/icons/alltabs.png (icons/alltabs.png) + skin/classic/global/icons/alert-error.gif (icons/alert-error.gif) + skin/classic/global/icons/alert-message.gif (icons/alert-message.gif) diff --git a/toolkit/themes/winstripe/global/dirListing/dirListing.css b/toolkit/themes/winstripe/global/dirListing/dirListing.css new file mode 100755 index 00000000000..17f211ca875 --- /dev/null +++ b/toolkit/themes/winstripe/global/dirListing/dirListing.css @@ -0,0 +1,110 @@ +:root { + background-color: -moz-dialog; + color: -moz-dialogtext; + font: message-box; +} + +body { + border: 1px solid ThreeDShadow; + -moz-border-radius: 10px; + padding: 3em; + min-width: 13em; + max-width: 52em; + margin: 4em auto; + background-color: -moz-field; + color: -moz-fieldtext; +} + +h1 { + font-size: 160%; + margin: 0 0 .6em; + border-bottom: 1px solid ThreeDLightShadow; + font-weight: normal; +} + +a { + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +p { + font-size: 110%; +} + +#UI_goUp { + margin-top: 0; + float: left; +} + +#UI_showHidden { + margin-top: 0; + float: right; +} + +#UI_showHidden:not(:hover) { + color: graytext; +} + +table { + clear: both; + width: 90%; + margin: 0 auto; +} + +thead { + font-size: 130%; +} + +th { + font-weight: normal; +} + +th:first-child , +th:first-child + th { + padding-right: 2em; +} + +table[order] th:hover { + text-decoration: underline; +} + +tbody > tr:not(:hover) > td:not(:first-child) { + color: graytext; +} + +/* let 'Size' and 'Last Modified' take only as much space as they need and 'Name' all the rest */ +td:first-child + td , +td:first-child + td + td , +td:last-child { + width: 0; +} + +.up , +.dir , +.symlink , +.file { + padding: 0 .5em; + margin-left: 20px; +} + +.up::before , +.dir::before , +.file > img { + margin-right: 4px; + margin-left: -20px; + opacity: .6; + vertical-align: middle; +} + +.up::before { + content: url(chrome://global/skin/dirListing/up.png); +} + +.up:hover::before , +tr:hover > td > a::before , +tr:hover > td > .file > img { + opacity: 1; +} diff --git a/toolkit/themes/winstripe/global/dirListing/local.png b/toolkit/themes/winstripe/global/dirListing/local.png new file mode 100755 index 00000000000..44c305a290f Binary files /dev/null and b/toolkit/themes/winstripe/global/dirListing/local.png differ diff --git a/toolkit/themes/winstripe/global/dirListing/remote.png b/toolkit/themes/winstripe/global/dirListing/remote.png new file mode 100755 index 00000000000..85d931ddaa5 Binary files /dev/null and b/toolkit/themes/winstripe/global/dirListing/remote.png differ diff --git a/toolkit/themes/winstripe/global/dirListing/up.png b/toolkit/themes/winstripe/global/dirListing/up.png new file mode 100755 index 00000000000..c6786a1e7f2 Binary files /dev/null and b/toolkit/themes/winstripe/global/dirListing/up.png differ diff --git a/toolkit/themes/winstripe/global/jar.mn b/toolkit/themes/winstripe/global/jar.mn index 5fb5f980a3f..6ea0375a7d8 100644 --- a/toolkit/themes/winstripe/global/jar.mn +++ b/toolkit/themes/winstripe/global/jar.mn @@ -62,7 +62,11 @@ classic.jar: skin/classic/global/arrow/arrow-up-hov.gif (arrow/arrow-up-hov.gif) skin/classic/global/arrow/arrow-up-sharp.gif (arrow/arrow-up-sharp.gif) skin/classic/global/checkbox/cbox-check.gif (checkbox/cbox-check.gif) - skin/classic/global/checkbox/cbox-check-dis.gif (checkbox/cbox-check-dis.gif) + skin/classic/global/checkbox/cbox-check-dis.gif (checkbox/cbox-check-dis.gif) + skin/classic/global/dirListing/dirListing.css (dirListing/dirListing.css) + skin/classic/global/dirListing/local.png (dirListing/local.png) + skin/classic/global/dirListing/remote.png (dirListing/remote.png) + skin/classic/global/dirListing/up.png (dirListing/up.png) skin/classic/global/Filepicker.png (filepicker/Filepicker.png) skin/classic/global/icons/alltabs-box-overflow-end-bkgnd-hover.png (icons/alltabs-box-overflow-end-bkgnd-hover.png) skin/classic/global/icons/alltabs-box-overflow-start-bkgnd-hover.png (icons/alltabs-box-overflow-start-bkgnd-hover.png)