Merge branch 'develop' of github.com:ether/etherpad-lite into develop

pull/1536/merge
John McLear 2013-02-18 19:34:19 +00:00
commit 1e7d24c03b
4 changed files with 22 additions and 12 deletions

View File

@ -28,7 +28,7 @@ documented codebase makes it easier for developers to improve the code and contr
Etherpad Lite is designed to be easily embeddable and provides a [HTTP API](https://github.com/ether/etherpad-lite/wiki/HTTP-API) Etherpad Lite is designed to be easily embeddable and provides a [HTTP API](https://github.com/ether/etherpad-lite/wiki/HTTP-API)
that allows your web application to manage pads, users and groups. It is recommended to use the [available client implementations](https://github.com/ether/etherpad-lite/wiki/HTTP-API-client-libraries) in order to interact with this API. There is also a [jQuery plugin](https://github.com/johnyma22/etherpad-lite-jquery-plugin) that helps you to embed Pads into your website. that allows your web application to manage pads, users and groups. It is recommended to use the [available client implementations](https://github.com/ether/etherpad-lite/wiki/HTTP-API-client-libraries) in order to interact with this API. There is also a [jQuery plugin](https://github.com/ether/etherpad-lite-jquery-plugin) that helps you to embed Pads into your website.
There's also a full-featured plugin framework, allowing you to easily add your own features. There's also a full-featured plugin framework, allowing you to easily add your own features.
Finally, Etherpad Lite comes with translations into tons of different languages! Finally, Etherpad Lite comes with translations into tons of different languages!

View File

@ -1622,9 +1622,17 @@ function Ace2Inner(){
lines = ccData.lines; lines = ccData.lines;
var lineAttribs = ccData.lineAttribs; var lineAttribs = ccData.lineAttribs;
var linesWrapped = ccData.linesWrapped; var linesWrapped = ccData.linesWrapped;
var scrollToTheLeftNeeded = false;
if (linesWrapped > 0) if (linesWrapped > 0)
{ {
if(!browser.ie){
// chrome decides in it's infinite wisdom that its okay to put the browsers visisble window in the middle of the span
// an outcome of this is that the first chars of the string are no longer visible to the user.. Yay chrome..
// Move the browsers visible area to the left hand side of the span
// Firefox isn't quite so bad, but it's still pretty quirky.
var scrollToTheLeftNeeded = true;
}
// console.log("Editor warning: " + linesWrapped + " long line" + (linesWrapped == 1 ? " was" : "s were") + " hard-wrapped into " + ccData.numLinesAfter + " lines."); // console.log("Editor warning: " + linesWrapped + " long line" + (linesWrapped == 1 ? " was" : "s were") + " hard-wrapped into " + ccData.numLinesAfter + " lines.");
} }
@ -1692,6 +1700,10 @@ function Ace2Inner(){
//console.log("removed: "+id); //console.log("removed: "+id);
}); });
if(scrollToTheLeftNeeded){ // needed to stop chrome from breaking the ui when long strings without spaces are pasted
$("#innerdocbody").scrollLeft(0);
}
p.mark("findsel"); p.mark("findsel");
// if the nodes that define the selection weren't encountered during // if the nodes that define the selection weren't encountered during
// content collection, figure out where those nodes are now. // content collection, figure out where those nodes are now.
@ -1897,7 +1909,7 @@ function Ace2Inner(){
var prevLine = rep.lines.prev(thisLine); var prevLine = rep.lines.prev(thisLine);
var prevLineText = prevLine.text; var prevLineText = prevLine.text;
var theIndent = /^ *(?:)/.exec(prevLineText)[0]; var theIndent = /^ *(?:)/.exec(prevLineText)[0];
if (/[\[\(\{]\s*$/.exec(prevLineText)) theIndent += THE_TAB; if (/[\[\(\:\{]\s*$/.exec(prevLineText)) theIndent += THE_TAB;
var cs = Changeset.builder(rep.lines.totalWidth()).keep( var cs = Changeset.builder(rep.lines.totalWidth()).keep(
rep.lines.offsetOfIndex(lineNum), lineNum).insert( rep.lines.offsetOfIndex(lineNum), lineNum).insert(
theIndent, [ theIndent, [
@ -3317,8 +3329,10 @@ function Ace2Inner(){
function doIndentOutdent(isOut) function doIndentOutdent(isOut)
{ {
if (!(rep.selStart && rep.selEnd) || if (!((rep.selStart && rep.selEnd) ||
((rep.selStart[0] == rep.selEnd[0]) && (rep.selStart[1] == rep.selEnd[1]) && rep.selEnd[1] > 1)) ((rep.selStart[0] == rep.selEnd[0]) && (rep.selStart[1] == rep.selEnd[1]) && rep.selEnd[1] > 1)) &&
(isOut != true)
)
{ {
return false; return false;
} }
@ -3326,7 +3340,6 @@ function Ace2Inner(){
var firstLine, lastLine; var firstLine, lastLine;
firstLine = rep.selStart[0]; firstLine = rep.selStart[0];
lastLine = Math.max(firstLine, rep.selEnd[0] - ((rep.selEnd[1] === 0) ? 1 : 0)); lastLine = Math.max(firstLine, rep.selEnd[0] - ((rep.selEnd[1] === 0) ? 1 : 0));
var mods = []; var mods = [];
for (var n = firstLine; n <= lastLine; n++) for (var n = firstLine; n <= lastLine; n++)
{ {

View File

@ -1,6 +1,6 @@
(function(document) { (function(document) {
// Set language for l10n // Set language for l10n
var language = document.cookie.match(/language=((\w{2,3})(-w+)?)/); var language = document.cookie.match(/language=((\w{2,3})(-\w+)?)/);
if(language) language = language[1]; if(language) language = language[1];
html10n.bind('indexed', function() { html10n.bind('indexed', function() {

View File

@ -156,10 +156,7 @@ var padeditbar = (function()
else if (cmd == 'insertorderedlist') ace.ace_doInsertOrderedList(); else if (cmd == 'insertorderedlist') ace.ace_doInsertOrderedList();
else if (cmd == 'indent') else if (cmd == 'indent')
{ {
if (!ace.ace_doIndentOutdent(false)) ace.ace_doIndentOutdent(false);
{
ace.ace_doInsertUnorderedList();
}
} }
else if (cmd == 'outdent') else if (cmd == 'outdent')
{ {