From 719ec8c69472cf0789d57748c1bb369b1d61ab71 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 6 Mar 2007 18:40:57 +0000 Subject: [PATCH] Miscellaneous updates: - Display items with empty titles at beginning of list (since having new notes and items appear at the bottom of the list is distracting) - On item modify, select item if in active window (which hopefully doesn't have any side effects, though I'm not sure why I ever changed this) - Focus quicksearch bar on Z pane open --- chrome/content/zotero/overlay.js | 3 ++- chrome/content/zotero/xpcom/itemTreeView.js | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/overlay.js b/chrome/content/zotero/overlay.js index b0b1f4363..a9eeb4536 100644 --- a/chrome/content/zotero/overlay.js +++ b/chrome/content/zotero/overlay.js @@ -218,7 +218,8 @@ var ZoteroPane = new function() document.getElementById('zotero-splitter').setAttribute('hidden', !visible); if (visible) { - document.getElementById('zotero-pane').click(); + // Focus the quicksearch on pane open + setTimeout("document.getElementById('zotero-tb-search').inputField.select();", 1); } else { document.getElementById('content').setAttribute('collapsed', false); diff --git a/chrome/content/zotero/xpcom/itemTreeView.js b/chrome/content/zotero/xpcom/itemTreeView.js index 750c1f4b4..82890125f 100644 --- a/chrome/content/zotero/xpcom/itemTreeView.js +++ b/chrome/content/zotero/xpcom/itemTreeView.js @@ -331,6 +331,10 @@ Zotero.ItemTreeView.prototype.notify = function(action, type, ids) } this.rememberSelection(savedSelection); + + if (activeWindow) { + this.selectItem(ids[0]); + } } else { @@ -554,8 +558,9 @@ Zotero.ItemTreeView.prototype.sort = function() } // Hash table of fields for which rows with empty values should be displayed last - // - Not currently used - var emptyFirst = {}; + var emptyFirst = { + title: true + }; function columnSort(a,b) { var cmp;