зеркало из https://github.com/mozilla/gecko-dev.git
add 'no updates found' page.
This commit is contained in:
Родитель
ca96c72909
Коммит
9a801a6355
|
@ -6,6 +6,9 @@
|
|||
<!ENTITY cancel.label "Cancel">
|
||||
<!ENTITY cancel.accesskey "C">
|
||||
|
||||
<!ENTITY noupdatesfound.title "No Updates Found">
|
||||
<!ENTITY noupdatesfound.intro "There are no new updates available. &brandShortName; may check periodically for new updates.">
|
||||
|
||||
<!ENTITY updatesfound.title "Updates Available">
|
||||
|
||||
<!ENTITY forMoreInfo.label "For more information, ">
|
||||
|
|
|
@ -5,7 +5,9 @@ wizard[description=""] .wizard-header-description {
|
|||
}
|
||||
|
||||
wizard[currentpageid="license"] .wizard-buttons,
|
||||
wizard[currentpageid="errors"] .wizard-buttons {
|
||||
wizard[currentpageid="errors"] .wizard-buttons,
|
||||
wizard[currentpageid="noupdatesfound"] .wizard-buttons,
|
||||
wizard[currentpageid="checking"] .wizard-buttons {
|
||||
display: -moz-box;
|
||||
}
|
||||
|
||||
|
|
|
@ -164,6 +164,8 @@ var gCheckingPage = {
|
|||
if (!gUpdates.update) {
|
||||
LOG("Could not select an appropriate update, either because there were none," +
|
||||
" or |selectUpdate| failed.");
|
||||
var checking = document.getElementById("checking");
|
||||
checking.setAttribute("next", "noupdatesfound");
|
||||
}
|
||||
document.documentElement.advance();
|
||||
},
|
||||
|
@ -187,6 +189,14 @@ var gCheckingPage = {
|
|||
}
|
||||
};
|
||||
|
||||
var gNoUpdatesPage = {
|
||||
onPageShow: function() {
|
||||
document.documentElement.getButton("back").disabled = true;
|
||||
document.documentElement.getButton("cancel").disabled = true;
|
||||
document.documentElement.getButton("finish").focus();
|
||||
}
|
||||
};
|
||||
|
||||
var gUpdatesAvailablePage = {
|
||||
_incompatibleItems: null,
|
||||
|
||||
|
|
|
@ -64,19 +64,21 @@
|
|||
</stringbundleset>
|
||||
|
||||
<wizardpage id="checking" pageid="checking" next="updatesfound"
|
||||
label="&checking.title;"
|
||||
onpageshow="gCheckingPage.onPageShow();">
|
||||
<vbox class="content" flex="1">
|
||||
<label>&checking.label;</label>
|
||||
<separator/>
|
||||
<progressmeter id="checkingProgress" mode="undetermined"/>
|
||||
<separator flex="1"/>
|
||||
<hbox pack="end">
|
||||
<button label="&cancel.label;" accesskey="&cancel.accesskey;"
|
||||
oncommand="gCheckingPage.onClose();"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</wizardpage>
|
||||
|
||||
<wizardpage id="noupdatesfound" pageid="noupdatesfound" class="content"
|
||||
label="&noupdatesfound.title;"
|
||||
onpageshow="gNoUpdatesPage.onPageShow();">
|
||||
<label>&noupdatesfound.intro;</label>
|
||||
</wizardpage>
|
||||
|
||||
<wizardpage id="updatesfound" pageid="updatesfound" next="downloading"
|
||||
onpageshow="gUpdatesAvailablePage.onPageShow();" flex="1">
|
||||
<vbox id="update-info" flex="1">
|
||||
|
|
|
@ -1574,10 +1574,10 @@ TimerManager.prototype = {
|
|||
*
|
||||
*/
|
||||
notify: function(timer) {
|
||||
LOG("self._timers = " + self._timers.toSource());
|
||||
// LOG("self._timers = " + self._timers.toSource());
|
||||
var lastUpdateTime = self._timers[this.id].lastUpdateTime;
|
||||
var now = Math.round(Date.now() / 1000);
|
||||
LOG("notify = " + (now - lastUpdateTime) + " > " + this.interval);
|
||||
// LOG("notify = " + (now - lastUpdateTime) + " > " + this.interval);
|
||||
|
||||
// Fudge the lastUpdateTime by some random increment of the update
|
||||
// check interval (e.g. some random slice of 10 minutes) so that when
|
||||
|
|
Загрузка…
Ссылка в новой задаче