From a0791e6192a86f409ef415cb0f17d4e607d5936b Mon Sep 17 00:00:00 2001 From: Jos van den Oever Date: Sat, 12 Jun 2010 21:27:49 +0200 Subject: [PATCH] Make spreadsheets look better. --- javascriptzip/odf.html | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/javascriptzip/odf.html b/javascriptzip/odf.html index 8f6f55fb..7c3227ba 100644 --- a/javascriptzip/odf.html +++ b/javascriptzip/odf.html @@ -14,18 +14,26 @@ @namespace text url(urn:oasis:names:tc:opendocument:xmlns:text:1.0); @namespace draw url(urn:oasis:names:tc:opendocument:xmlns:drawing:1.0); @namespace office url(urn:oasis:names:tc:opendocument:xmlns:office:1.0); + @namespace table url(urn:oasis:names:tc:opendocument:xmlns:table:1.0); text|p, text|h { display: block; border: 1px solid black; padding: 3px 3px 3px 3px; margin: 5px 5px 5px 5px; -/* position: absolute; */ } text|h { font-weight: bold; } office|text { display: block; + background: white; + } + office|spreadsheet { + display: block; + background: white; + border-collapse: collapse; + font-family: sans-serif; + font-size: 10pt; } office|presentation { background: #888888; @@ -38,6 +46,27 @@ background: white; margin: 3px; } + office|spreadsheet text|p { + border: 0px; + padding: 1px; + margin: 0px; + } + office|spreadsheet table|table-cell { + border: 1px solid #cccccc; + } + table|table { + display: table; + border: 1px solid black; + } + table|table-row { + display: table-row; + } + table|table-column { + display: table-column; + } + table|table-cell { + display: table-cell; + } text|p[text|style-name='list.start'] { color: red; } @@ -70,6 +99,7 @@ function loadFile(url) { clear(); var ziplist = document.body; + document.body.innerHTML = 'Loading...'; var zip; try { zip = new jsodfkit.Zip(url); @@ -89,6 +119,7 @@ function loadFile(url) { content = document.importNode(content.firstChild, true); contentxml.appendChild(content); } + clear(); document.body.appendChild(contentxml); } @@ -97,8 +128,5 @@ function loadFile(url) { -
-
-