resolve merge issues

This commit is contained in:
John McLear 2014-11-15 15:34:18 +00:00
commit cce2d7279a
13 changed files with 205 additions and 33 deletions

View file

@ -12,9 +12,9 @@
"pad.toolbar.bold.title": "Fett (Strg-B)",
"pad.toolbar.italic.title": "Kursiv (Strg-I)",
"pad.toolbar.underline.title": "Unterstrichen (Strg-U)",
"pad.toolbar.strikethrough.title": "Durchgestrichen",
"pad.toolbar.ol.title": "Nummerierte Liste",
"pad.toolbar.ul.title": "Ungeordnete Liste",
"pad.toolbar.strikethrough.title": "Durchgestrichen (Strg+5)",
"pad.toolbar.ol.title": "Nummerierte Liste (Strg+Shift+N)",
"pad.toolbar.ul.title": "Ungeordnete Liste (Strg+Shift+L)",
"pad.toolbar.indent.title": "Einrücken (TAB)",
"pad.toolbar.unindent.title": "Ausrücken (Shift+TAB)",
"pad.toolbar.undo.title": "Rückgängig (Strg-Z)",

View file

@ -12,7 +12,7 @@
"pad.toolbar.unindent.title": "Outdent (Shift+TAB)",
"pad.toolbar.undo.title": "Undo (Ctrl+Z)",
"pad.toolbar.redo.title": "Redo (Ctrl+Y)",
"pad.toolbar.clearAuthorship.title": "Clear Authorship Colors",
"pad.toolbar.clearAuthorship.title": "Clear Authorship Colors (Ctrl+Shift+C)",
"pad.toolbar.import_export.title": "Import/Export from/to different file formats",
"pad.toolbar.timeslider.title": "Timeslider",
"pad.toolbar.savedRevision.title": "Save Revision",

View file

@ -4,7 +4,8 @@
"Beta16",
"Gianfranco",
"Muxator",
"Vituzzu"
"Vituzzu",
"Macofe"
]
},
"index.newPad": "Nuovo Pad",
@ -12,9 +13,9 @@
"pad.toolbar.bold.title": "Grassetto (Ctrl-B)",
"pad.toolbar.italic.title": "Corsivo (Ctrl-I)",
"pad.toolbar.underline.title": "Sottolineato (Ctrl-U)",
"pad.toolbar.strikethrough.title": "Barrato",
"pad.toolbar.ol.title": "Elenco numerato",
"pad.toolbar.ul.title": "Elenco puntato",
"pad.toolbar.strikethrough.title": "Barrato (Ctrl+5)",
"pad.toolbar.ol.title": "Elenco numerato (Ctrl+Shift+N)",
"pad.toolbar.ul.title": "Elenco puntato (Ctrl+Shift+L)",
"pad.toolbar.indent.title": "Rientro (TAB)",
"pad.toolbar.unindent.title": "Riduci rientro (Shift+TAB)",
"pad.toolbar.undo.title": "Annulla (Ctrl-Z)",

View file

@ -6,8 +6,8 @@
]
},
"index.newPad": "Neie Pad",
"pad.toolbar.ol.title": "Numeréiert Lëscht",
"pad.toolbar.ul.title": "Net-numeréiert Lëscht",
"pad.toolbar.ol.title": "Numeréiert Lëscht (Ctrl+Shift+N)",
"pad.toolbar.ul.title": "Net-numeréiert Lëscht (Ctrl+Shift+L)",
"pad.toolbar.undo.title": "Réckgängeg (Ctrl-Z)",
"pad.toolbar.redo.title": "Widderhuelen (Ctrl-Y)",
"pad.toolbar.savedRevision.title": "Versioun späicheren",

View file

