closes #305, add conditionals/quotes to CSL

addresses #327, Scrapers should either take snapshots or use URL field
closes #309, Integration server prevents Zotero from loading in multiple instances of Firefox
This commit is contained in:
Simon Kornblith 2006-10-03 21:05:48 +00:00
parent 5da77cf7ee
commit 03e9dc5ae5
4 changed files with 644 additions and 482 deletions

File diff suppressed because it is too large Load diff

View file

@ -16,11 +16,15 @@ Zotero.Integration = new function() {
serv = sock.createInstance();
serv = serv.QueryInterface(Components.interfaces.nsIServerSocket);
// bind to a random port on loopback only
serv.init(50001, true, -1);
serv.asyncListen(Zotero.Integration.SocketListener);
Zotero.debug("Integration HTTP server listening on 127.0.0.1:"+serv.port);
try {
// bind to a random port on loopback only
serv.init(50001, true, -1);
serv.asyncListen(Zotero.Integration.SocketListener);
Zotero.debug("Integration HTTP server listening on 127.0.0.1:"+serv.port);
} catch(e) {
Zotero.debug("Not initializing integration HTTP");
}
}
/*

View file

@ -1194,7 +1194,8 @@ Zotero.Translate.prototype._itemDone = function(item) {
(attachment.title ? attachment.title : attachment.document.title));
}
} else {
if(attachment.document) {
// links no longer exist, so just don't save them
/*if(attachment.document) {
attachmentID = Zotero.Attachments.linkFromURL(attachment.document.location.href, myID,
(attachment.mimeType ? attachment.mimeType : attachment.document.contentType),
(attachment.title ? attachment.title : attachment.document.title));
@ -1206,7 +1207,7 @@ Zotero.Translate.prototype._itemDone = function(item) {
attachmentID = Zotero.Attachments.linkFromURL(attachment.url, myID,
(attachment.mimeType ? attachment.mimeType : undefined),
(attachment.title ? attachment.title : undefined));
}
}*/
}
} else if(this.type == "import") {
var attachmentItem = this._itemImportAttachment(attachment, myID);

View file

@ -763,7 +763,7 @@ Zotero.Date = new function(){
// get short month strings from CSL interpreter
if(!months) {
var months = Zotero.CSL.getMonthStrings("short");
var months = Zotero.CSL.Global.getMonthStrings("short");
}
if(!_monthRe) {
// then, see if have anything resembling a month anywhere
@ -820,11 +820,11 @@ Zotero.Date = new function(){
}
if(!months) {
var months = Zotero.CSL.getMonthStrings("short");
var months = Zotero.CSL.Global.getMonthStrings("short");
}
if(date.month != undefined && months[date.month]) {
// get short month strings from CSL interpreter
var months = Zotero.CSL.getMonthStrings("long");
var months = Zotero.CSL.Global.getMonthStrings("long");
string += months[date.month];
if(date.day) {
string += " "+date.day+", ";