mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-05 14:47:12 -04:00
Merge a671140378
into 55a2f46ca9
This commit is contained in:
commit
423724716b
9 changed files with 93 additions and 52 deletions
|
@ -18,7 +18,7 @@ var chat = (function()
|
|||
{
|
||||
var self = {
|
||||
show: function ()
|
||||
{
|
||||
{
|
||||
$("#chaticon").hide("slide", {
|
||||
direction: "down"
|
||||
}, 500, function ()
|
||||
|
@ -55,9 +55,10 @@ var chat = (function()
|
|||
scrollDown: function()
|
||||
{
|
||||
//console.log($('#chatbox').css("display"));
|
||||
|
||||
if($('#chatbox').css("display") != "none")
|
||||
if($('#chatbox').css("display") != "none") {
|
||||
$('#chattext').animate({scrollTop: $('#chattext')[0].scrollHeight}, "slow");
|
||||
$("#chatinput").focus();
|
||||
}
|
||||
},
|
||||
send: function()
|
||||
{
|
||||
|
@ -98,7 +99,7 @@ var chat = (function()
|
|||
var count = Number($("#chatcounter").text());
|
||||
count++;
|
||||
$("#chatcounter").text(count);
|
||||
// chat throb stuff -- Just make it throb in for ~2 secs then fadeotu
|
||||
// chat throb stuff -- Just make it throb in for ~2 secs then fadeout
|
||||
$('#chatthrob').html("<b>"+authorName+"</b>" + ": " + text);
|
||||
$('#chatthrob').effect("pulsate", {times:1,mode:"hide"},2000);
|
||||
}
|
||||
|
@ -108,6 +109,13 @@ var chat = (function()
|
|||
},
|
||||
init: function()
|
||||
{
|
||||
$("#chaticon").mouseenter(function(){
|
||||
self.show();
|
||||
});
|
||||
$("#chatbox").mouseenter(function(evt){
|
||||
if ( !$("#chatinput").is(":focus") ) $("#chatinput").focus();
|
||||
});
|
||||
|
||||
$("#chatinput").keypress(function(evt)
|
||||
{
|
||||
//if the user typed enter, fire the send
|
||||
|
|
|
@ -173,9 +173,9 @@ function handshake()
|
|||
socket.once('connect', function()
|
||||
{
|
||||
var padId = document.location.pathname.substring(document.location.pathname.lastIndexOf("/") + 1);
|
||||
padId = unescape(padId); // unescape neccesary due to Safari and Opera interpretation of spaces
|
||||
padId = decodeURIComponent(padId); // unescape neccesary due to Safari and Opera interpretation of spaces
|
||||
|
||||
document.title = document.title + " | " + padId;
|
||||
document.title = padId.replace( /_/g, " ") + " | " + document.title;
|
||||
|
||||
var token = readCookie("token");
|
||||
if (token == null)
|
||||
|
|
|
@ -122,6 +122,10 @@ var padeditbar = (function()
|
|||
else if (cmd == 'save')
|
||||
{
|
||||
padsavedrevs.saveNow();
|
||||
}
|
||||
else if (cmd == 'tglfont')
|
||||
{
|
||||
pad.changeViewOption('useMonospaceFont', !(pad.padOptions.view&&pad.padOptions.view.useMonospaceFont));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue