From ef70e69416586798cd170391ec076101cb7c9517 Mon Sep 17 00:00:00 2001 From: Van Date: Thu, 25 Sep 2014 16:03:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=8C=E5=87=BB=E5=9D=90=E6=A0=87=E6=89=93?= =?UTF-8?q?=E5=BC=80=20goline?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/css/base.css | 4 ++++ static/js/editors.js | 2 +- static/js/wide.js | 9 ++++++++- view/index.html | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) 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 @@