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
|
@ -116,6 +116,7 @@ var ZoteroAdvancedSearch = new function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
lastWin.ZoteroPane.selectItem(item.getID(), false, true);
|
lastWin.ZoteroPane.selectItem(item.getID(), false, true);
|
||||||
|
lastWin.focus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,8 @@
|
||||||
persist="screenX screenY width height"
|
persist="screenX screenY width height"
|
||||||
onload="ZoteroAdvancedSearch.onLoad()"
|
onload="ZoteroAdvancedSearch.onLoad()"
|
||||||
onunload="ZoteroAdvancedSearch.onUnload()"
|
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="include.js"/>
|
||||||
<script src="advancedSearch.js"/>
|
<script src="advancedSearch.js"/>
|
||||||
|
|
|
@ -450,6 +450,18 @@ var ZoteroPane = new function()
|
||||||
|
|
||||||
|
|
||||||
function openAdvancedSearchWindow() {
|
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();
|
var s = new Zotero.Search();
|
||||||
s.addCondition('title', 'contains', '');
|
s.addCondition('title', 'contains', '');
|
||||||
var io = {dataIn: {search: s}, dataOut: null};
|
var io = {dataIn: {search: s}, dataOut: null};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user