diff options
author | silverwind <me@silverwind.io> | 2020-01-26 09:17:25 +0100 |
---|---|---|
committer | zeripath <art27@cantab.net> | 2020-01-26 08:17:25 +0000 |
commit | fd094eea959a235654b7591da066dcbbee11fc25 (patch) | |
tree | d5b7029b39a58ceafa168016c03c312b2c792dab /routers | |
parent | 8d51f28ba04980734a04fef645a8065472e6ca63 (diff) | |
download | gitea-fd094eea959a235654b7591da066dcbbee11fc25.tar.gz gitea-fd094eea959a235654b7591da066dcbbee11fc25.zip |
fix commit view JS features, reimplement folding (#9968)
* fix commit view JS features, reimplement folding
File content folding was not working so I reimplemented it in a saner
way. Then I noticed the issue was actually because of missing JS
libraries (seen on the console of every commit with error
'SimpleMDE is not defined').
Fixed the libraries. I think the reimplementation is worth to keep.
* add .closest polyfill
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'routers')
-rw-r--r-- | routers/repo/commit.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/routers/repo/commit.go b/routers/repo/commit.go index cb9727fccc..2e6cd76bb3 100644 --- a/routers/repo/commit.go +++ b/routers/repo/commit.go @@ -206,6 +206,8 @@ func FileHistory(ctx *context.Context) { func Diff(ctx *context.Context) { ctx.Data["PageIsDiff"] = true ctx.Data["RequireHighlightJS"] = true + ctx.Data["RequireSimpleMDE"] = true + ctx.Data["RequireTribute"] = true userName := ctx.Repo.Owner.Name repoName := ctx.Repo.Repository.Name |