From c3903262dc12ff08f696030e5eb44f585e589f8d Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sat, 15 Jan 2011 23:07:15 +0100 Subject: [PATCH] added uuids to permalink --- htdocs/frontend/javascripts/frontend.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/htdocs/frontend/javascripts/frontend.js b/htdocs/frontend/javascripts/frontend.js index e6ef001..75a4d8c 100644 --- a/htdocs/frontend/javascripts/frontend.js +++ b/htdocs/frontend/javascripts/frontend.js @@ -37,14 +37,20 @@ vz.wui.init = function() { // buttons $('button, input[type=button],[type=image]').button(); $('button[name=options-save]').click(function() { vz.options.save(); }); - $('#permalink').click(function() { // TODO add uuids - var u = window.location.protocol + '//' + + $('#permalink').click(function() { + var url = window.location.protocol + '//' + window.location.host + window.location.pathname + '?from=' + vz.options.plot.xaxis.min + '&to=' + vz.options.plot.xaxis.max; + + vz.entities.each(function(entity, parent) { + if (entity.active) { + url += '&uuid=' + entity.uuid; + } + }); - window.location = u; + window.location = url; }); $('button[name=entity-add]').click(function() { $('#entity-add').dialog('open'); }); $('#entity-subscribe input[type=button]').click(function() {