From f42a2f786c147f37bfa158345fdda0d57c0eec2a Mon Sep 17 00:00:00 2001 From: Tristan Cavelier <tristan.cavelier@tiolive.com> Date: Tue, 4 Mar 2014 15:18:09 +0100 Subject: [PATCH] jio dashboard save and load description added --- examples/jio_dashboard.html | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/examples/jio_dashboard.html b/examples/jio_dashboard.html index 0acb9ff..50176f9 100644 --- a/examples/jio_dashboard.html +++ b/examples/jio_dashboard.html @@ -21,8 +21,10 @@ <button onclick="fillLocalDescription()">Local</button> <button onclick="fillDavDescription()">WebDAV</button> <button onclick="fillERP5Description()">ERP5</button> - <button onclick="fillCustomDescription()">Custom</button> + <button onclick="fillCustomDescription()">Custom</button> - <button onclick="fillLastDescription()">Last</button> + <button onclick="loadDescription()">Load</button> + <button onclick="saveDescription()">Save</button> </td> </tr> <tr> @@ -177,6 +179,16 @@ function fillLastDescription() { select("#storagedescription").value = localStorage.getItem("last_jio_description") || "{}"; } +function saveDescription() { + localStorage.setItem( + "saved_jio_description", + select("#storagedescription").value + ); +} +function loadDescription() { + select("#storagedescription").value = + localStorage.getItem("saved_jio_description") || "{}"; +} fillLastDescription(); function createJIO() { -- 2.30.9