aboutsummaryrefslogtreecommitdiffstats
path: root/public/ng/js
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-07-30 10:02:31 -0400
committerUnknwon <joe2010xtmf@163.com>2014-07-30 10:02:31 -0400
commit3428baa3b57b39f2e010254bffede93e7d3cdf37 (patch)
treeae00317132d79955fcd0d3bda6b7196b0d45574a /public/ng/js
parent645c194a007fbffc2966d77948cf4fa1dad2db4e (diff)
downloadgitea-3428baa3b57b39f2e010254bffede93e7d3cdf37.tar.gz
gitea-3428baa3b57b39f2e010254bffede93e7d3cdf37.zip
Mirror fix on template
Diffstat (limited to 'public/ng/js')
-rw-r--r--public/ng/js/gogs.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/public/ng/js/gogs.js b/public/ng/js/gogs.js
index 68bd279fef..ae2e8712b4 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;
}