]> _ Git - fluidbook-html5.git/commitdiff
(no commit message)
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 16 Oct 2013 11:47:34 +0000 (11:47 +0000)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 16 Oct 2013 11:47:34 +0000 (11:47 +0000)
js/libs/fluidbook/fluidbook.js

index abbb733f42f2f5155ba1516339ef2b5e7b458772..76007dbb480d811f256c0b976863053882667e77 100644 (file)
@@ -1240,14 +1240,22 @@ Fluidbook.prototype = {
        },\r
        print: function() {\r
                var $this = this;\r
-               var pdf = getBaseURL() + '/data/' + this.datas.pdfName;\r
+               var pdf;\r
+               var pdfName;\r
+               if (this.datas.pdfName.substr(0, 4) == 'http') {\r
+                       pdf = this.datas.pdfName;\r
+               } else {\r
+                       pdf = getBaseURL() + '/data/' + this.datas.pdfName;\r
+               }\r
+               var e = pdf.split('/');\r
+               pdfName = e.pop();\r
                if (this.gal) {\r
                        this.displayLoader();\r
                        this.gal.downloadAndCall('extras', function() {\r
-                               $this._openFile(pdf, $("#print"), 'pdf', $this.datas.pdfName);\r
+                               $this._openFile(pdf, $("#print"), 'pdf', pdfName);\r
                        });\r
                } else {\r
-                       this._openFile(pdf, $("#print"), 'pdf', this.datas.pdfName);\r
+                       this._openFile(pdf, $("#print"), 'pdf', pdfName);\r
                }\r
        },\r
        _openFile: function(url, e, type, localname) {\r