-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Enhancement] Add media count to sources page (#251)
* [WIP] Got query kinda working, now to refactor other queries * Refactored all query methods to use dynamic snippets * Refactored tab layout to grab tabs by name * Removed standalone show buttons from in-app tables * Removed unneeded comment
- Loading branch information
1 parent
94c0cf9
commit a2a0f48
Showing
28 changed files
with
210 additions
and
233 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
window.setTabIndex = (index) => { | ||
window.location.hash = `tab-${index}` | ||
window.setTabByName = (tabName) => { | ||
window.location.hash = `tab-${tabName}` | ||
|
||
return index | ||
return tabName | ||
} | ||
|
||
// The conditionals and currIndex stuff ensures that | ||
// the tab index is always set to 0 if the hash is empty | ||
// AND other hash values are ignored | ||
window.getTabIndex = (currIndex) => { | ||
window.getTabFromHash = (currentTabName, defaultTabName) => { | ||
if (window.location.hash === '' || window.location.hash === '#') { | ||
return 0 | ||
return defaultTabName | ||
} | ||
|
||
if (window.location.hash.startsWith('#tab-')) { | ||
return parseInt(window.location.hash.replace('#tab-', '')) | ||
return window.location.hash.replace('#tab-', '') | ||
} | ||
|
||
return currIndex | ||
return currentTabName | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.