Mercurial > altnet-hispano
changeset 220:42a1068e73c8
corrección en subpanels para respetar (un poco mas) html según la w3c
author | nelopauselli |
---|---|
date | Fri, 09 Sep 2011 11:26:17 -0300 |
parents | b9850b647a4e |
children | 37ddf81333d3 |
files | Agendas/trunk/src/Agendas.Web/Content/subpanels-0.9.css Agendas/trunk/src/Agendas.Web/Scripts/subpanels-0.9.js |
diffstat | 2 files changed, 16 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/Agendas/trunk/src/Agendas.Web/Content/subpanels-0.9.css Thu Sep 08 11:22:10 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Web/Content/subpanels-0.9.css Fri Sep 09 11:26:17 2011 -0300 @@ -8,6 +8,11 @@ text-align: right; } +.sp-main { + position: absolute; +} + .ajax-button { display: inline-block; -} \ No newline at end of file +} +
--- a/Agendas/trunk/src/Agendas.Web/Scripts/subpanels-0.9.js Thu Sep 08 11:22:10 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Web/Scripts/subpanels-0.9.js Fri Sep 09 11:26:17 2011 -0300 @@ -15,14 +15,23 @@ closeLink = $('<a></a>').addClass('ajax-button ui-widget ui-state-default ui-corner-all').css('display', 'none').click(this.close).appendTo(panel); var closeSpan = $('<span></span>').addClass('ui-icon ui-icon-minusthick').appendTo(closeLink); + var body = $('body'); + // panel principal main = $('<div></div>') .addClass('ui-widget') .addClass('ui-widget-content') .addClass('ui-corner-all') + .addClass('sp-main') .width(settings.width || '400px') .css('display', 'none') - .appendTo(panel); + .appendTo(body); + + var o = openLink.offset(); + var top = o.top + openLink.height() * 1.2; + var left = o.left; + + main.offset({ top: top, left: left }); }; this.close = function () {