Closes #41
* Disable the cache-selection interface while a synchronous API call is being made.
Cette révision appartient à :
Parent
6a53cb6f6d
révision
bcec4017ac
3 fichiers modifiés avec 25 ajouts et 7 suppressions
|
@ -196,7 +196,7 @@
|
|||
<div id="errorTitle">
|
||||
<h1 id="errorTitleText" />
|
||||
</div>
|
||||
|
||||
|
||||
<!-- LONG CONTENT (the section most likely to require scrolling) -->
|
||||
<div id="errorLongContent">
|
||||
<!-- Short Description -->
|
||||
|
@ -219,7 +219,7 @@
|
|||
<div id='targetWin' style='display: none;'></div>
|
||||
|
||||
<p>&resurrect.thispage;</p>
|
||||
<select id='mirror' size='5'>
|
||||
<select id='mirror' size='6'>
|
||||
<option value='coralcdn'>&resurrect.coralcdn;</option>
|
||||
<option value='google'>&resurrect.google;</option>
|
||||
<option value='googletext'>&resurrect.google;&resurrect.textonly;</option>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
</radiogroup>
|
||||
|
||||
<label value='&resurrect.fromMirror;' />
|
||||
<listbox id='mirror' rows='5'
|
||||
<listbox id='mirror' rows='6'
|
||||
onclick='resurrect.clickedXul(event);'
|
||||
>
|
||||
<listitem value='coralcdn' label='&resurrect.coralcdn;' />
|
||||
|
|
|
@ -99,7 +99,7 @@ var resurrect={
|
|||
},
|
||||
|
||||
clickedHtml:function(event) {
|
||||
resurrect.selectMirror(
|
||||
return resurrect.clickHandler(
|
||||
event.target.ownerDocument,
|
||||
event.target.ownerDocument,
|
||||
event.target.ownerDocument.location.href
|
||||
|
@ -107,17 +107,35 @@ var resurrect={
|
|||
},
|
||||
|
||||
clickedXul:function(event) {
|
||||
resurrect.selectMirror(
|
||||
return resurrect.clickHandler(
|
||||
event.target.ownerDocument,
|
||||
window.arguments[0],
|
||||
window.arguments[1]
|
||||
);
|
||||
},
|
||||
|
||||
clickHandler:function(ownerDoc, contentDoc, rawUrl) {
|
||||
// Check, set, disabled status.
|
||||
var listbox=ownerDoc.getElementById('mirror');
|
||||
|
||||
if (-1==listbox.selectedIndex) return false;
|
||||
if (resurrect.disabled) return false;
|
||||
|
||||
resurrect.disabled=true;
|
||||
listbox.setAttribute('disabled', true);
|
||||
|
||||
var button=contentDoc.getElementById('mirrorSelect');
|
||||
if (!button && ownerDoc.documentElement.getButton) {
|
||||
button=ownerDoc.documentElement.getButton('accept');
|
||||
}
|
||||
button.setAttribute('disabled', true);
|
||||
|
||||
// Run the actual code. After timeout for UI repaint.
|
||||
setTimeout(resurrect.selectMirror, 1, ownerDoc, contentDoc, rawUrl);
|
||||
},
|
||||
|
||||
selectMirror:function(ownerDoc, contentDoc, rawUrl) {
|
||||
var listbox=ownerDoc.getElementById('mirror');
|
||||
if (resurrect.disabled) return false;
|
||||
resurrect.disabled=true;
|
||||
|
||||
var gotoUrl=null;
|
||||
var encUrl=encodeURIComponent(rawUrl);
|
||||
|
|
Chargement…
Référencer dans un nouveau ticket