Add ctr + s event listener
This commit is contained in:
Родитель
9b1fff3e48
Коммит
9b6737ca93
|
@ -1,6 +1,17 @@
|
|||
/// <reference path="../typings/index.d.ts" />
|
||||
import { Controller } from "./control";
|
||||
import * as ExtensionContracts from "TFS/WorkItemTracking/ExtensionContracts";
|
||||
import { WorkItemFormService } from "TFS/WorkItemTracking/Services";
|
||||
|
||||
// save on ctr + s
|
||||
$(window).bind("keydown", function (event: JQueryEventObject) {
|
||||
if (event.ctrlKey || event.metaKey) {
|
||||
if (String.fromCharCode(event.which) === "S") {
|
||||
event.preventDefault();
|
||||
WorkItemFormService.getService().then((service) => service.beginSaveWorkItem($.noop, $.noop));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var control: Controller;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"manifestVersion": 1,
|
||||
"id": "color-form-control",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.2",
|
||||
"name": "Color picklist control",
|
||||
"description": "Add custom colors and labels for picklist fields.",
|
||||
"publisher": "ms-devlabs",
|
||||
|
|
Загрузка…
Ссылка в новой задаче