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;
|
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
|
// Call the pagination listener
|
||||||
this.paginationListener();
|
this.paginationListener();
|
||||||
},
|
},
|
||||||
|
@ -66,7 +72,12 @@ var browseByVClass = {
|
||||||
// Load individuals for default class as specified by menupage template
|
// Load individuals for default class as specified by menupage template
|
||||||
defaultVClass: function() {
|
defaultVClass: function() {
|
||||||
if ( this.defaultBrowseVClassURI != "false" ) {
|
if ( this.defaultBrowseVClassURI != "false" ) {
|
||||||
this.getIndividuals(this.defaultBrowseVClassUri, "all", 1, 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue