mirror of
https://github.com/zotero/zotero.git
synced 2026-10-08 03:08:19 +00:00
Make double-click in advanced search windows focus the browser window, and only allow one advanced search window
This commit is contained in:
parent
0dbbe046c5
commit
81dfd56f55
3 changed files with 15 additions and 1 deletions
|
|
@ -116,6 +116,7 @@ var ZoteroAdvancedSearch = new function() {
|
|||
}
|
||||
|
||||
lastWin.ZoteroPane.selectItem(item.getID(), false, true);
|
||||
lastWin.focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@
|
|||
persist="screenX screenY width height"
|
||||
onload="ZoteroAdvancedSearch.onLoad()"
|
||||
onunload="ZoteroAdvancedSearch.onUnload()"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
windowtype="zotero:search">
|
||||
|
||||
<script src="include.js"/>
|
||||
<script src="advancedSearch.js"/>
|
||||
|
|
|
|||
|
|
@ -450,6 +450,18 @@ var ZoteroPane = new function()
|
|||
|
||||
|
||||
function openAdvancedSearchWindow() {
|
||||
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
|
||||
.getService(Components.interfaces.nsIWindowMediator);
|
||||
var enumerator = wm.getEnumerator('zotero:search');
|
||||
while (enumerator.hasMoreElements()) {
|
||||
var win = enumerator.getNext();
|
||||
}
|
||||
|
||||
if (win) {
|
||||
win.focus();
|
||||
return;
|
||||
}
|
||||
|
||||
var s = new Zotero.Search();
|
||||
s.addCondition('title', 'contains', '');
|
||||
var io = {dataIn: {search: s}, dataOut: null};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue