dialog centering
This commit is contained in:
parent
c750b9b62e
commit
c3331c43e1
@ -80,20 +80,23 @@ AEOS =
|
|||||||
switch position
|
switch position
|
||||||
when 'topleft'
|
when 'topleft'
|
||||||
left = '0px'
|
left = '0px'
|
||||||
top = '0px'
|
top = '0px'
|
||||||
when 'topright'
|
when 'topright'
|
||||||
left = null
|
left = null
|
||||||
top = '0px'
|
top = '0px'
|
||||||
when 'bottomleft'
|
when 'bottomleft'
|
||||||
left = '0px'
|
left = '0px'
|
||||||
top = null
|
top = null
|
||||||
when 'bottomright'
|
when 'bottomright'
|
||||||
left = null
|
left = null
|
||||||
top = null
|
top = null
|
||||||
|
when 'center'
|
||||||
|
left = '50%'
|
||||||
|
top = '25%'
|
||||||
left = GM_getValue "#{id}Left", left
|
left = GM_getValue "#{id}Left", left
|
||||||
top = GM_getValue "#{id}Top", top
|
top = GM_getValue "#{id}Top", top
|
||||||
if left then dialog.style.left = left else dialog.style.right = '0px'
|
if left then dialog.style.left = left else dialog.style.right = '0px'
|
||||||
if top then dialog.style.top = top else dialog.style.bottom = '0px'
|
if top then dialog.style.top = top else dialog.style.bottom = '0px'
|
||||||
|
|
||||||
$('div.move', dialog).addEventListener 'mousedown', AEOS.move, true
|
$('div.move', dialog).addEventListener 'mousedown', AEOS.move, true
|
||||||
$('div.move a[name=close]', dialog)?.addEventListener 'click', (-> remove $ id), true
|
$('div.move a[name=close]', dialog)?.addEventListener 'click', (-> remove $ id), true
|
||||||
@ -1219,7 +1222,7 @@ if getConfig 'Quick Report'
|
|||||||
|
|
||||||
if getConfig 'Thread Watcher'
|
if getConfig 'Thread Watcher'
|
||||||
#create watcher
|
#create watcher
|
||||||
watcher.innerHTML = '<div class="move">Thread Watcher</div><div></div>'
|
html = '<div class="move">Thread Watcher</div><div></div>'
|
||||||
watcher = AEOS.makeDialog 'watcher', 'topleft', html
|
watcher = AEOS.makeDialog 'watcher', 'topleft', html
|
||||||
addTo d.body, watcher
|
addTo d.body, watcher
|
||||||
watcherUpdate()
|
watcherUpdate()
|
||||||
|
|||||||
@ -94,6 +94,10 @@
|
|||||||
case 'bottomright':
|
case 'bottomright':
|
||||||
left = null;
|
left = null;
|
||||||
top = null;
|
top = null;
|
||||||
|
break;
|
||||||
|
case 'center':
|
||||||
|
left = '50%';
|
||||||
|
top = '25%';
|
||||||
}
|
}
|
||||||
left = GM_getValue("" + id + "Left", left);
|
left = GM_getValue("" + id + "Left", left);
|
||||||
top = GM_getValue("" + id + "Top", top);
|
top = GM_getValue("" + id + "Top", top);
|
||||||
@ -1379,8 +1383,7 @@
|
|||||||
if (getConfig('Image Expansion')) {
|
if (getConfig('Image Expansion')) {
|
||||||
delform = $('form[name=delform]');
|
delform = $('form[name=delform]');
|
||||||
expand = n('div', {
|
expand = n('div', {
|
||||||
innerHTML: '<label>Expand Images<input type=checkbox id=imageExpand></label>\
|
innerHTML: "<label>Expand Images<input type=checkbox id=imageExpand></label>"
|
||||||
<select><option>full</option><option>fit width</option><option>fit screen</option></select>'
|
|
||||||
});
|
});
|
||||||
$("input", expand).addEventListener('click', imageExpandClick, true);
|
$("input", expand).addEventListener('click', imageExpandClick, true);
|
||||||
inBefore(delform.firstChild, expand);
|
inBefore(delform.firstChild, expand);
|
||||||
@ -1523,7 +1526,7 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (getConfig('Thread Watcher')) {
|
if (getConfig('Thread Watcher')) {
|
||||||
watcher.innerHTML = '<div class="move">Thread Watcher</div><div></div>';
|
html = '<div class="move">Thread Watcher</div><div></div>';
|
||||||
watcher = AEOS.makeDialog('watcher', 'topleft', html);
|
watcher = AEOS.makeDialog('watcher', 'topleft', html);
|
||||||
addTo(d.body, watcher);
|
addTo(d.body, watcher);
|
||||||
watcherUpdate();
|
watcherUpdate();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user