Replace custom tooltips with native ones in files_sharing

Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
This commit is contained in:
julia.kirschenheuter 2022-12-15 11:01:57 +01:00
parent 7284091779
commit a67c53af2b
10 changed files with 14 additions and 21 deletions

View file

@ -65,7 +65,6 @@
$('#drop-upload-progress-indicator').removeClass('hidden');
$('#drop-uploaded-files').append(output({isUploading: true, name: data.files[0].name}));
$('[data-toggle="tooltip"]').tooltip();
data.submit();
return true;
@ -73,7 +72,6 @@
updateFileItem: function (fileName, fileItem) {
$('#drop-uploaded-files li[data-name="' + fileName + '"]').replaceWith(fileItem);
$('[data-toggle="tooltip"]').tooltip();
},
initialize: function () {

View file

@ -65,7 +65,6 @@ OCA.Sharing.PublicApp = {
// Toggle for grid view
this.$showGridView = $('input#showgridview');
this.$showGridView.on('change', _.bind(this._onGridviewChange, this));
$('#view-toggle').tooltip({placement: 'bottom', trigger: 'hover'});
var filesClient = new OC.Files.Client({
host: OC.getHost(),
@ -380,7 +379,7 @@ OCA.Sharing.PublicApp = {
.removeClass('icon-toggle-filelist icon-toggle-pictures')
.addClass(isGridView ? 'icon-toggle-filelist' : 'icon-toggle-pictures')
this.$showGridView.next('#view-toggle').attr(
'data-original-title',
'title',
isGridView ? t('files', 'Show list view') : t('files', 'Show grid view'),
)

View file

@ -135,9 +135,7 @@
'class': 'modified',
'title': formatted,
'style': 'color:rgb(' + modifiedColor + ',' + modifiedColor + ',' + modifiedColor + ')'
}).text(text)
.tooltip({ placement: 'top' })
)
}).text(text))
$tr.append(td)
}

View file

@ -10,7 +10,7 @@ templates['files_drop'] = template({"1":function(container,depth0,helpers,partia
return " <div id=\"drop-upload-name\">"
+ container.escapeExpression(((helper = (helper = lookupProperty(helpers,"name") || (depth0 != null ? lookupProperty(depth0,"name") : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"name","hash":{},"data":data,"loc":{"start":{"line":3,"column":29},"end":{"line":3,"column":37}}}) : helper)))
+ "</div><div id=\"drop-upload-status\"></div>\n <progress id=\"drop-upload-progress-bar\" value=\"0\" max=\"100\"></progress> \n";
+ "</div><div id=\"drop-upload-status\"></div>\n <progress id=\"drop-upload-progress-bar\" value=\"0\" max=\"100\"></progress>\n";
},"3":function(container,depth0,helpers,partials,data) {
var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
@ -32,10 +32,10 @@ templates['files_drop'] = template({"1":function(container,depth0,helpers,partia
return undefined
};
return "<li data-toggle=\"tooltip\" title=\""
+ alias4(((helper = (helper = lookupProperty(helpers,"name") || (depth0 != null ? lookupProperty(depth0,"name") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"name","hash":{},"data":data,"loc":{"start":{"line":1,"column":33},"end":{"line":1,"column":41}}}) : helper)))
return "<li title=\""
+ alias4(((helper = (helper = lookupProperty(helpers,"name") || (depth0 != null ? lookupProperty(depth0,"name") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"name","hash":{},"data":data,"loc":{"start":{"line":1,"column":11},"end":{"line":1,"column":19}}}) : helper)))
+ "\" data-name=\""
+ alias4(((helper = (helper = lookupProperty(helpers,"name") || (depth0 != null ? lookupProperty(depth0,"name") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"name","hash":{},"data":data,"loc":{"start":{"line":1,"column":54},"end":{"line":1,"column":62}}}) : helper)))
+ alias4(((helper = (helper = lookupProperty(helpers,"name") || (depth0 != null ? lookupProperty(depth0,"name") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"name","hash":{},"data":data,"loc":{"start":{"line":1,"column":32},"end":{"line":1,"column":40}}}) : helper)))
+ "\">\n"
+ ((stack1 = lookupProperty(helpers,"if").call(alias1,(depth0 != null ? lookupProperty(depth0,"isUploading") : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data,"loc":{"start":{"line":2,"column":1},"end":{"line":7,"column":8}}})) != null ? stack1 : "")
+ "</li>\n";

View file

@ -1,7 +1,7 @@
<li data-toggle="tooltip" title="{{name}}" data-name="{{name}}">
<li title="{{name}}" data-name="{{name}}">
{{#if isUploading}}
<div id="drop-upload-name">{{name}}</div><div id="drop-upload-status"></div>
<progress id="drop-upload-progress-bar" value="0" max="100"></progress>
<progress id="drop-upload-progress-bar" value="0" max="100"></progress>
{{else}}
<img src="{{iconSrc}}"/> {{name}}
{{/if}}

View file

@ -377,7 +377,6 @@ import { getCapabilities } from '@nextcloud/capabilities'
avatarElement.each(function() {
$(this).avatar($(this).data('username'), 32)
})
action.find('span[title]').tooltip({ placement: 'top' })
}
} else {
action.html('<span class="hidden-visually">' + t('files_sharing', 'Shared') + '</span>').prepend(icon)
@ -511,7 +510,6 @@ import { getCapabilities } from '@nextcloud/capabilities'
avatarElement.each(function() {
$(this).avatar($(this).data('username'), 32)
})
action.find('span[title]').tooltip({ placement: 'top' })
}
} else {
action.html('<span class="hidden-visually">' + t('files_sharing', 'Shared') + '</span>').prepend(icon)

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