Skip to content

Commit

Permalink
Merge pull request #128 from jpwhite4/drillfix
Browse files Browse the repository at this point in the history
Fix the node selection algorithm broken in #117
  • Loading branch information
jpwhite4 authored May 5, 2017
2 parents e214bb0 + 0ef4868 commit 1fd2adc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions html/gui/js/modules/job_viewer/JobViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@ XDMoD.Module.JobViewer = Ext.extend(XDMoD.PortalModule, {
return;
}

var token = CCR.tokenize(Ext.History.getToken());
var token = CCR.tokenize(document.location.hash);
var params = Ext.urlDecode(token.params);

if (params.job) {
Expand All @@ -920,9 +920,10 @@ XDMoD.Module.JobViewer = Ext.extend(XDMoD.PortalModule, {
if (!params.realm) {
return;
}
var selectionModel = this.searchHistoryPanel.getSelectionModel();

var path = this._getPath(token.raw);
var isSelected = this.compareNodePath(this.currentNode, path);
var isSelected = this.compareNodePath(this.currentNode, path) && selectionModel && CCR.exists(selectionModel.getSelectedNode());

if (!isSelected) {
this.searchHistoryPanel.fireEvent('expand_node', path);
Expand Down

0 comments on commit 1fd2adc

Please # to comment.