@@ -4,6 +4,9 @@ | |||||
.result-list { | .result-list { | ||||
min-height: 200px; | min-height: 200px; | ||||
} | } | ||||
.sort-selector .dropdown:hover { | |||||
text-decoration: underline; | |||||
} | |||||
.list-filters { | .list-filters { | ||||
position: relative; | position: relative; | ||||
} | } | ||||
@@ -403,14 +403,15 @@ frappe.ui.form.ControlData = frappe.ui.form.ControlInput.extend({ | |||||
this.$input.addClass(this.df.input_class); | this.$input.addClass(this.df.input_class); | ||||
} | } | ||||
}, | }, | ||||
set_input: function(val) { | |||||
this.$input && this.$input.val(this.format_for_input(val)); | |||||
set_input: function(value) { | |||||
this.value = value; | |||||
this.$input && this.$input.val(this.format_for_input(value)); | |||||
this.set_disp_area(); | this.set_disp_area(); | ||||
this.last_value = val; | |||||
this.set_mandatory && this.set_mandatory(val); | |||||
this.last_value = value; | |||||
this.set_mandatory && this.set_mandatory(value); | |||||
}, | }, | ||||
get_value: function() { | get_value: function() { | ||||
return this.$input ? this.$input.val() : undefined; | |||||
return this.$input && this.$input.val() || this.value; | |||||
}, | }, | ||||
format_for_input: function(val) { | format_for_input: function(val) { | ||||
return val==null ? "" : val; | return val==null ? "" : val; | ||||
@@ -210,7 +210,7 @@ frappe.hide_progress = function() { | |||||
} | } | ||||
// Floating Message | // Floating Message | ||||
function show_alert(txt, seconds) { | |||||
frappe.show_alert = function(txt, seconds) { | |||||
if(!$('#dialog-container').length) { | if(!$('#dialog-container').length) { | ||||
$('<div id="dialog-container"><div id="alert-container"></div></div>').appendTo('body'); | $('<div id="dialog-container"><div id="alert-container"></div></div>').appendTo('body'); | ||||
} | } | ||||
@@ -229,3 +229,6 @@ function show_alert(txt, seconds) { | |||||
div.delay(seconds ? seconds * 1000 : 3000).fadeOut(300); | div.delay(seconds ? seconds * 1000 : 3000).fadeOut(300); | ||||
return div; | return div; | ||||
} | } | ||||
// for backward compatibility | |||||
var show_alert = frappe.show_alert; |
@@ -8,6 +8,12 @@ | |||||
min-height: 200px; | min-height: 200px; | ||||
} | } | ||||
.sort-selector { | |||||
.dropdown:hover { | |||||
text-decoration: underline; | |||||
} | |||||
} | |||||
.list-filters { | .list-filters { | ||||
position: relative; | position: relative; | ||||