changeset 535:510bae2b593b

more fixes, e.g. IE support. first version of index page.
author casties
date Thu, 26 Jul 2012 19:32:31 +0200
parents 9009cf0b0532
children abd36d4d97b8
files css/docuviewer.css css/docuviewer_ie.css documentViewer.py version.txt zpt/common_template.zpt zpt/toc_concordance.zpt zpt/toc_figures.zpt zpt/toc_none.zpt zpt/viewer_index.zpt zpt/viewer_text.zpt
diffstat 10 files changed, 57 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/css/docuviewer.css	Wed Jul 25 21:52:08 2012 +0200
+++ b/css/docuviewer.css	Thu Jul 26 19:32:31 2012 +0200
@@ -30,9 +30,12 @@
 }
 div.page-head div.title {
     max-width: 50em;
-    border: 1px solid silver;
+    background-color: white;
+	font-family: Georgia,Times,serif;
+	font-size: 14px;
+	line-height: 1.3;
+	border: 1px solid silver;
     padding: 0.5em;  
-    background-color: white;
 }
 
 ul.view-switcher {
@@ -69,13 +72,16 @@
     display:table-row;
 }
 
+div.toc-switcher-col {
+	display: table-cell;
+}
 div.toc-switcher {
-    display: table-cell;
+    display: block; /* moz only does relative with block */
+    position: relative;
     width: 26.5px; /* for moz and webkit -- don't ask me */
 }
 div.toc-switcher ul {
     position: absolute;
-    /* z-index: 20; */
     transform: rotate(270deg);
     transform-origin: top left;
     -moz-transform: rotate(270deg);
@@ -84,10 +90,12 @@
     -webkit-transform-origin: top left;
     -o-transform: rotate(270deg);
     -o-transform-origin: top left;
-    left: 12px;
-    top: 486px;
+	left: 7px;
+    top: 32em;
+    width: 40em;
     padding: 0px;
 }
