Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('div.icon').dblclick(function(ev, ui) {
- //'+ (panels.size() + 1) +'
- //try setting a id to have panels be individualistic
- //$(this).replaceWith("<div>" + $(this).text() + "</div>");
- $(this).prepend('<div class="panel flora" title="'+ $(this).find('.icontxt').text() +'"> >:) Click & drag icons, double click to open a window.</div>');
- $(this).find('.panel').dialog({
- position: ['center','center'],
- stack: true,
- open: function(ev, ui) {
- $('.ui-dialog-titlebar').dblclick(function(ev, ui) {
- var maxHeight = $('#wrapper').height(); var maxWidth = $('#wrapper').width();
- if (max) {
- $('.panel').css('top',temp[1]);
- $('.panel').css('left',temp[2]);
- $('.panel').height(temp[4]).width(temp[3]);
- max = false;
- } else {
- /*temp = [$(this).parent().css('top'),$(this).parent().css('left'),$(this).parent().width,$(this).parent().height];
- $('.panel').css('top: 0;','left: 0;');
- //$('.panel').css('left','0');
- $('.panel').height(maxHeight).width(maxWidth);
- $(this).parent().dialog({draggable:false});
- $(this).parent().parent().dialog({resizable:false});*/
- alert($(this).parents("div.icon").find('.panel').dialog("isOpen"));
- max = true;
- }
- //$('.panel').dialog({draggable: false});
- });
- }
- });
- });
Add Comment
Please, Sign In to add comment