Show unsupported message for old browsers
This commit is contained in:
parent
92dcd79a84
commit
39fb1c8db4
2 changed files with 24 additions and 8 deletions
|
|
@ -10,6 +10,13 @@ frappe.start_app = function() {
|
|||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
if(!frappe.utils.supportsES6) {
|
||||
frappe.msgprint({
|
||||
indicator: 'red',
|
||||
title: __('Browser not supported'),
|
||||
message: __('Some of the features might not work in your browser. Please update your browser to the latest version.')
|
||||
});
|
||||
}
|
||||
frappe.start_app();
|
||||
});
|
||||
|
||||
|
|
@ -133,9 +140,9 @@ frappe.Application = Class.extend({
|
|||
var s = new frappe.ui.Dialog({
|
||||
title: __("Checking one moment"),
|
||||
fields: [{
|
||||
"fieldtype": "HTML",
|
||||
"fieldname": "checking"
|
||||
}]
|
||||
"fieldtype": "HTML",
|
||||
"fieldname": "checking"
|
||||
}]
|
||||
});
|
||||
s.fields_dict.checking.$wrapper.html('<i class="fa fa-spinner fa-spin fa-4x"></i>')
|
||||
s.show();
|
||||
|
|
@ -415,10 +422,10 @@ frappe.Application = Class.extend({
|
|||
if(window.mixpanel) {
|
||||
window.mixpanel.identify(frappe.session.user);
|
||||
window.mixpanel.people.set({
|
||||
"$first_name": frappe.boot.user.first_name,
|
||||
"$last_name": frappe.boot.user.last_name,
|
||||
"$created": frappe.boot.user.creation,
|
||||
"$email": frappe.session.user
|
||||
"$first_name": frappe.boot.user.first_name,
|
||||
"$last_name": frappe.boot.user.last_name,
|
||||
"$created": frappe.boot.user.creation,
|
||||
"$email": frappe.session.user
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -573,7 +573,16 @@ frappe.utils = {
|
|||
});
|
||||
|
||||
return email_list;
|
||||
}
|
||||
},
|
||||
supportsES6: function() {
|
||||
try {
|
||||
new Function("(a = 0) => a");
|
||||
return true;
|
||||
}
|
||||
catch (err) {
|
||||
return false;
|
||||
}
|
||||
}()
|
||||
};
|
||||
|
||||
// String.prototype.includes polyfill
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue