@@ -1230,3 +1230,6 @@ def logger(module=None, with_more_info=True): | |||||
def get_desk_link(doctype, name): | def get_desk_link(doctype, name): | ||||
return '<a href="#Form/{0}/{1}" style="font-weight: bold;">{2} {1}</a>'.format(doctype, name, _(doctype)) | return '<a href="#Form/{0}/{1}" style="font-weight: bold;">{2} {1}</a>'.format(doctype, name, _(doctype)) | ||||
def bold(text): | |||||
return '<b>{0}</b>'.format(text) |
@@ -168,6 +168,19 @@ body { | |||||
.dropdown-navbar-new-comments .dropdown-menu { | .dropdown-navbar-new-comments .dropdown-menu { | ||||
margin-top: 0; | margin-top: 0; | ||||
} | } | ||||
@media (max-width: 767px) { | |||||
.dropdown-navbar-new-comments.open .dropdown-menu { | |||||
position: absolute; | |||||
border-top: 1px solid rgba(0, 0, 0, 0.14902); | |||||
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); | |||||
background-color: #fff; | |||||
right: 0; | |||||
left: auto; | |||||
} | |||||
.dropdown-navbar-new-comments.open .dropdown-menu > li > a { | |||||
padding: 12px; | |||||
} | |||||
} | |||||
.navbar-new-comments { | .navbar-new-comments { | ||||
display: inline-block; | display: inline-block; | ||||
min-width: 24px; | min-width: 24px; | ||||
@@ -25,6 +25,7 @@ frappe.ui.form.Dashboard = Class.extend({ | |||||
// clear links | // clear links | ||||
this.links_area.addClass('hidden'); | this.links_area.addClass('hidden'); | ||||
this.links_area.find('.count, .open-notification').addClass('hidden'); | |||||
// clear stats | // clear stats | ||||
this.stats_area.empty().addClass('hidden'); | this.stats_area.empty().addClass('hidden'); | ||||
@@ -254,6 +255,7 @@ frappe.ui.form.Dashboard = Class.extend({ | |||||
if(count) { | if(count) { | ||||
$link.find('.count') | $link.find('.count') | ||||
.removeClass('hidden') | |||||
.html((count > 9) ? '9+' : count); | .html((count > 9) ? '9+' : count); | ||||
} | } | ||||
@@ -30,6 +30,17 @@ frappe.ui.FilterList = Class.extend({ | |||||
}, | }, | ||||
add_filter: function(doctype, fieldname, condition, value, hidden) { | add_filter: function(doctype, fieldname, condition, value, hidden) { | ||||
if(!frappe.meta.has_field(doctype, fieldname) | |||||
&& !in_list(frappe.model.std_fields_list, fieldname)) { | |||||
frappe.msgprint({ | |||||
message: __('Filter {0} missing', [fieldname.bold()]), | |||||
title: 'Invalid Filter', | |||||
indicator: 'red' | |||||
}); | |||||
return; | |||||
} | |||||
this.$w.find('.show_filters').toggle(true); | this.$w.find('.show_filters').toggle(true); | ||||
var is_new_filter = arguments.length===0; | var is_new_filter = arguments.length===0; | ||||
@@ -149,6 +160,7 @@ frappe.ui.Filter = Class.extend({ | |||||
// add help for "in" codition | // add help for "in" codition | ||||
me.$w.find('.condition').change(function() { | me.$w.find('.condition').change(function() { | ||||
if(!me.field) return; | |||||
var condition = $(this).val(); | var condition = $(this).val(); | ||||
if(in_list(["in", "like", "not in", "not like"], condition)) { | if(in_list(["in", "like", "not in", "not like"], condition)) { | ||||
me.set_field(me.field.df.parent, me.field.df.fieldname, 'Data', condition); | me.set_field(me.field.df.parent, me.field.df.fieldname, 'Data', condition); | ||||
@@ -187,7 +187,7 @@ $.extend(frappe, { | |||||
send_message: function(opts, btn) { | send_message: function(opts, btn) { | ||||
return frappe.call({ | return frappe.call({ | ||||
type: "POST", | type: "POST", | ||||
method: "frappe.templates.pages.contact.send_message", | |||||
method: "frappe.templates.www.contact.send_message", | |||||
btn: btn, | btn: btn, | ||||
args: opts, | args: opts, | ||||
callback: opts.callback | callback: opts.callback | ||||