Merging [1801], [2306], and [2343] to the 1.0 branch for Firefox 3 compatibility
Still a number of major things that don't work
This commit is contained in:
parent
9ee5fde100
commit
3c62db5baa
|
@ -40,5 +40,7 @@ locale zotero zh-TW chrome/locale/zh-TW/zotero/
|
|||
skin zotero default chrome/skin/default/zotero/
|
||||
|
||||
overlay chrome://browser/content/browser.xul chrome://zotero/content/overlay.xul
|
||||
overlay chrome://browser/content/browser.xul chrome://zotero/content/itemPane.xul
|
||||
|
||||
style chrome://browser/content/browser.xul chrome://zotero/skin/zotero.css
|
||||
style chrome://global/content/customizeToolbar.xul chrome://zotero/skin/zotero.css
|
||||
|
|
|
@ -286,7 +286,7 @@
|
|||
Note: Code in tagsbox.xml is dependent on the DOM path between the
|
||||
tagsbox and tagsLabel above, so be sure to update fixPopup() if it changes
|
||||
-->
|
||||
<xul:popup id="tagsPopup" ignorekeys="true" width="300"
|
||||
<xul:popup id="tagsPopup" ignorekeys="true"
|
||||
onpopupshown="if (!document.commandDispatcher.focusedElement || document.commandDispatcher.focusedElement.tagName=='xul:label'){ /* DEBUG: it would be nice to make this work -- if (this.firstChild.count==0){ this.firstChild.new(); } */ this.setAttribute('showing', 'true'); }"
|
||||
onpopuphidden="if (!document.commandDispatcher.focusedElement || document.commandDispatcher.focusedElement.tagName=='xul:label'){ this.setAttribute('showing', 'false'); }">
|
||||
<xul:tagsbox id="tags" flex="1"/>
|
||||
|
|
|
@ -265,8 +265,8 @@
|
|||
<method name="closePopup">
|
||||
<body>
|
||||
<![CDATA[
|
||||
if (this.parentNode.getAttribute('showing')=='true') {
|
||||
this.parentNode.setAttribute('showing', false);
|
||||
if (this.parentNode.hidePopup) {
|
||||
this.parentNode.hidePopup()
|
||||
}
|
||||
]]>
|
||||
</body>
|
||||
|
@ -283,7 +283,7 @@
|
|||
<xul:scrollbox xbl:inherits="flex" orient="vertical" style="overflow:auto">
|
||||
<xul:hbox align="center">
|
||||
<xul:label id="tagsNum"/>
|
||||
<xul:button label="&zotero.item.add;" oncommand="this.parentNode.parentNode.parentNode.new();"/>
|
||||
<xul:button label="&zotero.item.add;" oncommand="document.getBindingParent(this).new();"/>
|
||||
</xul:hbox>
|
||||
<xul:grid>
|
||||
<xul:columns>
|
||||
|
|
|
@ -1006,7 +1006,7 @@ var ZoteroItemPane = new function()
|
|||
_dynamicFields.focus();
|
||||
}
|
||||
|
||||
//Zotero.debug('Showing editor');
|
||||
Zotero.debug('Showing editor');
|
||||
|
||||
var fieldName = elem.getAttribute('fieldname');
|
||||
var tabindex = elem.getAttribute('ztabindex');
|
||||
|
@ -1123,6 +1123,10 @@ var ZoteroItemPane = new function()
|
|||
// If result uses two fields, save both
|
||||
if (numFields==2)
|
||||
{
|
||||
// Manually clear autocomplete controller's reference to
|
||||
// textbox to prevent error next time around
|
||||
textbox.mController.input = null;
|
||||
|
||||
var [field, creatorIndex, creatorField] =
|
||||
textbox.getAttribute('fieldname').split('-');
|
||||
|
||||
|
@ -1167,6 +1171,9 @@ var ZoteroItemPane = new function()
|
|||
switch (event.keyCode)
|
||||
{
|
||||
case event.DOM_VK_RETURN:
|
||||
// Prevent blur on textbox above
|
||||
event.preventDefault();
|
||||
|
||||
var fieldname = target.getAttribute('fieldname');
|
||||
// Use shift-enter as the save action for the larger fields
|
||||
if ((fieldname == 'abstractNote' || fieldname == 'extra')
|
||||
|
@ -1220,8 +1227,15 @@ var ZoteroItemPane = new function()
|
|||
case event.DOM_VK_ESCAPE:
|
||||
// Reset field to original value
|
||||
target.value = target.getAttribute('value');
|
||||
|
||||
var tagsbox = Zotero.getAncestorByTagName(focused, 'tagsbox');
|
||||
|
||||
focused.blur();
|
||||
|
||||
if (tagsbox) {
|
||||
tagsbox.closePopup();
|
||||
}
|
||||
|
||||
// Return focus to items pane
|
||||
var tree = document.getElementById('zotero-items-tree');
|
||||
if (tree) {
|
||||
|
@ -1243,12 +1257,13 @@ var ZoteroItemPane = new function()
|
|||
|
||||
function hideEditor(t, saveChanges)
|
||||
{
|
||||
//Zotero.debug('Hiding editor');
|
||||
Zotero.debug('Hiding editor');
|
||||
var textbox = Zotero.getAncestorByTagName(t, 'textbox');
|
||||
if (!textbox){
|
||||
Zotero.debug('Textbox not found in hideEditor');
|
||||
return;
|
||||
}
|
||||
|
||||
var fieldName = textbox.getAttribute('fieldname');
|
||||
var tabindex = textbox.getAttribute('ztabindex');
|
||||
|
||||
|
@ -1349,10 +1364,7 @@ var ZoteroItemPane = new function()
|
|||
if (existingTypes && existingTypes.indexOf(1) != -1) {
|
||||
_lastTabIndex--;
|
||||
}
|
||||
|
||||
var id = tagsbox.add(value);
|
||||
|
||||
// DEBUG: why does this need to continue if added?
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1370,6 +1382,7 @@ var ZoteroItemPane = new function()
|
|||
}
|
||||
catch (e) {}
|
||||
tagsbox.fixPopup();
|
||||
tagsbox.closePopup();
|
||||
|
||||
_tabDirection = false;
|
||||
return;
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
-->
|
||||
<?xml-stylesheet href="chrome://zotero/skin/itemPane.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://zotero-platform/content/itemPane.css" type="text/css"?>
|
||||
|
||||
<!DOCTYPE window SYSTEM "chrome://zotero/locale/zotero.dtd">
|
||||
|
||||
<overlay
|
||||
|
|
|
@ -23,13 +23,12 @@
|
|||
<?xml-stylesheet href="chrome://zotero/skin/overlay.css" type="text/css"?>
|
||||
|
||||
<!DOCTYPE overlay [
|
||||
<!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd"> %globalDTD;
|
||||
<!ENTITY % zoteroDTD SYSTEM "chrome://zotero/locale/zotero.dtd"> %zoteroDTD;
|
||||
<!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd"> %globalDTD;
|
||||
<!ENTITY % zoteroDTD SYSTEM "chrome://zotero/locale/zotero.dtd"> %zoteroDTD;
|
||||
]>
|
||||
|
||||
<overlay id="zotero"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<?xul-overlay href="itemPane.xul" ?>
|
||||
|
||||
<!-- Include the global XPCOM object -->
|
||||
<script src="include.js"/>
|
||||
|
|
|
@ -62,11 +62,6 @@ Zotero.ProgressWindowSet = new function() {
|
|||
if (parent) {
|
||||
var right = parent.screenX + parent.outerWidth;
|
||||
var bottom = parent.screenY + parent.outerHeight;
|
||||
// On OS X outerHeight doesn't include 22px title bar and
|
||||
// moveTo() positions popups 22px below the specified location
|
||||
if (Zotero.isMac) {
|
||||
bottom += (22 * 2);
|
||||
}
|
||||
}
|
||||
else {
|
||||
var right = progressWin.screen.width + X_OFFSET - X_WINDOWLESS_OFFSET;
|
||||
|
@ -145,11 +140,11 @@ Zotero.ProgressWindow = function(_window){
|
|||
}
|
||||
|
||||
if (_window) {
|
||||
_progressWindow = _window.openDialog("chrome://zotero/chrome/progressWindow.xul",
|
||||
_progressWindow = _window.openDialog("chrome://zotero/content/progressWindow.xul",
|
||||
"", "chrome,dialog=no,titlebar=no,popup=yes");
|
||||
}
|
||||
else {
|
||||
_progressWindow = ww.openWindow(null, "chrome://zotero/chrome/progressWindow.xul",
|
||||
_progressWindow = ww.openWindow(null, "chrome://zotero/content/progressWindow.xul",
|
||||
"", "chrome,dialog=no,titlebar=no,popup=yes", null);
|
||||
}
|
||||
_progressWindow.addEventListener("pageshow", _onWindowLoaded, false);
|
||||
|
|
|
@ -8,3 +8,7 @@
|
|||
{
|
||||
cursor: pointer !important;
|
||||
}
|
||||
|
||||
#tagsPopup {
|
||||
min-width: 300px;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user