双击坐标打开 goline

This commit is contained in:
Van 2014-09-25 16:03:14 +08:00
parent f4e1f0f9fc
commit ef70e69416
4 changed files with 14 additions and 3 deletions

View File

@ -309,6 +309,10 @@ ul {
line-height: 18px;
}
.footer .cursor {
cursor: pointer;
}
.notification-count {
float: right;
display: none;

View File

@ -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 的时候要重置
});

View File

@ -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();

View File

@ -167,7 +167,7 @@
<div class="footer fn-clear">
<span title="{{.i18n.max_side}}" class="font-ico ico-max fn-none"></span>
<span title="{{.i18n.max_bottom}}" class="font-ico ico-max fn-none"></span>
<span id="footer-cursor" style="float: right;"></span>
<span class="cursor fn-right"></span>
<span class="notification-count" title="{{.i18n.unread_notification}}">{{.i18n.notification}}!</span>
</div>