mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 946601 - Show an "Other" button in the requests footer, r=me
This commit is contained in:
parent
af29cefdc7
commit
2a52b2ac99
@ -471,27 +471,6 @@ RequestsMenuView.prototype = Heritage.extend(WidgetMethods, {
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Create a new custom request form populated with the data from
|
||||
* the currently selected request.
|
||||
*/
|
||||
cloneSelectedRequest: function() {
|
||||
let selected = this.selectedItem.attachment;
|
||||
|
||||
// Create the element node for the network request item.
|
||||
let menuView = this._createMenuView(selected.method, selected.url);
|
||||
|
||||
// Append a network request item to this container.
|
||||
let newItem = this.push([menuView], {
|
||||
attachment: Object.create(selected, {
|
||||
isCustom: { value: true }
|
||||
})
|
||||
});
|
||||
|
||||
// Immediately switch to new request pane.
|
||||
this.selectedItem = newItem;
|
||||
},
|
||||
|
||||
/**
|
||||
* Opens selected item in a new tab.
|
||||
*/
|
||||
@ -521,16 +500,37 @@ RequestsMenuView.prototype = Heritage.extend(WidgetMethods, {
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Create a new custom request form populated with the data from
|
||||
* the currently selected request.
|
||||
*/
|
||||
cloneSelectedRequest: function() {
|
||||
let selected = this.selectedItem.attachment;
|
||||
|
||||
// Create the element node for the network request item.
|
||||
let menuView = this._createMenuView(selected.method, selected.url);
|
||||
|
||||
// Append a network request item to this container.
|
||||
let newItem = this.push([menuView], {
|
||||
attachment: Object.create(selected, {
|
||||
isCustom: { value: true }
|
||||
})
|
||||
});
|
||||
|
||||
// Immediately switch to new request pane.
|
||||
this.selectedItem = newItem;
|
||||
},
|
||||
|
||||
/**
|
||||
* Send a new HTTP request using the data in the custom request form.
|
||||
*/
|
||||
sendCustomRequest: function() {
|
||||
let selected = this.selectedItem.attachment;
|
||||
let data = Object.create(selected);
|
||||
|
||||
let data = Object.create(selected, {
|
||||
headers: { value: selected.requestHeaders.headers }
|
||||
});
|
||||
|
||||
if (selected.requestHeaders) {
|
||||
data.headers = selected.requestHeaders.headers;
|
||||
}
|
||||
if (selected.requestPostData) {
|
||||
data.body = selected.requestPostData.postData.text;
|
||||
}
|
||||
@ -548,9 +548,8 @@ RequestsMenuView.prototype = Heritage.extend(WidgetMethods, {
|
||||
*/
|
||||
closeCustomRequest: function() {
|
||||
this.remove(this.selectedItem);
|
||||
|
||||
NetMonitorView.Sidebar.toggle(false);
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* Filters all network requests in this container by a specified type.
|
||||
|
@ -215,6 +215,11 @@
|
||||
data-key="flash"
|
||||
label="&netmonitorUI.footer.filterFlash;">
|
||||
</button>
|
||||
<button id="requests-menu-filter-other-button"
|
||||
class="requests-menu-filter-button requests-menu-footer-button"
|
||||
data-key="other"
|
||||
label="&netmonitorUI.footer.filterOther;">
|
||||
</button>
|
||||
<spacer id="requests-menu-spacer"
|
||||
class="requests-menu-footer-spacer"
|
||||
flex="100"/>
|
||||
|
Loading…
Reference in New Issue
Block a user