Restore EndNote® import

This commit is contained in:
Dan Stillman 2008-10-27 18:16:45 +00:00
parent 946826fe25
commit 76a1969645
2 changed files with 6 additions and 6 deletions

View File

@ -1065,7 +1065,7 @@ function addStyle() {
fp.init(window, Zotero.getString("zotero.preferences.styles.addStyle"), nsIFilePicker.modeOpen); fp.init(window, Zotero.getString("zotero.preferences.styles.addStyle"), nsIFilePicker.modeOpen);
fp.appendFilter("CSL Style", "*.csl"); fp.appendFilter("CSL Style", "*.csl");
//fp.appendFilter("EndNote Style", "*.ens"); fp.appendFilter("EndNote Style", "*.ens");
var rv = fp.show(); var rv = fp.show();
if (rv == nsIFilePicker.returnOK || rv == nsIFilePicker.returnReplace) { if (rv == nsIFilePicker.returnOK || rv == nsIFilePicker.returnReplace) {

View File

@ -146,15 +146,15 @@ Zotero.Styles = new function() {
var error = false; var error = false;
try { try {
/*if(type == "ens") { if(type == "ens") {
// EN style // EN style
var type = "ens"; var type = "ens";
var enConverter = new Zotero.ENConverter(style); var enConverter = new Zotero.ENConverter(style);
var xml = enConverter.parse(); var xml = enConverter.parse();
} else {*/ } else {
// CSL // CSL
var xml = new XML(Zotero.CSL.Global.cleanXML(style)); var xml = new XML(Zotero.CSL.Global.cleanXML(style));
//} }
} catch(e) { } catch(e) {
error = e; error = e;
} }
@ -330,13 +330,13 @@ Zotero.Style = function(file) {
this.file = file; this.file = file;
var extension = file.leafName.substr(-4).toLowerCase(); var extension = file.leafName.substr(-4).toLowerCase();
/*if(extension == ".ens") { if(extension == ".ens") {
this.type = "ens"; this.type = "ens";
this.styleID = Zotero.Styles.ios.newFileURI(this.file).spec; this.styleID = Zotero.Styles.ios.newFileURI(this.file).spec;
this.title = file.leafName.substr(0, file.leafName.length-4); this.title = file.leafName.substr(0, file.leafName.length-4);
this.updated = Zotero.Date.dateToSQL(new Date(file.lastModifiedTime)); this.updated = Zotero.Date.dateToSQL(new Date(file.lastModifiedTime));
} else */if(extension == ".csl") { } else if(extension == ".csl") {
// "with ({});" needed to fix default namespace scope issue // "with ({});" needed to fix default namespace scope issue
// See https://bugzilla.mozilla.org/show_bug.cgi?id=330572 // See https://bugzilla.mozilla.org/show_bug.cgi?id=330572
default xml namespace = "http://purl.org/net/xbiblio/csl"; with ({}); default xml namespace = "http://purl.org/net/xbiblio/csl"; with ({});