1
0
Fork 0

fixed a routing bug in the ui (#7067)

* fixed a routing bug in backbone js ui

* use of navigate

* changelog

* fixes same issue in another view, too
This commit is contained in:
Heiko 2018-10-25 16:11:17 +02:00 committed by Michael Hackstein
parent 55b0ad7c96
commit 83785de993
3 changed files with 8 additions and 4 deletions

View File

@ -1,6 +1,7 @@
devel
-----
* fixes a routing issue within the web ui after the use of views
* fixes some graph data parsing issues in the ui, e.g. cleaning up duplicate
edges inside the graph viewer.

View File

@ -72,8 +72,10 @@
redirectToGraphViewer: function (e) {
var name = $(e.currentTarget).attr('id');
name = name.substr(0, name.length - 5);
window.location.hash = window.location.hash.substr(0, window.location.hash.length - 1) + '/' + encodeURIComponent(name);
if (name) {
name = name.substr(0, name.length - 5);
window.App.navigate('graph/' + encodeURIComponent(name), {trigger: true});
}
},
loadGraphViewer: function (graphName, refetch) {

View File

@ -30,7 +30,7 @@
events: {
'click #createView': 'createView',
'click #viewsToggle': 'toggleSettingsDropdown',
'click .tile': 'gotoView',
'click .tile-view': 'gotoView',
'keyup #viewsSearchInput': 'search',
'click #viewsSearchSubmit': 'search',
'click #viewsSortDesc': 'sorting'
@ -151,7 +151,8 @@
gotoView: function (e) {
var name = $(e.currentTarget).attr('id');
if (name) {
window.location.hash = window.location.hash.substr(0, window.location.hash.length - 1) + '/' + encodeURIComponent(name);
var url = 'view/' + encodeURIComponent(name);
window.App.navigate(url, {trigger: true});
}
},