@ -10,9 +10,9 @@
"pad.toolbar.bold.title": "Задебелено (Ctrl-B)",
"pad.toolbar.italic.title": "Косо (Ctrl-I)",
"pad.toolbar.underline.title": "Подвлечено (Ctrl-U)",
"pad.toolbar.strikethrough.title": "Прецртано",
"pad.toolbar.ol.title": "Подреден список",
"pad.toolbar.ul.title": "Неподреден список",
"pad.toolbar.strikethrough.title": "Прецртано (Ctrl+5)",
"pad.toolbar.ol.title": "Подреден список (Ctrl+Shift+N)",
"pad.toolbar.ul.title": "Неподреден список (Ctrl+Shift+L)",
"pad.toolbar.indent.title": "Вовлекување (TAB)",
"pad.toolbar.unindent.title": "Отстап (Shift+TAB)",
"pad.toolbar.undo.title": "Врати (Ctrl-Z)",

View file

@ -11,9 +11,9 @@
"pad.toolbar.bold.title": "Fet (Ctrl-B)",
"pad.toolbar.italic.title": "Kursiv (Ctrl-I)",
"pad.toolbar.underline.title": "Understruken (Ctrl-U)",
"pad.toolbar.strikethrough.title": "Genomstruken",
"pad.toolbar.ol.title": "Numrerad lista",
"pad.toolbar.ul.title": "Osorterad lista",
"pad.toolbar.strikethrough.title": "Genomstruken (Ctrl+5)",
"pad.toolbar.ol.title": "Numrerad lista (Ctrl+Shift+N)",
"pad.toolbar.ul.title": "Onumrerad lista (Ctrl+Shift+L)",
"pad.toolbar.indent.title": "Öka indrag (TABB)",
"pad.toolbar.unindent.title": "Minska indrag (Shift+TABB)",
"pad.toolbar.undo.title": "Ångra (Ctrl-Z)",
@ -52,7 +52,7 @@
"pad.importExport.exportpdf": "PDF",
"pad.importExport.exportopen": "ODF (Open Document Format)",
"pad.importExport.exportdokuwiki": "DokuWiki",
"pad.importExport.abiword.innerHTML": "Du kan endast importera från oformaterad text eller html-format. För mer avancerade importeringsfunktioner, var god <a href=\"https://github.com/ether/etherpad-lite/wiki/How-to-enable-importing-and-exporting-different-file-formats-in-Ubuntu-or-OpenSuse-or-SLES-with-AbiWord\">installera abiword</a>.",
"pad.importExport.abiword.innerHTML": "Du kan endast importera från oformaterad text eller HTML-format. För mer avancerade importeringsfunktioner, var god <a href=\"https://github.com/ether/etherpad-lite/wiki/How-to-enable-importing-and-exporting-different-file-formats-in-Ubuntu-or-OpenSuse-or-SLES-with-AbiWord\">installera abiword</a>.",
"pad.modals.connected": "Ansluten.",
"pad.modals.reconnecting": "Återansluter till ditt block...",
"pad.modals.forcereconnect": "Tvinga återanslutning",
@ -60,7 +60,7 @@
"pad.modals.userdup.explanation": "Detta block verkar vara öppet i mer än ett fönster på denna dator.",
"pad.modals.userdup.advice": "Återanslut för att använda detta fönster istället.",
"pad.modals.unauth": "Inte godkänd",
"pad.modals.unauth.explanation": "Din behörighet ändrades medan du visar denna sida. Försök att återansluta.",
"pad.modals.unauth.explanation": "Din behörighet ändrades medan du visade denna sida. Försök att återansluta.",
"pad.modals.looping.explanation": "Kommunikationsproblem med synkroniseringsservern har uppstått.",
"pad.modals.looping.cause": "Kanske du är ansluten via en inkompatibel brandvägg eller proxy.",
"pad.modals.initsocketfail": "Servern kan inte nås.",
@ -69,7 +69,7 @@
"pad.modals.slowcommit.explanation": "Servern svarar inte.",
"pad.modals.slowcommit.cause": "Detta kan bero på problem med nätverksanslutningen.",
"pad.modals.badChangeset.explanation": "En redigering som du gjort klassificerades som otillåten av synkroniseringsservern.",
"pad.modals.badChangeset.cause": "Detta kan bero på en felaktig konfiguration av servern eller något annat oväntad beteende. Var god kontakta tjänstadministratören om du anser att detta är ett fel. Försök ansluta igen för att fortsätta redigera.",
"pad.modals.badChangeset.cause": "Detta kan bero på en felaktig konfiguration av servern eller något annat oväntad beteende. Var god kontakta tjänsteadministratören om du upplever att detta är ett fel. Försök att ansluta igen för att fortsätta redigera.",
"pad.modals.corruptPad.explanation": "Blocket du försöker komma åt är skadat.",
"pad.modals.corruptPad.cause": "Detta kan bero på en felaktig konfiguration av servern eller något annat oväntad beteende. Var god kontakta tjänstadministratören.",
"pad.modals.deleted": "Raderad.",
@ -84,7 +84,7 @@
"pad.chat": "Chatt",
"pad.chat.title": "Öppna chatten för detta block.",
"pad.chat.loadmessages": "Läs in fler meddelanden",
"timeslider.pageTitle": "Tidsreglage för {{appTitle}}",
"timeslider.pageTitle": "{{appTitle}} tidsreglage",
"timeslider.toolbar.returnbutton": "Återvänd till blocket",
"timeslider.toolbar.authors": "Författare:",
"timeslider.toolbar.authorsList": "Inga författare",

