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">
|
<method name="clearAll">
|
||||||
<body>
|
<body>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
this.selection = [];
|
this.selection = {};
|
||||||
this.clearVisible();
|
this.clearVisible();
|
||||||
]]>
|
]]>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -3461,9 +3461,12 @@ Zotero.Tags = new function(){
|
||||||
|
|
||||||
|
|
||||||
function search(str){
|
function search(str){
|
||||||
var sql = 'SELECT tagID, tag, tagType FROM tags WHERE tag LIKE ? '
|
var sql = 'SELECT tagID, tag, tagType FROM tags';
|
||||||
+ 'ORDER BY tag COLLATE NOCASE';
|
if (str) {
|
||||||
var tags = Zotero.DB.query(sql, '%' + str + '%');
|
sql += ' WHERE tag LIKE ?';
|
||||||
|
}
|
||||||
|
sql += ' ORDER BY tag COLLATE NOCASE';
|
||||||
|
var tags = Zotero.DB.query(sql, str ? '%' + str + '%' : undefined);
|
||||||
var indexed = {};
|
var indexed = {};
|
||||||
for each(var tag in tags) {
|
for each(var tag in tags) {
|
||||||
indexed[tag.tagID] = {
|
indexed[tag.tagID] = {
|
||||||
|
|
|
@ -60,6 +60,7 @@ Zotero.Fulltext = new function(){
|
||||||
*/
|
*/
|
||||||
function registerPDFToText() {
|
function registerPDFToText() {
|
||||||
var exec = Zotero.getZoteroDirectory();
|
var exec = Zotero.getZoteroDirectory();
|
||||||
|
|
||||||
var fileName = 'pdftotext-' + Zotero.platform.replace(' ', '-');
|
var fileName = 'pdftotext-' + Zotero.platform.replace(' ', '-');
|
||||||
if (Zotero.isWin) {
|
if (Zotero.isWin) {
|
||||||
fileName += '.exe';
|
fileName += '.exe';
|
||||||
|
@ -319,7 +320,6 @@ Zotero.Fulltext = new function(){
|
||||||
Zotero.debug('Running pdftotext -nopgbrk -l ' + maxPages +
|
Zotero.debug('Running pdftotext -nopgbrk -l ' + maxPages +
|
||||||
' "' + file.path + '" "' + cacheFile.path + '"');
|
' "' + file.path + '" "' + cacheFile.path + '"');
|
||||||
var args = ['-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);
|
proc.run(true, args, args.length);
|
||||||
|
|
||||||
if (cacheFile.exists()) {
|
if (cacheFile.exists()) {
|
||||||
|
|
|
@ -166,7 +166,7 @@ Zotero.Notifier = new function(){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i in _observers.items){
|
for (var i in _observers.items){
|
||||||
Zotero.debug("Calling notify() on observer with hash '" + i + "'", 4);
|
Zotero.debug("Calling notify() on observer with hash '" + i + "'", 4);
|
||||||
// Find observers that handle notifications for this type (or all types)
|
// Find observers that handle notifications for this type (or all types)
|
||||||
if (!_observers.get(i).types || _observers.get(i).types.indexOf(type)!=-1){
|
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 id = _queue[type][event].ids[i];
|
||||||
var data = _queue[type][event].data[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 (event == 'modify') {
|
||||||
if (!Zotero.Items.get(id)) {
|
if (type == 'item' && !Zotero.Items.get(id)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else if (type == 'tag' && !Zotero.Tags.get(id)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user