Make "View as Document Type..." only show valid options
Summary: Ref T13513. Currently, "View as Document Type..." lists every available engine. This is hard to get completely right because we can't always rebuild the document ref accurately in the endpoint, but try harder to fake something reasonable. Test Plan: Used "View as Document Type..." on Jupyter notebooks, was given "Jupyter" and "Source" as options. Maniphest Tasks: T13513 Differential Revision: https://secure.phabricator.com/D21241
This commit is contained in:
@@ -944,8 +944,12 @@ JX.install('DiffChangesetList', {
|
||||
.setIcon('fa-file-image-o')
|
||||
.setName(pht('View As Document Type...'))
|
||||
.setHandler(function(e) {
|
||||
var options = changeset.getAvailableDocumentEngineKeys() || [];
|
||||
options = options.join(',');
|
||||
|
||||
var params = {
|
||||
engine: changeset.getResponseDocumentEngineKey(),
|
||||
options: options
|
||||
};
|
||||
|
||||
new JX.Workflow('/services/viewas/', params)
|
||||
|
||||
Reference in New Issue
Block a user