From 09e8249db80ef3619cac02e41856aa77f0dc12aa Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Mon, 28 Jul 2008 11:11:12 +0000 Subject: [PATCH] closes #743, Support non-EZproxy proxies closes #831, transparent EZProxy support adds a proxy pane to the preferences asks before saving proxies to the DB (to avoid the potential phishing risk #831 would otherwise pose) --- chrome/content/zotero/browser.js | 2 +- .../content/zotero/preferences/preferences.js | 84 ++- .../zotero/preferences/preferences.xul | 41 +- .../content/zotero/preferences/proxyEditor.js | 137 +++++ .../zotero/preferences/proxyEditor.xul | 46 ++ chrome/content/zotero/xpcom/ingester.js | 179 ------ chrome/content/zotero/xpcom/proxy.js | 526 ++++++++++++++++++ chrome/content/zotero/xpcom/schema.js | 6 + chrome/content/zotero/xpcom/translate.js | 6 +- chrome/content/zotero/xpcom/utilities.js | 6 +- chrome/locale/en-US/zotero/preferences.dtd | 18 + chrome/locale/en-US/zotero/zotero.properties | 10 + chrome/skin/default/zotero/prefs-proxies.png | Bin 0 -> 2212 bytes components/zotero-service.js | 2 +- defaults/preferences/zotero.js | 6 +- userdata.sql | 19 +- 16 files changed, 893 insertions(+), 195 deletions(-) create mode 100644 chrome/content/zotero/preferences/proxyEditor.js create mode 100644 chrome/content/zotero/preferences/proxyEditor.xul create mode 100644 chrome/content/zotero/xpcom/proxy.js create mode 100644 chrome/skin/default/zotero/prefs-proxies.png diff --git a/chrome/content/zotero/browser.js b/chrome/content/zotero/browser.js index a4eca8d3c..c701e5cf3 100644 --- a/chrome/content/zotero/browser.js +++ b/chrome/content/zotero/browser.js @@ -103,7 +103,7 @@ var Zotero_Browser = new function() { Zotero_Browser.browserData = new Object(); Zotero_Browser._scrapePopupShowing = false; - Zotero.Ingester.ProxyMonitor.init(); + Zotero.Proxies.init(); Zotero.Ingester.MIMEHandler.init(); Zotero.Cite.MIMEHandler.init(); Zotero.Translate.init(); diff --git a/chrome/content/zotero/preferences/preferences.js b/chrome/content/zotero/preferences/preferences.js index 4cc05895b..b8f92d18f 100644 --- a/chrome/content/zotero/preferences/preferences.js +++ b/chrome/content/zotero/preferences/preferences.js @@ -22,6 +22,7 @@ var openURLServerField; var openURLVersionMenu; +var proxies; function init() { @@ -32,6 +33,7 @@ function init() } refreshStylesList(); + refreshProxyList(); populateQuickCopyList(); updateQuickCopyInstructions(); initSearchPane(); @@ -930,8 +932,6 @@ function refreshStylesList(cslID) { var styleData = Zotero.DB.query(sql); if (!styleData) return; - Zotero.debug("ASKED FOR "+cslID); - var selectIndex = false; for (var i=0; i a.scheme) { + return 1; + } + + return 0; + }); + + // erase old children + var treechildren = document.getElementById('proxyTree-rows'); + while (treechildren.hasChildNodes()) { + treechildren.removeChild(treechildren.firstChild); + } + + // add proxies to list + for (var i=0; i @@ -344,7 +345,7 @@ To add a new preference: -