Disable outline button when unavailable
This commit is contained in:
		
							parent
							
								
									5ceac52a6b
								
							
						
					
					
						commit
						6b4f72a2c3
					
				| @ -53,9 +53,6 @@ thumbs_label=الصور المصغرة | |||||||
| findbar.title=البحث في المستند | findbar.title=البحث في المستند | ||||||
| findbar_label=بحث | findbar_label=بحث | ||||||
| 
 | 
 | ||||||
| # Document outline messages |  | ||||||
| no_outline=لا يوجد ملخص |  | ||||||
| 
 |  | ||||||
| # Thumbnails panel item (tooltip and alt text for images) | # Thumbnails panel item (tooltip and alt text for images) | ||||||
| # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page | # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page | ||||||
| # number. | # number. | ||||||
|  | |||||||
| @ -55,9 +55,6 @@ thumbs_label=Miniatures | |||||||
| findbar.title=Cercar en el document | findbar.title=Cercar en el document | ||||||
| findbar_label=Cercar | findbar_label=Cercar | ||||||
| 
 | 
 | ||||||
| # Document outline messages |  | ||||||
| no_outline=No hi ha cap esquema disponible |  | ||||||
| 
 |  | ||||||
| # Thumbnails panel item (tooltip and alt text for images) | # Thumbnails panel item (tooltip and alt text for images) | ||||||
| # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page | # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page | ||||||
| # number. | # number. | ||||||
|  | |||||||
| @ -40,7 +40,6 @@ loading_error=Došlo k chybě při načítání PDF. | |||||||
| rendering_error=Došlo k chybě při vykreslování stránky. | rendering_error=Došlo k chybě při vykreslování stránky. | ||||||
| page_label=Stránka: | page_label=Stránka: | ||||||
| page_of=z{{pageCount}} | page_of=z{{pageCount}} | ||||||
| no_outline=Žádné osnovy k dispozici |  | ||||||
| open_file.title=Otevřít soubor | open_file.title=Otevřít soubor | ||||||
| text_annotation_type=[{{type}}Anotace] | text_annotation_type=[{{type}}Anotace] | ||||||
| toggle_slider_label=Přepnout posuvník | toggle_slider_label=Přepnout posuvník | ||||||
|  | |||||||
| @ -53,9 +53,6 @@ thumbs_label=Thumbnails | |||||||
| findbar.title=Søg i dokumentet | findbar.title=Søg i dokumentet | ||||||
| findbar_label=Søg | findbar_label=Søg | ||||||
| 
 | 
 | ||||||
| # Dokumentoversigtsbeskeder |  | ||||||
| no_outline=Ingen dokumentoversigt tilgængelig |  | ||||||
| 
 |  | ||||||
| # Thumbnails panelet (tooltips og alt. billedtekst) | # Thumbnails panelet (tooltips og alt. billedtekst) | ||||||
| # Oversættelsesnote: "{{page}}" vil blive erstattet af det | # Oversættelsesnote: "{{page}}" vil blive erstattet af det | ||||||
| # egentlige sidetal | # egentlige sidetal | ||||||
|  | |||||||
| @ -53,9 +53,6 @@ thumbs_label=Vorschaubilder | |||||||
| findbar.title=Im Dokument suchen | findbar.title=Im Dokument suchen | ||||||
| findbar_label=Suchen | findbar_label=Suchen | ||||||
| 
 | 
 | ||||||
| # Document outline messages |  | ||||||
| no_outline=Kein Inhaltsverzeichnis verfügbar |  | ||||||
| 
 |  | ||||||
| # Thumbnails panel item (tooltip and alt text for images) | # Thumbnails panel item (tooltip and alt text for images) | ||||||
| # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page | # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page | ||||||
| # number. | # number. | ||||||
|  | |||||||
| @ -53,9 +53,6 @@ thumbs_label=Thumbnails | |||||||
| findbar.title=Find in Document | findbar.title=Find in Document | ||||||
| findbar_label=Find | findbar_label=Find | ||||||
| 
 | 
 | ||||||
| # Document outline messages |  | ||||||
| no_outline=No Outline Available |  | ||||||
| 
 |  | ||||||
| # Thumbnails panel item (tooltip and alt text for images) | # Thumbnails panel item (tooltip and alt text for images) | ||||||
| # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page | # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page | ||||||
| # number. | # number. | ||||||
|  | |||||||
| @ -53,9 +53,6 @@ thumbs_label=Miniaturas | |||||||
| findbar.title=Buscar en el documento | findbar.title=Buscar en el documento | ||||||
| findbar_label=Buscar | findbar_label=Buscar | ||||||
| 
 | 
 | ||||||
| # Document outline messages |  | ||||||
| no_outline=No hay esquema disponible |  | ||||||
| 
 |  | ||||||
| # Thumbnails panel item (tooltip and alt text for images) | # Thumbnails panel item (tooltip and alt text for images) | ||||||
| # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page | # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page | ||||||
| # number. | # number. | ||||||
|  | |||||||
| @ -53,9 +53,6 @@ thumbs_label=Miniaturas | |||||||
| findbar.title=Buscar en el documento | findbar.title=Buscar en el documento | ||||||
| findbar_label=Buscar | findbar_label=Buscar | ||||||
| 
 | 
 | ||||||
| # Document outline messages |  | ||||||
| no_outline=No hay un esquema disponible |  | ||||||
| 
 |  | ||||||
| # Thumbnails panel item (tooltip and alt text for images) | # Thumbnails panel item (tooltip and alt text for images) | ||||||
| # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page | # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page | ||||||
| # number. | # number. | ||||||
|  | |||||||
| @ -53,9 +53,6 @@ thumbs_label=Esikatselukuvat | |||||||
| findbar.title=Etsi asiakirjasta | findbar.title=Etsi asiakirjasta | ||||||
| findbar_label=Etsi | findbar_label=Etsi | ||||||
| 
 | 
 | ||||||
| # Document outline messages |  | ||||||
| no_outline=Jäsennystä ei ole tarjolla |  | ||||||
| 
 |  | ||||||
| # Thumbnails panel item (tooltip and alt text for images) | # Thumbnails panel item (tooltip and alt text for images) | ||||||
| # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page | # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page | ||||||
| # number. | # number. | ||||||
|  | |||||||
| @ -53,9 +53,6 @@ thumbs_label=Vignettes | |||||||
| findbar.title=Rechercher dans le document | findbar.title=Rechercher dans le document | ||||||
| findbar_label=Rechercher | findbar_label=Rechercher | ||||||
| 
 | 
 | ||||||
| # Document outline messages |  | ||||||
| no_outline=Aucun signet disponible |  | ||||||
| 
 |  | ||||||
| # Thumbnails panel item (tooltip and alt text for images) | # Thumbnails panel item (tooltip and alt text for images) | ||||||
| # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page | # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page | ||||||
| # number. | # number. | ||||||
|  | |||||||
| @ -40,7 +40,6 @@ loading_error=אירעה שגיאה בעת טעינת קובץ PDF. | |||||||
| rendering_error=אירעה שגיאה בעת עיבוד הדף. | rendering_error=אירעה שגיאה בעת עיבוד הדף. | ||||||
| page_label=דף: | page_label=דף: | ||||||
| page_of=מתוך {{pageCount}} | page_of=מתוך {{pageCount}} | ||||||
| no_outline=אין מתאר זמין |  | ||||||
| open_file.title=פתיחת קובץ | open_file.title=פתיחת קובץ | ||||||
| text_annotation_type=[{{type}} Annotation] | text_annotation_type=[{{type}} Annotation] | ||||||
| toggle_slider_label=מתג החלקה | toggle_slider_label=מתג החלקה | ||||||
|  | |||||||
| @ -40,6 +40,5 @@ loading_error= | |||||||
| rendering_error=È accaduto un errore durante il rendering della pagina. | rendering_error=È accaduto un errore durante il rendering della pagina. | ||||||
| page_label=Pagina: | page_label=Pagina: | ||||||
| page_of=di {{pageCount}} | page_of=di {{pageCount}} | ||||||
| no_outline=Nessun Indice Disponibile |  | ||||||
| open_file.title=Apri File | open_file.title=Apri File | ||||||
| text_annotation_type=[{{type}} Annotazione] | text_annotation_type=[{{type}} Annotazione] | ||||||
|  | |||||||
| @ -53,9 +53,6 @@ thumbs_label=縮小版 | |||||||
| findbar.title=検索 | findbar.title=検索 | ||||||
| findbar_label=検索 | findbar_label=検索 | ||||||
| 
 | 
 | ||||||
