changeset 386:48d27e100d19

*** empty log message ***
author abukhman
date Thu, 28 Oct 2010 17:44:20 +0200
parents 7a6a2e4476eb
children 580db757e0eb
files MpdlXmlTextServer.py documentViewer.py
diffstat 2 files changed, 25 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/MpdlXmlTextServer.py	Tue Oct 26 18:47:20 2010 +0200
+++ b/MpdlXmlTextServer.py	Thu Oct 28 17:44:20 2010 +0200
@@ -183,16 +183,31 @@
         """Show and Save different Pages as PDF in Options"""
         selfurl=self.absolute_url()
         pn=pageinfo['current']
-        viewmode =pageinfo['viewMode']
-        text = self.getServerData("page-fragment.xql", "document=%s&mode=%s&pn=%s&export=%s"(docinfo['textURLPath'],mode, pn,'pdf'))
-        dom =Parse(text)
-        logging.debug("dom :%s"%(dom))
-        return dom
+        
+        viewMode =pageinfo['viewMode']
         
+        #text = ("page-fragment.xql","document=%s&mode=%s&pn=%s&export=%s"%(docinfo['textURLPath'], 'text',  pn,'pdf'))
+        #text = self.getServerData("page-fragment.xql", "document=%s&mode=%s&pn=%s&export=%s"(docinfo['textURLPath'],'text', pn,'pdf'))
+        #logging.debug("text :%s"%(text))
+        #dom =Parse(text)
+        #logging.debug("text :%s"%(text))
+        #return text
+     
+    def getBrowserType(self):
+        """get browser type object"""
+        if self.REQUEST.SESSION.has_key('browserType'):
+            return self.REQUEST.SESSION['browserType']
+        else:
+            bt = browserCheck(self)
+            self.REQUEST.SESSION.set('browserType', bt)    
+            logging.debug("documentViewer (BROWSER TYPE) bt %s"%bt)                    
+            return bt
+   
         
     def getOrigPages (self, docinfo=None, pageinfo=None):
         """Show original page """
         docpath = docinfo['textURLPath'] 
+        logging.debug ("docinfo['textURLPath']=%s"%(docinfo['textURLPath']))
         #url = docinfo['url']
         selfurl = self.absolute_url()
         pn =pageinfo['current']
--- a/documentViewer.py	Tue Oct 26 18:47:20 2010 +0200
+++ b/documentViewer.py	Thu Oct 28 17:44:20 2010 +0200
@@ -181,6 +181,10 @@
     def getQuery(self, **args):
         """get query"""
         return self.template.fulltextclient.getQuery(**args)
+    
+    def getPDF(self, **args):
+        """get query"""
+        return self.template.fulltextclient.getPDF(**args)
 
     def getSearch(self, **args):
         """get search"""
@@ -662,7 +666,7 @@
         presentationUrls = dom.xpath("//texttool/presentation")
         docinfo = self.getBibinfoFromIndexMeta(url, docinfo=docinfo, dom=dom)   # get info von bib tag
         docinfo = self.getNameFromIndexMeta(url, docinfo=docinfo, dom=dom)
-        #docinfo =self.getOrigPages(docinfo=docinfo)
+        
         
         if presentationUrls and (len(presentationUrls) > 0): # ueberschreibe diese durch presentation informationen 
              # presentation url ergiebt sich ersetzen von index.meta in der url der fuer die Metadaten