Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Carlos Ribas
rnacentral-webcode
Commits
32469434
Commit
32469434
authored
Jun 21, 2021
by
carlosribas
Browse files
Update checkTab
parent
ef0d4a07
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
rnacentral/portal/static/js/components/sequence/sequence.module.js
...l/portal/static/js/components/sequence/sequence.module.js
+8
-4
No files found.
rnacentral/portal/static/js/components/sequence/sequence.module.js
View file @
32469434
...
...
@@ -30,16 +30,20 @@ var rnaSequenceController = function($scope, $location, $window, $rootScope, $co
// Downloads tab shouldn't be clickable
$scope
.
checkTab
=
function
(
$event
,
$selectedIndex
)
{
let
getUrl
=
window
.
location
.
href
.
split
(
"
?
"
);
let
getTab
=
getUrl
[
1
];
if
(
$selectedIndex
==
3
)
{
// don't call $event.stopPropagation() - we need the link on the tab to open a dropdown;
$event
.
preventDefault
();
}
else
if
(
$selectedIndex
==
0
)
{
// reload to avoid Genome Locations error when a page is initially opened in the 2D structure tab
window
.
location
=
getUrl
[
0
];
}
else
if
(
$selectedIndex
==
1
&&
typeof
getTab
!==
"
undefined
"
)
{
// remove tab paremeter
$location
.
search
(
'
tab
'
,
null
);
}
};
$scope
.
clearUrlParams
=
function
()
{
$location
.
search
(
'
tab
'
,
null
);
}
// This is terribly annoying quirk of ui-bootstrap that costed me a whole day of debugging.
// When it transcludes uib-tab-heading, it creates the following link:
//
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment