Browse Source

Explicitly close div element

Fix: #30002
Signed-off-by: Louis Chemineau <louis@chmn.me>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
tags/v24.0.0beta3
Louis Chemineau 2 years ago
parent
commit
4763a1263f

+ 1
- 1
apps/files/js/fileactions.js View File

@@ -557,7 +557,7 @@
// recreate fileactions container
nameLinks = parent.children('a.name');
nameLinks.find('.fileactions, .nametext .action').remove();
nameLinks.append('<span class="fileactions" />');
nameLinks.append('<span class="fileactions"></span>');
var defaultAction = this.getDefaultFileAction(
this.getCurrentMimeType(),
this.getCurrentType(),

+ 3
- 3
apps/files/js/files.js View File

@@ -422,12 +422,12 @@ var createDragShadow = function(event) {

$(selectedFiles).each(function(i,elem) {
// TODO: refactor this with the table row creation code
var newtr = $('<tr/>')
var newtr = $('<tr></tr>')
.attr('data-dir', dir)
.attr('data-file', elem.name)
.attr('data-origin', elem.origin);
newtr.append($('<td class="filename" />').text(elem.name).css('background-size', 32));
newtr.append($('<td class="size" />').text(OC.Util.humanFileSize(elem.size)));
newtr.append($('<td class="filename"></td>').text(elem.name).css('background-size', 32));
newtr.append($('<td class="size"></td>').text(OC.Util.humanFileSize(elem.size)));
tbody.append(newtr);
if (elem.type === 'dir') {
newtr.find('td.filename')

+ 1
- 1
apps/files/js/sidebarpreviewtext.js View File

@@ -25,7 +25,7 @@
$thumbnailDiv.removeClass('icon-loading icon-32');
$thumbnailContainer.addClass('large');
$thumbnailContainer.addClass('text');
var $textPreview = $('<pre/>').text(content);
var $textPreview = $('<pre></pre>').text(content);
$thumbnailDiv.children('.stretcher').remove();
$thumbnailDiv.append($textPreview);
$thumbnailContainer.css("max-height", previewHeight);

+ 1
- 1
apps/files_external/js/settings.js View File

@@ -141,7 +141,7 @@ function addSelect2 ($elements, userListLimit) {
return element.name;
},
formatResult: function (element) {
var $result = $('<span><div class="avatardiv"/><span>'+escapeHTML(element.displayname)+'</span></span>');
var $result = $('<span><div class="avatardiv"></div><span>'+escapeHTML(element.displayname)+'</span></span>');
var $div = $result.find('.avatardiv')
.attr('data-type', element.type)
.attr('data-name', element.name)

+ 2
- 2
apps/files_sharing/js/public.js View File

@@ -355,12 +355,12 @@ OCA.Sharing.PublicApp = {
},

_showTextPreview: function (data, previewHeight) {
var textDiv = $('<div/>').addClass('text-preview');
var textDiv = $('<div></div>').addClass('text-preview');
textDiv.text(data);
textDiv.appendTo('#imgframe');
var divHeight = textDiv.height();
if (data.length > 999) {
var ellipsis = $('<div/>').addClass('ellipsis');
var ellipsis = $('<div></div>').addClass('ellipsis');
ellipsis.html('(&#133;)');
ellipsis.appendTo('#imgframe');
}

+ 1
- 1
core/src/OC/eventsource.js View File

@@ -65,7 +65,7 @@ const OCEventSource = function(src, data) {
} else {
var iframeId = 'oc_eventsource_iframe_' + OCEventSource.iframeCount
OCEventSource.fallBackSources[OCEventSource.iframeCount] = this
this.iframe = $('<iframe/>')
this.iframe = $('<iframe></iframe>')
this.iframe.attr('id', iframeId)
this.iframe.hide()


+ 2
- 2
core/src/components/MainMenu.js View File

@@ -77,7 +77,7 @@ export const setUp = () => {
$app.find('div').remove() // prevent odd double-clicks
// no need for theming, loader is already inverted on dark mode
// but we need it over the primary colour
$app.prepend($('<div/>').addClass('icon-loading-small'))
$app.prepend($('<div></div>').addClass('icon-loading-small'))
} else {
// Close navigation when opening app in
// a new tab
@@ -103,7 +103,7 @@ export const setUp = () => {
if (event.which === 1 && !event.ctrlKey && !event.metaKey && $app.parent('#more-apps').length === 0 && $app.attr('target') !== '_blank') {
$app.find('svg').remove()
$app.find('div').remove() // prevent odd double-clicks
$app.prepend($('<div/>').addClass(
$app.prepend($('<div></div>').addClass(
OCA.Theming && OCA.Theming.inverted
? 'icon-loading-small'
: 'icon-loading-small-dark'

+ 1
- 1
core/src/components/UserMenu.js View File

@@ -41,7 +41,7 @@ export const setUp = () => {
if (!$excludedPageClasses.includes($page.attr('class'))) {
$page.find('img').remove()
$page.find('div').remove() // prevent odd double-clicks
$page.prepend($('<div/>').addClass('icon-loading-small'))
$page.prepend($('<div></div>').addClass('icon-loading-small'))
}
} else {
// Close navigation when opening menu entry in

+ 2
- 2
core/src/jquery/ocdialog.js View File

@@ -46,7 +46,7 @@ $.widget('oc.ocdialog', {
this.originalTitle = this.element.attr('title')
this.options.title = this.options.title || this.originalTitle

this.$dialog = $('<div class="oc-dialog" />')
this.$dialog = $('<div class="oc-dialog"></div>')
.attr({
// Setting tabIndex makes the div focusable
tabIndex: -1,
@@ -133,7 +133,7 @@ $.widget('oc.ocdialog', {
if (this.$buttonrow) {
this.$buttonrow.empty()
} else {
const $buttonrow = $('<div class="oc-dialog-buttonrow" />')
const $buttonrow = $('<div class="oc-dialog-buttonrow"></div>')
this.$buttonrow = $buttonrow.appendTo(this.$dialog)
}
if (value.length === 1) {

+ 2
- 2
dist/core-login.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/core-login.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
dist/core-main.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/core-main.js.map
File diff suppressed because it is too large
View File


Loading…
Cancel
Save