mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-26 10:26:15 -04:00
Merge branch 'develop' of git://github.com/Pita/etherpad-lite into restartserver
This commit is contained in:
commit
a0548af021
14 changed files with 320 additions and 41 deletions
|
@ -341,6 +341,11 @@ function Ace2Inner(){
|
|||
return rep;
|
||||
};
|
||||
|
||||
editorInfo.ace_getAuthor = function()
|
||||
{
|
||||
return thisAuthor;
|
||||
}
|
||||
|
||||
var currentCallStack = null;
|
||||
|
||||
function inCallStack(type, action)
|
||||
|
@ -439,6 +444,14 @@ function Ace2Inner(){
|
|||
try
|
||||
{
|
||||
result = action();
|
||||
|
||||
hooks.callAll('aceEditEvent', {
|
||||
callstack: currentCallStack,
|
||||
editorInfo: editorInfo,
|
||||
rep: rep,
|
||||
documentAttributeManager: documentAttributeManager
|
||||
});
|
||||
|
||||
//console.log("Just did action for: "+type);
|
||||
cleanExit = true;
|
||||
}
|
||||
|
@ -522,6 +535,7 @@ function Ace2Inner(){
|
|||
{
|
||||
return rep.lines.atOffset(charOffset).key;
|
||||
}
|
||||
|
||||
|
||||
function dispose()
|
||||
{
|
||||
|
|
|
@ -114,9 +114,13 @@ var chat = (function()
|
|||
{
|
||||
var count = Number($("#chatcounter").text());
|
||||
count++;
|
||||
|
||||
// is the users focus already in the chatbox?
|
||||
var alreadyFocused = $("#chatinput").is(":focus");
|
||||
|
||||
$("#chatcounter").text(count);
|
||||
// chat throb stuff -- Just make it throw for twice as long
|
||||
if(wasMentioned)
|
||||
if(wasMentioned && !alreadyFocused)
|
||||
{ // If the user was mentioned show for twice as long and flash the browser window
|
||||
if (chatMentions == 0){
|
||||
title = document.title;
|
||||
|
@ -130,7 +134,11 @@ var chat = (function()
|
|||
$('#chatthrob').html("<b>"+authorName+"</b>" + ": " + text).show().delay(2000).hide(400);
|
||||
}
|
||||
}
|
||||
|
||||
// Clear the chat mentions when the user clicks on the chat input box
|
||||
$('#chatinput').click(function(){
|
||||
chatMentions = 0;
|
||||
document.title = title;
|
||||
});
|
||||
self.scrollDown();
|
||||
|
||||
},
|
||||
|
|
|
@ -54,10 +54,22 @@ exports.formatHooks = function (hook_set_name) {
|
|||
};
|
||||
|
||||
exports.loadFn = function (path, hookName) {
|
||||
var x = path.split(":");
|
||||
var fn = require(x[0]);
|
||||
var functionName = x[1] ? x[1] : hookName;
|
||||
var functionName
|
||||
, parts = path.split(":");
|
||||
|
||||
// on windows: C:\foo\bar:xyz
|
||||
if(parts[0].length == 1) {
|
||||
if(parts.length == 3)
|
||||
functionName = parts.pop();
|
||||
path = parts.join(":");
|
||||
}else{
|
||||
path = parts[0];
|
||||
functionName = parts[1];
|
||||
}
|
||||
|
||||
var fn = require(path);
|
||||
functionName = functionName ? functionName : hookName;
|
||||
|
||||
_.each(functionName.split("."), function (name) {
|
||||
fn = fn[name];
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue