Skip to content

Commit f7c6257

Browse files
committed
adjust close button position and style
1 parent f58e37a commit f7c6257

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

3rdparty/pdfjs/viewer.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ html[dir='ltr'] #toolbarViewerRight,
501501
html[dir='rtl'] #toolbarViewerLeft {
502502
position: absolute;
503503
top: 0;
504-
right: 0;
504+
right: 25px;
505505
}
506506
html[dir='ltr'] #toolbarViewerLeft > *,
507507
html[dir='ltr'] #toolbarViewerMiddle > *,

js/loader.js

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,28 @@ function hidePDFviewer() {
88
}
99
}
1010

11-
function showPDFviewer(dir,filename){
12-
if(!showPDFviewer.shown){
11+
function showPDFviewer(dir,filename) {
12+
if(!showPDFviewer.shown) {
1313
var $iframe;
1414
$("#editor").hide();
1515
$('#content table').hide();
1616
$("#controls").hide();
17-
var oldcontent = $("#content").html();
1817
var viewer = OC.linkTo('files_pdfviewer', 'viewer.php')+'?dir='+encodeURIComponent(dir).replace(/%2F/g, '/')+'&file='+encodeURIComponent(filename);
1918
$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()) {
2120
// force the preview to adjust its height
2221
$('#preview').append($iframe).css({height: '100%'});
23-
}
24-
else{
22+
} else {
2523
$('#content').append($iframe);
2624
}
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'});
2927
// 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(){
3230
hidePDFviewer();
3331
});
34-
}
35-
else{
32+
} else {
3633
$('#close').css({display:'none'});
3734
}
3835
}

0 commit comments

Comments
 (0)