diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2018-09-05 09:28:34 +0200 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2018-09-05 18:35:37 +0200 |
commit | 63ab5d919ea3912ffc5d33c14ed41bee8e5db598 (patch) | |
tree | 44149ccb8fe64c0444b851c85e7e8a3777518bd7 /apps/comments/js | |
parent | db1fce6a59e4e6aa8a192cfe76dfa6937ce16e8f (diff) | |
download | nextcloud-server-63ab5d919ea3912ffc5d33c14ed41bee8e5db598.tar.gz nextcloud-server-63ab5d919ea3912ffc5d33c14ed41bee8e5db598.zip |
Reformat embedded HTML code to resemble HTML code
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'apps/comments/js')
-rw-r--r-- | apps/comments/js/commentstabview.js | 58 |
1 files changed, 31 insertions, 27 deletions
diff --git a/apps/comments/js/commentstabview.js b/apps/comments/js/commentstabview.js index 6d4d5b2ca85..3c428fe86a6 100644 --- a/apps/comments/js/commentstabview.js +++ b/apps/comments/js/commentstabview.js @@ -196,24 +196,26 @@ sorter: function (q, items) { return items; } }, displayTpl: function (item) { - return '<li>' - + '<span class="avatar-name-wrapper">' - + '<span class="avatar" ' - + ' data-username="' + escapeHTML(item.id) + '"' // for avatars - + ' data-user="' + escapeHTML(item.id) + '"' // for contactsmenu - + ' data-user-display-name="' + escapeHTML(item.label) + '"></span>' - + '<strong>' + escapeHTML(item.label) + '</strong>' - + '</span></li>'; + return '<li>' + + '<span class="avatar-name-wrapper">' + + '<span class="avatar" ' + + 'data-username="' + escapeHTML(item.id) + '" ' + // for avatars + 'data-user="' + escapeHTML(item.id) + '" ' + // for contactsmenu + 'data-user-display-name="' + escapeHTML(item.label) + '">' + + '</span>' + + '<strong>' + escapeHTML(item.label) + '</strong>' + + '</span></li>'; }, insertTpl: function (item) { - return '' - + '<span class="avatar-name-wrapper">' - + '<span class="avatar" ' - + ' data-username="' + escapeHTML(item.id) + '"' // for avatars - + ' data-user="' + escapeHTML(item.id) + '"' // for contactsmenu - + ' data-user-display-name="' + escapeHTML(item.label) + '"></span>' - + '<strong>' + escapeHTML(item.label) + '</strong>' - + '</span>'; + return '' + + '<span class="avatar-name-wrapper">' + + '<span class="avatar" ' + + 'data-username="' + escapeHTML(item.id) + '" ' + // for avatars + 'data-user="' + escapeHTML(item.id) + '" ' + // for contactsmenu + 'data-user-display-name="' + escapeHTML(item.label) + '">' + + '</span>' + + '<strong>' + escapeHTML(item.label) + '</strong>' + + '</span>'; }, searchKey: "label" }); @@ -486,20 +488,22 @@ }, _composeHTMLMention: function(uid, displayName) { - var avatar = '<span class="avatar" ' - + 'data-username="' + _.escape(uid) + '"' - + ' data-user="' + _.escape(uid) + '"' - + ' data-user-display-name="' - + _.escape(displayName) + '"></span>'; + var avatar = '' + + '<span class="avatar" ' + + 'data-username="' + _.escape(uid) + '" ' + + 'data-user="' + _.escape(uid) + '" ' + + 'data-user-display-name="' + _.escape(displayName) + '">' + + '</span>'; var isCurrentUser = (uid === OC.getCurrentUser().uid); - return '' - + '<span class="atwho-inserted" contenteditable="false">' - + '<span class="avatar-name-wrapper' + (isCurrentUser ? ' currentUser' : '') + '">' - + avatar + '<strong>'+ _.escape(displayName)+'</strong>' - + '</span>' - + '</span>'; + return '' + + '<span class="atwho-inserted" contenteditable="false">' + + '<span class="avatar-name-wrapper' + (isCurrentUser ? ' currentUser' : '') + '">' + + avatar + + '<strong>' + _.escape(displayName) + '</strong>' + + '</span>' + + '</span>'; }, nextPage: function() { |