Miscellaneous fixes:
- Tags matching JS Array object methods ("every", "map", "splice") would appear selected in tag selector after clicking Deselect All - Tag selector wasn't notified correctly on tag renames - Don't use LIKE if no text string in Tags.search() - Iterator variable in for loop in Notifier.commit() wasn't local - Removed extra debug info in pdftotext run
This commit is contained in:
parent
12606548fe
commit
5f37a75804
|
@ -411,7 +411,7 @@
|
|||
<method name="clearAll">
|
||||
<body>
|
||||
<![CDATA[
|
||||
this.selection = [];
|
||||
this.selection = {};
|
||||
this.clearVisible();
|
||||
]]>
|
||||
</body>
|
||||
|
|
|
@ -3461,9 +3461,12 @@ Zotero.Tags = new function(){
|
|||
|
||||
|
||||
function search(str){
|
||||
var sql = 'SELECT tagID, tag, tagType FROM tags WHERE tag LIKE ? '
|
||||
+ 'ORDER BY tag COLLATE NOCASE';
|
||||
var tags = Zotero.DB.query(sql, '%' + str + '%');
|
||||
var sql = 'SELECT tagID, tag, tagType FROM tags';
|
||||
if (str) {
|
||||
sql += ' WHERE tag LIKE ?';
|
||||
}
|
||||
sql += ' ORDER BY tag COLLATE NOCASE';
|
||||
var tags = Zotero.DB.query(sql, str ? '%' + str + '%' : undefined);
|
||||
var indexed = {};
|
||||
for each(var tag in tags) {
|
||||
indexed[tag.tagID] = {
|
||||
|
|
|
@ -60,6 +60,7 @@ Zotero.Fulltext = new function(){
|
|||
*/
|
||||
function registerPDFToText() {
|
||||
var exec = Zotero.getZoteroDirectory();
|
||||
|
||||
var fileName = 'pdftotext-' + Zotero.platform.replace(' ', '-');
|
||||
if (Zotero.isWin) {
|
||||
fileName += '.exe';
|
||||
|
@ -319,7 +320,6 @@ Zotero.Fulltext = new function(){
|
|||
Zotero.debug('Running pdftotext -nopgbrk -l ' + maxPages +
|
||||
' "' + file.path + '" "' + cacheFile.path + '"');
|
||||
var args = ['-nopgbrk', '-l', maxPages, file.path, cacheFile.path];
|
||||
Zotero.debug(args);
|
||||
proc.run(true, args, args.length);
|
||||
|
||||
if (cacheFile.exists()) {
|
||||
|
|
|
@ -166,7 +166,7 @@ Zotero.Notifier = new function(){
|
|||
return true;
|
||||
}
|
||||
|
||||
for (i in _observers.items){
|
||||
for (var i in _observers.items){
|
||||
Zotero.debug("Calling notify() on observer with hash '" + i + "'", 4);
|
||||
// Find observers that handle notifications for this type (or all types)
|
||||
if (!_observers.get(i).types || _observers.get(i).types.indexOf(type)!=-1){
|
||||
|
@ -254,9 +254,12 @@ Zotero.Notifier = new function(){
|
|||
var id = _queue[type][event].ids[i];
|
||||
var data = _queue[type][event].data[i];
|
||||
|
||||
// Don't send modify on nonexistent items
|
||||
// Don't send modify on nonexistent items or tags
|
||||
if (event == 'modify') {
|
||||
if (!Zotero.Items.get(id)) {
|
||||
if (type == 'item' && !Zotero.Items.get(id)) {
|
||||
continue;
|
||||
}
|
||||
else if (type == 'tag' && !Zotero.Tags.get(id)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user