Resize chat

This commit is contained in:
John McLear 2011-07-19 16:03:34 +01:00 committed by Peter 'Pita' Martischka
parent bc9aa8579e
commit 65baa26fca
2 changed files with 46 additions and 3 deletions

View file

@ -785,8 +785,12 @@ ul#colorpickerswatches li:hover
background-color: white; background-color: white;
border: 1px solid white; border: 1px solid white;
overflow-y:scroll; overflow-y:scroll;
height: 165px;
font-size: 12px; font-size: 12px;
position:absolute;
right:0px;
left:0px;
top:25px;
bottom:25px;
} }
#chattext p #chattext p
@ -798,6 +802,10 @@ ul#colorpickerswatches li:hover
#chatinputbox #chatinputbox
{ {
padding: 3px 2px; padding: 3px 2px;
position: absolute;
bottom:0px;
right:0px;
left:3px;
} }
#chatlabel #chatlabel
@ -858,6 +866,8 @@ ul#colorpickerswatches li:hover
#titlelabel #titlelabel
{ {
font-size:13px; font-size:13px;
margin-left:20px;
padding-top:3px;
} }
#titlecross #titlecross
@ -879,3 +889,32 @@ ul#colorpickerswatches li:hover
margin-right: 3px; margin-right: 3px;
margin-top:2px; margin-top:2px;
} }
/* resizable stuff for chat */
.ui-resizable {
position: relative;
}
.ui-resizable-handle {
position: absolute;
font-size: 0.1px;
z-index: 99999;
display: block;
}
/*
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable- autohide .ui-resizable-handle { display: none; }
*/
.ui-resizable-nw {
cursor: nw-resize;
width: 22px;
height: 22px;
left: 0px; top: 0px;
background-size: 100% auto;
background-image: url("/static/img/nw-resize.png");
background-repeat: no-repeat;
/* background-position: -5px -5px;*/
}
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right:
-5px; top: -5px;}

View file

@ -6,7 +6,11 @@ var chat = (function()
$("#chaticon").hide("slide", { direction: "down" }, 500, function() $("#chaticon").hide("slide", { direction: "down" }, 500, function()
{ {
$("#chatbox").show("slide", { direction: "down" }, 750, self.scrollDown); $("#chatbox").show("slide", { direction: "down" }, 750, self.scrollDown);
$("#chatbox").resizable(); $("#chatbox").resizable({ handles: 'nw', start: function(event,ui){
$("#editorcontainer").hide();
}, stop: function(event,ui){
$("#editorcontainer").show();
}});
}); });
}, },
hide: function () hide: function ()
@ -19,7 +23,7 @@ var chat = (function()
}, },
scrollDown: function() scrollDown: function()
{ {
console.log($('#chatbox').css("display")); //console.log($('#chatbox').css("display"));
if($('#chatbox').css("display") != "none") if($('#chatbox').css("display") != "none")
$('#chattext').animate({scrollTop: $('#chattext')[0].scrollHeight}, "slow"); $('#chattext').animate({scrollTop: $('#chattext')[0].scrollHeight}, "slow");