+
 div.toc-switcher li {
     list-style-type: none;
     display: inline;
@@ -104,7 +112,6 @@
 }
 
 div.tocbody {
-    /* z-index: 10; */
     display: table-cell;
     border: 1px solid silver;
     padding: 0.5em;  
@@ -137,7 +144,7 @@
 }
 div.tocbody table.thumbs .thumbsel {
     padding: 2px;
-    border: 1px solid blue;
+    border: 1px solid #892B06;
 }
 div.tocbody table.thumbs .thumbcap {
     color: black;
@@ -163,11 +170,13 @@
 }
 
 div.col.main div.content {
-    border: 1px solid silver;
-    padding: 1em;  
+	min-width: 30em;
     background-color: white;
+    font-family: Junicode,Gentium,Georgia,serif;
     font-size: 14px;
-    font-family: Junicode,Gentium,Georgia,serif;
+	line-height: 1.3;
+	border: 1px solid silver;
+    padding: 1em;
 }
 div.col.main div.content a:link,
 div.col.main div.content a:visited {
@@ -182,9 +191,11 @@
  * buttons
  */
 div.col.buttons div.options {
-    border: 1px solid silver;
-    padding: 0.5em;  
-    background-color: white;    
+    background-color: white;
+	border: 1px solid silver;
+    border-radius: 5px;
+    padding: 0.5em;
+    margin-bottom: 5px;  
 }
 div.col.buttons h4 {
     margin-top: 0;
@@ -204,3 +215,15 @@
     max-width: 20em;
 }
 
+/*
+ * index page
+ */
+div.index-image {
+	float: left;
+	padding-left: 1em;
+	padding-right: 1em;
+	padding-bottom: 1em;
+}
+div.index-info td.type {
+	font-weight: bold;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/css/docuviewer_ie.css	Thu Jul 26 19:32:31 2012 +0200
@@ -0,0 +1,10 @@
+/* fix rotated text positioning */
+div.toc-switcher ul {
+    filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
+    left: 5px;
+    top: -8em;
+    height: 26px;
+    width: 40em;
+    padding-top: 3px;
+    z-index: 10;
+}
--- a/documentViewer.py	Wed Jul 25 21:52:08 2012 +0200
+++ b/documentViewer.py	Thu Jul 26 19:32:31 2012 +0200
@@ -145,6 +145,9 @@
     docuviewer_css = ImageFile('css/docuviewer.css',globals())
     # make docuviewer_css refreshable for development
     docuviewer_css.index_html = refreshingImageFileIndexHtml
+    docuviewer_ie_css = ImageFile('css/docuviewer_ie.css',globals())
+    # make docuviewer_ie_css refreshable for development
+    docuviewer_ie_css.index_html = refreshingImageFileIndexHtml
     jquery_js = ImageFile('js/jquery.js',globals())
     
     
--- a/version.txt	Wed Jul 25 21:52:08 2012 +0200
+++ b/version.txt	Thu Jul 26 19:32:31 2012 +0200
@@ -1,1 +1,1 @@
-DocumentViewer 2.1.2a
\ No newline at end of file
+DocumentViewer 2.2.0
\ No newline at end of file
--- a/zpt/common_template.zpt	Wed Jul 25 21:52:08 2012 +0200
+++ b/zpt/common_template.zpt	Thu Jul 26 19:32:31 2012 +0200
@@ -100,6 +100,7 @@
 
   <!-- toc type switcher -->
   <metal:block metal:define-macro="toc_switcher">
+  <div class="toc-switcher-col">
     <div class="toc-switcher">
       <ul>
         <li tal:attributes="class python:here.getStyle(tocMode, 'none')"><span><a tal:omit-tag="python:tocMode=='none'"
@@ -117,6 +118,7 @@
             tal:omit-tag="python:tocMode=='thumbs'" tal:attributes="href python:here.getLink('tocMode','thumbs')">Thumbnails</a></span></li>
       </ul>
     </div>
+    </div>
   </metal:block>
 
 </body>
--- a/zpt/toc_concordance.zpt	Wed Jul 25 21:52:08 2012 +0200
+++ b/zpt/toc_concordance.zpt	Thu Jul 26 19:32:31 2012 +0200
@@ -12,7 +12,6 @@
       tal:define="start pageinfo/start; tocsize docinfo/numPages; grpsize pageinfo/tocPageSize;
                 pageNumbers docinfo/pageNumbers | nothing;
                 batch python:here.getBatch(start=start,size=grpsize,end=tocsize,data=pageNumbers);">
-      <div metal:use-macro="here/template/common_template/macros/toc_switcher" />
       <div class="ruler">
         <metal:block metal:use-macro="here/template/common_template/macros/toc_ruler" />
       </div>
--- a/zpt/toc_figures.zpt	Wed Jul 25 21:52:08 2012 +0200
+++ b/zpt/toc_figures.zpt	Thu Jul 26 19:32:31 2012 +0200
@@ -11,7 +11,6 @@
     <div class="tocbody figures"
       tal:define="start pageinfo/start; tocsize docinfo/numFigureEntries; grpsize pageinfo/tocPageSize;
                 batch python:here.getBatch(start=start,size=grpsize,end=tocsize);">
-      <div metal:use-macro="here/template/common_template/macros/toc_switcher" />
       <div class="ruler">
         <metal:block metal:use-macro="here/template/common_template/macros/toc_ruler" />
       </div>
--- a/zpt/toc_none.zpt	Wed Jul 25 21:52:08 2012 +0200
+++ b/zpt/toc_none.zpt	Thu Jul 26 19:32:31 2012 +0200
@@ -8,7 +8,7 @@
   <!-- block used for main content area -->
   <div class="toc-none" metal:define-macro="main">
     <div metal:use-macro="here/template/common_template/macros/toc_switcher"/>
-    <div class="content"></div>
+    <!--  <div class="tocbody none"></div> -->
   </div>
   <!-- toc -->
 </body>
--- a/zpt/viewer_index.zpt	Wed Jul 25 21:52:08 2012 +0200
+++ b/zpt/viewer_index.zpt	Thu Jul 26 19:32:31 2012 +0200
@@ -17,10 +17,10 @@
   <div class="index-image">
     <!-- image -->
     <a tal:define="tp docinfo/titlePage | nothing"
-      tal:attributes="href python:context.getLink('viewMode','auto')"><img
+      tal:attributes="href python:context.getLink(params={'viewMode':'auto','pn':tp})"><img
       tal:condition="tp" border="0"
       tal:attributes="src string:${docinfo/imageURL}&pn=$tp&dw=300&dh=500" /><img
-      tal:condition="not:tp" border="0" src="images/oldbook.png" /></a>
+      tal:condition="python:not tp and exists('here/template/book.png')" border="0" src="template/book.png" /></a>
   </div>
 
   <div class="index-info">
--- a/zpt/viewer_text.zpt	Wed Jul 25 21:52:08 2012 +0200
+++ b/zpt/viewer_text.zpt	Thu Jul 26 19:32:31 2012 +0200
@@ -11,6 +11,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <title tal:content="python:docinfo.get('creator',' ') + ' - ' + docinfo.get('title',' ')" />
 <link rel="stylesheet" href="template/docuviewer_css" type="text/css" />
+<!--[if IE]><link rel="stylesheet" href="template/docuviewer_ie_css" type="text/css" /><![endif]-->
 <script type="text/javascript" tal:attributes="src string:$rootUrl/template/jquery_js"></script>
 <script type="text/javascript">
 	// <!--