|
@@ -84,10 +84,10 @@
|
|
|
}
|
|
|
//匹配网址
|
|
|
var i = 0;
|
|
|
- var m = content.match(/(((((http|ftp|https|HTTP|FTP|HTTPS):\/\/)[\w\-_]+)|www|WWW|[0-9]+)(\.(?!gif|jpg|png|mp3)[\w\-_]+)+([\w\-\.,@?^=%:/~\+#]*[\w\-\@?^=%/~\+#\r\n]))/ig);
|
|
|
+ var m = content.match(/(((((http|ftp|https|HTTP|FTP|HTTPS):\/\/)[\w\-_]+)|www|WWW)(\.(?!gif|jpg|png|mp3)[\w\-_]+)+([\w\-\.,@?^=%:/~\+#]*[\w\-\@?^=%/~\+#\r\n]))|(([0-9]+)(\.[0-9]+)(\.[0-9]+)(\.[0-9]+)([\/\w\W]*))/ig);
|
|
|
if (m == null)
|
|
|
return content;
|
|
|
- content = content.replace(/(((((http|ftp|https|HTTP|FTP|HTTPS):\/\/)[\w\-_]+)|www|WWW|[0-9]+)(\.(?!gif|jpg|png|mp3)[\w\-_]+)+([\w\-\.,@?^=%:/~\+#]*[\w\-\@?^=%/~\+#\r\n]))/ig, function() {
|
|
|
+ content = content.replace(/(((((http|ftp|https|HTTP|FTP|HTTPS):\/\/)[\w\-_]+)|www|WWW)(\.(?!gif|jpg|png|mp3)[\w\-_]+)+([\w\-\.,@?^=%:/~\+#]*[\w\-\@?^=%/~\+#\r\n]))|(([0-9]+)(\.[0-9]+)(\.[0-9]+)(\.[0-9]+)([\/\w\W]*))/ig, function() {
|
|
|
var html = '';
|
|
|
var g = (/((((http|ftp|https|HTTP|FTP|HTTPS):\/\/)[\w\-_]+)(\.[\w\-_]+)+([\w\-\.,@?^=%:/~\+#]*[\w\-\@?^=%/~\+#\r\n]))/ig).exec(m[i]);
|
|
|
if (getUserID()) {
|
|
@@ -226,9 +226,9 @@
|
|
|
html = '<div class="well m-l-xs m-t-xs fit-content" id="file-error"><span class="glyphicon glyphicon-remove-sign"></span><span>' + getFileInfo(content)[5] + '</span></div>';
|
|
|
} else if (ifSelf(content) && content.way == 1) {
|
|
|
if (getUserID())
|
|
|
- html = '';
|
|
|
+ html = '<div class="well m-l-xs m-t-xs fit-content" id="file-info"><span class="glyphicon glyphicon-info-sign"></span><span>' + getFileInfo(content)[8] + '</span></div>';
|
|
|
else
|
|
|
- html = '<div class="well m-l-xs m-t-xs fit-content" id="file-info"><span class="glyphicon glyphicon-remove-sign"></span><span>' + getFileInfo(content)[8] + '</span></div>';
|
|
|
+ html = '<div class="well m-l-xs m-t-xs fit-content" id="file-info"><span class="glyphicon glyphicon-info-sign"></span><span>' + getFileInfo(content)[8] + '</span></div>';
|
|
|
}
|
|
|
} else if (scope.msg.contentType == 4) {
|
|
|
html = '<span class="text-message">' +
|
|
@@ -245,18 +245,16 @@
|
|
|
var html_g = html;
|
|
|
} else {
|
|
|
if (getUserID()) {
|
|
|
- var html_g = '<p><strong>' +
|
|
|
+ var html_g = '<div><p><strong>' +
|
|
|
scope.msg.senderDisplayName +
|
|
|
- '</strong><small class="text-muted">-' +
|
|
|
- getTime(scope.msg) + '</small></p>' +
|
|
|
+ '</strong><small class="text-muted"></small></p></div>' +
|
|
|
'<div class="wellself m-l-xs m-t-xs fit-content" >' +
|
|
|
'<div class="text-point"></div>' + html +
|
|
|
'</div>';
|
|
|
} else {
|
|
|
- var html_g = '<p><strong>' +
|
|
|
+ var html_g = '<div><p><strong>' +
|
|
|
scope.msg.senderDisplayName +
|
|
|
- '</strong><small class="text-muted">-' +
|
|
|
- getTime(scope.msg) + '</small></p>' +
|
|
|
+ '</strong><small class="text-muted"></small></p></div>' +
|
|
|
'<div class="well m-l-xs m-t-xs fit-content" >' +
|
|
|
'<div class="text-point"></div>' + html +
|
|
|
'</div>';
|