зеркало из https://github.com/mozilla/pjs.git
Bug 683499 - GCLI needs an 'edit' command (for CSS only to start with); r=jwalker
This commit is contained in:
Родитель
6c773b48de
Коммит
7d298b299a
|
@ -126,6 +126,40 @@ gcli.addCommand({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 'edit' command
|
||||||
|
*/
|
||||||
|
gcli.addCommand({
|
||||||
|
name: "edit",
|
||||||
|
description: gcli.lookup("editDesc"),
|
||||||
|
manual: gcli.lookup("editManual"),
|
||||||
|
params: [
|
||||||
|
{
|
||||||
|
name: 'resource',
|
||||||
|
type: {
|
||||||
|
name: 'resource',
|
||||||
|
include: 'text/css'
|
||||||
|
},
|
||||||
|
description: gcli.lookup("editResourceDesc")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "line",
|
||||||
|
defaultValue: 1,
|
||||||
|
type: {
|
||||||
|
name: "number",
|
||||||
|
min: 1,
|
||||||
|
step: 10
|
||||||
|
},
|
||||||
|
description: gcli.lookup("editLineToJumpToDesc")
|
||||||
|
}
|
||||||
|
],
|
||||||
|
exec: function(args, context) {
|
||||||
|
let hud = HUDService.getHudReferenceById(context.environment.hudId);
|
||||||
|
let StyleEditor = hud.gcliterm.document.defaultView.StyleEditor;
|
||||||
|
StyleEditor.openChrome(args.resource.element, args.line);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
let breakpoints = [];
|
let breakpoints = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -129,3 +129,23 @@ breakdelRemoved=Breakpoint removed
|
||||||
# 'console close' command. This string is designed to be shown in a menu
|
# 'console close' command. This string is designed to be shown in a menu
|
||||||
# alongside the command name, which is why it should be as short as possible.
|
# alongside the command name, which is why it should be as short as possible.
|
||||||
consolecloseDesc=Close the console
|
consolecloseDesc=Close the console
|
||||||
|
|
||||||
|
# LOCALIZATION NOTE (editDesc) A very short description of the 'edit'
|
||||||
|
# command. See editManual for a fuller description of what it does. This
|
||||||
|
# string is designed to be shown in a menu alongside the command name, which
|
||||||
|
# is why it should be as short as possible.
|
||||||
|
editDesc=Tweak a page resource
|
||||||
|
|
||||||
|
# LOCALIZATION NOTE (editManual) A fuller description of the 'edit' command,
|
||||||
|
# displayed when the user asks for help on what it does.
|
||||||
|
editManual=Edit one of the resources that is part of this page (or maybe any generic web resource?)
|
||||||
|
|
||||||
|
# LOCALIZATION NOTE (editResourceDesc) A very short string to describe the
|
||||||
|
# 'resource' parameter to the 'edit' command, which is displayed in a dialog
|
||||||
|
# when the user is using this command.
|
||||||
|
editResourceDesc=URL to edit
|
||||||
|
|
||||||
|
# LOCALIZATION NOTE (editLineToJumpToDesc) A very short string to describe the
|
||||||
|
# 'line' parameter to the 'edit' command, which is displayed in a dialog
|
||||||
|
# when the user is using this command.
|
||||||
|
editLineToJumpToDesc=Line to jump to
|
||||||
|
|
Загрузка…
Ссылка в новой задаче