+ :
+
+
+
+
+
+
+
+
+
-
-
diff --git a/extensions/firefox/components/PdfStreamConverter.js b/extensions/firefox/components/PdfStreamConverter.js index ab19ef21b..32143a1e5 100644 --- a/extensions/firefox/components/PdfStreamConverter.js +++ b/extensions/firefox/components/PdfStreamConverter.js @@ -315,8 +315,8 @@ ChromeActions.prototype = { pdfBugEnabled: function() { return getBoolPref(PREF_PREFIX + '.pdfBugEnabled', false); }, - searchEnabled: function() { - return getBoolPref(PREF_PREFIX + '.searchEnabled', false); + findEnabled: function() { + return getBoolPref(PREF_PREFIX + '.findEnabled', false); }, fallback: function(url, sendResponse) { var self = this; diff --git a/l10n/ar/viewer.properties b/l10n/ar/viewer.properties index 3ef9c1cd0..d1ceae44e 100644 --- a/l10n/ar/viewer.properties +++ b/l10n/ar/viewer.properties @@ -36,8 +36,8 @@ outline.title=إظهار ملخص المستند outline_label=ملخص المستند thumbs.title=إظهار الصور المصغرة thumbs_label=الصور المصغرة -search_panel.title=البحث في المستند -search_panel_label=بحث +find_panel.title=البحث في المستند +find_panel_label=بحث # Document outline messages no_outline=لا يوجد ملخص @@ -54,9 +54,9 @@ thumb_page_canvas=صورة مصغرة من الصفحة {{page}} page_rotate_cw.label=تدوير مع عقارب الساعة page_rotate_ccw.label=تدوير عكس عقارب الساعة -# Search panel button title and messages -search=بحث -search_terms_not_found=(لا يوجد) +# Find panel button title and messages +find=بحث +find_terms_not_found=(لا يوجد) # Error panel labels error_more_info=مزيد من المعلومات diff --git a/l10n/da/viewer.properties b/l10n/da/viewer.properties index 72e04bb62..90231c7ca 100644 --- a/l10n/da/viewer.properties +++ b/l10n/da/viewer.properties @@ -36,8 +36,8 @@ outline.title=Vis dokumentoversigt outline_label=Dokumentoversigt thumbs.title=Vis thumbnails thumbs_label=Thumbnails -search_panel.title=Søg i dokumentet -search_panel_label=Søg +find_panel.title=Søg i dokumentet +find_panel_label=Søg # Dokumentoversigtsbeskeder no_outline=Ingen dokumentoversigt tilgængelig @@ -51,8 +51,8 @@ thumb_page_title=Side {{page}} thumb_page_canvas=Thumbnail af side {{page}} # Søgepanelet -search=Søg -search_terms_not_found=(Ikke fundet) +find=Søg +find_terms_not_found=(Ikke fundet) # Fejlpanel error_more_info=Mere information diff --git a/l10n/en-US/viewer.properties b/l10n/en-US/viewer.properties index 6afb232e7..8e0ca9879 100644 --- a/l10n/en-US/viewer.properties +++ b/l10n/en-US/viewer.properties @@ -36,8 +36,6 @@ outline.title=Show Document Outline outline_label=Document Outline thumbs.title=Show Thumbnails thumbs_label=Thumbnails -search_panel.title=Search Document -search_panel_label=Search # Document outline messages no_outline=No Outline Available @@ -54,9 +52,15 @@ thumb_page_canvas=Thumbnail of Page {{page}} page_rotate_cw.label=Rotate Clockwise page_rotate_ccw.label=Rotate Counter-Clockwise -# Search panel button title and messages -search=Find -search_terms_not_found=(Not found) +# Find panel button title and messages +find.title=Find in Document +find_label=Find +find_previous.title=Find the previous occurrence of the phrase +find_next.title=Find the next occurrence of the phrase +find_highlight=Highlight all +find_match_case_label=Match case +find_wrapped_to_bottom=Reached end of page, continued from bottom +find_wrapped_to_top=Reached end of page, continued from top # Error panel labels error_more_info=More Information diff --git a/l10n/es/viewer.properties b/l10n/es/viewer.properties index 8485cbf17..bac4cee67 100644 --- a/l10n/es/viewer.properties +++ b/l10n/es/viewer.properties @@ -36,8 +36,8 @@ outline.title=Mostrar esquema del documento outline_label=Esquema del documento thumbs.title=Mostrar miniaturas thumbs_label=Miniaturas -search_panel.title=Buscar en el documento -search_panel_label=Buscar +find_panel.title=Buscar en el documento +find_panel_label=Buscar # Document outline messages no_outline=No hay un esquema disponible @@ -50,9 +50,9 @@ thumb_page_title=Página {{page}} # number. thumb_page_canvas=Miniatura de la página {{page}} -# Search panel button title and messages -search=Buscar -search_terms_not_found=(No encontrado) +# Find panel button title and messages +find=Buscar +find_terms_not_found=(No encontrado) # Error panel labels error_more_info=Más información diff --git a/l10n/fi/viewer.properties b/l10n/fi/viewer.properties index 4cc0ba70e..5fcde5eaf 100644 --- a/l10n/fi/viewer.properties +++ b/l10n/fi/viewer.properties @@ -36,8 +36,8 @@ outline.title=Näytä asiakirjan jäsennys outline_label=Asiakirjan jäsennys thumbs.title=Näytä esikatselukuvat thumbs_label=Esikatselukuvat -search_panel.title=Etsi asiakirjasta -search_panel_label=Etsi +find_panel.title=Etsi asiakirjasta +find_panel_label=Etsi # Document outline messages no_outline=Jäsennystä ei ole tarjolla @@ -50,9 +50,9 @@ thumb_page_title=Sivu {{page}} # number. thumb_page_canvas=Sivun {{page}} esikatselukuva -# Search panel button title and messages -search=Etsi -search_terms_not_found=(Ei löytynyt) +# Find panel button title and messages +find=Etsi +find_terms_not_found=(Ei löytynyt) # Error panel labels error_more_info=Enemmän tietoa diff --git a/l10n/ja/viewer.properties b/l10n/ja/viewer.properties index 33f00ac4c..a79d65940 100644 --- a/l10n/ja/viewer.properties +++ b/l10n/ja/viewer.properties @@ -36,8 +36,8 @@ outline.title=文書の目次 outline_label=文書の目次 thumbs.title=縮小版 thumbs_label=縮小版 -search_panel.title=検索 -search_panel_label=検索 +find_panel.title=検索 +find_panel_label=検索 # Document outline messages no_outline=利用可能な目次はありません @@ -54,9 +54,9 @@ thumb_page_canvas=ページの縮小版 {{page}} page_rotate_cw.label=右回転 page_rotate_ccw.label=左回転 -# Search panel button title and messages -search=検索 -search_terms_not_found=(見つかりませんでした) +# Find panel button title and messages +find=検索 +find_terms_not_found=(見つかりませんでした) # Error panel labels error_more_info=詳細情報 diff --git a/l10n/nl/viewer.properties b/l10n/nl/viewer.properties index 5164862ea..45bbec253 100644 --- a/l10n/nl/viewer.properties +++ b/l10n/nl/viewer.properties @@ -34,8 +34,8 @@ outline.title=Toon document structuur outline_label=Document structuur thumbs.title=Toon miniaturen thumbs_label=Miniaturen -search_panel.title=Doorzoek document -search_panel_label=Zoek +find_panel.title=Doorzoek document +find_panel_label=Zoek # Document outline messages no_outline=Geen structuur beschikbaar @@ -48,9 +48,9 @@ thumb_page_title=Pagina {{page}} # number. thumb_page_canvas=Miniatuur van pagina {{page}} -# Search panel button title and messages -search=Zoek -search_terms_not_found=(Niet gevonden) +# Find panel button title and messages +find=Zoek +find_terms_not_found=(Niet gevonden) # Error panel labels error_more_info=Meer informatie diff --git a/l10n/sv/viewer.properties b/l10n/sv/viewer.properties index 81d4a3958..e09418442 100644 --- a/l10n/sv/viewer.properties +++ b/l10n/sv/viewer.properties @@ -34,8 +34,8 @@ outline.title=Visa dokumentdisposition outline_label=Dokumentdisposition thumbs.title=Visa miniatyrer thumbs_label=Miniatyrer -search_panel.title=Sök i dokumentet -search_panel_label=Sök +find_panel.title=Sök i dokumentet +find_panel_label=Sök # Document outline messages no_outline=Ingen dokumentdisposition tillgänglig @@ -48,9 +48,9 @@ thumb_page_title=Sida {{page}} # number. thumb_page_canvas=Miniatyr av sida {{page}} -# Search panel button title and messages -search=Hitta -search_terms_not_found=(hittades inte) +# Find panel button title and messages +find=Hitta +find_terms_not_found=(hittades inte) # Error panel labels error_more_info=Mer information diff --git a/l10n/zh-TW/viewer.properties b/l10n/zh-TW/viewer.properties index 37dc05951..8d4f642c3 100644 --- a/l10n/zh-TW/viewer.properties +++ b/l10n/zh-TW/viewer.properties @@ -34,8 +34,8 @@ outline.title=顯示文件綱要 outline_label=文件綱要 thumbs.title=顯示縮圖 thumbs_label=縮圖 -search_panel.title=搜索文件 -search_panel_label=搜索 +find_panel.title=搜索文件 +find_panel_label=搜索 # 文件綱要相關訊息 no_outline=無可用的綱要 @@ -51,8 +51,8 @@ page_rotate_cw.label=順時針旋轉 page_rotate_ccw.label=逆時針旋轉 # 搜尋面板按鍵文字及訊息 -search=搜索 -search_terms_not_found=(沒有找到) +find=搜索 +find_terms_not_found=(沒有找到) # 錯誤面板標籤 error_more_info=更多資訊 diff --git a/web/viewer.css b/web/viewer.css index 0f615094a..30877a6d6 100644 --- a/web/viewer.css +++ b/web/viewer.css @@ -245,7 +245,7 @@ html[dir='rtl'] #sidebarContent { 0 1px 1px hsla(0,0%,0%,.1); } -#toolbarViewer { +#toolbarViewer, .findbar { position: relative; height: 32px; background-image: url(images/texture.png), @@ -265,6 +265,65 @@ html[dir='rtl'] #sidebarContent { 0 1px 0 hsla(0,0%,0%,.15), 0 1px 1px hsla(0,0%,0%,.1); } + +.findbar { + top: 32px; + left: 68px; + position: absolute; + z-index: 10000; + height: 20px; + + min-width: 16px; + padding: 3px 6px 3px 6px; + margin: 4px 2px 4px 0; + color: hsl(0,0%,85%); + font-size: 12px; + line-height: 14px; + text-align: left; + cursor: default; +} + +.findbar label { + -webkit-user-select:none; + -moz-user-select:none; +} + +.doorHanger { + border: 1px solid hsla(0,0%,0%,.5); + border-radius: 2px; + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); +} +.doorHanger:after, .doorHanger:before { + bottom: 100%; + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; + pointer-events: none; +} +.doorHanger:after { + border-bottom-color: hsla(0,0%,32%,.99); + border-width: 8px; + left: 16px; + margin-left: -8px; +} +.doorHanger:before { + border-bottom-color: hsla(0,0%,0%,.5); + border-width: 9px; + left: 16px; + margin-left: -9px; +} + +#findMsg { + font-style: italic; + color: #A6B7D0; +} + +.notFound { + background-color: rgb(255, 137, 153); +} + html[dir='ltr'] #toolbarViewerLeft { margin-left: -1px; } @@ -702,7 +761,7 @@ html[dir='rtl'] .toolbarButton.pageDown::before { content: url(images/toolbarButton-viewOutline.png); } -#viewSearch.toolbarButton::before { +#viewFind.toolbarButton::before { display: inline-block; content: url(images/toolbarButton-search.png); } @@ -844,8 +903,7 @@ a:focus > .thumbnail > .thumbnailSelectionRing, margin-left: 20px; } -.outlineItem > a, -#searchResults > a { +.outlineItem > a { text-decoration: none; display: inline-block; min-width: 95%; @@ -861,8 +919,7 @@ a:focus > .thumbnail > .thumbnailSelectionRing, white-space: nowrap; } -.outlineItem > a:hover, -#searchResults > a:hover { +.outlineItem > a:hover { background-color: hsla(0,0%,100%,.02); background-image: -moz-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0)); background-clip: padding-box; @@ -889,7 +946,7 @@ a:focus > .thumbnail > .thumbnailSelectionRing, font-style: italic; } -#searchScrollView { +#findScrollView { position: absolute; top: 10px; bottom: 10px; @@ -897,36 +954,6 @@ a:focus > .thumbnail > .thumbnailSelectionRing, width: 280px; } -#searchToolbar { - padding-left: 0px; - right: 0px; - padding-top: 0px; - padding-bottom: 5px; -} - -#searchToolbar > input { - margin-left: 4px; - width: 124px; -} - -#searchToolbar button { - width: auto; - margin: 0; - padding: 0 6px; - height: 22px; -} - -#searchResults { - overflow: auto; - position: absolute; - top: 30px; - bottom: 0px; - left: 0px; - right: 0; - padding: 4px 4px 0; - font-size: smaller; -} - #sidebarControls { position:absolute; width: 180px; @@ -1069,6 +1096,30 @@ canvas { white-space:pre; } +.textLayer .highlight { + margin: -1px; + padding: 1px; + + background-color: rgba(180, 0, 170, 0.2); + border-radius: 4px; +} + +.textLayer .highlight.begin { + border-radius: 4px 0px 0px 4px; +} + +.textLayer .highlight.end { + border-radius: 0px 4px 4px 0px; +} + +.textLayer .highlight.middle { + border-radius: 0px; +} + +.textLayer .highlight.selected { + background-color: rgba(0, 100, 0, 0.2); +} + /* TODO: file FF bug to support ::-moz-selection:window-inactive so we can override the opaque grey background when the window is inactive; see https://bugzilla.mozilla.org/show_bug.cgi?id=706209 */ @@ -1291,7 +1342,7 @@ canvas { } @media all and (max-width: 600px) { - #toolbarViewerRight { + #toolbarViewerRight, #findbar, #viewFind { display: none; } } diff --git a/web/viewer.html b/web/viewer.html index 70cd8cdb0..7af1d919b 100644 --- a/web/viewer.html +++ b/web/viewer.html @@ -88,35 +88,40 @@ limitations under the License. -