React Tag Selector polish, i18n and tests

- Added icon-button UI code for the menubutton
- Upgrade to React 16 to allow non-standard attrs, such as `tooltiptext`
to support XUL tooltips
- Add i18n support for React UI elements
- Update tests for reactified tag selector
This commit is contained in:
Adomas Venčkauskas 2018-12-12 12:34:39 +02:00
parent 897e74c7f1
commit a24cada451
39 changed files with 1437 additions and 1252 deletions

View file

@ -213,12 +213,15 @@ var waitForTagSelector = function (win) {
var zp = win.ZoteroPane;
var deferred = Zotero.Promise.defer();
if (zp.tagSelectorShown()) {
var tagSelector = win.document.getElementById('zotero-tag-selector');
var onRefresh = () => {
tagSelector.removeEventListener('refresh', onRefresh);
let tagSelector = zp.tagSelector;
let componentDidUpdate = tagSelector.componentDidUpdate;
tagSelector.componentDidUpdate = function() {
deferred.resolve();
};
tagSelector.addEventListener('refresh', onRefresh);
tagSelector.componentDidUpdate = componentDidUpdate;
if (typeof componentDidUpdate == 'function') {
componentDidUpdate.call(this, arguments);
}
}
}
else {
deferred.resolve();