Procházet zdrojové kódy

[messages] show notifications and fix double listing in dropdown

version-14
Rushabh Mehta před 9 roky
rodič
revize
751e36a533
2 změnil soubory, kde provedl 4 přidání a 4 odebrání
  1. +1
    -2
      frappe/desk/page/messages/messages.py
  2. +3
    -2
      frappe/public/js/frappe/ui/toolbar/notifications.js

+ 1
- 2
frappe/desk/page/messages/messages.py Zobrazit soubor

@@ -31,9 +31,9 @@ def get_list(arg=None):
return frappe.db.sql("""select * from `tabComment`
where (owner=%(contact)s
or comment_docname=%(user)s
or (owner=comment_docname and ifnull(parenttype, "")!="Assignment")
or owner=comment_docname)
and comment_doctype ='Message'
and ifnull(parenttype, "")!="Assignment"
order by creation desc
limit %(limit_start)s, %(limit_page_length)s""", frappe.local.form_dict, as_dict=1)
else:
@@ -42,7 +42,6 @@ def get_list(arg=None):
or (owner=%(user)s and comment_docname=%(contact)s)
or (owner=%(contact)s and comment_docname=%(contact)s))
and comment_doctype ='Message'
and ifnull(parenttype, "")!="Assignment"
order by creation desc
limit %(limit_start)s, %(limit_page_length)s""", frappe.local.form_dict, as_dict=1)



+ 3
- 2
frappe/public/js/frappe/ui/toolbar/notifications.js Zobrazit soubor

@@ -23,8 +23,9 @@ frappe.ui.notifications.update_notifications = function() {

// add to toolbar and sidebar
$.each(doctypes, function(i, doctype) {
if(!in_list(["ToDo", "Comment", "Event"]))
frappe.ui.notifications.add_notification(doctype);
if(!in_list(["ToDo", "Comment", "Event"], doctype)) {
frappe.ui.notifications.add_notification(doctype);
}
});

// set click events


Načítá se…
Zrušit
Uložit