зеркало из https://github.com/mozilla/pjs.git
Clean up load ordering issues and fix the label on the sidebar to flex and crop.
This commit is contained in:
Родитель
b581199197
Коммит
850cf31769
|
@ -1061,9 +1061,8 @@
|
||||||
<hbox flex="1" id="browser">
|
<hbox flex="1" id="browser">
|
||||||
<vbox id="sidebar-box" hidden="true">
|
<vbox id="sidebar-box" hidden="true">
|
||||||
<sidebarheader align="center">
|
<sidebarheader align="center">
|
||||||
<label id="sidebar-title" persist="value"/>
|
<label id="sidebar-title" persist="value" flex="1" crop="end"/>
|
||||||
<image id="sidebar-throbber"/>
|
<image id="sidebar-throbber"/>
|
||||||
<spacer flex="1"/>
|
|
||||||
<toolbarbutton class="tabs-closebutton" oncommand="toggleSidebar();"/>
|
<toolbarbutton class="tabs-closebutton" oncommand="toggleSidebar();"/>
|
||||||
</sidebarheader>
|
</sidebarheader>
|
||||||
<browser id="sidebar" flex="1" autoscroll="false"
|
<browser id="sidebar" flex="1" autoscroll="false"
|
||||||
|
|
|
@ -45,22 +45,28 @@ var panelProgressListener = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var gLoadCachedSrc = true;
|
var gLoadFired = false;
|
||||||
function loadWebPanel(aURI) {
|
function loadWebPanel(aURI) {
|
||||||
var panelBrowser = document.getElementById('web-panels-browser');
|
var panelBrowser = document.getElementById('web-panels-browser');
|
||||||
panelBrowser.removeAttribute("src");
|
panelBrowser.removeAttribute("src");
|
||||||
|
panelBrowser.removeAttribute("cachedurl");
|
||||||
|
if (!gLoadFired)
|
||||||
|
load();
|
||||||
panelBrowser.setAttribute("src", aURI);
|
panelBrowser.setAttribute("src", aURI);
|
||||||
panelBrowser.setAttribute("cachedurl", aURI);
|
panelBrowser.setAttribute("cachedurl", aURI);
|
||||||
gLoadCachedSrc = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function load()
|
function load()
|
||||||
{
|
{
|
||||||
|
if (gLoadFired)
|
||||||
|
return;
|
||||||
|
|
||||||
var panelBrowser = document.getElementById('web-panels-browser');
|
var panelBrowser = document.getElementById('web-panels-browser');
|
||||||
panelBrowser.webProgress.addProgressListener(panelProgressListener, Components.interfaces.nsIWebProgress.NOTIFY_ALL);
|
panelBrowser.webProgress.addProgressListener(panelProgressListener, Components.interfaces.nsIWebProgress.NOTIFY_ALL);
|
||||||
if (gLoadCachedSrc && panelBrowser.getAttribute("cachedurl")) {
|
if (panelBrowser.getAttribute("cachedurl")) {
|
||||||
panelBrowser.setAttribute("src", panelBrowser.getAttribute("cachedurl"));
|
panelBrowser.setAttribute("src", panelBrowser.getAttribute("cachedurl"));
|
||||||
}
|
}
|
||||||
|
gLoadFired = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function unload()
|
function unload()
|
||||||
|
|
Загрузка…
Ссылка в новой задаче