Skip to content

Commit 0e8ce69

Browse files
authored
Merge pull request #35904 from nextcloud/backport/35785/stable25
[stable25] Replace custom tooltips with native one for files sharing
2 parents c886637 + 101989a commit 0e8ce69

File tree

9 files changed

+13
-19
lines changed

9 files changed

+13
-19
lines changed

apps/files_sharing/js/files_drop.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,13 @@
6565
$('#drop-upload-progress-indicator').removeClass('hidden');
6666

6767
$('#drop-uploaded-files').append(output({isUploading: true, name: data.files[0].name}));
68-
$('[data-toggle="tooltip"]').tooltip();
6968
data.submit();
7069

7170
return true;
7271
},
7372

7473
updateFileItem: function (fileName, fileItem) {
7574
$('#drop-uploaded-files li[data-name="' + fileName + '"]').replaceWith(fileItem);
76-
$('[data-toggle="tooltip"]').tooltip();
7775
},
7876

7977
initialize: function () {

apps/files_sharing/js/sharedfilelist.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,7 @@
135135
'class': 'modified',
136136
'title': formatted,
137137
'style': 'color:rgb(' + modifiedColor + ',' + modifiedColor + ',' + modifiedColor + ')'
138-
}).text(text)
139-
.tooltip({ placement: 'top' })
140-
)
138+
}).text(text))
141139

142140
$tr.append(td)
143141
}

apps/files_sharing/js/templates.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ templates['files_drop'] = template({"1":function(container,depth0,helpers,partia
1010

1111
return " <div id=\"drop-upload-name\">"
1212
+ 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)))
13-
+ "</div><div id=\"drop-upload-status\"></div>\n <progress id=\"drop-upload-progress-bar\" value=\"0\" max=\"100\"></progress> \n";
13+
+ "</div><div id=\"drop-upload-status\"></div>\n <progress id=\"drop-upload-progress-bar\" value=\"0\" max=\"100\"></progress>\n";
1414
},"3":function(container,depth0,helpers,partials,data) {
1515
var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {
1616
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
@@ -32,10 +32,10 @@ templates['files_drop'] = template({"1":function(container,depth0,helpers,partia
3232
return undefined
3333
};
3434

35-
return "<li data-toggle=\"tooltip\" title=\""
36-
+ 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)))
35+
return "<li title=\""
36+
+ 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)))
3737
+ "\" data-name=\""
38-
+ 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)))
38+
+ 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)))
3939
+ "\">\n"
4040
+ ((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 : "")
4141
+ "</li>\n";

apps/files_sharing/js/templates/files_drop.handlebars

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
<li data-toggle="tooltip" title="{{name}}" data-name="{{name}}">
1+
<li title="{{name}}" data-name="{{name}}">
22
{{#if isUploading}}
33
<div id="drop-upload-name">{{name}}</div><div id="drop-upload-status"></div>
4-
<progress id="drop-upload-progress-bar" value="0" max="100"></progress>
4+
<progress id="drop-upload-progress-bar" value="0" max="100"></progress>
55
{{else}}
66
<img src="{{iconSrc}}"/> {{name}}
77
{{/if}}

apps/files_sharing/src/share.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,6 @@ import { getCapabilities } from '@nextcloud/capabilities'
377377
avatarElement.each(function() {
378378
$(this).avatar($(this).data('username'), 32)
379379
})
380-
action.find('span[title]').tooltip({ placement: 'top' })
381380
}
382381
} else {
383382
action.html('<span class="hidden-visually">' + t('files_sharing', 'Shared') + '</span>').prepend(icon)
@@ -511,7 +510,6 @@ import { getCapabilities } from '@nextcloud/capabilities'
511510
avatarElement.each(function() {
512511
$(this).avatar($(this).data('username'), 32)
513512
})
514-
action.find('span[title]').tooltip({ placement: 'top' })
515513
}
516514
} else {
517515
action.html('<span class="hidden-visually">' + t('files_sharing', 'Shared') + '</span>').prepend(icon)

dist/files_sharing-additionalScripts.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files_sharing-additionalScripts.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files_sharing-files_sharing.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files_sharing-files_sharing.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)