- 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;
|
io = window.arguments[0].wrappedJSObject;
|
||||||
|
|
||||||
// find accept button
|
// 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");
|
_autoRegeneratePref = Zotero.Prefs.get("integration.autoRegenerate");
|
||||||
|
|
||||||
// if a style with sortable citations, present checkbox
|
// if a style with sortable citations, present checkbox
|
||||||
|
@ -144,7 +144,7 @@ var Zotero_Citation_Dialog = new function () {
|
||||||
_multipleSourcesOn = !_multipleSourcesOn;
|
_multipleSourcesOn = !_multipleSourcesOn;
|
||||||
if(_multipleSourcesOn) {
|
if(_multipleSourcesOn) {
|
||||||
document.getElementById("multiple-sources").hidden = undefined;
|
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");
|
document.getElementById("multiple-sources-button").label = Zotero.getString("citation.singleSource");
|
||||||
window.sizeToContent();
|
window.sizeToContent();
|
||||||
window.moveTo((window.screenX-75), window.screenY);
|
window.moveTo((window.screenX-75), window.screenY);
|
||||||
|
@ -153,7 +153,7 @@ var Zotero_Citation_Dialog = new function () {
|
||||||
_itemSelected(false);
|
_itemSelected(false);
|
||||||
} else {
|
} else {
|
||||||
document.getElementById("multiple-sources").hidden = true;
|
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");
|
document.getElementById("multiple-sources-button").label = Zotero.getString("citation.multipleSources");
|
||||||
window.sizeToContent();
|
window.sizeToContent();
|
||||||
window.moveTo((window.screenX+75), window.screenY);
|
window.moveTo((window.screenX+75), window.screenY);
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
<!DOCTYPE window SYSTEM "chrome://zotero/locale/zotero.dtd">
|
<!DOCTYPE window SYSTEM "chrome://zotero/locale/zotero.dtd">
|
||||||
|
|
||||||
<dialog
|
<dialog
|
||||||
id="add-citation-dialog"
|
id="zotero-add-citation-dialog"
|
||||||
orient="vertical"
|
orient="vertical"
|
||||||
title="&zotero.integration.addEditCitation.title;"
|
title="&zotero.integration.addEditCitation.title;"
|
||||||
width="600" height="450"
|
width="600" height="450"
|
||||||
|
@ -37,7 +37,8 @@
|
||||||
ondialogcancel="Zotero_Citation_Dialog.cancel();"
|
ondialogcancel="Zotero_Citation_Dialog.cancel();"
|
||||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
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="include.js"/>
|
||||||
<script src="selectItemsDialog.js"/>
|
<script src="selectItemsDialog.js"/>
|
||||||
|
@ -49,7 +50,8 @@
|
||||||
<vbox align="stretch" flex="1">
|
<vbox align="stretch" flex="1">
|
||||||
<hbox align="center" pack="end">
|
<hbox align="center" pack="end">
|
||||||
<label value="&zotero.toolbar.search.label;" control="zotero-tb-search"/>
|
<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"/>
|
<toolbarbutton id="zotero-tb-search-cancel" oncommand="this.parentNode.value='';" hidden="true"/>
|
||||||
</textbox>
|
</textbox>
|
||||||
</hbox>
|
</hbox>
|
||||||
|
|
|
@ -112,7 +112,7 @@ var Zotero_File_Interface_Bibliography = new function() {
|
||||||
|
|
||||||
// add border on Windows
|
// add border on Windows
|
||||||
if(Zotero.isWin) {
|
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();
|
window.sizeToContent();
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
<!DOCTYPE window SYSTEM "chrome://zotero/locale/zotero.dtd">
|
<!DOCTYPE window SYSTEM "chrome://zotero/locale/zotero.dtd">
|
||||||
|
|
||||||
<dialog
|
<dialog
|
||||||
id="edit-bibliography-dialog"
|
id="zotero-edit-bibliography-dialog"
|
||||||
orient="vertical"
|
orient="vertical"
|
||||||
title="&zotero.integration.editBibliography.title;"
|
title="&zotero.integration.editBibliography.title;"
|
||||||
width="750" height="450"
|
width="750" height="450"
|
||||||
|
@ -37,7 +37,8 @@
|
||||||
buttons="accept"
|
buttons="accept"
|
||||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
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="include.js"/>
|
||||||
<script src="selectItemsDialog.js"/>
|
<script src="selectItemsDialog.js"/>
|
||||||
|
|
|
@ -5,14 +5,15 @@
|
||||||
<!DOCTYPE window SYSTEM "chrome://zotero/locale/zotero.dtd">
|
<!DOCTYPE window SYSTEM "chrome://zotero/locale/zotero.dtd">
|
||||||
|
|
||||||
<dialog
|
<dialog
|
||||||
id="doc-prefs-dialog"
|
id="zotero-doc-prefs-dialog"
|
||||||
orient="vertical"
|
orient="vertical"
|
||||||
buttons="accept"
|
buttons="accept"
|
||||||
title="&zotero.integration.docPrefs.title;"
|
title="&zotero.integration.docPrefs.title;"
|
||||||
onload="Zotero_File_Interface_Bibliography.init();"
|
onload="Zotero_File_Interface_Bibliography.init();"
|
||||||
ondialogaccept="Zotero_File_Interface_Bibliography.acceptSelection();"
|
ondialogaccept="Zotero_File_Interface_Bibliography.acceptSelection();"
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
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="include.js"/>
|
||||||
<script src="bibliography.js"/>
|
<script src="bibliography.js"/>
|
||||||
|
|
|
@ -39,10 +39,6 @@ function doLoad()
|
||||||
|
|
||||||
collectionsView = new Zotero.CollectionTreeView();
|
collectionsView = new Zotero.CollectionTreeView();
|
||||||
document.getElementById('zotero-collections-tree').view = collectionsView;
|
document.getElementById('zotero-collections-tree').view = collectionsView;
|
||||||
|
|
||||||
// move to center of screen
|
|
||||||
window.sizeToContent();
|
|
||||||
window.centerWindowOnScreen();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function doUnload()
|
function doUnload()
|
||||||
|
|
|
@ -519,7 +519,7 @@ Zotero.Integration.SOAP = new function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
watcher.openWindow(null, 'chrome://zotero/content/integrationDocPrefs.xul', '',
|
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);
|
session.setStyle(io.style, io.useEndnotes, io.useBookmarks);
|
||||||
if(!oldStyle || oldStyle == io.style) {
|
if(!oldStyle || oldStyle == io.style) {
|
||||||
session.regenerateAll = session.bibliographyHasChanged = true;
|
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"]
|
Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
|
||||||
.getService(Components.interfaces.nsIWindowWatcher)
|
.getService(Components.interfaces.nsIWindowWatcher)
|
||||||
.openWindow(null, 'chrome://zotero/content/addCitationDialog.xul', '',
|
.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) {
|
if(citation && !io.citation.citationItems.length) {
|
||||||
io.citation = citation;
|
io.citation = citation;
|
||||||
|
@ -958,7 +958,7 @@ Zotero.Integration.Session.prototype.editBibliography = function() {
|
||||||
Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
|
Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
|
||||||
.getService(Components.interfaces.nsIWindowWatcher)
|
.getService(Components.interfaces.nsIWindowWatcher)
|
||||||
.openWindow(null, 'chrome://zotero/content/editBibliographyDialog.xul', '',
|
.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