mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 06:35:42 +00:00
Bug 609661 - Fire ViewChanged event when adding items to addon manager [r=mfinkle]
This commit is contained in:
parent
b9248c561d
commit
db77afc225
@ -577,6 +577,10 @@ var ExtensionsView = {
|
||||
|
||||
showmore.setAttribute("url", browseURL);
|
||||
this._list.appendChild(showmore);
|
||||
|
||||
let evt = document.createEvent("Events");
|
||||
evt.initEvent("ViewChanged", true, false);
|
||||
this._list.dispatchEvent(evt);
|
||||
},
|
||||
|
||||
displaySearchResults: function ev_displaySearchResults(aAddons, aTotalResults, aSelectFirstResult) {
|
||||
|
@ -165,15 +165,18 @@ function open_manager(aView, aCallback) {
|
||||
panelButton.click();
|
||||
var addonsButton = document.getElementById("tool-addons");
|
||||
addonsButton.click();
|
||||
|
||||
ExtensionsView.init();
|
||||
ExtensionsView._delayedInit();
|
||||
|
||||
// XXX - give the list time to add addons from the repo
|
||||
// find a better way to do this
|
||||
setTimeout(function() {
|
||||
if (!ExtensionsView._list) {
|
||||
window.addEventListener("ViewChanged", function() {
|
||||
window.removeEventListener("ViewChanged", arguments.callee, true);
|
||||
aCallback();
|
||||
}, true);
|
||||
|
||||
ExtensionsView.init();
|
||||
ExtensionsView._delayedInit();
|
||||
} else {
|
||||
aCallback();
|
||||
}, 2000);
|
||||
}
|
||||
}
|
||||
|
||||
function close_manager(aCallback) {
|
||||
|
Loading…
Reference in New Issue
Block a user