Browse Source

notification fix and date selectable (frappe/erpnext#6423) (frappe/erpnext#6389) (#2088)

* [ui][fix] disable notification when 0

* [enhance] other month dates selectable
version-14
Faris Ansari 8 years ago
committed by Rushabh Mehta
parent
commit
f69fc526c6
2 changed files with 5 additions and 2 deletions
  1. +2
    -0
      frappe/public/js/frappe/form/control.js
  2. +3
    -2
      frappe/public/js/frappe/ui/toolbar/notifications.js

+ 2
- 0
frappe/public/js/frappe/form/control.js View File

@@ -605,6 +605,8 @@ frappe.ui.form.ControlDate = frappe.ui.form.ControlData.extend({
changeYear: true, changeYear: true,
changeMonth: true, changeMonth: true,
yearRange: "-70Y:+10Y", yearRange: "-70Y:+10Y",
showOtherMonths: true,
selectOtherMonths: true
}, },
make_input: function() { make_input: function() {
this._super(); this._super();


+ 3
- 2
frappe/public/js/frappe/ui/toolbar/notifications.js View File

@@ -46,10 +46,11 @@ frappe.ui.notifications.update_notifications = function() {
} }
}); });


// switch colour on the navbar
// switch colour on the navbar and disable if no notifications
$(".navbar-new-comments") $(".navbar-new-comments")
.html(frappe.ui.notifications.total > 20 ? '20+' : frappe.ui.notifications.total) .html(frappe.ui.notifications.total > 20 ? '20+' : frappe.ui.notifications.total)
.toggleClass("navbar-new-comments-true", frappe.ui.notifications.total ? true : false);
.toggleClass("navbar-new-comments-true", frappe.ui.notifications.total ? true : false)
.parent().toggleClass("disabled", frappe.ui.notifications.total ? false : true);


} }




Loading…
Cancel
Save