Skip to content

Commit

Permalink
Add tag selector shortcuts
Browse files Browse the repository at this point in the history
* Toggle automatic tags
* Toggle display all tags
* Deselect all tags
* Focus tag selector search box
  • Loading branch information
wshanks committed Feb 14, 2020
1 parent ffc3c16 commit 7da521e
Show file tree
Hide file tree
Showing 12 changed files with 86 additions and 11 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
+ Add "Advanced search" shortcut
+ Add "Locate item" shortcut
+ Add "Show Locate menu" shortcut
+ Add tag selector shortcuts:
- Toggle displaying automatic tags
- Toggle displaying all tags
- Deselect all tags
- Focus search box

* In version 3.3.3:

Expand Down
42 changes: 31 additions & 11 deletions addon/chrome/content/zutilo/keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,37 @@ keys.shortcuts.selectTabboxTab3 = function(win) {
win.document.getElementById('zotero-view-tabbox').tabs.selectedIndex = 3;
};

keys.categories.locateMenu = 'uinavigation'
keys.shortcuts.locateMenu = function(win) {
win.document.getElementById('zotero-tb-locate-menu').showPopup();
};

keys.categories.locateItem = 'uinavigation'
keys.shortcuts.locateItem = function(win) {
let label = Zutilo.Prefs.get("locateItemEngine")
win.Zotero_LocateMenu.locateItem({"target": {"label": label}})
};

keys.categories.toggleAutomaticTags = 'uinavigation'
keys.shortcuts.toggleAutomaticTags = function(win) {
win.ZoteroPane.tagSelector.toggleShowAutomatic()
};

keys.categories.toggleAllTags = 'uinavigation'
keys.shortcuts.toggleAllTags = function(win) {
win.ZoteroPane.tagSelector.toggleDisplayAllTags()
};

keys.categories.deselectTags = 'uinavigation'
keys.shortcuts.deselectTags = function(win) {
win.ZoteroPane.tagSelector.deselectAll()
};

keys.categories.focusTagSelector = 'uinavigation'
keys.shortcuts.focusTagSelector = function(win) {
win.ZoteroPane.tagSelector.searchBoxRef.current.focus()
};

/***********************************************/
// Zotero functions (i.e. not Zutilo functions)
// Hide/show left/right pane
Expand Down Expand Up @@ -386,17 +417,6 @@ keys.shortcuts.toggleZoteroItemPaneStickySplitter = function(win) {
'toggle', true)
};

keys.categories.locateMenu = 'uinavigation'
keys.shortcuts.locateMenu = function(win) {
win.document.getElementById('zotero-tb-locate-menu').showPopup();
};

keys.categories.locateItem = 'uinavigation'
keys.shortcuts.locateItem = function(win) {
let label = Zutilo.Prefs.get("locateItemEngine")
win.Zotero_LocateMenu.locateItem({"target": {"label": label}})
};

AddonManager.getAddonByID('[email protected]', function(aAddon) {
if (aAddon === null || !aAddon.isActive) {
return
Expand Down
5 changes: 5 additions & 0 deletions addon/chrome/locale/de/zutilo/zutilo.properties
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ zutilo.shortcuts.name.toggleZoteroItemPaneStickySplitter = Item pane: Show / hi
zutilo.shortcuts.name.toggleZoteroCollectionsPaneStickySplitter = Collections pane: Show / hide (sticky)
zutilo.shortcuts.name.locateMenu = Show Locate menu
zutilo.shortcuts.name.locateItem = Locate with Google Scholar
zutilo.shortcuts.name.toggleAutomaticTags = Tag selector: toggle automatic
zutilo.shortcuts.name.toggleAllTags = Tag selector: toggle display all
zutilo.shortcuts.name.deselectTags = Tag selector: deselect all
zutilo.shortcuts.name.focusTagSelector = Tag selector: focus search box

zutilo.shortcuts.name.BBTPin = Pin key for selection
zutilo.shortcuts.name.BBTUnpin = Unpin key for selection
zutilo.shortcuts.name.BBTRefresh = Force-refresh key for selection
Expand Down
5 changes: 5 additions & 0 deletions addon/chrome/locale/en-US/zutilo/zutilo.properties
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ zutilo.shortcuts.name.toggleZoteroItemPaneStickySplitter = Item pane: Show / hi
zutilo.shortcuts.name.toggleZoteroCollectionsPaneStickySplitter = Collections pane: Show / hide (sticky)
zutilo.shortcuts.name.locateMenu = Show Locate menu
zutilo.shortcuts.name.locateItem = Locate with Google Scholar
zutilo.shortcuts.name.toggleAutomaticTags = Tag selector: toggle automatic
zutilo.shortcuts.name.toggleAllTags = Tag selector: toggle display all
zutilo.shortcuts.name.deselectTags = Tag selector: deselect all
zutilo.shortcuts.name.focusTagSelector = Tag selector: focus search box
zutilo.shortcuts.name.BBTPin = Pin key for selection
zutilo.shortcuts.name.BBTUnpin = Unpin key for selection
zutilo.shortcuts.name.BBTRefresh = Force-refresh key for selection
Expand Down
5 changes: 5 additions & 0 deletions addon/chrome/locale/es/zutilo/zutilo.properties
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ zutilo.shortcuts.name.toggleZoteroItemPaneStickySplitter = Item pane: Show / hi
zutilo.shortcuts.name.toggleZoteroCollectionsPaneStickySplitter = Collections pane: Show / hide (sticky)
zutilo.shortcuts.name.locateMenu = Show Locate menu
zutilo.shortcuts.name.locateItem = Locate with Google Scholar
zutilo.shortcuts.name.toggleAutomaticTags = Tag selector: toggle automatic
zutilo.shortcuts.name.toggleAllTags = Tag selector: toggle display all
zutilo.shortcuts.name.deselectTags = Tag selector: deselect all
zutilo.shortcuts.name.focusTagSelector = Tag selector: focus search box

zutilo.shortcuts.name.BBTPin = Pin key for selection
zutilo.shortcuts.name.BBTUnpin = Unpin key for selection
zutilo.shortcuts.name.BBTRefresh = Force-refresh key for selection
Expand Down
5 changes: 5 additions & 0 deletions addon/chrome/locale/fr/zutilo/zutilo.properties
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ zutilo.shortcuts.name.toggleZoteroItemPaneStickySplitter = Volet de droite : A
zutilo.shortcuts.name.toggleZoteroCollectionsPaneStickySplitter = Volet de gauche : Afficher / Cacher (avec diviseur)
zutilo.shortcuts.name.locateMenu = Show Locate menu
zutilo.shortcuts.name.locateItem = Locate with Google Scholar
zutilo.shortcuts.name.toggleAutomaticTags = Tag selector: toggle automatic
zutilo.shortcuts.name.toggleAllTags = Tag selector: toggle display all
zutilo.shortcuts.name.deselectTags = Tag selector: deselect all
zutilo.shortcuts.name.focusTagSelector = Tag selector: focus search box
zutilo.shortcuts.name.BBTPin = Pin key for selection
zutilo.shortcuts.name.BBTUnpin = Unpin key for selection
zutilo.shortcuts.name.BBTRefresh = Force-refresh key for selection
Expand Down
5 changes: 5 additions & 0 deletions addon/chrome/locale/zh-CN/zutilo/zutilo.properties
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ zutilo.shortcuts.name.toggleZoteroItemPaneStickySplitter = 显示/隐藏条目
zutilo.shortcuts.name.toggleZoteroCollectionsPaneStickySplitter = 显示/隐藏分类窗格 (sticky)
zutilo.shortcuts.name.locateMenu = Show Locate menu
zutilo.shortcuts.name.locateItem = Locate with Google Scholar
zutilo.shortcuts.name.toggleAutomaticTags = Tag selector: toggle automatic
zutilo.shortcuts.name.toggleAllTags = Tag selector: toggle display all
zutilo.shortcuts.name.deselectTags = Tag selector: deselect all
zutilo.shortcuts.name.focusTagSelector = Tag selector: focus search box

zutilo.shortcuts.name.BBTPin = 固定 BBT Citation Key
zutilo.shortcuts.name.BBTUnpin = 解除固定 BBT Citation Key
zutilo.shortcuts.name.BBTRefresh = 刷新 BBT Citation Key
Expand Down
5 changes: 5 additions & 0 deletions i18n/de/readme/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
+ Add "Advanced search" shortcut
+ Add "Locate item" shortcut
+ Add "Show Locate menu" shortcut
+ Add tag selector shortcuts:
- Toggle displaying automatic tags
- Toggle displaying all tags
- Deselect all tags
- Focus search box

* In version 3.3.3:

Expand Down
5 changes: 5 additions & 0 deletions i18n/en-US/readme/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
+ Add "Advanced search" shortcut
+ Add "Locate item" shortcut
+ Add "Show Locate menu" shortcut
+ Add tag selector shortcuts:
- Toggle displaying automatic tags
- Toggle displaying all tags
- Deselect all tags
- Focus search box

* In version 3.3.3:

Expand Down
5 changes: 5 additions & 0 deletions i18n/es/readme/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
+ Add "Advanced search" shortcut
+ Add "Locate item" shortcut
+ Add "Show Locate menu" shortcut
+ Add tag selector shortcuts:
- Toggle displaying automatic tags
- Toggle displaying all tags
- Deselect all tags
- Focus search box

* In version 3.3.3:

Expand Down
5 changes: 5 additions & 0 deletions i18n/fr/readme/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
+ Add "Advanced search" shortcut
+ Add "Locate item" shortcut
+ Add "Show Locate menu" shortcut
+ Add tag selector shortcuts:
- Toggle displaying automatic tags
- Toggle displaying all tags
- Deselect all tags
- Focus search box

* In version 3.3.3:

Expand Down
5 changes: 5 additions & 0 deletions i18n/zh-CN/readme/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
+ Add "Advanced search" shortcut
+ Add "Locate item" shortcut
+ Add "Show Locate menu" shortcut
+ Add tag selector shortcuts:
- Toggle displaying automatic tags
- Toggle displaying all tags
- Deselect all tags
- Focus search box

* In version 3.3.3:

Expand Down

0 comments on commit 7da521e

Please sign in to comment.