@@ -8,31 +8,28 @@ function hidePDFviewer() {
8
8
}
9
9
}
10
10
11
- function showPDFviewer ( dir , filename ) {
12
- if ( ! showPDFviewer . shown ) {
11
+ function showPDFviewer ( dir , filename ) {
12
+ if ( ! showPDFviewer . shown ) {
13
13
var $iframe ;
14
14
$ ( "#editor" ) . hide ( ) ;
15
15
$ ( '#content table' ) . hide ( ) ;
16
16
$ ( "#controls" ) . hide ( ) ;
17
- var oldcontent = $ ( "#content" ) . html ( ) ;
18
17
var viewer = OC . linkTo ( 'files_pdfviewer' , 'viewer.php' ) + '?dir=' + encodeURIComponent ( dir ) . replace ( / % 2 F / g, '/' ) + '&file=' + encodeURIComponent ( filename ) ;
19
18
$iframe = $ ( '<iframe id="pdframe" style="width:100%;height:100%;display:block;" src="' + viewer + '" /><div id="pdfbar"><a id="close" title="Close">X</a></div>' ) ;
20
- if ( $ ( '#isPublic' ) . val ( ) ) {
19
+ if ( $ ( '#isPublic' ) . val ( ) ) {
21
20
// force the preview to adjust its height
22
21
$ ( '#preview' ) . append ( $iframe ) . css ( { height : '100%' } ) ;
23
- }
24
- else {
22
+ } else {
25
23
$ ( '#content' ) . append ( $iframe ) ;
26
24
}
27
- $ ( "#pageWidthOption" ) . attr ( "selected" , "selected" ) ;
28
- $ ( '#pdfbar' ) . css ( { position :'absolute' , top :'5px ' , right :'5px' } ) ;
25
+ $ ( "#pageWidthOption" ) . attr ( "selected" , "selected" ) ;
26
+ $ ( '#pdfbar' ) . css ( { position :'absolute' , top :'6px ' , right :'5px' } ) ;
29
27
// if a filelist is present, the PDF viewer can be closed to go back there
30
- if ( $ ( '#fileList' ) . length ) {
31
- $ ( '#close' ) . css ( { display :'block' , padding :'0 5px' , color :'#BBBBBB' , 'font-weight' :'900' , height :'18px' , background :'transparent' } ) . click ( function ( ) {
28
+ if ( $ ( '#fileList' ) . length ) {
29
+ $ ( '#close' ) . css ( { display :'block' , padding :'0 5px' , color :'#BBBBBB' , 'font-weight' :'900' , 'font-size' : '16px ', height :'18px' , background :'transparent' } ) . click ( function ( ) {
32
30
hidePDFviewer ( ) ;
33
31
} ) ;
34
- }
35
- else {
32
+ } else {
36
33
$ ( '#close' ) . css ( { display :'none' } ) ;
37
34
}
38
35
}
0 commit comments