diff --git a/chrome/content/zotero/bindings/itembox.xml b/chrome/content/zotero/bindings/itembox.xml index 4372e584d..d04ea9826 100644 --- a/chrome/content/zotero/bindings/itembox.xml +++ b/chrome/content/zotero/bindings/itembox.xml @@ -2404,7 +2404,19 @@ } next[0].click(); - this.ensureElementIsVisible(next[0]); + + // DEBUG: next[0] is always equal to the target element, + // but for some reason it's necessary to scroll to the next + // element when moving forward for the target element to + // be fully in view + if (!back && next[0].parentNode.nextSibling) { + var visElem = next[0].parentNode.nextSibling; + } + else { + var visElem = next[0]; + } + this.ensureElementIsVisible(visElem); + return true; ]]> diff --git a/chrome/content/zotero/bindings/tagsbox.xml b/chrome/content/zotero/bindings/tagsbox.xml index 50ef77e36..c08ae1582 100644 --- a/chrome/content/zotero/bindings/tagsbox.xml +++ b/chrome/content/zotero/bindings/tagsbox.xml @@ -689,7 +689,19 @@ } next[0].click(); - this.ensureElementIsVisible(next[0]); + + // DEBUG: next[0] is always equal to the target element, + // but for some reason it's necessary to scroll to the next + // element when moving forward for the target element to + // be fully in view + if (!back && next[0].parentNode.nextSibling) { + var visElem = next[0].parentNode.nextSibling; + } + else { + var visElem = next[0]; + } + this.ensureElementIsVisible(visElem); + return true; ]]> diff --git a/chrome/content/zotero/browser.js b/chrome/content/zotero/browser.js index ab530e772..8eb28f089 100644 --- a/chrome/content/zotero/browser.js +++ b/chrome/content/zotero/browser.js @@ -634,14 +634,7 @@ Zotero_Browser.Tab.prototype.clear = function() { /* * detects translators for this browser object */ -Zotero_Browser.Tab.prototype.detectTranslators = function(rootDoc, doc) { - // if there's already a scrapable page in the browser window, and it's - // still there, ensure it is actually part of the page, then return - if(this.page.translators && this.page.translators.length && this.page.document.location) { - if(this._searchFrames(rootDoc, this.page.document)) return; - this.clear(); - } - +Zotero_Browser.Tab.prototype.detectTranslators = function(rootDoc, doc) { if(doc instanceof HTMLDocument && doc.documentURI.substr(0, 6) != "about:") { // get translators var me = this; @@ -791,6 +784,17 @@ Zotero_Browser.Tab.prototype._selectItems = function(obj, itemList, callback) { */ Zotero_Browser.Tab.prototype._translatorsAvailable = function(translate, translators) { if(translators && translators.length) { + // if there's already a scrapable page in the browser window, and it's + // still there, ensure it is actually part of the page, then return + if(this.page.translators && this.page.translators.length && this.page.document.location) { + if(this.page.document.defaultView && !this.page.document.defaultView.closed) { + // if it is still there, switch translation to take place on + if(!translators.length || this.page.translators[0].priority <= translators[0].priority) return; + } else { + this.clear(); + } + } + this.page.translate = translate; this.page.translators = translators; this.page.document = translate.document; diff --git a/chrome/content/zotero/overlay.js b/chrome/content/zotero/overlay.js index 96de6951a..0db2d7c43 100644 --- a/chrome/content/zotero/overlay.js +++ b/chrome/content/zotero/overlay.js @@ -245,53 +245,6 @@ var ZoteroOverlay = new function() zoteroPane.height = 0; document.getElementById('content').setAttribute('collapsed', false); - - // turn off full window mode, if it was on - _setFullWindowMode(false); - - // Return focus to the browser content pane - window.content.window.focus(); - } - } - - /** - * Hides or shows navigation toolbars - * @param set {Boolean} Whether navigation toolbars should be hidden or shown - */ - function _setFullWindowMode(set) { - // hide or show navigation toolbars - if(!getNavToolbox) return; - var toolbox = getNavToolbox(); - if(set) { - // the below would be a good thing to do if the whole title bar (and not just the center - // part) got updated when it happened... - /*if(Zotero.isMac) { - titlebarcolorState = document.documentElement.getAttribute("activetitlebarcolor"); - document.documentElement.removeAttribute("activetitlebarcolor"); - }*/ - if(document.title != "Zotero") { - titleState = document.title; - document.title = "Zotero"; - } - - if(!toolbarCollapseState) { - toolbarCollapseState = [node.collapsed for each (node in toolbox.childNodes)]; - for(var i=0; i + windowtype="zotero:pref" ondialoghelp="Zotero_Preferences.openHelpLink()" + xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> + image="chrome://zotero/skin/prefs-general.png" + helpTopic="general"> @@ -156,7 +158,8 @@ To add a new preference: + image="chrome://zotero/skin/prefs-sync.png" + helpTopic="sync"> @@ -422,7 +425,8 @@ To add a new preference: + image="chrome://zotero/skin/prefs-search.png" + helpTopic="search"> @@ -511,7 +515,8 @@ To add a new preference: + image="chrome://zotero/skin/prefs-export.png" + helpTopic="export"> @@ -576,7 +581,8 @@ To add a new preference: + image="chrome://zotero/skin/prefs-styles.png" + helpTopic="cite"> @@ -635,7 +641,8 @@ To add a new preference: + image="chrome://zotero/skin/prefs-keys.png" + helpTopic="shortcut_keys"> @@ -730,7 +737,8 @@ To add a new preference: + image="chrome://zotero/skin/prefs-advanced.png" + helpTopic="advanced"> diff --git a/chrome/content/zotero/preferences/preferences_firefox.xul b/chrome/content/zotero/preferences/preferences_firefox.xul index 51b9c1bd1..90aa7f9d8 100644 --- a/chrome/content/zotero/preferences/preferences_firefox.xul +++ b/chrome/content/zotero/preferences/preferences_firefox.xul @@ -78,7 +78,8 @@ To add a new preference: + image="chrome://zotero/skin/prefs-proxies.png" position="6" + helpTopic="proxies"> &zotero.preferences.proxies.desc_before_link;