www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 89434a7a575e97022552e985a85438c5268c94c1
parent 181611eddfe8324584a32771d7956d5f1cf207c7
Author: Simon Kornblith <simon@simonster.com>
Date:   Wed,  7 Sep 2011 23:57:04 +0000

Use windowdragbox instead of moving the window ourselves


Diffstat:
Mchrome/content/zotero/integration/quickFormat.js | 17-----------------
Mchrome/content/zotero/integration/quickFormat.xul | 4++--
2 files changed, 2 insertions(+), 19 deletions(-)

diff --git a/chrome/content/zotero/integration/quickFormat.js b/chrome/content/zotero/integration/quickFormat.js @@ -785,23 +785,6 @@ var Zotero_QuickFormat = new function () { } /** - * Called when the user begins to drag the window - */ - this.onDragStart = function(el, event) { - dragX = event.clientX; - dragY = event.clientY; - window.addEventListener("mousemove", _onDrag, false); - window.addEventListener("mouseup", function() { window.removeEventListener("mousemove", _onDrag, false) }, false); - } - - /** - * Called during the window drag - */ - function _onDrag(event) { - window.moveTo(event.screenX-dragX, event.screenY-dragY); - } - - /** * Makes "Enter" work in the panel */ this.onPanelKeyPress = function(event) { diff --git a/chrome/content/zotero/integration/quickFormat.xul b/chrome/content/zotero/integration/quickFormat.xul @@ -42,7 +42,7 @@ <script src="../include.js"/> <script src="quickFormat.js"/> - <hbox id="quick-format-entry" ondragstart="Zotero_QuickFormat.onDragStart(this, event)"> + <windowdragbox orient="horizontal" id="quick-format-entry"> <hbox id="quick-format-search" flex="1" align="start"> <toolbarbutton id="zotero-icon" type="menu"> <menupopup> @@ -59,7 +59,7 @@ <iframe id="quick-format-iframe" ondragstart="event.stopPropagation()" src="data:application/xhtml+xml,%3C!DOCTYPE%20html%20PUBLIC%20%22-//W3C//DTD%20XHTML%201.0%20Strict//EN%22%20%22http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd%22%3E%3Chtml%20xmlns=%22http://www.w3.org/1999/xhtml%22%3E%3Chead%3E%3Clink%20rel=%22stylesheet%22%20type=%22text/css%22%20href=%22chrome://zotero/skin/integration.css%22/%3E%3Clink%20rel=%22stylesheet%22%20type=%22text/css%22%20href=%22chrome://zotero-platform/content/integration.css%22/%3E%3C/head%3E%3Cbody%20contenteditable=%22true%22%20id=%22quick-format-editor%22/%3E%3C/html%3E" tabindex="1" flex="1"/> </hbox> - </hbox> + </windowdragbox> <panel id="quick-format-reference-panel" noautofocus="true" norestorefocus="true"> <richlistbox id="quick-format-reference-list" flex="1"/> </panel>