kopia lustrzana https://github.com/c9/core
make commands panel more readable
rodzic
4802a51a01
commit
7c043d28c8
|
@ -106,22 +106,24 @@ define(function(require, exports, module) {
|
||||||
+ (available && this.getClassName(row))
|
+ (available && this.getClassName(row))
|
||||||
+ (available ? "" : " notAvailable")
|
+ (available ? "" : " notAvailable")
|
||||||
+ "' style='height:" + this.innerRowHeight + "px'>"
|
+ "' style='height:" + this.innerRowHeight + "px'>"
|
||||||
+ "<span class='keys'>" + keys + "</span>"
|
|
||||||
+ "<span class='caption'>"
|
+ "<span class='caption'>"
|
||||||
+ this.replaceStrong((command.group || "General") + ": " + name)
|
+ this.replaceStrong(name)
|
||||||
+ "</span><span class='path'>"
|
+ "</span><span class='keys'>" + keys + "</span>"
|
||||||
+ (command.hint
|
+ "<span class='path'>"
|
||||||
? this.replaceStrong(command.hint)
|
+ ((command.group || "General"))
|
||||||
: "")
|
|
||||||
+ "</span></div>");
|
+ "</span></div>");
|
||||||
};
|
};
|
||||||
|
|
||||||
this.getText = function(node) {
|
this.getText = function(node) {
|
||||||
var command = this.commands.commands[node.id];
|
var command = this.commands.commands[node.id];
|
||||||
if (!command) return "";
|
if (!command) return "";
|
||||||
|
|
||||||
|
var keys = (command.bindKey || 0)[this.commands.platform] || "";
|
||||||
return (command.group || "General") + ": "
|
return (command.group || "General") + ": "
|
||||||
+ (command.displayName || command.name || node.id)
|
+ (command.displayName || command.name || node.id)
|
||||||
+ (command.hint ? "\n" + command.hint : "");
|
+ (command.hint ? "\n" + command.hint : "")
|
||||||
|
+ (keys ? "\n" + keys : "")
|
||||||
|
+ "\nPress F2 to change keybinding";
|
||||||
};
|
};
|
||||||
|
|
||||||
this.getClassName = function(row) {
|
this.getClassName = function(row) {
|
||||||
|
|
|
@ -94,6 +94,9 @@ define(function(require, exports, module) {
|
||||||
}, {
|
}, {
|
||||||
bindKey: "Shift-Enter",
|
bindKey: "Shift-Enter",
|
||||||
exec: function() { execCommand(false, true); }
|
exec: function() { execCommand(false, true); }
|
||||||
|
}, {
|
||||||
|
bindKey: "F2",
|
||||||
|
exec: function() { showKeyEditor(); }
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
function forwardToTree() {
|
function forwardToTree() {
|
||||||
|
@ -167,6 +170,10 @@ define(function(require, exports, module) {
|
||||||
|
|
||||||
/***** Methods *****/
|
/***** Methods *****/
|
||||||
|
|
||||||
|
function showKeyEditor() {
|
||||||
|
commands.exec("openpreferences", null, { panel: "preferences.keybindings" });
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Searches through the dataset
|
* Searches through the dataset
|
||||||
*
|
*
|
||||||
|
|
Ładowanie…
Reference in New Issue