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 ? "" : " notAvailable")
|
||||
+ "' style='height:" + this.innerRowHeight + "px'>"
|
||||
+ "<span class='keys'>" + keys + "</span>"
|
||||
+ "<span class='caption'>"
|
||||
+ this.replaceStrong((command.group || "General") + ": " + name)
|
||||
+ "</span><span class='path'>"
|
||||
+ (command.hint
|
||||
? this.replaceStrong(command.hint)
|
||||
: "")
|
||||
+ this.replaceStrong(name)
|
||||
+ "</span><span class='keys'>" + keys + "</span>"
|
||||
+ "<span class='path'>"
|
||||
+ ((command.group || "General"))
|
||||
+ "</span></div>");
|
||||
};
|
||||
|
||||
this.getText = function(node) {
|
||||
var command = this.commands.commands[node.id];
|
||||
if (!command) return "";
|
||||
|
||||
var keys = (command.bindKey || 0)[this.commands.platform] || "";
|
||||
return (command.group || "General") + ": "
|
||||
+ (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) {
|
||||
|
|
|
@ -94,6 +94,9 @@ define(function(require, exports, module) {
|
|||
}, {
|
||||
bindKey: "Shift-Enter",
|
||||
exec: function() { execCommand(false, true); }
|
||||
}, {
|
||||
bindKey: "F2",
|
||||
exec: function() { showKeyEditor(); }
|
||||
}
|
||||
]);
|
||||
function forwardToTree() {
|
||||
|
@ -166,6 +169,10 @@ define(function(require, exports, module) {
|
|||
}
|
||||
|
||||
/***** Methods *****/
|
||||
|
||||
function showKeyEditor() {
|
||||
commands.exec("openpreferences", null, { panel: "preferences.keybindings" });
|
||||
}
|
||||
|
||||
/**
|
||||
* Searches through the dataset
|
||||
|
|
Ładowanie…
Reference in New Issue