- Hide download option when in connector mode (will consider implementing in the connector instead)

- Disable radio, so it's not possible to focus it with the keyboard
This commit is contained in:
Simon Kornblith 2011-08-17 04:13:42 +00:00
parent 91024eb87c
commit 9261f8d5fb
2 changed files with 6 additions and 2 deletions

View file

@ -130,6 +130,8 @@ var Zotero_DownloadOverlay = new function() {
* Called when the save dialog is opened
*/
this.init = function() {
if(Zotero.isConnector) return;
// Disable for filetypes people probably don't want to save
var show = false;
var mimeType = dialog.mLauncher.MIMEInfo.MIMEType.toLowerCase();
@ -137,10 +139,12 @@ var Zotero_DownloadOverlay = new function() {
if(typeof elem === "string") {
if(elem === mimeType) {
document.getElementById('zotero-container').hidden = false;
document.getElementById('zotero-radio').disabled = false;
break;
}
} else if(elem.test(mimeType)) {
document.getElementById('zotero-container').hidden = false;
document.getElementById('zotero-radio').disabled = false;
break;
}
}

View file

@ -39,9 +39,9 @@
<script type="application/x-javascript" src="downloadOverlay.js"/>
<radiogroup id="mode">
<vbox insertbefore="save" id="zotero-container" flex="1" hidden="true">
<radio id="zotero-radio" label="&zotero.downloadManager.label;"/>
<radio id="zotero-radio" label="&zotero.downloadManager.label;" disabled="true"/>
<vbox style="margin-left: 10px">
<checkbox id="zotero-recognizePDF" hidden="true" persist="checked"/>
<checkbox id="zotero-recognizePDF" hidden="true" persist="checked" disabled="true"/>
</vbox>
</vbox>
</radiogroup>