From fb95c775d0339c5bf180362c01c6cd433ee3ea97 Mon Sep 17 00:00:00 2001 From: Owen Date: Mon, 21 Jul 2014 15:08:08 +0300 Subject: Save Load done, Gantt scrolling much better Save now asks if you wish to discard your changes Load now load everything perfectly, no bugs with dates or the gantt chart Scrolling for the gantt area new works much much better, it deactivates zooming controls and enables horizontal scrolling. Zooming and background clicking is left intact in Graph mode. --- scripts/buttons.js | 13 ++++++---- scripts/gant.js | 67 +++++++++++++++++++++++++++++----------------------- scripts/rhizicore.js | 45 ++++++++++++++++++++--------------- 3 files changed, 72 insertions(+), 53 deletions(-) (limited to 'scripts') diff --git a/scripts/buttons.js b/scripts/buttons.js index e1e39a68..472b58ff 100644 --- a/scripts/buttons.js +++ b/scripts/buttons.js @@ -46,20 +46,23 @@ $('.save').click(function(){ }); $('.load').click(function(){ + if (confirm('All unsaved changes will be deleted, are you sure?')) { + links=[]; + nodes=[]; var data = JSON.parse(JSON.parse(localStorage.getItem(key))); console.log(data); for(var i=0; inodes[startindex].start){ @@ -629,7 +637,6 @@ function mousedown() { $('.editinfo').css('left', 0); $('.editlinkinfo').css('top', -100); $('.editlinkinfo').css('left', 0); - d3.event.stopPropagation(); graph.removeHighlight(); $('.info').fadeOut(300); } -- cgit v1.3.1