From 3428baa3b57b39f2e010254bffede93e7d3cdf37 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Wed, 30 Jul 2014 10:02:31 -0400 Subject: [PATCH] Mirror fix on template --- gogs.go | 2 +- modules/middleware/repo.go | 2 +- public/ng/js/gogs.js | 8 +++++--- templates/.VERSION | 2 +- templates/repo/issue/view.tmpl | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/gogs.go b/gogs.go index 53f96e90f..e55d38728 100644 --- a/gogs.go +++ b/gogs.go @@ -17,7 +17,7 @@ import ( "github.com/gogits/gogs/modules/setting" ) -const APP_VER = "0.4.7.0726 Alpha" +const APP_VER = "0.4.7.0730 Alpha" func init() { runtime.GOMAXPROCS(runtime.NumCPU()) diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go index c3d26c283..bc52cdb62 100644 --- a/modules/middleware/repo.go +++ b/modules/middleware/repo.go @@ -165,7 +165,7 @@ func RepoAssignment(redirect bool, args ...bool) macaron.Handler { ctx.Data["IsRepositoryTrueOwner"] = ctx.Repo.IsTrueOwner if setting.SshPort != 22 { - ctx.Repo.CloneLink.SSH = fmt.Sprintf("ssh://%s@%s/%s/%s.git", setting.RunUser, setting.Domain, u.LowerName, repo.LowerName) + ctx.Repo.CloneLink.SSH = fmt.Sprintf("ssh://%s@%s:%d/%s/%s.git", setting.RunUser, setting.Domain, setting.SshPort, u.LowerName, repo.LowerName) } else { ctx.Repo.CloneLink.SSH = fmt.Sprintf("%s@%s:%s/%s.git", setting.RunUser, setting.Domain, u.LowerName, repo.LowerName) } diff --git a/public/ng/js/gogs.js b/public/ng/js/gogs.js index 68bd279fe..ae2e8712b 100644 --- a/public/ng/js/gogs.js +++ b/public/ng/js/gogs.js @@ -130,15 +130,16 @@ var Gogs = {}; $(window).on('hashchange', function (e) { var m = window.location.hash.match(/^#(L\d+)\-(L\d+)$/); var $list = $('.code-view ol.linenums > li'); + var $first; if (m) { - var $first = $list.filter('.' + m[1]); + $first = $list.filter('.' + m[1]); selectRange($list, $first, $list.filter('.' + m[2])); $("html, body").scrollTop($first.offset().top - 200); return; } m = window.location.hash.match(/^#(L\d+)$/); if (m) { - var $first = $list.filter('.' + m[1]); + $first = $list.filter('.' + m[1]); selectRange($list, $first); $("html, body").scrollTop($first.offset().top - 200); } @@ -211,7 +212,8 @@ function homepage() { function settingsProfile() { // Confirmation of change username in user profile page. $('#user-profile-form').submit(function (e) { - if (($('#username').data('uname') != $('#username').val()) && !confirm('Username has been changed, do you want to continue?')) { + var $username = $('#username'); + if (($username.data('uname') != $username.val()) && !confirm('Username has been changed, do you want to continue?')) { e.preventDefault(); return true; } diff --git a/templates/.VERSION b/templates/.VERSION index a4f4593d7..df7593880 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.4.7.0726 Alpha \ No newline at end of file +0.4.7.0730 Alpha \ No newline at end of file diff --git a/templates/repo/issue/view.tmpl b/templates/repo/issue/view.tmpl index c12de7dd7..3828928aa 100644 --- a/templates/repo/issue/view.tmpl +++ b/templates/repo/issue/view.tmpl @@ -109,7 +109,7 @@
- {{.Poster.Name}} Referenced this issue {{TimeSince .Created}} + {{.Poster.Name}} Referenced this issue {{TimeSince .Created $.Lang}}

{{.ContentHtml}}