diff --git a/chrome/content/zotero/about.xul b/chrome/content/zotero/about.xul
index 1a2daa342..ecee69c10 100644
--- a/chrome/content/zotero/about.xul
+++ b/chrome/content/zotero/about.xul
@@ -254,9 +254,8 @@
-
+
-
@@ -264,16 +263,12 @@
-
-
-
-
-
+
@@ -292,10 +287,6 @@
-
-
-
-
diff --git a/chrome/content/zotero/xpcom/attachments.js b/chrome/content/zotero/xpcom/attachments.js
index 86a53a1a8..4b8216731 100644
--- a/chrome/content/zotero/xpcom/attachments.js
+++ b/chrome/content/zotero/xpcom/attachments.js
@@ -328,11 +328,9 @@ Zotero.Attachments = new function(){
// if it fails
//
// TODO: index later
- var timer = Components.classes["@mozilla.org/timer;1"].
- createInstance(Components.interfaces.nsITimer);
- timer.initWithCallback({notify: function() {
+ setTimeout(function() {
Zotero.Fulltext.indexItems([itemID]);
- }}, 1000, Components.interfaces.nsITimer.TYPE_ONE_SHOT);
+ }, 1000);
}
catch (e) {
// Clean up
@@ -612,10 +610,9 @@ Zotero.Attachments = new function(){
// we'll index it later if it fails
//
// TODO: index later
- var timer = Components.classes["@mozilla.org/timer;1"].
- createInstance(Components.interfaces.nsITimer);
- timer.initWithCallback({notify: f}, 1000,
- Components.interfaces.nsITimer.TYPE_ONE_SHOT);
+ setTimeout(function () {
+ f();
+ }, 1000);
}
catch (e) {
// Clean up
@@ -652,10 +649,9 @@ Zotero.Attachments = new function(){
Zotero.Notifier.trigger('add', 'item', itemID);
// Wait a second before indexing (see note above)
- var timer = Components.classes["@mozilla.org/timer;1"].
- createInstance(Components.interfaces.nsITimer);
- timer.initWithCallback({notify: f}, 1000,
- Components.interfaces.nsITimer.TYPE_ONE_SHOT);
+ setTimeout(function () {
+ f();
+ }, 1000);
}
// Caution: Take care using this itemID. The notifier may not yet have been called,
diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js
index 8d0962e2c..529cc031c 100644
--- a/chrome/content/zotero/xpcom/integration.js
+++ b/chrome/content/zotero/xpcom/integration.js
@@ -1366,7 +1366,8 @@ Zotero.Integration.Fields.prototype.addEditCitation = function(field, callback)
if(!session.bibliographyHasChanged) {
for(var i=0, n=citation.citationItems.length; i 9 ? 87 : 48)) + String.fromCharCode(ones + (ones > 9 ? 87 : 48)));
}
return ascii.join('');
+ },
+
+
+ /**
+ * Display a prompt from an error with custom buttons and a callback
+ */
+ "errorPrompt":function(title, e) {
+ var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
+ .getService(Components.interfaces.nsIPromptService);
+ var message, buttonText, buttonCallback;
+
+ if (e.data) {
+ if (e.data.dialogText) {
+ message = e.data.dialogText;
+ }
+ if (typeof e.data.dialogButtonText != 'undefined') {
+ buttonText = e.data.dialogButtonText;
+ buttonCallback = e.data.dialogButtonCallback;
+ }
+ }
+ if (!message) {
+ if (e.message) {
+ message = e.message;
+ }
+ else {
+ message = e;
+ }
+ }
+
+ if (typeof buttonText == 'undefined') {
+ buttonText = Zotero.getString('errorReport.reportError');
+ buttonCallback = function () {
+ win.ZoteroPane.reportErrors();
+ }
+ }
+ // If secondary button is explicitly null, just use an alert
+ else if (buttonText === null) {
+ ps.alert(null, title, message);
+ return;
+ }
+
+ var buttonFlags = ps.BUTTON_POS_0 * ps.BUTTON_TITLE_OK
+ + ps.BUTTON_POS_1 * ps.BUTTON_TITLE_IS_STRING;
+ var index = ps.confirmEx(
+ null,
+ title,
+ message,
+ buttonFlags,
+ "",
+ buttonText,
+ "", null, {}
+ );
+
+ if (index == 1) {
+ setTimeout(function () { buttonCallback(); }, 1);
+ }
}
}
diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js
index cb29234dc..5be397d90 100644
--- a/chrome/content/zotero/zoteroPane.js
+++ b/chrome/content/zotero/zoteroPane.js
@@ -2643,7 +2643,7 @@ var ZoteroPane = new function()
* (e.g. meta-click == new background tab, meta-shift-click == new front tab,
* shift-click == new window, no modifier == frontmost tab
*/
- function loadURI(uris, event, data) {
+ function loadURI(uris, event) {
if(typeof uris === "string") {
uris = [uris];
}
@@ -3377,18 +3377,24 @@ var ZoteroPane = new function()
if (!externalViewer) {
var url = 'zotero://attachment/' + itemID + '/';
- this.loadURI(url, event, { attachmentID: itemID});
+ this.loadURI(url, event);
}
else {
- // Some platforms don't have nsILocalFile.launch, so we just load it and
+ // Some platforms don't have nsILocalFile.launch, so we just
// let the Firefox external helper app window handle it
try {
file.launch();
}
catch (e) {
- Zotero.debug("launch() not supported -- passing file to loadURI()");
- var fileURL = item.getLocalFileURL();
- this.loadURI(fileURL);
+ Zotero.debug("launch() not supported -- passing file to loadUrl()");
+
+ var uri = Components.classes["@mozilla.org/network/standard-url;1"].
+ createInstance(Components.interfaces.nsIURI);
+ uri.spec = attachment.getLocalFileURL();
+
+ var nsIEPS = Components.classes["@mozilla.org/uriloader/external-protocol-service;1"].
+ getService(Components.interfaces.nsIExternalProtocolService);
+ nsIEPS.loadUrl(uri);
}
}
}
diff --git a/chrome/locale/en-US/zotero/about.dtd b/chrome/locale/en-US/zotero/about.dtd
index 266203671..731577e2d 100644
--- a/chrome/locale/en-US/zotero/about.dtd
+++ b/chrome/locale/en-US/zotero/about.dtd
@@ -1,5 +1,6 @@
+
@@ -7,4 +8,5 @@
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/chrome/locale/en-US/zotero/preferences.dtd b/chrome/locale/en-US/zotero/preferences.dtd
index 21cc2ed63..2cd3fc278 100644
--- a/chrome/locale/en-US/zotero/preferences.dtd
+++ b/chrome/locale/en-US/zotero/preferences.dtd
@@ -163,7 +163,7 @@
-
+
diff --git a/chrome/locale/en-US/zotero/zotero.properties b/chrome/locale/en-US/zotero/zotero.properties
index bf60cc3c9..7c1727d8e 100644
--- a/chrome/locale/en-US/zotero/zotero.properties
+++ b/chrome/locale/en-US/zotero/zotero.properties
@@ -681,6 +681,7 @@ sync.storage.error.webdav.insufficientSpace = A file upload failed due to insuf
sync.storage.error.webdav.sslCertificateError = SSL certificate error connecting to %S.
sync.storage.error.webdav.sslConnectionError = SSL connection error connecting to %S.
sync.storage.error.webdav.loadURLForMoreInfo = Load your WebDAV URL in the browser for more information.
+sync.storage.error.webdav.loadURL = Load WebDAV URL
sync.storage.error.zfs.personalQuotaReached1 = You have reached your Zotero File Storage quota. Some files were not uploaded. Other Zotero data will continue to sync to the server.
sync.storage.error.zfs.personalQuotaReached2 = See your zotero.org account settings for additional storage options.
sync.storage.error.zfs.groupQuotaReached1 = The group '%S' has reached its Zotero File Storage quota. Some files were not uploaded. Other Zotero data will continue to sync to the server.
diff --git a/chrome/skin/default/zotero/about.css b/chrome/skin/default/zotero/about.css
index b3e8a1cf0..b68d97265 100644
--- a/chrome/skin/default/zotero/about.css
+++ b/chrome/skin/default/zotero/about.css
@@ -37,7 +37,7 @@ dialog
#zotero-translators-list {
margin: .3em 0;
- height: 7.3em;
+ height: 9em;
overflow: -moz-scrollbars-vertical;
}
diff --git a/chrome/skin/default/zotero/preferences.css b/chrome/skin/default/zotero/preferences.css
index 3e039bbb7..dcc39b5f7 100644
--- a/chrome/skin/default/zotero/preferences.css
+++ b/chrome/skin/default/zotero/preferences.css
@@ -22,7 +22,7 @@ radio[pane]
}
/* Links within messages */
-description label[class=zotero-text-link], label label[class=zotero-text-link]
+description label[class=zotero-text-link], label[class=zotero-text-link]
{
margin: 0;
}
diff --git a/components/zotero-service.js b/components/zotero-service.js
index ca753e578..85df60e2a 100644
--- a/components/zotero-service.js
+++ b/components/zotero-service.js
@@ -76,7 +76,6 @@ const xpcomFilesLocal = [
'data/relations',
'data/tag',
'data/tags',
- 'date',
'db',
'duplicates',
'enstyle',