mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 17:13:38 -05:00
started making pdf viewer conditional - work in progress
This commit is contained in:
parent
57f4177f30
commit
57b09e1d60
4 changed files with 10 additions and 6 deletions
4
services/web/.gitignore
vendored
4
services/web/.gitignore
vendored
|
@ -46,10 +46,10 @@ TpdsWorker.js
|
||||||
BackgroundJobsWorker.js
|
BackgroundJobsWorker.js
|
||||||
|
|
||||||
public/js/history/versiondetail.js
|
public/js/history/versiondetail.js
|
||||||
!public/js/libs/*
|
!public/js/libs/
|
||||||
public/js/*
|
public/js/*
|
||||||
!public/js/ace/*
|
!public/js/ace/*
|
||||||
!public/js/libs/*
|
!public/js/libs/
|
||||||
public/js/editor.js
|
public/js/editor.js
|
||||||
public/js/home.js
|
public/js/home.js
|
||||||
public/js/forms.js
|
public/js/forms.js
|
||||||
|
|
|
@ -35,7 +35,9 @@ UserSchema = new Schema
|
||||||
compileTimeout: { type:Number, default: Settings.defaultFeatures.compileTimeout }
|
compileTimeout: { type:Number, default: Settings.defaultFeatures.compileTimeout }
|
||||||
compileGroup: { type:String, default: Settings.defaultFeatures.compileGroup }
|
compileGroup: { type:String, default: Settings.defaultFeatures.compileGroup }
|
||||||
}
|
}
|
||||||
featureSwitches : {}
|
featureSwitches : {
|
||||||
|
pdfng: { type: Boolean }
|
||||||
|
}
|
||||||
referal_id : {type:String, default:() -> uuid.v4().split("-")[0]}
|
referal_id : {type:String, default:() -> uuid.v4().split("-")[0]}
|
||||||
refered_users: [ type:ObjectId, ref:'User' ]
|
refered_users: [ type:ObjectId, ref:'User' ]
|
||||||
refered_user_count: { type:Number, default: 0 }
|
refered_user_count: { type:Number, default: 0 }
|
||||||
|
|
|
@ -112,8 +112,10 @@ block content
|
||||||
|
|
||||||
- locals.suppressDefaultJs = true
|
- locals.suppressDefaultJs = true
|
||||||
|
|
||||||
- var fingerprintedPath = fingerprint(jsPath+'libs/pdf.worker.js')
|
- var pdfPath = 'libs/pdf.worker.js'
|
||||||
- var pdfJsWorkerPath = jsPath+'libs/pdf.worker.js?fingerprint='+fingerprintedPath
|
- if (user.featureSwitches && user.featureSwitches.pdfng) { pdfPath = 'libs/pdfjs-1.0.712/pdf.worker.js'; }
|
||||||
|
- var fingerprintedPath = fingerprint(jsPath+pdfPath)
|
||||||
|
- var pdfJsWorkerPath = jsPath+pdfPath+'?fingerprint='+fingerprintedPath
|
||||||
script(type='text/javascript').
|
script(type='text/javascript').
|
||||||
window.pdfJsWorkerPath = "#{pdfJsWorkerPath}";
|
window.pdfJsWorkerPath = "#{pdfJsWorkerPath}";
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ define [
|
||||||
"ide/pdfng/directives/pdfRenderer"
|
"ide/pdfng/directives/pdfRenderer"
|
||||||
"ide/pdfng/directives/pdfPage"
|
"ide/pdfng/directives/pdfPage"
|
||||||
"ide/pdfng/directives/pdfViewer"
|
"ide/pdfng/directives/pdfViewer"
|
||||||
"libs/pdf"
|
"libs/pdfjs-1.0.712/pdf"
|
||||||
"text!libs/pdfListView/TextLayer.css"
|
"text!libs/pdfListView/TextLayer.css"
|
||||||
"text!libs/pdfListView/AnnotationsLayer.css"
|
"text!libs/pdfListView/AnnotationsLayer.css"
|
||||||
"text!libs/pdfListView/HighlightsLayer.css"
|
"text!libs/pdfListView/HighlightsLayer.css"
|
||||||
|
|
Loading…
Reference in a new issue