@@ -20,7 +20,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* global OC OCA OCP _ */
|
/* global OC OCA OCP t escapeHTML */
|
||||||
|
|
||||||
import CommentCollection from '../legacy/commentcollection';
|
import CommentCollection from '../legacy/commentcollection';
|
||||||
import CommentModel from '../legacy/commentmodel';
|
import CommentModel from '../legacy/commentmodel';
|
||||||
@@ -59,7 +59,7 @@ class ActivityController {
|
|||||||
|
|
||||||
this.activityservice.subscribe(this.$scope, function() {
|
this.activityservice.subscribe(this.$scope, function() {
|
||||||
self.$scope.$apply();
|
self.$scope.$apply();
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
applyAtWho($target) {
|
applyAtWho($target) {
|
||||||
@@ -72,7 +72,7 @@ class ActivityController {
|
|||||||
callbacks: {
|
callbacks: {
|
||||||
remoteFilter: function(query, callback) {
|
remoteFilter: function(query, callback) {
|
||||||
let uids = self.boardservice.getUsers();
|
let uids = self.boardservice.getUsers();
|
||||||
uids = uids.filter(x => x.uid.toLowerCase().includes(query.toLowerCase()) || x.displayname.toLowerCase().includes(query.toLowerCase()));
|
uids = uids.filter((x) => x.uid.toLowerCase().includes(query.toLowerCase()) || x.displayname.toLowerCase().includes(query.toLowerCase()));
|
||||||
callback(uids);
|
callback(uids);
|
||||||
},
|
},
|
||||||
highlighter: function (li) {
|
highlighter: function (li) {
|
||||||
@@ -126,15 +126,15 @@ class ActivityController {
|
|||||||
$inserted.html('@' + $this.find('.avatar').data('username'));
|
$inserted.html('@' + $this.find('.avatar').data('username'));
|
||||||
});
|
});
|
||||||
$comment.html(OCP.Comments.richToPlain($comment.html()));
|
$comment.html(OCP.Comments.richToPlain($comment.html()));
|
||||||
$comment.html($comment.html().replace(/<br\s*[\/]?>/gi, "\n"));
|
$comment.html($comment.html().replace(/<br\s*[\/]?>/gi, '\n'));
|
||||||
return $comment.text();
|
return $comment.text();
|
||||||
}
|
}
|
||||||
|
|
||||||
static _composeHTMLMention(uid, displayName) {
|
static _composeHTMLMention(uid, displayName) {
|
||||||
var avatar = '' +
|
var avatar = '' +
|
||||||
'<span class="avatar" data-username="' + _.escape(uid) + '" data-user="' + _.escape(uid) + '" ng-attr-size="16" ' +
|
'<span class="avatar" data-username="' + escapeHTML(uid) + '" data-user="' + escapeHTML(uid) + '" ng-attr-size="16" ' +
|
||||||
'ng-attr-user="' + _.escape(uid) + '" ' +
|
'ng-attr-user="' + escapeHTML(uid) + '" ' +
|
||||||
'ng-attr-displayname="' + _.escape(displayName) + '" ng-attr-contactsmenu="true">' +
|
'ng-attr-displayname="' + escapeHTML(displayName) + '" ng-attr-contactsmenu="true">' +
|
||||||
'</span>';
|
'</span>';
|
||||||
|
|
||||||
var isCurrentUser = (uid === OC.getCurrentUser().uid);
|
var isCurrentUser = (uid === OC.getCurrentUser().uid);
|
||||||
@@ -143,7 +143,7 @@ class ActivityController {
|
|||||||
'<span class="atwho-inserted" contenteditable="false">' +
|
'<span class="atwho-inserted" contenteditable="false">' +
|
||||||
'<span class="avatar-name-wrapper' + (isCurrentUser ? ' currentUser' : '') + '">' +
|
'<span class="avatar-name-wrapper' + (isCurrentUser ? ' currentUser' : '') + '">' +
|
||||||
avatar +
|
avatar +
|
||||||
'<strong>' + _.escape(displayName) + '</strong>' +
|
'<strong>' + escapeHTML(displayName) + '</strong>' +
|
||||||
'</span>' +
|
'</span>' +
|
||||||
'</span>';
|
'</span>';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ app.directive('ngContenteditable', function($compile) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
element.bind('keydown', function(event) {
|
element.bind('keydown', function(event) {
|
||||||
if(event.which == '13' && event.shiftKey) {
|
if(event.which === 13 && event.shiftKey) {
|
||||||
scope.submit();
|
scope.submit();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ class ActivityService {
|
|||||||
let item = this.toEnhanceWithComments[index];
|
let item = this.toEnhanceWithComments[index];
|
||||||
item.commentModel = this.commentCollection.get(item.subject_rich[1].comment);
|
item.commentModel = this.commentCollection.get(item.subject_rich[1].comment);
|
||||||
if (typeof item.commentModel !== 'undefined') {
|
if (typeof item.commentModel !== 'undefined') {
|
||||||
this.toEnhanceWithComments = this.toEnhanceWithComments.filter(entry => entry.activity_id !== item.activity_id);
|
this.toEnhanceWithComments = this.toEnhanceWithComments.filter((entry) => entry.activity_id !== item.activity_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ class Application extends App {
|
|||||||
/** @var CardMapper */
|
/** @var CardMapper */
|
||||||
$service = $this->getContainer()->query(CardMapper::class);
|
$service = $this->getContainer()->query(CardMapper::class);
|
||||||
try {
|
try {
|
||||||
$card = $service->find((int) $name);
|
$service->find((int) $name);
|
||||||
} catch (\InvalidArgumentException $e) {
|
} catch (\InvalidArgumentException $e) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user