diff --git a/static/css/base.css b/static/css/base.css index dd575c5..398ab7d 100644 --- a/static/css/base.css +++ b/static/css/base.css @@ -309,6 +309,10 @@ ul { line-height: 18px; } +.footer .cursor { + cursor: pointer; +} + .notification-count { float: right; display: none; diff --git a/static/js/editors.js b/static/js/editors.js index 12591b2..b9f2f76 100644 --- a/static/js/editors.js +++ b/static/js/editors.js @@ -279,7 +279,7 @@ var editors = { editor.on('cursorActivity', function (cm) { var cursor = cm.getCursor(); - $("#footer-cursor").text('| ' + (cursor.line + 1) + ':' + (cursor.ch + 1) + ' |'); + $(".footer .cursor").text('| ' + (cursor.line + 1) + ':' + (cursor.ch + 1) + ' |'); // TODO: 关闭 tab 的时候要重置 }); diff --git a/static/js/wide.js b/static/js/wide.js index 43d96db..eab121f 100644 --- a/static/js/wide.js +++ b/static/js/wide.js @@ -199,7 +199,7 @@ var wide = { }, "ok": function () { var line = parseInt($("#dialogGoLinePrompt > input").val()); - if ($.trim(line) === "") { + if ($.trim($("#dialogGoLinePrompt > input").val()) === "") { $("#dialogGoLinePrompt > .tip").text(config.label.input_no_empty); return false; } @@ -376,7 +376,14 @@ var wide = { } }); }, + _initFooter: function () { + $(".footer .cursor").dblclick(function () { + $("#dialogGoLinePrompt").dialog("open"); + }); + }, init: function () { + this._initFooter(); + this._initFullscreen(); this._initWS(); diff --git a/view/index.html b/view/index.html index 8184fd5..070ff1c 100644 --- a/view/index.html +++ b/view/index.html @@ -167,7 +167,7 @@