From 261862cf305dd5f0663091bcecaf6d6134546240 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 17 Jan 2012 01:18:38 -0500 Subject: [PATCH 01/69] Remove debugging info --- chrome/content/zotero/xpcom/data/dataObjects.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/chrome/content/zotero/xpcom/data/dataObjects.js b/chrome/content/zotero/xpcom/data/dataObjects.js index 5896142166..1e1690aba9 100644 --- a/chrome/content/zotero/xpcom/data/dataObjects.js +++ b/chrome/content/zotero/xpcom/data/dataObjects.js @@ -366,12 +366,6 @@ Zotero.DataObjects = function (object, objectPlural, id, table) { this.editCheck = function (obj) { if (!Zotero.Sync.Server.updatesInProgress && !Zotero.Sync.Storage.updatesInProgress && !this.isEditable(obj)) { - try { - asfasf(); - } - catch (e) { - Zotero.debug(e); - } if (Zotero.Sync.Storage.syncInProgress) { Components.utils.reportError("Storage sync in progress but updatesInProgress not set -- fix?"); return; From 2b2da828c09eff38b40184bbfa15292bc2585a15 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 17 Jan 2012 01:19:29 -0500 Subject: [PATCH 02/69] Restore ".SOURCE" in ZOTERO_CONFIG version --- chrome/content/zotero/xpcom/zotero.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index f9889eac37..b0af143ee0 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -35,7 +35,7 @@ const ZOTERO_CONFIG = { API_URL: 'https://api.zotero.org/', PREF_BRANCH: 'extensions.zotero.', BOOKMARKLET_URL: 'https://www.zotero.org/bookmarklet/', - VERSION: "3.0rc1" + VERSION: "3.0rc1.SOURCE" }; /* From 6750535319ef4584b8ed66d07aea4636ca71a0fb Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Tue, 17 Jan 2012 00:23:59 -0500 Subject: [PATCH 03/69] Fix panel sizing on OS X and Windows --- chrome/content/zotero/integration/quickFormat.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/integration/quickFormat.js b/chrome/content/zotero/integration/quickFormat.js index 732c51e732..3206db38f7 100644 --- a/chrome/content/zotero/integration/quickFormat.js +++ b/chrome/content/zotero/integration/quickFormat.js @@ -741,11 +741,15 @@ var Zotero_QuickFormat = new function () { } if(!panelFrameHeight) { - panelFrameHeight = referencePanel.boxObject.height - referencePanel.clientHeight; + if(Zotero.isWin || Zotero.isMac) { + panelFrameHeight = 1; + } else { + panelFrameHeight = referencePanel.boxObject.height - referencePanel.clientHeight; + } } referencePanel.sizeTo(window.outerWidth-30, - numReferences*referenceHeight+numSeparators*separatorHeight+2*panelFrameHeight-1); + numReferences*referenceHeight+numSeparators*separatorHeight+2*panelFrameHeight); if(!panelShowing) _openReferencePanel(); } else if(panelShowing) { referencePanel.hidePopup(); From bbd686f8bbafd4430ee8197e5aa78a29a3518a5c Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Tue, 17 Jan 2012 00:31:43 -0500 Subject: [PATCH 04/69] A true platform-general solution to the panel sizing problem --- chrome/content/zotero/integration/quickFormat.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/chrome/content/zotero/integration/quickFormat.js b/chrome/content/zotero/integration/quickFormat.js index 3206db38f7..ca37251547 100644 --- a/chrome/content/zotero/integration/quickFormat.js +++ b/chrome/content/zotero/integration/quickFormat.js @@ -24,6 +24,7 @@ */ var Zotero_QuickFormat = new function () { + const pixelRe = /^([0-9]+)px$/ var initialized, io, qfs, qfi, qfiWindow, qfiDocument, qfe, qfb, qfbHeight, keepSorted, showEditor, referencePanel, referenceBox, referenceHeight = 0, separatorHeight = 0, currentLocator, currentLocatorLabel, currentSearchTime, dragging, panel, @@ -741,15 +742,19 @@ var Zotero_QuickFormat = new function () { } if(!panelFrameHeight) { - if(Zotero.isWin || Zotero.isMac) { - panelFrameHeight = 1; - } else { - panelFrameHeight = referencePanel.boxObject.height - referencePanel.clientHeight; + panelFrameHeight = referencePanel.boxObject.height - referencePanel.clientHeight; + var computedStyle = window.getComputedStyle(referenceBox, null); + for each(var attr in ["border-top-width", "border-bottom-width"]) { + var val = computedStyle.getPropertyValue(attr); + if(val) { + var m = pixelRe.exec(val); + if(m) panelFrameHeight += parseInt(m[1], 10); + } } } referencePanel.sizeTo(window.outerWidth-30, - numReferences*referenceHeight+numSeparators*separatorHeight+2*panelFrameHeight); + numReferences*referenceHeight+numSeparators*separatorHeight+panelFrameHeight); if(!panelShowing) _openReferencePanel(); } else if(panelShowing) { referencePanel.hidePopup(); From 0fcf07dd6a9bbb1011783e18a38db32a8df33aee Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Tue, 17 Jan 2012 01:49:09 -0500 Subject: [PATCH 05/69] Teeny tiny cosmetic fix on Windows --- chrome/content/zotero-platform/win/integration.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero-platform/win/integration.css b/chrome/content/zotero-platform/win/integration.css index f466ab7f6a..38432c6c12 100644 --- a/chrome/content/zotero-platform/win/integration.css +++ b/chrome/content/zotero-platform/win/integration.css @@ -31,7 +31,7 @@ } #zotero-icon { - margin: 2px 0 0 3px; + margin: -1px 0 0 4px; -moz-appearance: none; } From 77a9bac69152a5a1360f1753dbcd8fa510effb38 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Tue, 17 Jan 2012 01:49:45 -0500 Subject: [PATCH 06/69] Fix window dragging on Windows, because for some reason the jsm doesn't work properly --- .../content/zotero/integration/quickFormat.js | 2 + .../zotero/integration/quickFormat.xul | 7 +- .../zotero/integration/windowDraggingUtils.js | 118 ++++++++++++++++++ 3 files changed, 124 insertions(+), 3 deletions(-) create mode 100644 chrome/content/zotero/integration/windowDraggingUtils.js diff --git a/chrome/content/zotero/integration/quickFormat.js b/chrome/content/zotero/integration/quickFormat.js index ca37251547..1491ac0bbb 100644 --- a/chrome/content/zotero/integration/quickFormat.js +++ b/chrome/content/zotero/integration/quickFormat.js @@ -49,6 +49,8 @@ var Zotero_QuickFormat = new function () { document.documentElement.setAttribute("hidechrome", true); } + new WindowDraggingElement(document.getElementById("quick-format-dialog"), window); + qfs = document.getElementById("quick-format-search"); qfi = document.getElementById("quick-format-iframe"); qfb = document.getElementById("quick-format-entry"); diff --git a/chrome/content/zotero/integration/quickFormat.xul b/chrome/content/zotero/integration/quickFormat.xul index fb5df04eca..b82478f9d0 100644 --- a/chrome/content/zotero/integration/quickFormat.xul +++ b/chrome/content/zotero/integration/quickFormat.xul @@ -40,9 +40,10 @@ onkeypress="Zotero_QuickFormat.onKeyPress(event)">