1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-20 02:48:51 +00:00

Pdf viewer (#5574)

* [pdf viewer] use the latest PDFjs(v3.8.162)

* [pdf viewer] redesigned it: added side panel(thumbnail panel) and bottom bar(includes side panel toggle, 'file page manager', and 'zoom manager')

* [pdf file view] added 'print' to the top-right toolbar
This commit is contained in:
llj
2023-08-09 18:54:58 +08:00
committed by GitHub
parent 780ea56662
commit 542e54ad05
190 changed files with 90909 additions and 12404 deletions

View File

@@ -117,6 +117,13 @@ class FileToolbar extends React.Component {
return (
<Fragment>
<ButtonGroup className="d-none d-md-block">
{fileType == 'PDF' && (
<IconButton
id="seafile-pdf-print"
icon="fa fa-print"
text={gettext('Print')}
/>
)}
<IconButton
id="open-parent-folder"
icon="fa fa-folder-open"
@@ -195,9 +202,9 @@ class FileToolbar extends React.Component {
</DropdownItem>
)}
{filePerm == 'rw' && (
<a href={`${siteRoot}repo/file_revisions/${repoID}/?p=${encodeURIComponent(filePath)}&referer=${encodeURIComponent(location.href)}`} className="dropdown-item">
{gettext('History')}
</a>
<a href={`${siteRoot}repo/file_revisions/${repoID}/?p=${encodeURIComponent(filePath)}&referer=${encodeURIComponent(location.href)}`} className="dropdown-item">
{gettext('History')}
</a>
)}
</DropdownMenu>
</ButtonDropdown>

View File

@@ -3,25 +3,35 @@ import { gettext } from '../utils/constants';
class PDFViewer extends React.Component {
componentDidMount() {
const el = document.createElement('div');
el.id = 'printContainer';
document.body.append(el);
}
render() {
return (
<React.Fragment>
<div id="outerContainer">
<div id="sidebarContainer" className="sf-hide">
<div id="sidebarContainer">
<div id="toolbarSidebar">
<div id="toolbarSidebarLeft">
<div className="splitToolbarButton toggled">
<button id="viewThumbnail" className="toolbarButton toggled" title="Show Thumbnails" tabIndex="2" data-l10n-id="thumbs">
<div id="thumbnails-header" className="p-4 d-flex justify-content-between">
<h3 className="m-0 title font-weight-normal">{gettext('Thumbnail')}</h3>
<button id="close-thumbnail-panel" className="close-thumbnail-panel sf2-icon-x3 border-0 bg-transparent" aria-controls="sidebarContainer"></button>
</div>
<div id="toolbarSidebarLeft" className="sf-hide">
<div id="sidebarViewButtons" className="splitToolbarButton toggled" role="radiogroup">
<button id="viewThumbnail" className="toolbarButton toggled" title="Show Thumbnails" tabIndex="2" data-l10n-id="thumbs" role="radio" aria-checked="true" aria-controls="thumbnailView">
<span data-l10n-id="thumbs_label">Thumbnails</span>
</button>
<button id="viewOutline" className="toolbarButton" title="Show Document Outline (double-click to expand/collapse all items)" tabIndex="3" data-l10n-id="document_outline">
<button id="viewOutline" className="toolbarButton" title="Show Document Outline (double-click to expand/collapse all items)" tabIndex="3" data-l10n-id="document_outline" role="radio" aria-checked="false" aria-controls="outlineView">
<span data-l10n-id="document_outline_label">Document Outline</span>
</button>
<button id="viewAttachments" className="toolbarButton" title="Show Attachments" tabIndex="4" data-l10n-id="attachments">
<button id="viewAttachments" className="toolbarButton" title="Show Attachments" tabIndex="4" data-l10n-id="attachments" role="radio" aria-checked="false" aria-controls="attachmentsView">
<span data-l10n-id="attachments_label">Attachments</span>
</button>
<button id="viewLayers" className="toolbarButton" title="Show Layers (double-click to reset all layers to the default state)" tabIndex="5" data-l10n-id="layers">
<button id="viewLayers" className="toolbarButton" title="Show Layers (double-click to reset all layers to the default state)" tabIndex="5" data-l10n-id="layers" role="radio" aria-checked="false" aria-controls="layersView">
<span data-l10n-id="layers_label">Layers</span>
</button>
</div>
@@ -49,18 +59,18 @@ class PDFViewer extends React.Component {
</div>
<div id="sidebarResizer"></div>
</div>
{/* <!-- sidebarContainer --> */}
{/*<!-- sidebarContainer -->*/}
<div id="mainContainer">
<div className="findbar hidden doorHanger sf-hide" id="findbar">
<div className="findbar hidden doorHanger" id="findbar">
<div id="findbarInputContainer">
<input id="findInput" className="toolbarField" title="Find" placeholder="Find in document…" tabIndex="91" data-l10n-id="find_input" />
<input id="findInput" className="toolbarField" title="Find" placeholder="Find in document…" tabIndex="91" data-l10n-id="find_input" aria-invalid="false" />
<div className="splitToolbarButton">
<button id="findPrevious" className="toolbarButton findPrevious" title="Find the previous occurrence of the phrase" tabIndex="92" data-l10n-id="find_previous">
<button id="findPrevious" className="toolbarButton" title="Find the previous occurrence of the phrase" tabIndex="92" data-l10n-id="find_previous">
<span data-l10n-id="find_previous_label">Previous</span>
</button>
<div className="splitToolbarButtonSeparator"></div>
<button id="findNext" className="toolbarButton findNext" title="Find the next occurrence of the phrase" tabIndex="93" data-l10n-id="find_next">
<button id="findNext" className="toolbarButton" title="Find the next occurrence of the phrase" tabIndex="93" data-l10n-id="find_next">
<span data-l10n-id="find_next_label">Next</span>
</button>
</div>
@@ -68,98 +78,142 @@ class PDFViewer extends React.Component {
<div id="findbarOptionsOneContainer">
<input type="checkbox" id="findHighlightAll" className="toolbarField" tabIndex="94" />
<label htmlFor="findHighlightAll" className="toolbarLabel" data-l10n-id="find_highlight">Highlight all</label>
<label htmlFor="findHighlightAll" className="toolbarLabel" data-l10n-id="find_highlight">Highlight All</label>
<input type="checkbox" id="findMatchCase" className="toolbarField" tabIndex="95" />
<label htmlFor="findMatchCase" className="toolbarLabel" data-l10n-id="find_match_case_label">Match case</label>
<label htmlFor="findMatchCase" className="toolbarLabel" data-l10n-id="find_match_case_label">Match Case</label>
</div>
<div id="findbarOptionsTwoContainer">
<input type="checkbox" id="findEntireWord" className="toolbarField" tabIndex="96" />
<label htmlFor="findEntireWord" className="toolbarLabel" data-l10n-id="find_entire_word_label">Whole words</label>
<span id="findResultsCount" className="toolbarLabel hidden"></span>
<input type="checkbox" id="findMatchDiacritics" className="toolbarField" tabIndex="96" />
<label htmlFor="findMatchDiacritics" className="toolbarLabel" data-l10n-id="find_match_diacritics_label">Match Diacritics</label>
<input type="checkbox" id="findEntireWord" className="toolbarField" tabIndex="97" />
<label htmlFor="findEntireWord" className="toolbarLabel" data-l10n-id="find_entire_word_label">Whole Words</label>
</div>
<div id="findbarMessageContainer">
<div id="findbarMessageContainer" aria-live="polite">
<span id="findResultsCount" className="toolbarLabel"></span>
<span id="findMsg" className="toolbarLabel"></span>
</div>
</div>
{/*<!-- findbar -->*/}
<div id="secondaryToolbar" className="secondaryToolbar hidden doorHangerRight sf-hide">
<div id="secondaryToolbarButtonContainer">
<button id="secondaryPresentationMode" className="secondaryToolbarButton presentationMode visibleLargeView" title="Switch to Presentation Mode" tabIndex="51" data-l10n-id="presentation_mode">
<span data-l10n-id="presentation_mode_label">Presentation Mode</span>
</button>
<div className="editorParamsToolbar hidden doorHangerRight" id="editorFreeTextParamsToolbar">
<div className="editorParamsToolbarContainer">
<div className="editorParamsSetter">
<label htmlFor="editorFreeTextColor" className="editorParamsLabel" data-l10n-id="editor_free_text_color">Color</label>
<input type="color" id="editorFreeTextColor" className="editorParamsColor" tabIndex="100" />
</div>
<div className="editorParamsSetter">
<label htmlFor="editorFreeTextFontSize" className="editorParamsLabel" data-l10n-id="editor_free_text_size">Size</label>
<input type="range" id="editorFreeTextFontSize" className="editorParamsSlider" defaultValue="10" min="5" max="100" step="1" tabIndex="101" />
</div>
</div>
</div>
<button id="secondaryOpenFile" className="secondaryToolbarButton openFile visibleLargeView" title="Open File" tabIndex="52" data-l10n-id="open_file">
<div className="editorParamsToolbar hidden doorHangerRight" id="editorInkParamsToolbar">
<div className="editorParamsToolbarContainer">
<div className="editorParamsSetter">
<label htmlFor="editorInkColor" className="editorParamsLabel" data-l10n-id="editor_ink_color">Color</label>
<input type="color" id="editorInkColor" className="editorParamsColor" tabIndex="102" />
</div>
<div className="editorParamsSetter">
<label htmlFor="editorInkThickness" className="editorParamsLabel" data-l10n-id="editor_ink_thickness">Thickness</label>
<input type="range" id="editorInkThickness" className="editorParamsSlider" defaultValue="1" min="1" max="20" step="1" tabIndex="103" />
</div>
<div className="editorParamsSetter">
<label htmlFor="editorInkOpacity" className="editorParamsLabel" data-l10n-id="editor_ink_opacity">Opacity</label>
<input type="range" id="editorInkOpacity" className="editorParamsSlider" defaultValue="100" min="1" max="100" step="1" tabIndex="104" />
</div>
</div>
</div>
<div id="secondaryToolbar" className="secondaryToolbar hidden doorHangerRight">
<div id="secondaryToolbarButtonContainer">
<button id="secondaryOpenFile" className="secondaryToolbarButton visibleLargeView" title="Open File" tabIndex="51" data-l10n-id="open_file">
<span data-l10n-id="open_file_label">Open</span>
</button>
<button id="secondaryPrint" className="secondaryToolbarButton print visibleMediumView" title="Print" tabIndex="53" data-l10n-id="print">
<button id="secondaryPrint" className="secondaryToolbarButton visibleMediumView" title="Print" tabIndex="52" data-l10n-id="print">
<span data-l10n-id="print_label">Print</span>
</button>
<button id="secondaryDownload" className="secondaryToolbarButton download visibleMediumView" title="Download" tabIndex="54" data-l10n-id="download">
<span data-l10n-id="download_label">Download</span>
<button id="secondaryDownload" className="secondaryToolbarButton visibleMediumView" title="Save" tabIndex="53" data-l10n-id="save">
<span data-l10n-id="save_label">Save</span>
</button>
<a href="#" id="secondaryViewBookmark" className="secondaryToolbarButton bookmark visibleSmallView" title="Current view (copy or open in new window)" tabIndex="55" data-l10n-id="bookmark">
<span data-l10n-id="bookmark_label">Current View</span>
</a>
<div className="horizontalToolbarSeparator visibleLargeView"></div>
<button id="firstPage" className="secondaryToolbarButton firstPage" title="Go to First Page" tabIndex="56" data-l10n-id="first_page">
<button id="presentationMode" className="secondaryToolbarButton" title="Switch to Presentation Mode" tabIndex="54" data-l10n-id="presentation_mode">
<span data-l10n-id="presentation_mode_label">Presentation Mode</span>
</button>
<a href="#" id="viewBookmark" className="secondaryToolbarButton" title="Current Page (View URL from Current Page)" tabIndex="55" data-l10n-id="bookmark1">
<span data-l10n-id="bookmark1_label">Current Page</span>
</a>
<div id="viewBookmarkSeparator" className="horizontalToolbarSeparator"></div>
{/*
<button id="firstPage" className="secondaryToolbarButton" title="Go to First Page" tabIndex="56" data-l10n-id="first_page">
<span data-l10n-id="first_page_label">Go to First Page</span>
</button>
<button id="lastPage" className="secondaryToolbarButton lastPage" title="Go to Last Page" tabIndex="57" data-l10n-id="last_page">
<button id="lastPage" className="secondaryToolbarButton" title="Go to Last Page" tabIndex="57" data-l10n-id="last_page">
<span data-l10n-id="last_page_label">Go to Last Page</span>
</button>
*/}
<div className="horizontalToolbarSeparator"></div>
<button id="pageRotateCw" className="secondaryToolbarButton rotateCw" title="Rotate Clockwise" tabIndex="58" data-l10n-id="page_rotate_cw">
<button id="pageRotateCw" className="secondaryToolbarButton" title="Rotate Clockwise" tabIndex="58" data-l10n-id="page_rotate_cw">
<span data-l10n-id="page_rotate_cw_label">Rotate Clockwise</span>
</button>
<button id="pageRotateCcw" className="secondaryToolbarButton rotateCcw" title="Rotate Counterclockwise" tabIndex="59" data-l10n-id="page_rotate_ccw">
<button id="pageRotateCcw" className="secondaryToolbarButton" title="Rotate Counterclockwise" tabIndex="59" data-l10n-id="page_rotate_ccw">
<span data-l10n-id="page_rotate_ccw_label">Rotate Counterclockwise</span>
</button>
<div className="horizontalToolbarSeparator"></div>
<button id="cursorSelectTool" className="secondaryToolbarButton selectTool toggled" title="Enable Text Selection Tool" tabIndex="60" data-l10n-id="cursor_text_select_tool">
<span data-l10n-id="cursor_text_select_tool_label">Text Selection Tool</span>
</button>
<button id="cursorHandTool" className="secondaryToolbarButton handTool" title="Enable Hand Tool" tabIndex="61" data-l10n-id="cursor_hand_tool">
<span data-l10n-id="cursor_hand_tool_label">Hand Tool</span>
</button>
<div id="cursorToolButtons" role="radiogroup">
<button id="cursorSelectTool" className="secondaryToolbarButton toggled" title="Enable Text Selection Tool" tabIndex="60" data-l10n-id="cursor_text_select_tool" role="radio" aria-checked="true">
<span data-l10n-id="cursor_text_select_tool_label">Text Selection Tool</span>
</button>
<button id="cursorHandTool" className="secondaryToolbarButton" title="Enable Hand Tool" tabIndex="61" data-l10n-id="cursor_hand_tool" role="radio" aria-checked="false">
<span data-l10n-id="cursor_hand_tool_label">Hand Tool</span>
</button>
</div>
<div className="horizontalToolbarSeparator"></div>
<button id="scrollVertical" className="secondaryToolbarButton scrollModeButtons scrollVertical toggled" title="Use Vertical Scrolling" tabIndex="62" data-l10n-id="scroll_vertical">
<span data-l10n-id="scroll_vertical_label">Vertical Scrolling</span>
</button>
<button id="scrollHorizontal" className="secondaryToolbarButton scrollModeButtons scrollHorizontal" title="Use Horizontal Scrolling" tabIndex="63" data-l10n-id="scroll_horizontal">
<span data-l10n-id="scroll_horizontal_label">Horizontal Scrolling</span>
</button>
<button id="scrollWrapped" className="secondaryToolbarButton scrollModeButtons scrollWrapped" title="Use Wrapped Scrolling" tabIndex="64" data-l10n-id="scroll_wrapped">
<span data-l10n-id="scroll_wrapped_label">Wrapped Scrolling</span>
</button>
<div id="scrollModeButtons" role="radiogroup">
<button id="scrollPage" className="secondaryToolbarButton" title="Use Page Scrolling" tabIndex="62" data-l10n-id="scroll_page" role="radio" aria-checked="false">
<span data-l10n-id="scroll_page_label">Page Scrolling</span>
</button>
<button id="scrollVertical" className="secondaryToolbarButton toggled" title="Use Vertical Scrolling" tabIndex="63" data-l10n-id="scroll_vertical" role="radio" aria-checked="true">
<span data-l10n-id="scroll_vertical_label" >Vertical Scrolling</span>
</button>
<button id="scrollHorizontal" className="secondaryToolbarButton" title="Use Horizontal Scrolling" tabIndex="64" data-l10n-id="scroll_horizontal" role="radio" aria-checked="false">
<span data-l10n-id="scroll_horizontal_label">Horizontal Scrolling</span>
</button>
<button id="scrollWrapped" className="secondaryToolbarButton" title="Use Wrapped Scrolling" tabIndex="65" data-l10n-id="scroll_wrapped" role="radio" aria-checked="false">
<span data-l10n-id="scroll_wrapped_label">Wrapped Scrolling</span>
</button>
</div>
<div className="horizontalToolbarSeparator scrollModeButtons"></div>
<div className="horizontalToolbarSeparator"></div>
<button id="spreadNone" className="secondaryToolbarButton spreadModeButtons spreadNone toggled" title="Do not join page spreads" tabIndex="65" data-l10n-id="spread_none">
<span data-l10n-id="spread_none_label">No Spreads</span>
</button>
<button id="spreadOdd" className="secondaryToolbarButton spreadModeButtons spreadOdd" title="Join page spreads starting with odd-numbered pages" tabIndex="66" data-l10n-id="spread_odd">
<span data-l10n-id="spread_odd_label">Odd Spreads</span>
</button>
<button id="spreadEven" className="secondaryToolbarButton spreadModeButtons spreadEven" title="Join page spreads starting with even-numbered pages" tabIndex="67" data-l10n-id="spread_even">
<span data-l10n-id="spread_even_label">Even Spreads</span>
</button>
<div id="spreadModeButtons" role="radiogroup">
<button id="spreadNone" className="secondaryToolbarButton toggled" title="Do not join page spreads" tabIndex="66" data-l10n-id="spread_none" role="radio" aria-checked="true">
<span data-l10n-id="spread_none_label">No Spreads</span>
</button>
<button id="spreadOdd" className="secondaryToolbarButton" title="Join page spreads starting with odd-numbered pages" tabIndex="67" data-l10n-id="spread_odd" role="radio" aria-checked="false">
<span data-l10n-id="spread_odd_label">Odd Spreads</span>
</button>
<button id="spreadEven" className="secondaryToolbarButton" title="Join page spreads starting with even-numbered pages" tabIndex="68" data-l10n-id="spread_even" role="radio" aria-checked="false">
<span data-l10n-id="spread_even_label">Even Spreads</span>
</button>
</div>
<div className="horizontalToolbarSeparator spreadModeButtons"></div>
<div className="horizontalToolbarSeparator"></div>
<button id="documentProperties" className="secondaryToolbarButton documentProperties" title="Document Properties…" tabIndex="68" data-l10n-id="document_properties">
<button id="documentProperties" className="secondaryToolbarButton" title="Document Properties…" tabIndex="69" data-l10n-id="document_properties" aria-controls="documentPropertiesDialog">
<span data-l10n-id="document_properties_label">Document Properties</span>
</button>
</div>
@@ -169,57 +223,71 @@ class PDFViewer extends React.Component {
<div className="toolbar">
<div id="toolbarContainer">
<div id="toolbarViewer">
<div id="toolbarViewerLeft" className="sf-hide">
<div id="toolbarViewerLeft">
<button id="sidebarToggle" className="toolbarButton" title="Toggle Sidebar" tabIndex="11" data-l10n-id="toggle_sidebar" aria-expanded="false" aria-controls="sidebarContainer">
<span data-l10n-id="toggle_sidebar_label">Toggle Sidebar</span>
</button>
<div className="toolbarButtonSpacer"></div>
<button id="viewFind" className="toolbarButton" title="Find in Document" tabIndex="12" data-l10n-id="findbar" aria-expanded="false" aria-controls="findbar">
<div className="toolbarButtonSpacer d-none"></div>
<button id="viewFind" className="toolbarButton d-none" title="Find in Document" tabIndex="12" data-l10n-id="findbar" aria-expanded="false" aria-controls="findbar">
<span data-l10n-id="findbar_label">Find</span>
</button>
<div className="splitToolbarButton hiddenSmallView">
<button className="toolbarButton pageUp" title="Previous Page" id="previous" tabIndex="13" data-l10n-id="previous">
<div className="splitToolbarButton hiddenSmallView ml-2 d-flex align-items-center">
<div className="splitToolbarButtonSeparator mr-2"></div>
<button id="firstPage" className="toolbarButton" title="Go to First Page" tabIndex="56" data-l10n-id="first_page">
<span data-l10n-id="first_page_label">Go to First Page</span>
</button>
<button className="toolbarButton" title="Previous Page" id="previous" tabIndex="13" data-l10n-id="previous">
<span data-l10n-id="previous_label">Previous</span>
</button>
<div className="splitToolbarButtonSeparator"></div>
<button className="toolbarButton pageDown" title="Next Page" id="next" tabIndex="14" data-l10n-id="next">
<input type="number" id="pageNumber" className="toolbarField" title="Page" defaultValue="1" min="1" tabIndex="15" data-l10n-id="page" autoComplete="off" />
<span id="numPages" className="toolbarLabel"></span>
<button className="toolbarButton" title="Next Page" id="next" tabIndex="14" data-l10n-id="next">
<span data-l10n-id="next_label">Next</span>
</button>
<button id="lastPage" className="toolbarButton" title="Go to Last Page" tabIndex="57" data-l10n-id="last_page">
<span data-l10n-id="last_page_label">Go to Last Page</span>
</button>
</div>
<input type="number" id="pageNumber" className="toolbarField pageNumber" title="Page" defaultValue="1" size="4" min="1" tabIndex="15" data-l10n-id="page" autoComplete="off" />
<span id="numPages" className="toolbarLabel"></span>
</div>
<div id="toolbarViewerRight" className="sf-hide">
<button id="presentationMode" className="toolbarButton presentationMode hiddenLargeView" title="Switch to Presentation Mode" tabIndex="31" data-l10n-id="presentation_mode">
<span data-l10n-id="presentation_mode_label">Presentation Mode</span>
</button>
<button id="openFile" className="toolbarButton openFile hiddenLargeView" title="Open File" tabIndex="32" data-l10n-id="open_file">
<button id="openFile" className="toolbarButton hiddenLargeView" title="Open File" tabIndex="31" data-l10n-id="open_file">
<span data-l10n-id="open_file_label">Open</span>
</button>
<button id="print" className="toolbarButton print hiddenMediumView" title="Print" tabIndex="33" data-l10n-id="print">
<button id="print" className="toolbarButton hiddenMediumView" title="Print" tabIndex="32" data-l10n-id="print">
<span data-l10n-id="print_label">Print</span>
</button>
<button id="download" className="toolbarButton download hiddenMediumView" title="Download" tabIndex="34" data-l10n-id="download">
<span data-l10n-id="download_label">Download</span>
<button id="download" className="toolbarButton hiddenMediumView" title="Save" tabIndex="33" data-l10n-id="save">
<span data-l10n-id="save_label">Save</span>
</button>
<a href="#" id="viewBookmark" className="toolbarButton bookmark hiddenSmallView" title="Current view (copy or open in new window)" tabIndex="35" data-l10n-id="bookmark">
<span data-l10n-id="bookmark_label">Current View</span>
</a>
<div className="verticalToolbarSeparator hiddenSmallView"></div>
<div className="verticalToolbarSeparator hiddenMediumView"></div>
<button id="secondaryToolbarToggle" className="toolbarButton" title="Tools" tabIndex="36" data-l10n-id="tools" aria-expanded="false" aria-controls="secondaryToolbar">
<div id="editorModeButtons" className="splitToolbarButton toggled" role="radiogroup">
<button id="editorFreeText" className="toolbarButton" disabled="disabled" title="Text" role="radio" aria-checked="false" aria-controls="editorFreeTextParamsToolbar" tabIndex="34" data-l10n-id="editor_free_text2">
<span data-l10n-id="editor_free_text2_label">Text</span>
</button>
<button id="editorInk" className="toolbarButton" disabled="disabled" title="Draw" role="radio" aria-checked="false" aria-controls="editorInkParamsToolbar" tabIndex="35" data-l10n-id="editor_ink2">
<span data-l10n-id="editor_ink2_label">Draw</span>
</button>
</div>
<div id="editorModeSeparator" className="verticalToolbarSeparator"></div>
<button id="secondaryToolbarToggle" className="toolbarButton" title="Tools" tabIndex="48" data-l10n-id="tools" aria-expanded="false" aria-controls="secondaryToolbar">
<span data-l10n-id="tools_label">Tools</span>
</button>
</div>
<div id="toolbarViewerMiddle" className="d-none">
<div className="splitToolbarButton">
<div id="toolbarViewerMiddle" className="d-flex align-items-center">
<div className="splitToolbarButton float-none">
<button id="zoomOut" className="toolbarButton" title="Zoom Out" tabIndex="21" data-l10n-id="zoom_out">
<span data-l10n-id="zoom_out_label">Zoom Out</span>
</button>
<div className="splitToolbarButtonSeparator d-none"></div>
</div>
<span id="scaleSelectContainer" className="dropdownToolbarButton">
<select id="scaleSelect" title="Zoom" tabIndex="23" data-l10n-id="zoom" defaultValue="auto">
<div id="scaleSelectContainer" className="dropdownToolbarButton my-0 mx-1 float-none">
<select id="scaleSelect" title="Zoom" tabIndex="23" data-l10n-id="zoom" defaultValue="auto" className="bg-white border rounded py-0 px-1">
<option id="pageAutoOption" title="" value="auto" data-l10n-id="page_scale_auto">Automatic Zoom</option>
<option id="pageActualOption" title="" value="page-actual" data-l10n-id="page_scale_actual">Actual Size</option>
<option id="pageFitOption" title="" value="page-fit" data-l10n-id="page_scale_fit">Page Fit</option>
@@ -234,12 +302,17 @@ class PDFViewer extends React.Component {
<option title="" value="3" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 300 }'>300%</option>
<option title="" value="4" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 400 }'>400%</option>
</select>
</span>
</div>
<div className="splitToolbarButton float-none">
<button id="zoomIn" className="toolbarButton" title="Zoom In" tabIndex="22" data-l10n-id="zoom_in">
<span data-l10n-id="zoom_in_label">Zoom In</span>
</button>
</div>
</div>
</div>
<div id="loadingBar">
<span className="loading-icon loading-tip"></span>
<div className="progress hidden">
<div className="progress">
<div className="glimmer">
</div>
</div>
@@ -247,124 +320,108 @@ class PDFViewer extends React.Component {
</div>
</div>
<div className="d-flex flex-column" id="zoom-toolbar">
<button id="restoreToAuto" title={gettext('Default Size')} aria-label={gettext('Default Size')} className="sf3-font sf3-font-page-size btn btn-icon rounded mb-4"></button>
<button id="zoomIn" className="toolbarButton zoomIn sf3-font sf3-font-enlarge btn btn-icon rounded mb-2" title={gettext('Zoom In')} aria-label={gettext('Zoom In')} tabIndex="22"></button>
<button id="zoomOut" className="toolbarButton zoomOut sf3-font sf3-font-narrow btn btn-icon rounded" title={gettext('Zoom Out')} aria-label={gettext('Zoom Out')} tabIndex="21"></button>
</div>
<div id="viewerContainer" tabIndex="0">
<div id="viewer" className="pdfViewer"></div>
</div>
<div id="errorWrapper" hidden={true}>
<div id="errorMessageLeft">
<span id="errorMessage"></span>
<button id="errorShowMore" data-l10n-id="error_more_info">
More Information
</button>
<button id="errorShowLess" data-l10n-id="error_less_info" hidden={true}>
Less Information
</button>
</div>
<div id="errorMessageRight">
<button id="errorClose" data-l10n-id="error_close">
Close
</button>
</div>
<div className="clearBoth"></div>
<textarea id="errorMoreInfo" hidden={true} readOnly={true}></textarea>
</div>
</div>
{/*<!-- mainContainer -->*/}
<div id="overlayContainer" className="hidden">
<div id="passwordOverlay" className="container hidden">
<div className="dialog">
<div className="row">
<p id="passwordText" data-l10n-id="password_label">Enter the password to open this PDF file:</p>
</div>
<div className="row">
<input type="password" id="password" className="toolbarField" />
</div>
<div className="buttonRow">
<button id="passwordCancel" className="overlayButton"><span data-l10n-id="password_cancel">Cancel</span></button>
<button id="passwordSubmit" className="overlayButton"><span data-l10n-id="password_ok">OK</span></button>
</div>
<div id="dialogContainer">
<dialog id="passwordDialog">
<div className="row">
<label htmlFor="password" id="passwordText" data-l10n-id="password_label">Enter the password to open this PDF file:</label>
</div>
</div>
<div id="documentPropertiesOverlay" className="container hidden">
<div className="dialog">
<div className="row">
<span data-l10n-id="document_properties_file_name">File name:</span> <p id="fileNameField">-</p>
</div>
<div className="row">
<span data-l10n-id="document_properties_file_size">File size:</span> <p id="fileSizeField">-</p>
</div>
<div className="separator"></div>
<div className="row">
<span data-l10n-id="document_properties_title">Title:</span> <p id="titleField">-</p>
</div>
<div className="row">
<span data-l10n-id="document_properties_author">Author:</span> <p id="authorField">-</p>
</div>
<div className="row">
<span data-l10n-id="document_properties_subject">Subject:</span> <p id="subjectField">-</p>
</div>
<div className="row">
<span data-l10n-id="document_properties_keywords">Keywords:</span> <p id="keywordsField">-</p>
</div>
<div className="row">
<span data-l10n-id="document_properties_creation_date">Creation Date:</span> <p id="creationDateField">-</p>
</div>
<div className="row">
<span data-l10n-id="document_properties_modification_date">Modification Date:</span> <p id="modificationDateField">-</p>
</div>
<div className="row">
<span data-l10n-id="document_properties_creator">Creator:</span> <p id="creatorField">-</p>
</div>
<div className="separator"></div>
<div className="row">
<span data-l10n-id="document_properties_producer">PDF Producer:</span> <p id="producerField">-</p>
</div>
<div className="row">
<span data-l10n-id="document_properties_version">PDF Version:</span> <p id="versionField">-</p>
</div>
<div className="row">
<span data-l10n-id="document_properties_page_count">Page Count:</span> <p id="pageCountField">-</p>
</div>
<div className="row">
<span data-l10n-id="document_properties_page_size">Page Size:</span> <p id="pageSizeField">-</p>
</div>
<div className="separator"></div>
<div className="row">
<span data-l10n-id="document_properties_linearized">Fast Web View:</span> <p id="linearizedField">-</p>
</div>
<div className="buttonRow">
<button id="documentPropertiesClose" className="overlayButton"><span data-l10n-id="document_properties_close">Close</span></button>
</div>
<div className="row">
<input type="password" id="password" className="toolbarField" />
</div>
</div>
<div id="printServiceOverlay" className="container hidden sf-hide">
<div className="dialog">
<div className="row">
<span data-l10n-id="print_progress_message">Preparing document for printing</span>
</div>
<div className="row">
<progress value="0" max="100"></progress>
<span data-l10n-id="print_progress_percent" data-l10n-args='{ "progress": 0 }' className="relative-progress">0%</span>
</div>
<div className="buttonRow">
<button id="printCancel" className="overlayButton"><span data-l10n-id="print_progress_close">Cancel</span></button>
</div>
<div className="buttonRow">
<button id="passwordCancel" className="dialogButton"><span data-l10n-id="password_cancel">Cancel</span></button>
<button id="passwordSubmit" className="dialogButton"><span data-l10n-id="password_ok">OK</span></button>
</div>
</div>
</dialog>
<dialog id="documentPropertiesDialog">
<div className="row">
<span id="fileNameLabel" data-l10n-id="document_properties_file_name">File name:</span>
<p id="fileNameField" aria-labelledby="fileNameLabel">-</p>
</div>
<div className="row">
<span id="fileSizeLabel" data-l10n-id="document_properties_file_size">File size:</span>
<p id="fileSizeField" aria-labelledby="fileSizeLabel">-</p>
</div>
<div className="separator"></div>
<div className="row">
<span id="titleLabel" data-l10n-id="document_properties_title">Title:</span>
<p id="titleField" aria-labelledby="titleLabel">-</p>
</div>
<div className="row">
<span id="authorLabel" data-l10n-id="document_properties_author">Author:</span>
<p id="authorField" aria-labelledby="authorLabel">-</p>
</div>
<div className="row">
<span id="subjectLabel" data-l10n-id="document_properties_subject">Subject:</span>
<p id="subjectField" aria-labelledby="subjectLabel">-</p>
</div>
<div className="row">
<span id="keywordsLabel" data-l10n-id="document_properties_keywords">Keywords:</span>
<p id="keywordsField" aria-labelledby="keywordsLabel">-</p>
</div>
<div className="row">
<span id="creationDateLabel" data-l10n-id="document_properties_creation_date">Creation Date:</span>
<p id="creationDateField" aria-labelledby="creationDateLabel">-</p>
</div>
<div className="row">
<span id="modificationDateLabel" data-l10n-id="document_properties_modification_date">Modification Date:</span>
<p id="modificationDateField" aria-labelledby="modificationDateLabel">-</p>
</div>
<div className="row">
<span id="creatorLabel" data-l10n-id="document_properties_creator">Creator:</span>
<p id="creatorField" aria-labelledby="creatorLabel">-</p>
</div>
<div className="separator"></div>
<div className="row">
<span id="producerLabel" data-l10n-id="document_properties_producer">PDF Producer:</span>
<p id="producerField" aria-labelledby="producerLabel">-</p>
</div>
<div className="row">
<span id="versionLabel" data-l10n-id="document_properties_version">PDF Version:</span>
<p id="versionField" aria-labelledby="versionLabel">-</p>
</div>
<div className="row">
<span id="pageCountLabel" data-l10n-id="document_properties_page_count">Page Count:</span>
<p id="pageCountField" aria-labelledby="pageCountLabel">-</p>
</div>
<div className="row">
<span id="pageSizeLabel" data-l10n-id="document_properties_page_size">Page Size:</span>
<p id="pageSizeField" aria-labelledby="pageSizeLabel">-</p>
</div>
<div className="separator"></div>
<div className="row">
<span id="linearizedLabel" data-l10n-id="document_properties_linearized">Fast Web View:</span>
<p id="linearizedField" aria-labelledby="linearizedLabel">-</p>
</div>
<div className="buttonRow">
<button id="documentPropertiesClose" className="dialogButton"><span data-l10n-id="document_properties_close">Close</span></button>
</div>
</dialog>
<dialog id="printServiceDialog" style={{minWidth: '200px'}}>
<div className="row">
<span data-l10n-id="print_progress_message">Preparing document for printing</span>
</div>
<div className="row">
<progress value="0" max="100"></progress>
<span data-l10n-id="print_progress_percent" data-l10n-args='{ "progress": 0 }' className="relative-progress">0%</span>
</div>
<div className="buttonRow">
<button id="printCancel" className="dialogButton"><span data-l10n-id="print_progress_close">Cancel</span></button>
</div>
</dialog>
</div>
{/*<!-- overlayContainer -->*/}
{/*<!-- dialogContainer -->*/}
</div>
{/*<!-- outerContainer -->*/}
<div id="printContainer" className="sf-hide"></div>
{/*<div id="printContainer"></div>*/}
<input type="file" id="fileInput" className="hidden" />
</React.Fragment>
);
}

View File

@@ -109,7 +109,7 @@ class SharedFileView extends React.Component {
{ loginUser && <Account /> }
</div>
<div className="shared-file-view-md-main">
<div className={`shared-file-view-head ${fileType == 'md' ? 'w-100 px-4' : ''}`}>
<div className={`shared-file-view-head ${(fileType == 'md' || fileType == 'pdf') ? 'w-100 px-4' : ''}`}>
<div className="float-left">
<h2 className="ellipsis" title={fileName}>{fileName}</h2>
{zipped ?

View File

@@ -6,6 +6,7 @@ body {
}
.file-view-header {
padding: 4px 10px;
background: #fff;
border-bottom: 1px solid #c9c9c9;
flex-shrink: 0;
}

View File

@@ -1,47 +1,43 @@
.pdf-file-view {
overflow:hidden;
position:relative;
overflow: hidden;
position: relative;
}
/* for pdf online file view */
.pdf-file-view.file-view-content {
border: 0;
}
.sf-hide {
height:0;
overflow:hidden;
}
.hidden {
display: none !important;
height: 0;
overflow: hidden;
}
#outerContainer,
#mainContainer,
#viewerContainer {
position:absolute;
top:0;
bottom:0;
left:0;
right:0;
}
#viewerContainer {
padding: 30px 0 15px;
overflow: auto;
}
#viewerContainer:focus {
outline:none;
}
#zoom-toolbar {
position: absolute;
right: 2rem;
bottom: 2rem;
z-index: 1030;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
#zoom-toolbar .btn-icon {
box-shadow: 0 2px 4px 0 rgba(0,0,0, 0.1);
#viewerContainer {
padding: 10px 0 32px;
overflow: auto;
}
.page {
#viewerContainer:focus {
outline: none;
}
.pdfViewer .page {
position: relative;
background: #fff;
border: none;
box-shadow: 0 0 6px #ccc;
margin: 0 auto 20px;
margin: 0 auto 10px;
}
.page .loading-icon {
@@ -50,290 +46,23 @@
left: 50%;
}
#fileInput {
display: none;
}
/*
* the following lines are copied from web/viewer.css
* modification:
* - replaced `var(...)` with its result
* - modified some 'z-index'
*/
/* textLayer starts */
.textLayer {
position: absolute;
text-align: initial;
left: 0;
top: 0;
/* the following lines overwrite lines from web/viewer.css */
#toolbarViewerMiddle {
left: auto;
right: 0;
bottom: 0;
overflow: hidden;
opacity: 0.2;
line-height: 1;
transform: none;
}
.textLayer span,
.textLayer br {
color: transparent;
position: absolute;
white-space: pre;
cursor: text;
transform-origin: 0% 0%;
select#scaleSelect {
background: #fff;
height: 24px;
font-size: 12px;
}
.textLayer .highlight {
margin: -1px;
padding: 1px;
background-color: rgba(180, 0, 170, 1);
border-radius: 4px;
#scaleSelectContainer::after {
top: 4px;
}
.textLayer .highlight.appended {
position: initial;
}
.textLayer .highlight.begin {
border-radius: 4px 0 0 4px;
}
.textLayer .highlight.end {
border-radius: 0 4px 4px 0;
}
.textLayer .highlight.middle {
border-radius: 0;
}
.textLayer .highlight.selected {
background-color: rgba(0, 100, 0, 1);
}
.textLayer ::-moz-selection {
background: rgba(0, 0, 255, 1);
}
.textLayer ::selection {
background: rgba(0, 0, 255, 1);
}
.textLayer .endOfContent {
display: block;
position: absolute;
left: 0;
top: 100%;
right: 0;
bottom: 0;
z-index: -1;
cursor: default;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
.textLayer .endOfContent.active {
top: 0;
}
/* textLayer ends */
/* annotationLayer starts */
.annotationLayer section {
position: absolute;
text-align: initial;
}
.annotationLayer .linkAnnotation > a,
.annotationLayer .buttonWidgetAnnotation.pushButton > a {
position: absolute;
font-size: 1em;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.annotationLayer .linkAnnotation > a:hover,
.annotationLayer .buttonWidgetAnnotation.pushButton > a:hover {
opacity: 0.2;
background: rgba(255, 255, 0, 1);
box-shadow: 0 2px 10px rgba(255, 255, 0, 1);
}
.annotationLayer .textAnnotation img {
position: absolute;
cursor: pointer;
}
.annotationLayer .textWidgetAnnotation input,
.annotationLayer .textWidgetAnnotation textarea,
.annotationLayer .choiceWidgetAnnotation select,
.annotationLayer .buttonWidgetAnnotation.checkBox input,
.annotationLayer .buttonWidgetAnnotation.radioButton input {
background-color: rgba(0, 54, 255, 0.13);
border: 1px solid transparent;
box-sizing: border-box;
font-size: 9px;
height: 100%;
margin: 0;
padding: 0 3px;
vertical-align: top;
width: 100%;
}
.annotationLayer .choiceWidgetAnnotation select option {
padding: 0;
}
.annotationLayer .buttonWidgetAnnotation.radioButton input {
border-radius: 50%;
}
.annotationLayer .textWidgetAnnotation textarea {
font: message-box;
font-size: 9px;
resize: none;
}
.annotationLayer .textWidgetAnnotation input[disabled],
.annotationLayer .textWidgetAnnotation textarea[disabled],
.annotationLayer .choiceWidgetAnnotation select[disabled],
.annotationLayer .buttonWidgetAnnotation.checkBox input[disabled],
.annotationLayer .buttonWidgetAnnotation.radioButton input[disabled] {
background: none;
border: 1px solid transparent;
cursor: not-allowed;
}
.annotationLayer .textWidgetAnnotation input:hover,
.annotationLayer .textWidgetAnnotation textarea:hover,
.annotationLayer .choiceWidgetAnnotation select:hover,
.annotationLayer .buttonWidgetAnnotation.checkBox input:hover,
.annotationLayer .buttonWidgetAnnotation.radioButton input:hover {
border: 1px solid rgba(0, 0, 0, 1);
}
.annotationLayer .textWidgetAnnotation input:focus,
.annotationLayer .textWidgetAnnotation textarea:focus,
.annotationLayer .choiceWidgetAnnotation select:focus {
background: none;
border: 1px solid transparent;
}
.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,
.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after,
.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before {
background-color: rgba(0, 0, 0, 1);
content: "";
display: block;
position: absolute;
}
.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,
.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after {
height: 80%;
left: 45%;
width: 1px;
}
.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before {
transform: rotate(45deg);
}
.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after {
transform: rotate(-45deg);
}
.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before {
border-radius: 50%;
height: 50%;
left: 30%;
top: 20%;
width: 50%;
}
.annotationLayer .textWidgetAnnotation input.comb {
font-family: monospace;
padding-left: 2px;
padding-right: 0;
}
.annotationLayer .textWidgetAnnotation input.comb:focus {
/*
* Letter spacing is placed on the right side of each character. Hence, the
* letter spacing of the last character may be placed outside the visible
* area, causing horizontal scrolling. We avoid this by extending the width
* when the element has focus and revert this when it loses focus.
*/
width: 103%;
}
.annotationLayer .buttonWidgetAnnotation.checkBox input,
.annotationLayer .buttonWidgetAnnotation.radioButton input {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
padding: 0;
}
.annotationLayer .popupWrapper {
position: absolute;
width: 20em;
}
.annotationLayer .popup {
position: absolute;
z-index: 200;
max-width: 20em;
background-color: rgba(255, 255, 153, 1);
box-shadow: 0 2px 5px rgba(136, 136, 136, 1);
border-radius: 2px;
padding: 6px;
margin-left: 5px;
cursor: pointer;
font: message-box;
font-size: 9px;
white-space: normal;
word-wrap: break-word;
}
.annotationLayer .popup > * {
font-size: 9px;
}
.annotationLayer .popup h1 {
display: inline-block;
}
.annotationLayer .popup span {
display: inline-block;
margin-left: 5px;
}
.annotationLayer .popup p {
border-top: 1px solid rgba(51, 51, 51, 1);
margin-top: 2px;
padding-top: 2px;
}
.annotationLayer .highlightAnnotation,
.annotationLayer .underlineAnnotation,
.annotationLayer .squigglyAnnotation,
.annotationLayer .strikeoutAnnotation,
.annotationLayer .freeTextAnnotation,
.annotationLayer .lineAnnotation svg line,
.annotationLayer .squareAnnotation svg rect,
.annotationLayer .circleAnnotation svg ellipse,
.annotationLayer .polylineAnnotation svg polyline,
.annotationLayer .polygonAnnotation svg polygon,
.annotationLayer .caretAnnotation,
.annotationLayer .inkAnnotation svg polyline,
.annotationLayer .stampAnnotation,
.annotationLayer .fileAttachmentAnnotation {
cursor: pointer;
}
/* annotationLayer ends */
/* errorWrapper starts */
#errorWrapper {
background: #ff6e6e;
@@ -345,135 +74,125 @@
z-index: 998; /* for seahub */
padding: 3px 6px;
}
#errorMessageLeft {
float: left;
}
#errorMessageRight {
float: right;
}
#errorMoreInfo {
background-color: #fff;
color: #060606;
border: 1px solid #bbbbbc;
padding: 3px;
margin: 3px;
width: 98%;
}
.clearBoth {
clear: both;
}
/* errorWrapper ends */
/* toolbar, which contains 'loadingBar' */
/* toolbar */
.toolbar {
position: relative;
position: absolute;
left: 0;
right: 0;
bottom: 0;
/*z-index: 9999;*/
z-index: 998; /* 1048: for seahub 'file view' */
cursor: default;
}
#toolbarContainer {
width: 100%;
box-shadow: none;
border-top: 1px solid #c9c9c9;
height: auto;
}
#loadingBar {
height: 0;
}
input#pageNumber {
font-size: 12px;
height: 20px;
padding: 0 5px;
margin: 0 0 0 9px;
}
#numPages.toolbarLabel {
margin: 0;
padding: 0 7px;
}
/* toolbar ends */
/* loadingBar starts */
#loadingBar {
position: absolute;
/*height: 4px;*/
height: 0; /* for seahub */
background-color: #ededf0;
border-bottom: 1px solid #ccc;
transition-duration: 200ms;
transition-timing-function: ease;
}
html[dir="ltr"] #loadingBar {
transition-property: left;
left: 0;
right: 0;
}
html[dir="rtl"] #loadingBar {
transition-property: right;
left: 0;
right: 0;
}
#loadingBar .loading-icon {
position: fixed;
top: 50%;
left: 50%;
}
#loadingBar .progress {
/* sidebar starts */
#sidebarContainer {
position: absolute;
top: 0;
left: 0;
width: 0%;
height: 100%;
background-color: #0a84ff;
overflow: hidden;
transition: width 200ms;
bottom: 0;
border-top: none;
background: #fff;
}
@-webkit-keyframes progressIndeterminate {
0% {
left: -142px;
}
100% {
left: 0;
}
#toolbarSidebar {
height: auto;
background: #fff;
}
@keyframes progressIndeterminate {
0% {
left: -142px;
}
100% {
left: 0;
}
#thumbnailView {
width: 100%;
padding: 0;
}
#loadingBar .progress.indeterminate {
background-color: #ddddde;
transition: none;
#thumbnails-header {
}
#loadingBar .progress.indeterminate .glimmer {
#thumbnails-header .title {
font-size: 1rem;
}
#thumbnails-header .sf2-icon-x3 {
font-family: 'seafile-font2';
}
#thumbnails-header .close-thumbnail-panel {
font-size: 1rem;
color: #999;
}
#thumbnails-header .close-thumbnail-panel:hover {
color: #555;
}
#thumbnailView .thumbnail {
float: none;
max-width: unset;
max-height: unset;
width: auto;
height: auto;
padding: 10px 0;
border: none;
border-radius: unset;
margin: 0 1px 0 0;
text-align: center;
}
#thumbnailView .thumbnail.selected {
background: #f0f0f0;
}
#thumbnailView .thumbnail .thumbnail-page-number {
font-size: .875rem;
color: #999;
position: absolute;
top: 0;
left: 0;
height: 100%;
width: calc(100% + 150px);
background: repeating-linear-gradient(
135deg,
#74b1ef 0,
#28282b 5px,
#28282b 45px,
#0a84ff 55px,
#0a84ff 95px,
#74b1ef 100px
);
-webkit-animation: progressIndeterminate 1s linear infinite;
animation: progressIndeterminate 1s linear infinite;
right: 100%;
bottom: 0;
}
/* loadingBar ends */
#thumbnailView .thumbnail .thumbnailImage {
border: 1px solid #ddd;
border-radius: 3px;
}
#thumbnailView .thumbnail.selected .thumbnailImage {
border: 2px solid #ff9800;
}
#sidebarContent {
inset-block: 51.5px 0;
}
.splitToolbarButton > .toolbarButton {
float: none;
}
/* sidebar ends */
/* overlay, passwordOverlay */
.overlayButton {
width: auto;
margin: 3px 4px 2px !important;
padding: 2px 11px;
color: #0c0c0d;
background-color: rgba(12, 12, 13, 0.1);
border: 0 none !important;
}
#overlayContainer {
display: table;
position: absolute;
@@ -484,64 +203,8 @@ html[dir="rtl"] #loadingBar {
z-index: 999; /* 1049: for seahub 'share' dialog */
}
#overlayContainer > * {
overflow: auto;
-webkit-overflow-scrolling: touch;
@media print {
#wrapper {
display: none;
}
}
#overlayContainer > .container {
display: table-cell;
vertical-align: middle;
text-align: center;
}
#overlayContainer > .container > .dialog {
display: inline-block;
padding: 15px;
border-spacing: 4px;
color: #0c0c0d;
font-size: 12px;
line-height: 14px;
background-color: #fff;
border: 1px solid rgba(0, 0, 0, 0.5);
border-radius: 4px;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.dialog > .row {
display: table-row;
}
.dialog > .row > * {
display: table-cell;
}
.dialog .toolbarField {
margin: 5px 0;
}
.dialog .separator {
display: block;
margin: 4px 0;
height: 1px;
width: 100%;
background-color: rgba(0, 0, 0, 0.3);
}
.dialog .buttonRow {
text-align: center;
vertical-align: middle;
}
.dialog :link {
color: rgba(255, 255, 255, 1);
}
#passwordOverlay > .dialog {
text-align: center;
}
#passwordOverlay .toolbarField {
width: 200px;
}
/* overlay ends */

View File

@@ -21,8 +21,9 @@
.shared-file-view-head {
width: 950px;
margin: 0 auto;
height: 60px;
background: #fff;
margin: 0 auto;
display: flex;
align-items:center;
justify-content: space-between;

View File

@@ -10,7 +10,7 @@ const { err } = window.shared.pageOptions;
class SharedFileViewPDF extends React.Component {
render() {
return <SharedFileView content={<FileContent />} />;
return <SharedFileView content={<FileContent />} fileType="pdf" />;
}
}