From 06d77102a4fd5b8590d43a08e63b25fa484b7dff Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Sun, 14 Apr 2013 00:19:29 +0200 Subject: [PATCH] UI should use $.get/$.set instead of localStorage. --- lib/ui.coffee | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ui.coffee b/lib/ui.coffee index 14b8fe025..eb06129aa 100644 --- a/lib/ui.coffee +++ b/lib/ui.coffee @@ -4,7 +4,8 @@ UI = do -> className: 'dialog' innerHTML: html id: id - el.style.cssText = localStorage.getItem("#{g.NAMESPACE}#{id}.position") or position + $.get "#{id}.position", position, (item) -> + el.style.cssText = item["#{id}.position"] move = $ '.move', el $.on move, 'touchstart mousedown', dragstart el @@ -273,7 +274,7 @@ UI = do -> else # mouseup $.off d, 'mousemove', @move $.off d, 'mouseup', @up - localStorage.setItem "#{g.NAMESPACE}#{@id}.position", @style.cssText + $.set "#{@id}.position", @style.cssText hoverstart = ({root, el, latestEvent, endEvents, asapTest, cb}) -> o = {