浏览代码

Merge pull request #4633 from pratu16x7/progress-tooltips

[minor][enhance] Add tooltips for progress and targets
version-14
Prateeksha Singh 7 年前
committed by GitHub
父节点
当前提交
982d6bce54
找不到此签名对应的密钥 GPG 密钥 ID: 4AEE18F83AFDEB23
共有 2 个文件被更改,包括 4 次插入3 次删除
  1. +1
    -1
      frappe/public/js/frappe/ui/toolbar/navbar.html
  2. +3
    -2
      frappe/public/js/frappe/ui/toolbar/notifications.js

+ 1
- 1
frappe/public/js/frappe/ui/toolbar/navbar.html 查看文件

@@ -11,7 +11,7 @@
<div class="navbar-center ellipsis" style="display: none;"></div>

<ul class="nav navbar-nav navbar-right">
<li class="user-progress hide">
<li class="user-progress hide" title="Your Setup Progress">
<a class="dropdown-toggle" data-toggle="dropdown" href="#" onclick="return false;" style="height: 40px;">
<div class="progress-chart" style"width: 50px; margin-top: 8px;"><div class="progress">
<div class="progress-bar"></div>


+ 3
- 2
frappe/public/js/frappe/ui/toolbar/notifications.js 查看文件

@@ -66,11 +66,12 @@ frappe.ui.notifications = {

add_notification: function(name, value, doc_dt, target = false) {
let label = this.config[name] ? this.config[name].label : name;
let title = target ? `title="Your Target"` : '';
let $list_item = !target
? $(`<li><a class="badge-hover" data-doctype="${name}">${__(label)}
? $(`<li><a class="badge-hover" data-doctype="${name}" ${title}>${__(label)}
<span class="badge pull-right">${value}</span>
</a></li>`)
: $(`<li><a class="progress-small" data-doctype="${doc_dt}"
: $(`<li><a class="progress-small" ${title} data-doctype="${doc_dt}"
data-doc="${name}"><span class="dropdown-item-label">${__(label)}<span>
<div class="progress-chart"><div class="progress">
<div class="progress-bar" style="width: ${value}%"></div>


正在加载...
取消
保存