Skip to content

Commit

Permalink
Do not rely on the existence of the analysis app router
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Oct 9, 2017
1 parent dcad663 commit 220fdcc
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 12 deletions.
18 changes: 12 additions & 6 deletions client/galaxy/scripts/mvc/dataset/dataset-li-edit.js
Expand Up @@ -64,8 +64,10 @@ var DatasetListItemEdit = _super.extend(
faIcon : 'fa-pencil',
classes : 'edit-btn',
onclick : function( ev ) {
ev.preventDefault();
Galaxy.router.push( 'datasets/edit', { dataset_id : self.model.attributes.id } );
if ( Galaxy.router ) {
ev.preventDefault();
Galaxy.router.push( 'datasets/edit', { dataset_id : self.model.attributes.id } );
}
}
};
// disable if purged or deleted and explain why in the tooltip
Expand Down Expand Up @@ -206,8 +208,10 @@ var DatasetListItemEdit = _super.extend(
classes : 'report-error-btn',
faIcon : 'fa-bug',
onclick : function( ev ) {
ev.preventDefault();
Galaxy.router.push( 'datasets/error', { dataset_id : self.model.attributes.id } );
if ( Galaxy.router ) {
ev.preventDefault();
Galaxy.router.push( 'datasets/error', { dataset_id : self.model.attributes.id } );
}
}
});
},
Expand All @@ -223,8 +227,10 @@ var DatasetListItemEdit = _super.extend(
target : this.linkTarget,
faIcon : 'fa-refresh',
onclick : function( ev ) {
ev.preventDefault();
Galaxy.router.push( '/', { job_id : creating_job } );
if ( Galaxy.router ) {
ev.preventDefault();
Galaxy.router.push( '/', { job_id : creating_job } );
}
}
});
}
Expand Down
2 changes: 1 addition & 1 deletion static/maps/mvc/dataset/dataset-li-edit.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions static/scripts/bundled/analysis.bundled.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/scripts/bundled/analysis.bundled.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/scripts/bundled/libs.bundled.js.map

Large diffs are not rendered by default.

0 comments on commit 220fdcc

Please sign in to comment.