Ctrl + C 清空output
This commit is contained in:
parent
34ef9a2494
commit
d2ada7dae0
|
@ -4,6 +4,10 @@ var bottomGroup = {
|
|||
init: function () {
|
||||
this._initTabs();
|
||||
this._initFrame();
|
||||
|
||||
$('.bottom-window-group .output').click(function () {
|
||||
$(this).focus();
|
||||
});
|
||||
},
|
||||
_initFrame: function () {
|
||||
$(".bottom-window-group .output").mousedown(function (event) {
|
||||
|
@ -26,11 +30,11 @@ var bottomGroup = {
|
|||
return false;
|
||||
});
|
||||
},
|
||||
clear: function () {
|
||||
$('.bottom-window-group .output > div').text('');
|
||||
clear: function (id) {
|
||||
$('.bottom-window-group .' + id + ' > div').text('');
|
||||
},
|
||||
clearOutput: function () {
|
||||
$('.bottom-window-group .output > div').text('');
|
||||
resetOutput: function () {
|
||||
this.clear('output');
|
||||
bottomGroup.tabs.setCurrent("output");
|
||||
windows.flowBottom();
|
||||
},
|
||||
|
|
|
@ -35,6 +35,13 @@ var hotkeys = {
|
|||
shiftKey: false,
|
||||
which: 54
|
||||
},
|
||||
// Ctrl+C 清空窗口内容
|
||||
clearWindow: {
|
||||
ctrlKey: true,
|
||||
altKey: false,
|
||||
shiftKey: false,
|
||||
which: 67
|
||||
},
|
||||
// Ctrl+D 窗口组切换
|
||||
changeEditor: {
|
||||
ctrlKey: true,
|
||||
|
@ -64,6 +71,18 @@ var hotkeys = {
|
|||
which: 117
|
||||
}
|
||||
},
|
||||
_bindOutput: function () {
|
||||
$(".bottom-window-group .output").keydown(function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
var hotKeys = hotkeys.defaultKeyMap;
|
||||
if (event.ctrlKey === hotKeys.clearWindow.ctrlKey
|
||||
&& event.which === hotKeys.clearWindow.which) { // Ctrl+F 搜索
|
||||
bottomGroup.clear('output');
|
||||
return;
|
||||
}
|
||||
});
|
||||
},
|
||||
_bindFileTree: function () {
|
||||
$("#files").keydown(function (event) {
|
||||
event.preventDefault();
|
||||
|
@ -188,9 +207,7 @@ var hotkeys = {
|
|||
}
|
||||
});
|
||||
},
|
||||
init: function () {
|
||||
this._bindFileTree();
|
||||
|
||||
_bindDocument: function () {
|
||||
var hotKeys = this.defaultKeyMap;
|
||||
$(document).keydown(function (event) {
|
||||
if (event.ctrlKey === hotKeys.goEditor.ctrlKey
|
||||
|
@ -234,6 +251,7 @@ var hotkeys = {
|
|||
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.ctrlKey === hotKeys.goSearch.ctrlKey
|
||||
&& event.which === hotKeys.goSearch.which) { // Ctrl+5 焦点切换到搜索窗口
|
||||
bottomGroup.tabs.setCurrent("search");
|
||||
|
@ -327,6 +345,11 @@ var hotkeys = {
|
|||
|
||||
return;
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
init: function () {
|
||||
this._bindFileTree();
|
||||
this._bindOutput();
|
||||
this._bindDocument();
|
||||
}
|
||||
};
|
|
@ -87,6 +87,10 @@ var tree = {
|
|||
$("#dialogRemoveConfirm").dialog("open");
|
||||
},
|
||||
init: function () {
|
||||
$("#file").click(function () {
|
||||
$(this).focus();
|
||||
});
|
||||
|
||||
var request = newWideRequest();
|
||||
|
||||
$.ajax({
|
||||
|
|
|
@ -585,7 +585,7 @@ var wide = {
|
|||
data: JSON.stringify(request),
|
||||
dataType: "json",
|
||||
beforeSend: function (data) {
|
||||
bottomGroup.clearOutput();
|
||||
bottomGroup.resetOutput();
|
||||
},
|
||||
success: function (data) {
|
||||
}
|
||||
|
@ -620,7 +620,7 @@ var wide = {
|
|||
data: JSON.stringify(request),
|
||||
dataType: "json",
|
||||
beforeSend: function (data) {
|
||||
bottomGroup.clearOutput();
|
||||
bottomGroup.resetOutput();
|
||||
},
|
||||
success: function (data) {
|
||||
$(".toolbars .ico-buildrun").addClass("ico-stop")
|
||||
|
@ -650,7 +650,7 @@ var wide = {
|
|||
data: JSON.stringify(request),
|
||||
dataType: "json",
|
||||
beforeSend: function (data) {
|
||||
bottomGroup.clearOutput();
|
||||
bottomGroup.resetOutput();
|
||||
},
|
||||
success: function (data) {
|
||||
}
|
||||
|
@ -677,7 +677,7 @@ var wide = {
|
|||
data: JSON.stringify(request),
|
||||
dataType: "json",
|
||||
beforeSend: function (data) {
|
||||
bottomGroup.clearOutput();
|
||||
bottomGroup.resetOutput();
|
||||
},
|
||||
success: function (data) {
|
||||
}
|
||||
|
@ -704,7 +704,7 @@ var wide = {
|
|||
data: JSON.stringify(request),
|
||||
dataType: "json",
|
||||
beforeSend: function (data) {
|
||||
bottomGroup.clearOutput();
|
||||
bottomGroup.resetOutput();
|
||||
},
|
||||
success: function (data) {
|
||||
}
|
||||
|
|
|
@ -175,7 +175,7 @@
|
|||
<span title="{{.i18n.min}}" class="font-ico ico-min"></span>
|
||||
<div class="frame">
|
||||
<ul>
|
||||
<li onclick="bottomGroup.clear()" title="{{.i18n.clear}}">
|
||||
<li onclick="bottomGroup.clear('output')" title="{{.i18n.clear}}">
|
||||
<span>{{.i18n.clear}}</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
Loading…
Reference in New Issue