Merge branch 'hotfix'
This commit is contained in:
commit
565e58d8cd
5 changed files with 10 additions and 7 deletions
|
|
@ -14,7 +14,7 @@ import os, sys, importlib, inspect, json
|
|||
from .exceptions import *
|
||||
from .utils.jinja import get_jenv, get_template, render_template, get_email_from_template
|
||||
|
||||
__version__ = '10.1.10'
|
||||
__version__ = '10.1.11'
|
||||
__title__ = "Frappe Framework"
|
||||
|
||||
local = Local()
|
||||
|
|
|
|||
|
|
@ -9,7 +9,10 @@ frappe.ui.form.ControlTime = frappe.ui.form.ControlData.extend({
|
|||
timeFormat: "hh:ii:ss",
|
||||
startDate: frappe.datetime.now_time(true),
|
||||
onSelect: function() {
|
||||
me.$input.trigger('change');
|
||||
// ignore micro seconds
|
||||
if (moment(me.get_value(), 'hh:mm:ss').format('HH:mm:ss') != moment(me.value, 'hh:mm:ss').format('HH:mm:ss')) {
|
||||
me.$input.trigger('change');
|
||||
}
|
||||
},
|
||||
onShow: function() {
|
||||
$('.datepicker--button:visible').text(__('Now'));
|
||||
|
|
@ -31,7 +34,7 @@ frappe.ui.form.ControlTime = frappe.ui.form.ControlData.extend({
|
|||
&& ((this.last_value && this.last_value !== this.value)
|
||||
|| (!this.datepicker.selectedDates.length))) {
|
||||
|
||||
var date_obj = frappe.datetime.moment_to_date_obj(moment(value, 'hh:mm:ss'));
|
||||
var date_obj = frappe.datetime.moment_to_date_obj(moment(value, 'HH:mm:ss'));
|
||||
this.datepicker.selectDate(date_obj);
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ frappe.ui.form.save = function (frm, action, callback, btn) {
|
|||
method: "frappe.desk.form.save.savedocs",
|
||||
args: { doc: frm.doc, action: action },
|
||||
callback: function (r) {
|
||||
frm.doc.__unsaved = false;
|
||||
$(document).trigger("save", [frm.doc]);
|
||||
callback(r);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -200,9 +200,7 @@ _f.Frm.prototype.watch_model_updates = function() {
|
|||
// the texteditor, summernote, changes nulls to empty strings on render,
|
||||
// so ignore those changes
|
||||
} else {
|
||||
if (value != doc[fieldname]) {
|
||||
me.dirty();
|
||||
}
|
||||
me.dirty();
|
||||
}
|
||||
me.fields_dict[fieldname]
|
||||
&& me.fields_dict[fieldname].refresh(fieldname);
|
||||
|
|
|
|||
|
|
@ -397,5 +397,6 @@ def get_random_filename(extn=None, content_type=None):
|
|||
|
||||
@frappe.whitelist()
|
||||
def validate_filename(filename):
|
||||
fname = get_file_name(filename, hashlib.md5(filename).hexdigest()[-6:])
|
||||
hash_ = get_content_hash(filename)
|
||||
fname = get_file_name(filename, hash_[-6:])
|
||||
return fname
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue