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

This commit is contained in:
John McLear 2014-03-03 21:26:22 +00:00
commit aa81c4d5cb
24 changed files with 212 additions and 47 deletions

View file

@ -124,6 +124,7 @@ function Ace2Editor()
editor.getInInternationalComposition = function()
{
if (!loaded) return false;
return info.ace_getInInternationalComposition();
};

View file

@ -81,7 +81,7 @@ $(document).ready(function () {
if(attr == "name"){ // Hack to rewrite URLS into name
row.find(".name").html("<a target='_blank' title='Plugin details' href='https://npmjs.org/package/"+plugin['name']+"'>"+plugin['name'].substr(3)+"</a>"); // remove 'ep_'
}else{
row.find("." + attr).html(plugin[attr]);
row.find("." + attr).text(plugin[attr]);
}
}
row.find(".version").html( plugin.version );

View file

@ -191,9 +191,18 @@ window.html10n = (function(window, document, undefined) {
return
}
// dat alng ain't here, man!
if (!data[lang]) {
cb(new Error('Couldn\'t find translations for '+lang))
return
var msg = 'Couldn\'t find translations for '+lang
, l
if(~lang.indexOf('-')) lang = lang.split('-')[0] // then let's try related langs
for(l in data) {
if(lang != l && l.indexOf(lang) === 0 && data[l]) {
lang = l
break;
}
}
if(lang != l) return cb(new Error(msg))
}
if ('string' == typeof data[lang]) {
@ -898,11 +907,22 @@ window.html10n = (function(window, document, undefined) {
var lang
langs.reverse()
// loop through priority array...
// loop through the priority array...
for (var i=0, n=langs.length; i < n; i++) {
lang = langs[i]
if(!lang || !(lang in that.loader.langs)) continue;
if(!lang) continue;
if(!(lang in that.loader.langs)) {// uh, we don't have this lang availbable..
// then check for related langs
if(~lang.indexOf('-')) lang = lang.split('-')[0];
for(var l in that.loader.langs) {
if(lang != l && l.indexOf(lang) === 0) {
lang = l
break;
}
}
if(lang != l) continue;
}
// ... and apply all strings of the current lang in the list
// to our build object

View file

@ -259,7 +259,7 @@ linestylefilter.getRegexpFilter = function(regExp, tag)
linestylefilter.REGEX_WORDCHAR = /[\u0030-\u0039\u0041-\u005A\u0061-\u007A\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\u1FFF\u3040-\u9FFF\uF900-\uFDFF\uFE70-\uFEFE\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFDC]/;
linestylefilter.REGEX_URLCHAR = new RegExp('(' + /[-:@a-zA-Z0-9_.,~%+\/\\?=&#!;()$]/.source + '|' + linestylefilter.REGEX_WORDCHAR.source + ')');
linestylefilter.REGEX_URLCHAR = new RegExp('(' + /[-:@a-zA-Z0-9_.,~%+\/\\?=&#!;()\[\]$]/.source + '|' + linestylefilter.REGEX_WORDCHAR.source + ')');
linestylefilter.REGEX_URL = new RegExp(/(?:(?:https?|s?ftp|ftps|file|nfs):\/\/|mailto:|www\.)/.source + linestylefilter.REGEX_URLCHAR.source + '*(?![:.,;])' + linestylefilter.REGEX_URLCHAR.source, 'g');
linestylefilter.getURLFilter = linestylefilter.getRegexpFilter(
linestylefilter.REGEX_URL, 'url');

View file

@ -77,6 +77,7 @@ var padimpexp = (function()
}
currentImportTimer = null;
importFailed("Request timed out.");
importDone();
}, 25000); // time out after some number of seconds
$('#importsubmitinput').attr(
{