UI should use $.get/$.set instead of localStorage.

This commit is contained in:
Nicolas Stepien 2013-04-14 00:19:29 +02:00
parent 344e1aaa19
commit 06d77102a4

View File

@ -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 = {