diff --git a/build.sbt b/build.sbt index 5838447..d8a31dd 100644 --- a/build.sbt +++ b/build.sbt @@ -1,6 +1,6 @@ val Organization = "io.github.gitbucket" val Name = "gitbucket" -val GitBucketVersion = "4.12.0" +val GitBucketVersion = "4.12.1" val ScalatraVersion = "2.5.0" val JettyVersion = "9.4.4.v20170414" @@ -33,7 +33,7 @@ "org.apache.commons" % "commons-compress" % "1.13", "org.apache.commons" % "commons-email" % "1.4", "org.apache.httpcomponents" % "httpclient" % "4.5.3", - "org.apache.sshd" % "apache-sshd" % "1.4.0", + "org.apache.sshd" % "apache-sshd" % "1.4.0" exclude("org.slf4j","slf4j-jdk14"), "org.apache.tika" % "tika-core" % "1.14", "com.github.takezoe" %% "blocking-slick-32" % "0.0.8", "joda-time" % "joda-time" % "2.9.9", diff --git a/src/main/scala/gitbucket/core/GitBucketCoreModule.scala b/src/main/scala/gitbucket/core/GitBucketCoreModule.scala index b33a909..46fef2e 100644 --- a/src/main/scala/gitbucket/core/GitBucketCoreModule.scala +++ b/src/main/scala/gitbucket/core/GitBucketCoreModule.scala @@ -32,5 +32,6 @@ new Version("4.11.0", new LiquibaseMigration("update/gitbucket-core_4.11.xml") ), - new Version("4.12.0") + new Version("4.12.0"), + new Version("4.12.1") ) diff --git a/src/main/scala/gitbucket/core/controller/ControllerBase.scala b/src/main/scala/gitbucket/core/controller/ControllerBase.scala index de80f97..d79d86d 100644 --- a/src/main/scala/gitbucket/core/controller/ControllerBase.scala +++ b/src/main/scala/gitbucket/core/controller/ControllerBase.scala @@ -147,6 +147,13 @@ } } + override def url(path: String, params: Iterable[(String, Any)] = Iterable.empty, + includeContextPath: Boolean = true, includeServletPath: Boolean = true, + absolutize: Boolean = true, withSessionId: Boolean = true) + (implicit request: HttpServletRequest, response: HttpServletResponse): String = + if (path.startsWith("http")) path + else baseUrl + super.url(path, params, false, false, false) + /** * Extends scalatra-form's trim rule to eliminate CR and LF. */ diff --git a/src/main/twirl/gitbucket/core/helper/preview.scala.html b/src/main/twirl/gitbucket/core/helper/preview.scala.html index 473dcd2..4ec4b09 100644 --- a/src/main/twirl/gitbucket/core/helper/preview.scala.html +++ b/src/main/twirl/gitbucket/core/helper/preview.scala.html @@ -44,6 +44,7 @@ $(function(){ @if(elastic){ $('#content@uid').elastic(); + $('#content@uid').trigger('blur'); } $('#preview@uid').click(function(){