From ecfc44ee57398211736c671a3a1fccb9f5865b9b Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 9 Sep 2008 15:19:22 +0000 Subject: [PATCH] Closes #1166, Add http access to WebDAV --- .../content/zotero/preferences/preferences.js | 18 ++++++++++++++++++ .../content/zotero/preferences/preferences.xul | 17 ++++++++++++++++- chrome/content/zotero/xpcom/storage.js | 17 ++++++++++++++++- chrome/skin/default/zotero/preferences.css | 3 ++- defaults/preferences/zotero.js | 1 + 5 files changed, 53 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/preferences/preferences.js b/chrome/content/zotero/preferences/preferences.js index 14e27f6c3a..df5daf3084 100644 --- a/chrome/content/zotero/preferences/preferences.js +++ b/chrome/content/zotero/preferences/preferences.js @@ -33,6 +33,7 @@ function init() rows[i].firstChild.nextSibling.value = Zotero.isMac ? 'Cmd+Shift+' : 'Ctrl+Alt+'; } + updateStorageSettings(); refreshStylesList(); refreshProxyList(); populateQuickCopyList(); @@ -147,6 +148,23 @@ function populateOpenURLResolvers() { // // Sync // +function updateStorageSettings(value) { + if (!value) { + value = document.getElementById('pref-storage-protocol').value; + } + var prefix = document.getElementById('storage-url-prefix'); + switch (value) { + case 'webdav': + prefix.value = 'http://'; + break; + + case 'webdavs': + prefix.value = 'https://'; + break; + } + unverifyStorageServer(); +} + function unverifyStorageServer() { Zotero.debug("Clearing storage settings"); Zotero.Sync.Storage.clearSettingsCache(); diff --git a/chrome/content/zotero/preferences/preferences.xul b/chrome/content/zotero/preferences/preferences.xul index 19dd06aded..0db310ca7d 100644 --- a/chrome/content/zotero/preferences/preferences.xul +++ b/chrome/content/zotero/preferences/preferences.xul @@ -161,6 +161,7 @@ To add a new preference: + @@ -222,10 +223,24 @@ To add a new preference: + +