ui.dialog: rm string position aliases

This commit is contained in:
James Campos 2011-05-14 10:29:12 -07:00
parent 484b2f4eb9
commit 71beb609d3
2 changed files with 2 additions and 44 deletions

View File

@ -136,31 +136,7 @@
el.className = 'reply dialog';
el.innerHTML = html;
el.id = id;
if (typeof position === 'object') {
left = position.left, top = position.top;
} else {
switch (position) {
case 'topleft':
left = '0px';
top = '0px';
break;
case 'topright':
left = null;
top = '0px';
break;
case 'bottomleft':
left = '0px';
top = null;
break;
case 'bottomright':
left = null;
top = null;
break;
case 'center':
left = '50%';
top = '25%';
}
}
left = position.left, top = position.top;
left = (_ref = localStorage["" + id + "Left"]) != null ? _ref : left;
top = (_ref2 = localStorage["" + id + "Top"]) != null ? _ref2 : top;
if (left) {

View File

@ -75,25 +75,7 @@ ui =
el.className = 'reply dialog'
el.innerHTML = html
el.id = id
if typeof position is 'object'
{left, top} = position
else
switch position
when 'topleft'
left = '0px'
top = '0px'
when 'topright'
left = null
top = '0px'
when 'bottomleft'
left = '0px'
top = null
when 'bottomright'
left = null
top = null
when 'center'
left = '50%'
top = '25%'
{left, top} = position
left = localStorage["#{id}Left"] ? left
top = localStorage["#{id}Top"] ? top
if left then el.style.left = left else el.style.right = '0px'