1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-25 06:33:48 +00:00

Merge branch '7.0'

This commit is contained in:
plt
2019-06-05 11:17:52 +08:00
23 changed files with 233 additions and 71 deletions

View File

@@ -229,6 +229,13 @@ export const Utils = {
navigator.userAgent.indexOf('Chrome') > -1;
},
isIEBrower: function() { // is ie <= ie11 not include Edge
var userAgent = navigator.userAgent;
var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1;
var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1;
return isIE || isIE11;
},
getDefaultLibIconUrl: function(isBig) {
let size = Utils.isHiDPI() ? 48 : 24;
size = isBig ? 256 : size;
@@ -871,6 +878,14 @@ export const Utils = {
password += possible.charAt(Math.floor(Math.random() * possible.length));
}
return password;
},
getEventData: function(event, data) {
if (event.target.dataset) {
return event.target.dataset[data];
}
return event.target.getAttribute('data-' + data);
}
};