@@ -1,6 +1,6 @@ | |||||
{ | { | ||||
"base_template": "lib/website/templates/base.html", | "base_template": "lib/website/templates/base.html", | ||||
"framework_version": "3.7.0", | |||||
"framework_version": "3.7.1", | |||||
"modules": { | "modules": { | ||||
"Calendar": { | "Calendar": { | ||||
"color": "#2980b9", | "color": "#2980b9", | ||||
@@ -3,6 +3,8 @@ | |||||
from __future__ import unicode_literals | from __future__ import unicode_literals | ||||
import webnotes | import webnotes | ||||
from core.doctype.notification_count.notification_count import delete_notification_count_for | |||||
@webnotes.whitelist() | @webnotes.whitelist() | ||||
def get_list(arg=None): | def get_list(arg=None): | ||||
@@ -17,6 +19,9 @@ def get_list(arg=None): | |||||
set docstatus = 1 where comment_doctype in ('My Company', 'Message') | set docstatus = 1 where comment_doctype in ('My Company', 'Message') | ||||
and comment_docname = %s | and comment_docname = %s | ||||
""", webnotes.user.name) | """, webnotes.user.name) | ||||
delete_notification_count_for("Messages") | |||||
webnotes.conn.commit() | webnotes.conn.commit() | ||||
if webnotes.form_dict['contact'] == webnotes.session['user']: | if webnotes.form_dict['contact'] == webnotes.session['user']: | ||||
@@ -69,6 +74,8 @@ def post(arg=None): | |||||
d.comment_docname = arg['contact'] | d.comment_docname = arg['contact'] | ||||
d.comment_doctype = 'Message' | d.comment_doctype = 'Message' | ||||
d.save() | d.save() | ||||
delete_notification_count_for("Messages") | |||||
import webnotes.utils | import webnotes.utils | ||||
if webnotes.utils.cint(arg.get('notify')): | if webnotes.utils.cint(arg.get('notify')): | ||||
@@ -145,7 +145,8 @@ wn.ui.Filter = Class.extend({ | |||||
me.field.desc_area = $a(me.field.wrapper, 'span', 'help', null, | me.field.desc_area = $a(me.field.wrapper, 'span', 'help', null, | ||||
'values separated by comma'); | 'values separated by comma'); | ||||
} else { | } else { | ||||
me.set_field(me.field.df.parent, me.field.df.fieldname); | |||||
me.set_field(me.field.df.parent, me.field.df.fieldname, null, | |||||
me.$w.find('.condition').val()); | |||||
} | } | ||||
}); | }); | ||||
@@ -166,7 +167,7 @@ wn.ui.Filter = Class.extend({ | |||||
if(value!=null) this.field.set_input(value); | if(value!=null) this.field.set_input(value); | ||||
}, | }, | ||||
set_field: function(tablename, fieldname, fieldtype) { | |||||
set_field: function(tablename, fieldname, fieldtype, condition) { | |||||
var me = this; | var me = this; | ||||
// set in fieldname (again) | // set in fieldname (again) | ||||
@@ -212,7 +213,7 @@ wn.ui.Filter = Class.extend({ | |||||
if(old_text) | if(old_text) | ||||
me.field.set_input(old_text); | me.field.set_input(old_text); | ||||
this.set_default_condition(df, fieldtype); | |||||
if(!condition) this.set_default_condition(df, fieldtype); | |||||
$(me.field.wrapper).find(':input').keydown(function(ev) { | $(me.field.wrapper).find(':input').keydown(function(ev) { | ||||
if(ev.which==13) { | if(ev.which==13) { | ||||