0

TFS 2018u1. I'm putting together an extension with a custom host dialog. There are two contributions involved - the dialog page itself, which has type "ms.vss-web.control", and the custom menu item that opens the dialog.

The OK button on the dialog is disabled by default. The guide tells us to enable it by calling updateOkButton() on the dialog object, which is returned from the openDialog() to the menu item script.

But the dialog page itself is perfectly scriptable, too. Is there a way to get to the dialog object from the dialog page itself? It makes more sense to be to enable/disable the OK button from event handlers that live on the dialog page.

Seva Alekseyev
  • 59,826
  • 25
  • 160
  • 281

1 Answers1

0

You can do this by calling

VSS.getConfiguration().dialog.updateOkButton(true);
Flex
  • 577
  • 2
  • 8
  • Caveat: VSS.getConfiguration() comes back as undefined immediately after `init()` and `register()`. It's a valid object later on. – Seva Alekseyev May 15 '18 at 14:54