From 825f5d9cceb2e94b3f41f7c8e381391c52e809f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Rossigneux?= Date: Thu, 13 Feb 2014 14:05:19 +0100 Subject: [PATCH] Cookie to save the selected probes when refreshing the page. Change-Id: I9b1d55d108af42ff1c03a46b4a7d77b7dd458cc8 --- .../rrd/static/jquery.cookie-1.4.0.min.js | 7 ++++ kwapi/plugins/rrd/templates/index.html | 35 ++++++++++++++++--- 2 files changed, 37 insertions(+), 5 deletions(-) create mode 100644 kwapi/plugins/rrd/static/jquery.cookie-1.4.0.min.js diff --git a/kwapi/plugins/rrd/static/jquery.cookie-1.4.0.min.js b/kwapi/plugins/rrd/static/jquery.cookie-1.4.0.min.js new file mode 100644 index 0000000..b489c14 --- /dev/null +++ b/kwapi/plugins/rrd/static/jquery.cookie-1.4.0.min.js @@ -0,0 +1,7 @@ +/*! + * jQuery Cookie Plugin v1.4.0 + * https://github.com/carhartl/jquery-cookie + * + * Copyright 2013 Klaus Hartl + * Released under the MIT license + */(function(a){typeof define=="function"&&define.amd?define(["jquery"],a):a(jQuery)})(function(a){function c(a){return h.raw?a:encodeURIComponent(a)}function d(a){return h.raw?a:decodeURIComponent(a)}function e(a){return c(h.json?JSON.stringify(a):String(a))}function f(a){a.indexOf('"')===0&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(b," ")),h.json?JSON.parse(a):a}catch(c){}}function g(b,c){var d=h.raw?b:f(b);return a.isFunction(c)?c(d):d}var b=/\+/g,h=a.cookie=function(b,f,i){if(f!==undefined&&!a.isFunction(f)){i=a.extend({},h.defaults,i);if(typeof i.expires=="number"){var j=i.expires,k=i.expires=new Date;k.setTime(+k+j*864e5)}return document.cookie=[c(b),"=",e(f),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}var l=b?undefined:{},m=document.cookie?document.cookie.split("; "):[];for(var n=0,o=m.length;n +