feat: update tooltip delay
This commit is contained in:
parent
607576119d
commit
9c2324b2c8
3 changed files with 9 additions and 9 deletions
|
|
@ -31,7 +31,7 @@ frappe.ui.IconBar = Class.extend({
|
|||
return false;
|
||||
});
|
||||
|
||||
$li.find("i").attr("title", label).tooltip();
|
||||
$li.find("i").attr("title", label).tooltip({ delay: { "show": 600, "hide": 100 } });
|
||||
|
||||
|
||||
this.$wrapper.find(".iconbar-" + group).removeClass("hide")
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ frappe.ui.Notifications = class Notifications {
|
|||
frappe.set_route('Form', 'Notification Settings', frappe.session.user);
|
||||
}).appendTo(this.header_actions)
|
||||
.attr('title', __("Notification Settings"))
|
||||
.tooltip();
|
||||
.tooltip({ delay: { "show": 600, "hide": 100 } });
|
||||
|
||||
$(`<span class="mark-all-read pull-right" data-action="mark_all_as_read">
|
||||
${frappe.utils.icon('mark-as-read')}
|
||||
|
|
@ -53,7 +53,7 @@ frappe.ui.Notifications = class Notifications {
|
|||
.on('click', (e) => this.mark_all_as_read(e))
|
||||
.appendTo(this.header_actions)
|
||||
.attr('title', __("Mark all as read"))
|
||||
.tooltip();
|
||||
.tooltip({ delay: { "show": 600, "hide": 100 } });
|
||||
|
||||
this.categories = [
|
||||
{
|
||||
|
|
@ -196,7 +196,7 @@ class BaseNotificaitonsView {
|
|||
class NotificationsView extends BaseNotificaitonsView {
|
||||
make() {
|
||||
this.notifications_icon = this.parent.find('.notifications-icon');
|
||||
this.notifications_icon.attr("title", __('Notifications')).tooltip();
|
||||
this.notifications_icon.attr("title", __('Notifications')).tooltip({ delay: { "show": 600, "hide": 100 } });
|
||||
|
||||
this.setup_notification_listeners();
|
||||
this.get_notifications_list(this.max_length).then(list => {
|
||||
|
|
@ -287,7 +287,7 @@ class NotificationsView extends BaseNotificaitonsView {
|
|||
|
||||
if (!field.read) {
|
||||
let mark_btn = item_html.find(".mark-as-read")
|
||||
mark_btn.tooltip();
|
||||
mark_btn.tooltip({ delay: { "show": 600, "hide": 100 } });
|
||||
mark_btn.on('click', (e) => {
|
||||
e.preventDefault();
|
||||
e.stopImmediatePropagation();
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ frappe.ui.Page = Class.extend({
|
|||
|
||||
// keyboard shortcuts
|
||||
let menu_btn = this.menu_btn_group.find('button');
|
||||
menu_btn.attr("title", __("Menu")).tooltip();
|
||||
menu_btn.attr("title", __("Menu")).tooltip({ delay: { "show": 600, "hide": 100 } });
|
||||
frappe.ui.keys
|
||||
.get_shortcut_group(this.page_actions[0])
|
||||
.add(menu_btn, menu_btn.find('.menu-btn-group-label'));
|
||||
|
|
@ -161,7 +161,7 @@ frappe.ui.Page = Class.extend({
|
|||
if (this.disable_sidebar_toggle || !sidebar_wrapper.length) {
|
||||
sidebar_toggle.remove();
|
||||
} else {
|
||||
sidebar_toggle.attr("title", __("Toggle Sidebar")).tooltip();
|
||||
sidebar_toggle.attr("title", __("Toggle Sidebar")).tooltip({ delay: { "show": 600, "hide": 100 } });
|
||||
sidebar_toggle.click(() => {
|
||||
if (frappe.utils.is_xs() || frappe.utils.is_sm()) {
|
||||
this.setup_overlay_sidebar();
|
||||
|
|
@ -214,7 +214,7 @@ frappe.ui.Page = Class.extend({
|
|||
|
||||
button.appendTo(this.icon_group.removeClass("hide"));
|
||||
button.click(click);
|
||||
button.attr("title", __(tooltip_label || frappe.unscrub(icon))).tooltip();
|
||||
button.attr("title", __(tooltip_label || frappe.unscrub(icon))).tooltip({ delay: { "show": 600, "hide": 100 } });
|
||||
|
||||
return button
|
||||
},
|
||||
|
|
@ -762,7 +762,7 @@ frappe.ui.Page = Class.extend({
|
|||
f.refresh();
|
||||
$(f.wrapper)
|
||||
.addClass('col-md-2')
|
||||
.attr("title", __(df.label)).tooltip();
|
||||
.attr("title", __(df.label)).tooltip({ delay: { "show": 600, "hide": 100 } });
|
||||
|
||||
// html fields in toolbar are only for display
|
||||
if (df.fieldtype=='HTML') {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue