Fetch more info about edit files The type of a file in a change edit is identified in a header on the getFileInChangeEdit response. This change modifies gr-rest-api to return the bare response, and upgrades the editor view to parse both the header identifying the file type and the response body containing the file content. Bug: Issue 4437 Change-Id: Icdadeafb4189692cd369c74fe026442787173ef8
diff --git a/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view.html b/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view.html index c6cf7ce..3042e76 100644 --- a/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view.html +++ b/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view.html
@@ -97,10 +97,9 @@ </gr-fixed-panel> <div class="textareaWrapper"> <gr-endpoint-decorator name="editor"> - <gr-endpoint-param name="fileContent" value="[[_newContent]]"> - </gr-endpoint-param> - <gr-endpoint-param name="prefs" value="[[_prefs]]"> - </gr-endpoint-param> + <gr-endpoint-param name="fileContent" value="[[_newContent]]"></gr-endpoint-param> + <gr-endpoint-param name="prefs" value="[[_prefs]]"></gr-endpoint-param> + <gr-endpoint-param name="fileType" value="[[_type]]"></gr-endpoint-param> <textarea value="{{_newContent::input}}" id="file"></textarea> </gr-endpoint-decorator> </div>