| # Document outline messages |  | ||||||
| no_outline=利用可能な目次はありません |  | ||||||
| 
 |  | ||||||
| # Thumbnails panel item (tooltip and alt text for images) | # Thumbnails panel item (tooltip and alt text for images) | ||||||
| # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page | # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page | ||||||
| # number. | # number. | ||||||
|  | |||||||
| @ -53,9 +53,6 @@ thumbs_label=Miniatiūros | |||||||
| findbar.title=Paieška dokumente | findbar.title=Paieška dokumente | ||||||
| findbar_label=Paieška | findbar_label=Paieška | ||||||
| 
 | 
 | ||||||
| # Document outline messages |  | ||||||
| no_outline=Turinys nėra galimas |  | ||||||
| 
 |  | ||||||
| # Thumbnails panel item (tooltip and alt text for images) | # Thumbnails panel item (tooltip and alt text for images) | ||||||
| # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page | # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page | ||||||
| # number. | # number. | ||||||
|  | |||||||
| @ -53,9 +53,6 @@ thumbs_label=Miniaturen | |||||||
| findbar.title=Zoeken in document | findbar.title=Zoeken in document | ||||||
| findbar_label=Zoeken | findbar_label=Zoeken | ||||||
| 
 | 
 | ||||||
| # Document outline messages |  | ||||||
| no_outline=Geen documentstructuur beschikbaar |  | ||||||
| 
 |  | ||||||
| # Thumbnails panel item (tooltip and alt text for images) | # Thumbnails panel item (tooltip and alt text for images) | ||||||
| # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page | # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page | ||||||
| # number. | # number. | ||||||
|  | |||||||
| @ -53,9 +53,6 @@ thumbs_label=Miniatury | |||||||
| findbar.title=Szukaj w tekście | findbar.title=Szukaj w tekście | ||||||
| findbar_label=Znajdź | findbar_label=Znajdź | ||||||
| 
 | 
 | ||||||
| # Document outline messages |  | ||||||
| no_outline=Konspekt nie jest dostępny |  | ||||||
| 
 |  | ||||||
