NIHVIVO-3283 - when using back button to navigate back to a menu page, the vclass previously selected will be selected
This commit is contained in:
parent
733c45e330
commit
43db4d7416
1 changed files with 12 additions and 1 deletions
|
@ -48,6 +48,12 @@ var browseByVClass = {
|
|||
return false;
|
||||
});
|
||||
|
||||
this.browseVClasses.children('li').each( function() {
|
||||
$(this).find('a').click(function () {
|
||||
// the extra space is needed to prevent odd scrolling behavior
|
||||
location.hash = $(this).attr('data-uri') + ' ';
|
||||
});
|
||||
});
|
||||
// Call the pagination listener
|
||||
this.paginationListener();
|
||||
},
|
||||
|
@ -66,8 +72,13 @@ var browseByVClass = {
|
|||
// Load individuals for default class as specified by menupage template
|
||||
defaultVClass: function() {
|
||||
if ( this.defaultBrowseVClassURI != "false" ) {
|
||||
if ( location.hash ) {
|
||||
this.getIndividuals(location.hash.substring(1,location.hash.length - 1), "all", 1, false);
|
||||
}
|
||||
else {
|
||||
this.getIndividuals(this.defaultBrowseVClassUri, "all", 1, false);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// Where all the magic happens -- gonna fetch me some individuals
|
||||
|
|
Loading…
Add table
Reference in a new issue