View file

@ -3,7 +3,8 @@
"authors": [
"Baonguyen21022003",
"Minh Nguyen",
"Tuankiet65"
"Tuankiet65",
"Max20091"
]
},
"index.newPad": "Tạo một Pad mới",
@ -11,9 +12,9 @@
"pad.toolbar.bold.title": "In đậm (Ctrl-B)",
"pad.toolbar.italic.title": "In nghiêng (Ctrl-I)",
"pad.toolbar.underline.title": "Gạch chân (Ctrl-U)",
"pad.toolbar.strikethrough.title": "Gạch ngang",
"pad.toolbar.ol.title": "Danh sách Có Đánh số",
"pad.toolbar.ul.title": "Danh sách Không Đánh số",
"pad.toolbar.strikethrough.title": "Gạch ngang (Ctrl+5)",
"pad.toolbar.ol.title": "Danh sách Có Đánh số (Ctrl+Shift+N)",
"pad.toolbar.ul.title": "Danh sách Không Đánh số (Ctrl+Shift+L)",
"pad.toolbar.indent.title": "Tăng lề (TAB)",
"pad.toolbar.unindent.title": "Giảm lề (Shift+TAB)",
"pad.toolbar.undo.title": "Hoàn tác (Ctrl-Z)",

View file

@ -14,9 +14,9 @@
"pad.toolbar.bold.title": "粗體Ctrl-B",
"pad.toolbar.italic.title": "斜體Ctrl-I",
"pad.toolbar.underline.title": "底線Ctrl-U",
"pad.toolbar.strikethrough.title": "刪除線",
"pad.toolbar.ol.title": "有序清單",
"pad.toolbar.ul.title": "無序清單",
"pad.toolbar.strikethrough.title": "刪除線Ctrl+5",
"pad.toolbar.ol.title": "有序清單Ctrl+Shift+N",
"pad.toolbar.ul.title": "無序清單Ctrl+Shift+L",
"pad.toolbar.indent.title": "縮排TAB",
"pad.toolbar.unindent.title": "凸排Shift+TAB",
"pad.toolbar.undo.title": "撤銷Ctrl-Z",
@ -94,7 +94,7 @@
"timeslider.toolbar.exportlink.title": "匯出",
"timeslider.exportCurrent": "匯出當前版本為:",
"timeslider.version": "版本{{version}}",
"timeslider.saved": "{{year}}年{{month}}{{day}}日儲存",
"timeslider.saved": "{{year}}年{{month}}{{day}}日儲存",
"timeslider.dateformat": "{{year}}年{{month}}月{{day}}日 {{hours}}:{{minutes}}:{{seconds}}",
"timeslider.month.january": "1月",
"timeslider.month.february": "2月",

View file

@ -575,6 +575,117 @@ exports.deletePad = function(padID, callback)
pad.remove(callback);
});
}
/**
restoreRevision(padID, [rev]) Restores revision from past as new changeset
Example returns:
{code:0, message:"ok", data:null}
{code: 1, message:"padID does not exist", data: null}
*/
exports.restoreRevision = function (padID, rev, callback)
{
var Changeset = require("ep_etherpad-lite/static/js/Changeset");
var padMessage = require("ep_etherpad-lite/node/handler/PadMessageHandler.js");
//check if rev is a number
if (rev !== undefined && typeof rev != "number")
{
//try to parse the number
if (!isNaN(parseInt(rev)))
{
rev = parseInt(rev);
}
else
{
callback(new customError("rev is not a number", "apierror"));
return;
}
}
//ensure this is not a negativ number
if (rev !== undefined && rev < 0)
{
callback(new customError("rev is a negativ number", "apierror"));
return;
}
//ensure this is not a float value
if (rev !== undefined && !is_int(rev))
{
callback(new customError("rev is a float value", "apierror"));
return;
}
//get the pad
getPadSafe(padID, true, function (err, pad)
{
if (ERR(err, callback)) return;
//check if this is a valid revision
if (rev > pad.getHeadRevisionNumber())
{
callback(new customError("rev is higher than the head revision of the pad", "apierror"));
return;
}
pad.getInternalRevisionAText(rev, function (err, atext)
{
if (ERR(err, callback)) return;
var oldText = pad.text();
atext.text += "\n";
function eachAttribRun(attribs, func)
{
var attribsIter = Changeset.opIterator(attribs);
var textIndex = 0;
var newTextStart = 0;
var newTextEnd = atext.text.length;
while (attribsIter.hasNext())
{
var op = attribsIter.next();
var nextIndex = textIndex + op.chars;
if (!(nextIndex <= newTextStart || textIndex >= newTextEnd))
{
func(Math.max(newTextStart, textIndex), Math.min(newTextEnd, nextIndex), op.attribs);
}
textIndex = nextIndex;
}
}
// create a new changeset with a helper builder object
var builder = Changeset.builder(oldText.length);
// assemble each line into the builder
eachAttribRun(atext.attribs, function (start, end, attribs)
{
builder.insert(atext.text.substring(start, end), attribs);
});
var lastNewlinePos = oldText.lastIndexOf('\n');
if (lastNewlinePos < 0)
{
builder.remove(oldText.length - 1, 0);
} else
{
builder.remove(lastNewlinePos, oldText.match(/\n/g).length - 1);
builder.remove(oldText.length - lastNewlinePos - 1, 0);
}
var changeset = builder.toString();
//append the changeset
pad.appendRevision(changeset);
//
padMessage.updatePadClients(pad, function ()
{
});
callback(null, null);
});
});
};
/**
copyPad(sourceID, destinationID[, force=false]) copies a pad. If force is true,

View file

@ -345,10 +345,56 @@ var version =
, "getChatHistory" : ["padID", "start", "end"]
, "getChatHead" : ["padID"]
}
, "1.2.11":
{ "createGroup" : []
, "createGroupIfNotExistsFor" : ["groupMapper"]
, "deleteGroup" : ["groupID"]
, "listPads" : ["groupID"]
, "listAllPads" : []
, "createDiffHTML" : ["padID", "startRev", "endRev"]
, "createPad" : ["padID", "text"]
, "createGroupPad" : ["groupID", "padName", "text"]
, "createAuthor" : ["name"]
, "createAuthorIfNotExistsFor": ["authorMapper" , "name"]
, "listPadsOfAuthor" : ["authorID"]
, "createSession" : ["groupID", "authorID", "validUntil"]
, "deleteSession" : ["sessionID"]
, "getSessionInfo" : ["sessionID"]
, "listSessionsOfGroup" : ["groupID"]
, "listSessionsOfAuthor" : ["authorID"]
, "getText" : ["padID", "rev"]
, "setText" : ["padID", "text"]
, "getHTML" : ["padID", "rev"]
, "setHTML" : ["padID", "html"]
, "getAttributePool" : ["padID"]
, "getRevisionsCount" : ["padID"]
, "getRevisionChangeset" : ["padID", "rev"]
, "getLastEdited" : ["padID"]
, "deletePad" : ["padID"]
, "copyPad" : ["sourceID", "destinationID", "force"]
, "movePad" : ["sourceID", "destinationID", "force"]
, "getReadOnlyID" : ["padID"]
, "getPadID" : ["roID"]
, "setPublicStatus" : ["padID", "publicStatus"]
, "getPublicStatus" : ["padID"]
, "setPassword" : ["padID", "password"]
, "isPasswordProtected" : ["padID"]
, "listAuthorsOfPad" : ["padID"]
, "padUsersCount" : ["padID"]
, "getAuthorName" : ["authorID"]
, "padUsers" : ["padID"]
, "sendClientsMessage" : ["padID", "msg"]
, "listAllGroups" : []
, "checkToken" : []
, "getChatHistory" : ["padID"]
, "getChatHistory" : ["padID", "start", "end"]
, "getChatHead" : ["padID"]
, "restoreRevision" : ["padID", "rev"]
}
};
// set the latest available API version here
exports.latestApiVersion = '1.2.10';
exports.latestApiVersion = '1.2.11';
// exports the versions so it can be used by the new Swagger endpoint
exports.version = version;

View file

@ -16,7 +16,7 @@
"require-kernel" : "1.0.5",
"resolve" : ">=1.0.0",
"socket.io" : ">=1.2.0",
"ueberDB" : ">=0.2.6",
"ueberDB" : ">=0.2.9",
"express" : ">3.1.0 <3.9.0",
"async" : "0.1.x",
"connect" : "2.7.x",

View file

@ -173,6 +173,7 @@
#import_export {
top: 115px;
width: 185px;
position: fixed;
}
.timeslider-bar {
background: #f7f7f7;

View file

@ -152,7 +152,6 @@ function Ace2Inner(){
var dmesg = noop;
window.dmesg = noop;
var scheduler = parent; // hack for opera required
var textFace = 'monospace';
@ -597,6 +596,13 @@ function Ace2Inner(){
fixView();
});
}, 0);
// Chrome can't handle the truth.. If CSS rule white-space:pre-wrap
// is true then any paste event will insert two lines..
if(browser.chrome){
$("#innerdocbody").css({"white-space":"normal"});
}
}
function setStyled(newVal)
@ -3757,7 +3763,7 @@ function Ace2Inner(){
doInsertUnorderedList()
specialHandled = true;
}
if ((!specialHandled) && isTypeForCmdKey && String.fromCharCode(which).toLowerCase() == "n" && (evt.metaKey || evt.ctrlKey) && evt.shiftKey)
if ((!specialHandled) && isTypeForCmdKey && String.fromCharCode(which).toLowerCase() == "n" && (evt.metaKey || evt.ctrlKey) && evt.shiftKey)
{
// cmd-shift-N (orderedlist)
fastIncorp(9);
@ -3765,6 +3771,12 @@ function Ace2Inner(){
doInsertOrderedList()
specialHandled = true;
}
if ((!specialHandled) && isTypeForCmdKey && String.fromCharCode(which).toLowerCase() == "c" && (evt.metaKey || evt.ctrlKey) && evt.shiftKey) {
// cmd-shift-C (clearauthorship)
fastIncorp(9);
evt.preventDefault();
CMDS.clearauthorship();
}
if ((!specialHandled) && isTypeForCmdKey && String.fromCharCode(which).toLowerCase() == "h" && (evt.ctrlKey))
{
// cmd-H (backspace)
@ -3816,7 +3828,7 @@ function Ace2Inner(){
}
updateBrowserSelectionFromRep();
var myselection = document.getSelection(); // get the current caret selection, can't use rep. here because that only gives us the start position not the current
var caretOffsetTop = myselection.focusNode.parentNode.offsetTop | myselection.focusNode.offsetTop; // get the carets selection offset in px IE 214
var caretOffsetTop = myselection.focusNode.parentNode.offsetTop || myselection.focusNode.offsetTop; // get the carets selection offset in px IE 214
// top.console.log(caretOffsetTop);
setScrollY(caretOffsetTop); // set the scrollY offset of the viewport on the document