Explicitly close div element

Fix: #30002
Signed-off-by: Louis Chemineau <louis@chmn.me>
pull/32421/head
Louis Chemineau 2 years ago
parent 5059a47a4b
commit 912f73e6b5

@ -538,7 +538,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(),

@ -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')

@ -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);

@ -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)

@ -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');
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -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()

@ -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.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'

@ -36,7 +36,7 @@ export const setUp = () => {
if (event.which === 1 && !event.ctrlKey && !event.metaKey) {
$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
// a new tab

@ -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) {

Loading…
Cancel
Save