mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-11 22:41:38 +00:00
Fix view so that bib preview only shows for bib files
This commit is contained in:
parent
78e52d8c96
commit
8621d497b4
2 changed files with 2 additions and 5 deletions
|
@ -19,10 +19,7 @@ div.binary-file.full-size(
|
||||||
onabort="sl_binaryFilePreviewError()"
|
onabort="sl_binaryFilePreviewError()"
|
||||||
)
|
)
|
||||||
|
|
||||||
p(
|
div(ng-if="(['bib'].indexOf(extension(openFile)) > -1) && !bibtex.error", ng-init="loadBibtexFilePreview()")
|
||||||
ng-if="(['bib'].indexOf(extension(openFile)) > -1) && !bibtex.error"
|
|
||||||
ng-init="loadBibtexFilePreview()"
|
|
||||||
)
|
|
||||||
div(ng-if="bibtex.loading")
|
div(ng-if="bibtex.loading")
|
||||||
| #{translate('loading')}...
|
| #{translate('loading')}...
|
||||||
div.bib-preview(ng-if="!bibtex.loading && !bibtex.error")
|
div.bib-preview(ng-if="!bibtex.loading && !bibtex.error")
|
||||||
|
|
|
@ -41,7 +41,7 @@ define [
|
||||||
guide = document.querySelector('.file-tree-inner')
|
guide = document.querySelector('.file-tree-inner')
|
||||||
table_wrap = document.querySelector('.bib-preview .scroll-container')
|
table_wrap = document.querySelector('.bib-preview .scroll-container')
|
||||||
if table_wrap
|
if table_wrap
|
||||||
desired_height = guide.offsetHeight - 60
|
desired_height = guide.offsetHeight - 44
|
||||||
if table_wrap.offsetHeight > desired_height
|
if table_wrap.offsetHeight > desired_height
|
||||||
table_wrap.style.height = desired_height + 'px'
|
table_wrap.style.height = desired_height + 'px'
|
||||||
table_wrap.style['max-height'] = desired_height + 'px'
|
table_wrap.style['max-height'] = desired_height + 'px'
|
||||||
|
|
Loading…
Reference in a new issue