| # Thumbnails panel item (tooltip and alt text for images) | # Thumbnails panel item (tooltip and alt text for images) | ||||||
| # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page | # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page | ||||||
| # number. | # number. | ||||||
|  | |||||||
| @ -40,6 +40,5 @@ loading_error=Um erro ocorreu ao carregar o arquivo. | |||||||
| rendering_error=Um erro ocorreu ao apresentar a página. | rendering_error=Um erro ocorreu ao apresentar a página. | ||||||
| page_label=Página: | page_label=Página: | ||||||
| page_of=de {{pageCount}} | page_of=de {{pageCount}} | ||||||
| no_outline=Índice não disponível |  | ||||||
| open_file.title=Abrir arquivo | open_file.title=Abrir arquivo | ||||||
| text_annotation_type=[{{type}} Anotações] | text_annotation_type=[{{type}} Anotações] | ||||||
|  | |||||||
| @ -40,7 +40,6 @@ loading_error=S-a produs o eroare în timpul încărcării documentului. | |||||||
| rendering_error=S-a produs o eroare în timpul procesării paginii. | rendering_error=S-a produs o eroare în timpul procesării paginii. | ||||||
| page_label=Pagina: | page_label=Pagina: | ||||||
| page_of=din {{pageCount}} | page_of=din {{pageCount}} | ||||||
| no_outline=Cuprins indisponibil |  | ||||||
| open_file.title=Deschide fișier | open_file.title=Deschide fișier | ||||||
| text_annotation_type=[Adnotare {{type}}] | text_annotation_type=[Adnotare {{type}}] | ||||||
| toggle_slider_label=Vedere de ansamblu | toggle_slider_label=Vedere de ansamblu | ||||||
|  | |||||||
| @ -40,7 +40,6 @@ loading_error=Произошла ошибка во время загрузки P | |||||||
| rendering_error=Произошла ошибка во время создания страницы. | rendering_error=Произошла ошибка во время создания страницы. | ||||||
| page_label=Страница: | page_label=Страница: | ||||||
| page_of=из {{pageCount}} | page_of=из {{pageCount}} | ||||||
| no_outline=Содержание не доступно |  | ||||||
| open_file.title=Открыть файл | open_file.title=Открыть файл | ||||||
| text_annotation_type=[Аннотация {{type}}] | text_annotation_type=[Аннотация {{type}}] | ||||||
| toggle_slider_label=Вспомогательная панель | toggle_slider_label=Вспомогательная панель | ||||||
|  | |||||||
| @ -40,7 +40,6 @@ loading_error=Дошло је до грешке током учитавања П | |||||||
| rendering_error=Дошло је до грешке приликом приказивања стране. | rendering_error=Дошло је до грешке приликом приказивања стране. | ||||||
| page_label=Страна: | page_label=Страна: | ||||||
| page_of=од {{pageCount}} | page_of=од {{pageCount}} | ||||||
| no_outline=Нема линија |  | ||||||
| open_file.title=Отвори датотеку | open_file.title=Отвори датотеку | ||||||
| text_annotation_type=[{{type}} Annotation] | text_annotation_type=[{{type}} Annotation] | ||||||
| toggle_slider_label=Клизач | toggle_slider_label=Клизач | ||||||
|  | |||||||
| @ -53,9 +53,6 @@ thumbs_label=Sidminiatyrer | |||||||
| findbar.title=Sök i dokumentet | findbar.title=Sök i dokumentet | ||||||
| findbar_label=Sök | findbar_label=Sök | ||||||
| 
 | 
 | ||||||
| # Document outline messages |  | ||||||
| no_outline=Inga bokmärken tillgängliga |  | ||||||
| 
 |  | ||||||
| # Thumbnails panel item (tooltip and alt text for images) | # Thumbnails panel item (tooltip and alt text for images) | ||||||
| # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page | # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page | ||||||
| # number. | # number. | ||||||
|  | |||||||
| @ -53,9 +53,6 @@ thumbs_label=Önizleme | |||||||
| findbar.title=Döküman içerisinde bul | findbar.title=Döküman içerisinde bul | ||||||
| findbar_label=Bul | findbar_label=Bul | ||||||
| 
 | 
 | ||||||
| # Document outline messages |  | ||||||
| no_outline=Kenarlık Mevcut Değil |  | ||||||
| 
 |  | ||||||
| # Thumbnails panel item (tooltip and alt text for images) | # Thumbnails panel item (tooltip and alt text for images) | ||||||
| # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page | # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page | ||||||
| # number. | # number. | ||||||
|  | |||||||
| @ -53,9 +53,6 @@ thumbs_label=缩略图 | |||||||
| findbar.title=在该文档内查找 | findbar.title=在该文档内查找 | ||||||
| findbar_label=查找 | findbar_label=查找 | ||||||
| 
 | 
 | ||||||
| # Document outline messages |  | ||||||
| no_outline=没有可用的大纲 |  | ||||||
| 
 |  | ||||||
| # Thumbnails panel item (tooltip and alt text for images) | # Thumbnails panel item (tooltip and alt text for images) | ||||||
| # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page | # LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page | ||||||
| # number. | # number. | ||||||
|  | |||||||
| @ -51,9 +51,6 @@ thumbs_label=縮圖 | |||||||
| findbar.title=在文件中搜尋 | findbar.title=在文件中搜尋 | ||||||
| findbar_label=搜索 | findbar_label=搜索 | ||||||
| 
 | 
 | ||||||
| # 文件綱要相關訊息 |  | ||||||
| no_outline=無可用的綱要 |  | ||||||
| 
 |  | ||||||
| # 縮圖面板項目 (工具提示和圖像的替代文字) | # 縮圖面板項目 (工具提示和圖像的替代文字) | ||||||
| # 本地化提示 (thumb_page_title): "{{page}}" 會被頁數取代。 | # 本地化提示 (thumb_page_title): "{{page}}" 會被頁數取代。 | ||||||
| thumb_page_title=第 {{page}} 頁 | thumb_page_title=第 {{page}} 頁 | ||||||
|  | |||||||
| @ -1061,7 +1061,6 @@ html[dir='rtl'] .outlineItem > a { | |||||||
|   color: hsla(0,0%,100%,1); |   color: hsla(0,0%,100%,1); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .noOutline, |  | ||||||
| .noResults { | .noResults { | ||||||
|   font-size: 12px; |   font-size: 12px; | ||||||
|   color: hsla(0,0%,100%,.8); |   color: hsla(0,0%,100%,.8); | ||||||
|  | |||||||
| @ -1444,6 +1444,7 @@ var PDFView = { | |||||||
|     PDFJS.Promise.all(promises).then(function() { |     PDFJS.Promise.all(promises).then(function() { | ||||||
|       pdfDocument.getOutline().then(function(outline) { |       pdfDocument.getOutline().then(function(outline) { | ||||||
|         self.outline = new DocumentOutlineView(outline); |         self.outline = new DocumentOutlineView(outline); | ||||||
|  |         document.getElementById('viewOutline').disabled = !outline; | ||||||
|       }); |       }); | ||||||
| 
 | 
 | ||||||
|       // Make all navigation keys work on document load,
 |       // Make all navigation keys work on document load,
 | ||||||
| @ -2622,9 +2623,17 @@ var ThumbnailView = function thumbnailView(container, id, defaultViewport) { | |||||||
| 
 | 
 | ||||||
| var DocumentOutlineView = function documentOutlineView(outline) { | var DocumentOutlineView = function documentOutlineView(outline) { | ||||||
|   var outlineView = document.getElementById('outlineView'); |   var outlineView = document.getElementById('outlineView'); | ||||||
|  |   var outlineButton = document.getElementById('viewOutline'); | ||||||
|   while (outlineView.firstChild) |   while (outlineView.firstChild) | ||||||
|     outlineView.removeChild(outlineView.firstChild); |     outlineView.removeChild(outlineView.firstChild); | ||||||
| 
 | 
 | ||||||
|  |   if (!outline) { | ||||||
|  |     if (!outlineView.classList.contains('hidden')) | ||||||
|  |       PDFView.switchSidebarView('thumbs'); | ||||||
|  | 
 | ||||||
|  |     return; | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|   function bindItemLink(domObj, item) { |   function bindItemLink(domObj, item) { | ||||||
|     domObj.href = PDFView.getDestinationHash(item.dest); |     domObj.href = PDFView.getDestinationHash(item.dest); | ||||||
|     domObj.onclick = function documentOutlineViewOnclick(e) { |     domObj.onclick = function documentOutlineViewOnclick(e) { | ||||||
| @ -2633,14 +2642,6 @@ var DocumentOutlineView = function documentOutlineView(outline) { | |||||||
|     }; |     }; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   if (!outline) { |  | ||||||
|     var noOutline = document.createElement('div'); |  | ||||||
|     noOutline.classList.add('noOutline'); |  | ||||||
|     noOutline.textContent = mozL10n.get('no_outline', null, |  | ||||||
|       'No Outline Available'); |  | ||||||
|     outlineView.appendChild(noOutline); |  | ||||||
|     return; |  | ||||||
|   } |  | ||||||
| 
 | 
 | ||||||
|   var queue = [{parent: outlineView, items: outline}]; |   var queue = [{parent: outlineView, items: outline}]; | ||||||
|   while (queue.length > 0) { |   while (queue.length > 0) { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user