- add resizer to integration windows
- don't automatically resize integration windows if a button is pressed - move integration js/xul to integration subdirectory
This commit is contained in:
parent
4a2a1db3a4
commit
f5c988f918
9 changed files with 77 additions and 92 deletions
|
@ -42,8 +42,7 @@ var Zotero_File_Interface_Bibliography = new function() {
|
|||
function init() {
|
||||
// Set font size from pref
|
||||
// Affects bibliography.xul and integrationDocPrefs.xul
|
||||
var sbc = document.getElementById('zotero-bibliography-container');
|
||||
if(sbc) Zotero.setFontSize(sbc);
|
||||
Zotero.setFontSize(document.documentElement);
|
||||
|
||||
if(window.arguments && window.arguments.length) {
|
||||
_io = window.arguments[0];
|
||||
|
|
|
@ -57,8 +57,8 @@ var Zotero_Citation_Dialog = new function () {
|
|||
* initialize add citation dialog
|
||||
*/
|
||||
function load() {
|
||||
document.getElementById("multiple-sources-button").label = Zotero.getString("citation.multipleSources");
|
||||
document.getElementById("show-editor-button").label = Zotero.getString("citation.showEditor");
|
||||
document.documentElement.getButton("extra1").label = Zotero.getString("citation.multipleSources");
|
||||
document.documentElement.getButton("extra2").label = Zotero.getString("citation.showEditor");
|
||||
|
||||
io = window.arguments[0].wrappedJSObject;
|
||||
|
||||
|
@ -145,7 +145,7 @@ var Zotero_Citation_Dialog = new function () {
|
|||
// var itemDataID = itemID+"::"+0;
|
||||
document.getElementById("multiple-sources").hidden = undefined;
|
||||
document.getElementById("zotero-add-citation-dialog").width = "750";
|
||||
document.getElementById("multiple-sources-button").label = Zotero.getString("citation.singleSource");
|
||||
document.documentElement.getButton("extra1").label = Zotero.getString("citation.singleSource");
|
||||
// move user field content to multiple before adding XXXXX
|
||||
if (itemID) {
|
||||
// _itemData[itemDataID] = new Object();
|
||||
|
@ -157,8 +157,6 @@ var Zotero_Citation_Dialog = new function () {
|
|||
_itemData[itemID][box] = element[_preserveData[box]];
|
||||
}
|
||||
}
|
||||
window.sizeToContent();
|
||||
window.moveTo((window.screenX-75), window.screenY);
|
||||
treeItemSelected();
|
||||
// disable adding info until citation added
|
||||
_itemSelected(false);
|
||||
|
@ -172,9 +170,7 @@ var Zotero_Citation_Dialog = new function () {
|
|||
} else {
|
||||
document.getElementById("multiple-sources").hidden = true;
|
||||
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);
|
||||
document.documentElement.getButton("extra1").label = Zotero.getString("citation.multipleSources");
|
||||
|
||||
// enable all fields
|
||||
for(var i in _preserveData) {
|
||||
|
@ -345,16 +341,14 @@ var Zotero_Citation_Dialog = new function () {
|
|||
_previewShown = !_previewShown;
|
||||
|
||||
if(_previewShown) {
|
||||
document.getElementById("show-editor-button").label = Zotero.getString("citation.hideEditor");
|
||||
window.sizeToContent();
|
||||
document.documentElement.getButton("extra2").label = Zotero.getString("citation.hideEditor");
|
||||
if(text) {
|
||||
editor.value = text;
|
||||
} else {
|
||||
_updatePreview();
|
||||
}
|
||||
} else {
|
||||
document.getElementById("show-editor-button").label = Zotero.getString("citation.showEditor");
|
||||
window.sizeToContent();
|
||||
document.documentElement.getButton("extra2").label = Zotero.getString("citation.showEditor");
|
||||
}
|
||||
}
|
||||
|
|
@ -21,6 +21,7 @@
|
|||
***** END LICENSE BLOCK *****
|
||||
-->
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://global/skin/dialog.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://zotero/skin/zotero.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://zotero/skin/overlay.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://zotero/skin/integration.css" type="text/css"?>
|
||||
|
@ -35,16 +36,18 @@
|
|||
onunload="doUnload();"
|
||||
ondialogaccept="return Zotero_Citation_Dialog.accept();"
|
||||
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"
|
||||
persist="screenX screenY width height">
|
||||
persist="screenX screenY width height"
|
||||
resizable="true"
|
||||
buttons="extra1,extra2,accept,cancel"
|
||||
ondialogextra2="Zotero_Citation_Dialog.toggleEditor()"
|
||||
ondialogextra1="Zotero_Citation_Dialog.toggleMultipleSources()">
|
||||
|
||||
<script src="include.js"/>
|
||||
<script src="selectItemsDialog.js"/>
|
||||
<script src="../include.js"/>
|
||||
<script src="../selectItemsDialog.js"/>
|
||||
<script src="addCitationDialog.js"/>
|
||||
|
||||
<vbox id="zotero-select-items-container" flex="1" style="padding: 1em">
|
||||
<vbox id="zotero-select-items-container" flex="1">
|
||||
<vbox flex="1">
|
||||
<hbox flex="1">
|
||||
<vbox align="stretch" flex="1">
|
||||
|
@ -193,18 +196,5 @@
|
|||
</vbox>
|
||||
|
||||
<textbox id="editor" type="styled" mode="integration" hidden="true" flex="1"/>
|
||||
|
||||
<hbox style="margin-top: 15px">
|
||||
<hbox>
|
||||
<button id="show-editor-button" oncommand="Zotero_Citation_Dialog.toggleEditor()"/>
|
||||
<button id="multiple-sources-button" oncommand="Zotero_Citation_Dialog.toggleMultipleSources()"/>
|
||||
</hbox>
|
||||
<vbox flex="1" align="end">
|
||||
<hbox>
|
||||
<button dlgtype="cancel"/>
|
||||
<button dlgtype="accept" disabled="true"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</dialog>
|
|
@ -37,14 +37,14 @@
|
|||
buttons="accept"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
style="padding: 0 5px 15px"
|
||||
persist="screenX screenY width height">
|
||||
persist="screenX screenY width height"
|
||||
resizable="true">
|
||||
|
||||
<script src="include.js"/>
|
||||
<script src="selectItemsDialog.js"/>
|
||||
<script src="../include.js"/>
|
||||
<script src="../selectItemsDialog.js"/>
|
||||
<script src="editBibliographyDialog.js"/>
|
||||
|
||||
<vbox id="zotero-select-items-container" flex="1" style="padding: 1em">
|
||||
<vbox id="zotero-select-items-container" flex="1">
|
||||
<vbox flex="1">
|
||||
<hbox flex="1">
|
||||
<vbox align="stretch" flex="1">
|
45
chrome/content/zotero/integration/integrationDocPrefs.xul
Normal file
45
chrome/content/zotero/integration/integrationDocPrefs.xul
Normal file
|
@ -0,0 +1,45 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin/global.css"?>
|
||||
<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css"?>
|
||||
<?xml-stylesheet href="chrome://zotero/skin/bibliography.css"?>
|
||||
<!DOCTYPE window SYSTEM "chrome://zotero/locale/zotero.dtd">
|
||||
|
||||
<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"
|
||||
persist="screenX screenY">
|
||||
|
||||
<script src="../include.js"/>
|
||||
<script src="../bibliography.js"/>
|
||||
|
||||
<groupbox>
|
||||
<caption label="&zotero.bibliography.style.label;"/>
|
||||
<listbox id="style-listbox" onselect="Zotero_File_Interface_Bibliography.styleChanged()"/>
|
||||
</groupbox>
|
||||
|
||||
<groupbox>
|
||||
<caption label="&zotero.integration.prefs.displayAs.label;"/>
|
||||
<radiogroup id="displayAs" orient="horizontal">
|
||||
<radio id="footnotes" label="&zotero.integration.prefs.footnotes.label;" selected="true"/>
|
||||
<radio id="endnotes" label="&zotero.integration.prefs.endnotes.label;"/>
|
||||
</radiogroup>
|
||||
</groupbox>
|
||||
|
||||
<groupbox>
|
||||
<caption label="&zotero.integration.prefs.formatUsing.label;"/>
|
||||
|
||||
<radiogroup id="formatUsing" orient="vertical">
|
||||
<radio id="fields" selected="true"/>
|
||||
<label class="radioDescription" id="fields-caption"/>
|
||||
<label class="radioDescription" id="fields-file-format-notice"/>
|
||||
<radio id="bookmarks" label="&zotero.integration.prefs.bookmarks.label;"/>
|
||||
<description class="radioDescription" id="bookmarks-caption" style="white-space: pre;">&zotero.integration.prefs.bookmarks.caption;</description>
|
||||
<description class="radioDescription" id="bookmarks-file-format-notice"/>
|
||||
</radiogroup>
|
||||
</groupbox>
|
||||
</dialog>
|
|
@ -1,48 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin/global.css"?>
|
||||
<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css"?>
|
||||
<?xml-stylesheet href="chrome://zotero/skin/bibliography.css"?>
|
||||
<!DOCTYPE window SYSTEM "chrome://zotero/locale/zotero.dtd">
|
||||
|
||||
<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"
|
||||
persist="screenX screenY">
|
||||
|
||||
<script src="include.js"/>
|
||||
<script src="bibliography.js"/>
|
||||
|
||||
<vbox id="zotero-bibliography-container" style="padding: 0.5em">
|
||||
<groupbox>
|
||||
<caption label="&zotero.bibliography.style.label;"/>
|
||||
<listbox id="style-listbox" onselect="Zotero_File_Interface_Bibliography.styleChanged()"/>
|
||||
</groupbox>
|
||||
|
||||
<groupbox>
|
||||
<caption label="&zotero.integration.prefs.displayAs.label;"/>
|
||||
<radiogroup id="displayAs" orient="horizontal">
|
||||
<radio id="footnotes" label="&zotero.integration.prefs.footnotes.label;" selected="true"/>
|
||||
<radio id="endnotes" label="&zotero.integration.prefs.endnotes.label;"/>
|
||||
</radiogroup>
|
||||
</groupbox>
|
||||
|
||||
<groupbox>
|
||||
<caption label="&zotero.integration.prefs.formatUsing.label;"/>
|
||||
|
||||
<radiogroup id="formatUsing" orient="vertical">
|
||||
<radio id="fields" selected="true"/>
|
||||
<label class="radioDescription" id="fields-caption"/>
|
||||
<label class="radioDescription" id="fields-file-format-notice"/>
|
||||
<radio id="bookmarks" label="&zotero.integration.prefs.bookmarks.label;"/>
|
||||
<description class="radioDescription" id="bookmarks-caption" style="white-space: pre;">&zotero.integration.prefs.bookmarks.caption;</description>
|
||||
<description class="radioDescription" id="bookmarks-file-format-notice"/>
|
||||
</radiogroup>
|
||||
</groupbox>
|
||||
</vbox>
|
||||
</dialog>
|
|
@ -861,7 +861,7 @@ Zotero.Integration.Session.prototype.setDocPrefs = function(primaryFieldType, se
|
|||
|
||||
Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
|
||||
.getService(Components.interfaces.nsIWindowWatcher)
|
||||
.openWindow(null, 'chrome://zotero/content/integrationDocPrefs.xul', '',
|
||||
.openWindow(null, 'chrome://zotero/content/integration/integrationDocPrefs.xul', '',
|
||||
'chrome,modal,centerscreen', io, true);
|
||||
if(!io.style) throw new Zotero.Integration.UserCancelledException();
|
||||
|
||||
|
@ -898,7 +898,7 @@ Zotero.Integration.Session.prototype.reselectItem = function(exception) {
|
|||
Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
|
||||
.getService(Components.interfaces.nsIWindowWatcher)
|
||||
.openWindow(null,'chrome://zotero/content/selectItemsDialog.xul', '',
|
||||
'chrome,modal,centerscreen,resizable=yes', io, true);
|
||||
'chrome,modal,centerscreen,resizable', io, true);
|
||||
|
||||
if(io.dataOut && io.dataOut.length) {
|
||||
var itemID = io.dataOut[0];
|
||||
|
@ -1252,8 +1252,8 @@ Zotero.Integration.Session.prototype.editCitation = function(index, noteIndex, c
|
|||
Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
|
||||
.getService(Components.interfaces.nsIWindowWatcher)
|
||||
.openWindow(
|
||||
null, 'chrome://zotero/content/addCitationDialog.xul', '',
|
||||
'chrome,modal,centerscreen,resizable=yes',
|
||||
null, 'chrome://zotero/content/integration/addCitationDialog.xul', '',
|
||||
'chrome,modal,centerscreen,resizable',
|
||||
io
|
||||
);
|
||||
|
||||
|
@ -1399,8 +1399,8 @@ 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,centerscreen,resizable=yes',
|
||||
null, 'chrome://zotero/content/integration/editBibliographyDialog.xul', '',
|
||||
'chrome,modal,centerscreen,resizable',
|
||||
io,
|
||||
true
|
||||
);
|
||||
|
|
|
@ -143,6 +143,11 @@ zoteromergepane {
|
|||
-moz-binding: url('chrome://zotero/content/bindings/merge.xml#merge-pane');
|
||||
}
|
||||
|
||||
dialog[resizable="true"]
|
||||
{
|
||||
-moz-binding: url('chrome://zotero/content/bindings/resizabledialog.xml#resizabledialog');
|
||||
}
|
||||
|
||||
.zotero-clicky
|
||||
{
|
||||
-moz-border-radius: 6px;
|
||||
|
|
Loading…
Reference in a new issue