- Allow screen position of integrationDocPrefs, addCitationDialog, and editBibliographyDialog to persist
- Pressing Escape in empty search field now closes citation window
This commit is contained in:
parent
59344b3985
commit
79809caddc
|
@ -66,7 +66,7 @@ var Zotero_Citation_Dialog = new function () {
|
|||
io = window.arguments[0].wrappedJSObject;
|
||||
|
||||
// find accept button
|
||||
_acceptButton = document.getElementById("add-citation-dialog").getButton("accept");
|
||||
_acceptButton = document.getElementById("zotero-add-citation-dialog").getButton("accept");
|
||||
_autoRegeneratePref = Zotero.Prefs.get("integration.autoRegenerate");
|
||||
|
||||
// if a style with sortable citations, present checkbox
|
||||
|
@ -144,7 +144,7 @@ var Zotero_Citation_Dialog = new function () {
|
|||
_multipleSourcesOn = !_multipleSourcesOn;
|
||||
if(_multipleSourcesOn) {
|
||||
document.getElementById("multiple-sources").hidden = undefined;
|
||||
document.getElementById("add-citation-dialog").width = "750";
|
||||
document.getElementById("zotero-add-citation-dialog").width = "750";
|
||||
document.getElementById("multiple-sources-button").label = Zotero.getString("citation.singleSource");
|
||||
window.sizeToContent();
|
||||
window.moveTo((window.screenX-75), window.screenY);
|
||||
|
@ -153,7 +153,7 @@ var Zotero_Citation_Dialog = new function () {
|
|||
_itemSelected(false);
|
||||
} else {
|
||||
document.getElementById("multiple-sources").hidden = true;
|
||||
document.getElementById("add-citation-dialog").width = "600";
|
||||
document.getElementById("zotero-add-citation-dialog").width = "600";
|
||||
document.getElementById("multiple-sources-button").label = Zotero.getString("citation.multipleSources");
|
||||
window.sizeToContent();
|
||||
window.moveTo((window.screenX+75), window.screenY);
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<!DOCTYPE window SYSTEM "chrome://zotero/locale/zotero.dtd">
|
||||
|
||||
<dialog
|
||||
id="add-citation-dialog"
|
||||
id="zotero-add-citation-dialog"
|
||||
orient="vertical"
|
||||
title="&zotero.integration.addEditCitation.title;"
|
||||
width="600" height="450"
|
||||
|
@ -37,7 +37,8 @@
|
|||
ondialogcancel="Zotero_Citation_Dialog.cancel();"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
style="padding: 0">
|
||||
style="padding: 0"
|
||||
persist="screenX screenY">
|
||||
|
||||
<script src="include.js"/>
|
||||
<script src="selectItemsDialog.js"/>
|
||||
|
@ -49,7 +50,8 @@
|
|||
<vbox align="stretch" flex="1">
|
||||
<hbox align="center" pack="end">
|
||||
<label value="&zotero.toolbar.search.label;" control="zotero-tb-search"/>
|
||||
<textbox id="zotero-tb-search" type="timed" timeout="250" oncommand="onSearch()" dir="reverse" onkeypress="if(event.keyCode == event.DOM_VK_ESCAPE) { this.value = ''; this.doCommand('cmd_zotero_search'); return false; } return true;">
|
||||
<textbox id="zotero-tb-search" type="timed" timeout="250" oncommand="onSearch()" dir="reverse"
|
||||
onkeypress="if(event.keyCode == event.DOM_VK_ESCAPE) { if (this.value == '') { cancelDialog(); return false; } this.value = ''; this.doCommand('cmd_zotero_search'); return false; } return true;">
|
||||
<toolbarbutton id="zotero-tb-search-cancel" oncommand="this.parentNode.value='';" hidden="true"/>
|
||||
</textbox>
|
||||
</hbox>
|
||||
|
|
|
@ -112,7 +112,7 @@ var Zotero_File_Interface_Bibliography = new function() {
|
|||
|
||||
// add border on Windows
|
||||
if(Zotero.isWin) {
|
||||
document.getElementById("doc-prefs-dialog").style.border = "1px solid black";
|
||||
document.getElementById("zotero-doc-prefs-dialog").style.border = "1px solid black";
|
||||
}
|
||||
}
|
||||
window.sizeToContent();
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<!DOCTYPE window SYSTEM "chrome://zotero/locale/zotero.dtd">
|
||||
|
||||
<dialog
|
||||
id="edit-bibliography-dialog"
|
||||
id="zotero-edit-bibliography-dialog"
|
||||
orient="vertical"
|
||||
title="&zotero.integration.editBibliography.title;"
|
||||
width="750" height="450"
|
||||
|
@ -37,7 +37,8 @@
|
|||
buttons="accept"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
style="padding: 0">
|
||||
style="padding: 0"
|
||||
persist="screenX screenY">
|
||||
|
||||
<script src="include.js"/>
|
||||
<script src="selectItemsDialog.js"/>
|
||||
|
|
|
@ -5,14 +5,15 @@
|
|||
<!DOCTYPE window SYSTEM "chrome://zotero/locale/zotero.dtd">
|
||||
|
||||
<dialog
|
||||
id="doc-prefs-dialog"
|
||||
id="zotero-doc-prefs-dialog"
|
||||
orient="vertical"
|
||||
buttons="accept"
|
||||
title="&zotero.integration.docPrefs.title;"
|
||||
onload="Zotero_File_Interface_Bibliography.init();"
|
||||
ondialogaccept="Zotero_File_Interface_Bibliography.acceptSelection();"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
style="padding: 0">
|
||||
style="padding: 0"
|
||||
persist="screenX screenY">
|
||||
|
||||
<script src="include.js"/>
|
||||
<script src="bibliography.js"/>
|
||||
|
|
|
@ -39,10 +39,6 @@ function doLoad()
|
|||
|
||||
collectionsView = new Zotero.CollectionTreeView();
|
||||
document.getElementById('zotero-collections-tree').view = collectionsView;
|
||||
|
||||
// move to center of screen
|
||||
window.sizeToContent();
|
||||
window.centerWindowOnScreen();
|
||||
}
|
||||
|
||||
function doUnload()
|
||||
|
|
|
@ -519,7 +519,7 @@ Zotero.Integration.SOAP = new function() {
|
|||
}
|
||||
|
||||
watcher.openWindow(null, 'chrome://zotero/content/integrationDocPrefs.xul', '',
|
||||
'chrome,modal'+(Zotero.isWin ? ',popup' : ''), io, true);
|
||||
'chrome,modal,centerscreen' + (Zotero.isWin ? ',popup' : ''), io, true);
|
||||
session.setStyle(io.style, io.useEndnotes, io.useBookmarks);
|
||||
if(!oldStyle || oldStyle == io.style) {
|
||||
session.regenerateAll = session.bibliographyHasChanged = true;
|
||||
|
@ -798,7 +798,7 @@ Zotero.Integration.Session.prototype.editCitation = function(index, citation) {
|
|||
Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
|
||||
.getService(Components.interfaces.nsIWindowWatcher)
|
||||
.openWindow(null, 'chrome://zotero/content/addCitationDialog.xul', '',
|
||||
'chrome,modal'+(Zotero.isWin ? ',popup' : ''), io);
|
||||
'chrome,modal,centerscreen' + (Zotero.isWin ? ',popup' : ''), io);
|
||||
|
||||
if(citation && !io.citation.citationItems.length) {
|
||||
io.citation = citation;
|
||||
|
@ -958,7 +958,7 @@ Zotero.Integration.Session.prototype.editBibliography = function() {
|
|||
Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
|
||||
.getService(Components.interfaces.nsIWindowWatcher)
|
||||
.openWindow(null, 'chrome://zotero/content/editBibliographyDialog.xul', '',
|
||||
'chrome,modal'+(Zotero.isWin ? ',popup' : ''), io, true);
|
||||
'chrome,modal,centerscreen' + (Zotero.isWin ? ',popup' : ''), io, true);
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user