diff --git a/chrome/content/zotero-platform/mac/overlay.css b/chrome/content/zotero-platform/mac/overlay.css
index 495c128296..e1cd1e9801 100644
--- a/chrome/content/zotero-platform/mac/overlay.css
+++ b/chrome/content/zotero-platform/mac/overlay.css
@@ -328,4 +328,14 @@ treechildren::-moz-tree-image {
#zotero-tb-actions-menu
{
list-style-image: url('chrome://zotero/skin/mac/cog.png');
+}
+
+#zotero-collectionmenu > .menuitem-iconic, #zotero-itemmenu > .menuitem-iconic, #zotero-collectionmenu > .menu-iconic, #zotero-itemmenu > .menu-iconic {
+ padding-top: 0px !important;
+ padding-bottom: 2px !important;
+ list-style-image: none !important;
+}
+
+#zotero-collectionmenu > .menuitem-iconic > .menu-iconic-left, #zotero-itemmenu > .menuitem-iconic > .menu-iconic-left, #zotero-collectionmenu > .menu-iconic > .menu-iconic-left, #zotero-itemmenu > .menu-iconic > .menu-iconic-left {
+ display: none;
}
\ No newline at end of file
diff --git a/chrome/content/zotero-platform/win/overlay.css b/chrome/content/zotero-platform/win/overlay.css
index 05dea23438..1afdc6e0b5 100644
--- a/chrome/content/zotero-platform/win/overlay.css
+++ b/chrome/content/zotero-platform/win/overlay.css
@@ -22,7 +22,8 @@
}
#zotero-tb-sync-error {
- margin-right: 2px;
+ margin-right: 4px;
+ padding-top: 4px;
}
#zotero-tb-sync {
diff --git a/chrome/content/zotero/bindings/styled-textbox.xml b/chrome/content/zotero/bindings/styled-textbox.xml
index e227110847..47be7dc4c2 100644
--- a/chrome/content/zotero/bindings/styled-textbox.xml
+++ b/chrome/content/zotero/bindings/styled-textbox.xml
@@ -375,13 +375,17 @@
if (!SJOW.tinyMCE) {
var exts = Zotero.getInstalledExtensions(function(exts) {
for each(var ext in exts) {
- if (ext.indexOf('NoScript') != -1) {
- var warning = win.document.getElementById('noScriptWarning');
+ if (ext.indexOf('NoScript') != -1 && ext.indexOf('disabled') == -1) {
+ var doc = win.document;
+ var div = doc.getElementById('tinymce');
+ var warning = doc.createElement('div');
+ warning.id = 'noScriptWarning';
var str = "The NoScript extension is preventing Zotero "
+ "from displaying notes. To use NoScript and Zotero together, "
+ "whitelist the 'file:' scheme in the NoScript preferences "
+ "and restart " + Zotero.appName + ".";
warning.appendChild(document.createTextNode(str));
+ div.appendChild(warning);
break;
}
}
diff --git a/chrome/content/zotero/bindings/tagselector.xml b/chrome/content/zotero/bindings/tagselector.xml
index 413fa516e1..faca83397b 100644
--- a/chrome/content/zotero/bindings/tagselector.xml
+++ b/chrome/content/zotero/bindings/tagselector.xml
@@ -40,7 +40,8 @@
false
null
null
- null
+ null
+ null
@@ -206,7 +207,8 @@
}
Zotero.debug('Refreshing tags selector');
- var empty = true;
+ var emptyColored = true;
+ var emptyRegular = true;
var tagsToggleBox = this.id('tags-toggle');
var self = this;
@@ -340,7 +342,7 @@
labels[i].className = 'zotero-clicky';
labels[i].setAttribute('inScope', true);
labels[i].setAttribute('hidden', false);
- empty = false;
+ emptyRegular = false;
}
else {
labels[i].className = '';
@@ -360,21 +362,15 @@
}
labels[i].setAttribute('hidden', false);
- empty = false;
+ emptyRegular = false;
}
- // If tag isn't in scope and is still selected, deselect it
- if (labels[i].getAttribute('hidden') == 'true' && self.selection[name]) {
- labels[i].setAttribute('selected', false);
- delete self.selection[name];
- var doCommand = true;
- }
-
-
- // Always show colored tags at top
- if (colorData) {
+ // Always show colored tags at top, unless they
+ // don't match an active tag search
+ if (colorData && (!self._search || inSearch)) {
labels[i].setAttribute('hidden', false);
labels[i].setAttribute('hasColor', true);
+ emptyColored = false;
}
else {
labels[i].removeAttribute('hasColor');
@@ -450,15 +446,16 @@
//end tag cloud code
-
self.updateNumSelected();
- self._empty = empty;
+ self._emptyColored = emptyColored;
+ self._emptyRegular = emptyRegular;
+ var empty = emptyColored && emptyRegular;
self.id('tags-toggle').setAttribute('collapsed', empty);
self.id('no-tags-box').setAttribute('collapsed', !empty);
- if (doCommand) {
- Zotero.debug('A selected tag went out of scope -- deselecting');
- self.doCommand();
+ if (self.onRefresh) {
+ self.onRefresh();
+ self.onRefresh = null;
}
})
.done();
@@ -563,14 +560,22 @@
me.setSearch(false, true);
}
me._dirty = true;
- me.doCommand();
- // If no tags visible after a delete, deselect all
- if ((event == 'remove' || event == 'delete') &&
- me._empty && me.getNumSelected()) {
- Zotero.debug('No tags visible after delete -- deselecting all');
- me.clearAll();
- }
+ // This is a hack, but set this to run after the refresh,
+ // since _emptyRegular isn't set until then
+ me.onRefresh = function () {
+ // If no regular tags visible after a delete, deselect all.
+ // This is necessary so that a selected tag that's removed
+ // from its last item doesn't cause all regular tags to
+ // disappear without anything being visibly selected.
+ if ((event == 'remove' || event == 'delete') &&
+ me._emptyRegular && me.getNumSelected()) {
+ Zotero.debug('No tags visible after delete -- deselecting all');
+ me.clearAll();
+ }
+ };
+
+ me.doCommand();
}, 0);
this._notified = true;
]]>
diff --git a/chrome/content/zotero/locateMenu.js b/chrome/content/zotero/locateMenu.js
index 8b66cfeb4d..183fd8c3b5 100644
--- a/chrome/content/zotero/locateMenu.js
+++ b/chrome/content/zotero/locateMenu.js
@@ -93,8 +93,9 @@ var Zotero_LocateMenu = new function() {
/**
* Clear the bottom part of the context menu and add locate options
* @param {menupopup} menu The menu to add context menu items to
+ * @param {Boolean} showIcons Whether menu items should have associated icons
*/
- this.buildContextMenu = function(menu) {
+ this.buildContextMenu = function(menu, showIcons) {
// get selected items
var selectedItems = _getSelectedItems();
@@ -102,7 +103,7 @@ var Zotero_LocateMenu = new function() {
if(!selectedItems.length || selectedItems.length > 20) return;
// add view options
- _addViewOptions(menu, selectedItems);
+ _addViewOptions(menu, selectedItems, showIcons);
/*// look for locate engines
var availableEngines = _getAvailableLocateEngines(selectedItems);
@@ -125,7 +126,7 @@ var Zotero_LocateMenu = new function() {
null, Zotero.getString("locate."+optionName+".tooltip"));
if(showIcons) {
menuitem.setAttribute("class", "menuitem-iconic");
- menuitem.setAttribute("image", optionObject.icon);
+ menuitem.style.listStyleImage = "url('"+optionObject.icon+"')";
}
menuitem.setAttribute("zotero-locate", "true");
diff --git a/chrome/content/zotero/lookup.js b/chrome/content/zotero/lookup.js
index 2ef6d9e6f3..b7f10084c1 100644
--- a/chrome/content/zotero/lookup.js
+++ b/chrome/content/zotero/lookup.js
@@ -76,9 +76,9 @@ const Zotero_Lookup = new function () {
//finally try for PMID
if(!items.length) {
- // PMID; right now, PMIDs are 8 digits, so it doesn't seem like we will need to
- // discriminate for a fairly long time
- var PMID_RE = /(?:\D|^)(\d{8})(?!\d)/g;
+ // PMID; right now, the longest PMIDs are 8 digits, so it doesn't
+ // seem like we will need to discriminate for a fairly long time
+ var PMID_RE = /(?:\D|^)(\d{1,9})(?!\d)/g;
var pmid;
while((pmid = PMID_RE.exec(identifier)) && foundIDs.indexOf(pmid) == -1) {
items.push({itemType:"journalArticle", contextObject:"rft_id=info:pmid/"+pmid[1]});
diff --git a/chrome/content/zotero/tinymce/integration.html b/chrome/content/zotero/tinymce/integration.html
index 9d72e91c7d..39bd5625a7 100755
--- a/chrome/content/zotero/tinymce/integration.html
+++ b/chrome/content/zotero/tinymce/integration.html
@@ -51,6 +51,6 @@ html, body {
-
+