refactored permalink calculation. included variables added in ermrestJS PR
refactored permalink calculation. included variables added in ermrestJS PR

informatics-isi-edu/chaise,informatics-isi-edu/chaise,informatics-isi-edu/chaise,informatics-isi-edu/chaise