From 337b16361a9bc65fb264fa96b860ea410ede81c1 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 30 Nov 2008 20:18:48 +0000 Subject: [PATCH] Merge [3617-3838] from branch to trunk --- chrome/content/zotero/addCitationDialog.js | 12 +- chrome/content/zotero/advancedSearch.js | 9 + chrome/content/zotero/advancedSearch.xul | 2 +- chrome/content/zotero/bibliography.js | 12 +- .../content/zotero/editBibliographyDialog.js | 12 +- chrome/content/zotero/overlay.js | 33 +++ chrome/content/zotero/overlay.xul | 17 +- chrome/content/zotero/selectItemsDialog.js | 9 - chrome/content/zotero/xpcom/attachments.js | 83 +++++- .../zotero/xpcom/collectionTreeView.js | 199 +++++++++---- chrome/content/zotero/xpcom/db.js | 2 +- chrome/content/zotero/xpcom/fulltext.js | 18 +- chrome/content/zotero/xpcom/integration.js | 36 ++- chrome/content/zotero/xpcom/itemTreeView.js | 271 ++++++++++++------ chrome/content/zotero/xpcom/report.js | 25 +- chrome/content/zotero/xpcom/translate.js | 5 + chrome/content/zotero/xpcom/zotero.js | 118 ++++++++ components/zotero-protocol-handler.js | 26 +- defaults/preferences/zotero.js | 1 + 19 files changed, 659 insertions(+), 231 deletions(-) diff --git a/chrome/content/zotero/addCitationDialog.js b/chrome/content/zotero/addCitationDialog.js index 5a8fd4adef..d54c9d72bf 100644 --- a/chrome/content/zotero/addCitationDialog.js +++ b/chrome/content/zotero/addCitationDialog.js @@ -60,9 +60,6 @@ var Zotero_Citation_Dialog = new function () { document.getElementById("multiple-sources-button").label = Zotero.getString("citation.multipleSources"); document.getElementById("show-editor-button").label = Zotero.getString("citation.showEditor"); - if(Zotero.isWin) { - document.getElementById("zotero-select-items-container").style.border = "1px solid black"; - } io = window.arguments[0].wrappedJSObject; // find accept button @@ -135,6 +132,15 @@ var Zotero_Citation_Dialog = new function () { _updateAccept(); } + + // Center citation popups manually after a delay when using a popup, since + // popups aren't resizable and there might be persisted positions + if (Zotero.Integration.usePopup) { + document.getElementsByTagName("dialog")[0].style.border = "1px solid black"; + setTimeout(function () { + window.centerWindowOnScreen(); + }, 1); + } } /* diff --git a/chrome/content/zotero/advancedSearch.js b/chrome/content/zotero/advancedSearch.js index b63b3f3198..a9ba4ee179 100644 --- a/chrome/content/zotero/advancedSearch.js +++ b/chrome/content/zotero/advancedSearch.js @@ -124,6 +124,15 @@ var ZoteroAdvancedSearch = new function() { } + this.startDrag = function (event, element) { + if (Zotero.isFx2 || Zotero.isFx30) { + nsDragAndDrop.startDrag(event, element); + return; + } + element.onDragStart(event); + } + + function onUnload() { // Unregister search from Notifier if (this.itemsView) { diff --git a/chrome/content/zotero/advancedSearch.xul b/chrome/content/zotero/advancedSearch.xul index f166fabd69..9b7e0c3d2e 100644 --- a/chrome/content/zotero/advancedSearch.xul +++ b/chrome/content/zotero/advancedSearch.xul @@ -39,7 +39,7 @@ + ondraggesture="if (event.target.localName == 'treechildren') { Zotero.debug('starting'); ZoteroAdvancedSearch.startDrag(event, ZoteroAdvancedSearch.itemsView); }">