From cc3e7197b337c16c5fe7e505847b57541e6cea80 Mon Sep 17 00:00:00 2001 From: Yury Delendik <ydelendik@mozilla.com> Date: Sun, 20 May 2012 17:12:58 -0500 Subject: [PATCH] Replaces browse button with a icon --- l10n/en-US/viewer.properties | 1 + web/images/toolbarButton-openFile.png | Bin 0 -> 708 bytes web/viewer.css | 7 ++++++- web/viewer.html | 6 +----- web/viewer.js | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 web/images/toolbarButton-openFile.png diff --git a/l10n/en-US/viewer.properties b/l10n/en-US/viewer.properties index d0ba6ffac..0922062a6 100644 --- a/l10n/en-US/viewer.properties +++ b/l10n/en-US/viewer.properties @@ -43,3 +43,4 @@ zoom.title=Zoom thumb_page_title=Page {{page}} thumb_page_canvas=Thumbnail of Page {{page}} request_password=PDF is protected by a password: +open_file_label=Open diff --git a/web/images/toolbarButton-openFile.png b/web/images/toolbarButton-openFile.png new file mode 100644 index 0000000000000000000000000000000000000000..12ce45f876b12eef3e5030b492d58d5fbb47ebbf GIT binary patch literal 708 zcmV;#0z3VQP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00004b3#c}2nYxW zd<bNS00009a7bBm0000-0000-0Y?D!vH$=88FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10zpYcK~y-6jZ)8R6G0e#vpc&>T2_|?DW!B>L;_wc?Zu;_6+$X4 zAyT|~3gSQD&4XUWvp4HSiY75A*^4JJ20Zj;57vN9blYWVer?F^X0u_(gN-Cjiv3`i zZyxV^^SzmmFvf6Nq*AHJJkMXLR;%}Sc6Nek95PK{b90j)3<fV378cTyBt>eqTG{iw zjbgFb`maDTnLIZ$GxJVW)f<u|@c<BpA*$8tw{Ew4SJ(9)rwSwziOY(jyj4|ondkX2 zVa6B?!}#eq&ci~X@NtN9BYtnmvix~|etww{GGQwWL&RdSOQI;gNvG2fhBzH2q9{f= zj{9Vqra&pZzPPw}VN}4fETdkpKjJvf_I<xHW+9Ww+@718d$zi|xZTn@4<k9BZ( zcxVfP@SNkg0RS`_jaT`6-lPB!iA3%tlgXutzDHtqcJ_QKm3m4kMYGvNHk<tg;5Ba; z#+E3GHvuS$q96=I?C$PDk|emU3!di@h9L+c=yW<bI5>c1SzwH5g+k#PjYgwa*VorC z?(OZNR4Rc|3PBJM1Oe98)}ScLU$2B<__)XW%J%lQO>Nu$-Rt#MG);r1X%j@x^CmDt z2!bGhZQB*<IL_CjqoWO3mZuU&ZXCmEwc4QBZ02aI)q20bzyBm2kBet5CWN3;skD6G z|3U$LH%-%3RaHD|F(Cx)cDt?Xy2t6d&Ro}Zdc7Wo%kw;po=;-kZWoT@SpO!`_x%s$ qa{11Qub-Uf<6w+&{eJ%i0Q>=rL=?c`huGf$0000<MNUMnLSTY_PdsY? literal 0 HcmV?d00001 diff --git a/web/viewer.css b/web/viewer.css index 92d9f44eb..c5994d334 100644 --- a/web/viewer.css +++ b/web/viewer.css @@ -501,6 +501,11 @@ html[dir='rtl'] .toolbarButton.pageDown::before { content: url(images/toolbarButton-print.png); } +.toolbarButton.openFile::before { + display: inline-block; + content: url(images/toolbarButton-openFile.png); +} + .toolbarButton.download::before { display: inline-block; content: url(images/toolbarButton-download.png); @@ -933,7 +938,7 @@ canvas { } @media all and (max-width: 770px) { - #scaleSelectContainer, #fileInput, #pageNumberLabel { + #scaleSelectContainer, #pageNumberLabel { display: none; } diff --git a/web/viewer.html b/web/viewer.html index 45fb9f040..4a307c7ef 100644 --- a/web/viewer.html +++ b/web/viewer.html @@ -87,14 +87,10 @@ <span id="numPages" class="toolbarLabel"></span> </div> <div id="toolbarViewerRight"> - <input id="fileInput" class="fileInput" type="file" oncontextmenu="return false;" tabindex="10" /> - - <!-- <input id="fileInput" class="fileInput" type="file" oncontextmenu="return false;" style="visibility: hidden; position: fixed; right: 0; top: 0" /> - <button id="openFile" class="toolbarButton print" title="Open File" tabindex="10" data-l10n-id="open_file" onclick="document.getElementById('fileInput').click()"> + <button id="openFile" class="toolbarButton openFile" title="Open File" tabindex="10" data-l10n-id="open_file" onclick="document.getElementById('fileInput').click()"> <span data-l10n-id="open_file_label">Open</span> </button> - --> <!-- <button id="print" class="toolbarButton print" title="Print" tabindex="11" data-l10n-id="print" onclick="window.print()"> diff --git a/web/viewer.js b/web/viewer.js index 44e27f83b..f616b02c9 100644 --- a/web/viewer.js +++ b/web/viewer.js @@ -1366,7 +1366,7 @@ window.addEventListener('load', function webViewerLoad(evt) { if (PDFJS.isFirefoxExtension || !window.File || !window.FileReader || !window.FileList || !window.Blob) { - document.getElementById('fileInput').setAttribute('hidden', 'true'); + document.getElementById('openFile').setAttribute('hidden', 'true'); } else { document.getElementById('fileInput').value = null; }