Commit 74e03092 by Torkel Ödegaard

Fixes #912, URL parameters are lost when switching to fullscreen/edit mode

parent 4edb89ee
...@@ -47,19 +47,12 @@ function (angular, _, $) { ...@@ -47,19 +47,12 @@ function (angular, _, $) {
}; };
DashboardViewState.prototype.getQueryStringState = function() { DashboardViewState.prototype.getQueryStringState = function() {
var queryParams = $location.search(); var state = $location.search();
var urlState = { state.panelId = parseInt(state.panelId) || null;
panelId: parseInt(queryParams.panelId) || null, state.fullscreen = state.fullscreen ? true : false;
fullscreen: queryParams.fullscreen ? true : false, state.edit = state.edit ? true : false;
edit: queryParams.edit ? true : false,
};
_.each(queryParams, function(value, key) {
if (key.indexOf('var-') !== 0) { return; }
urlState[key] = value;
});
return urlState; return state;
}; };
DashboardViewState.prototype.serializeToUrl = function() { DashboardViewState.prototype.serializeToUrl = function() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment