Browse Source

Replace custom tooltips with native ones in files_sharing

Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
tags/v26.0.0beta1
julia.kirschenheuter 1 year ago
parent
commit
a67c53af2b

+ 0
- 2
apps/files_sharing/js/files_drop.js 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 () {

+ 1
- 2
apps/files_sharing/js/public.js 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'),
)


+ 1
- 3
apps/files_sharing/js/sharedfilelist.js 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)
}

+ 4
- 4
apps/files_sharing/js/templates.js 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";

+ 2
- 2
apps/files_sharing/js/templates/files_drop.handlebars 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}}

+ 0
- 2
apps/files_sharing/src/share.js 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)

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


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


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


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


Loading…
Cancel
Save