Merge pull request #4766 from achillesrasquinha/chat-fixes

[MIN] Fixes Message Timestamp for Chat
This commit is contained in:
Achilles Rasquinha 2018-01-05 20:07:21 +05:30 committed by GitHub
commit b9599366d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -949,14 +949,14 @@ frappe.chat.pretty_datetime = function (date)
{
const today = moment()
const instance = date.moment
if ( today.isSame(instance, "d") )
return today.format("hh:mm A")
return instance.format("hh:mm A")
else
if ( today.isSame(instance, "week") )
return today.format("dddd")
return instance.format("dddd")
else
return today.format("DD/MM/YYYY")
return instance.format("DD/MM/YYYY")
}
// frappe.chat.sound

View file

@ -34,7 +34,7 @@ frappe.ui.Dialog = frappe.ui.FieldGroup.extend({
// show footer
this.action = this.action || { primary: { }, secondary: { } };
if(this.primary_action || this.action.primary.label) {
if(this.primary_action || !frappe._.is_empty(this.action.primary)) {
this.set_primary_action(this.primary_action_label || this.action.primary.label || __("Submit"), this.primary_action || this.action.primary.click);
}