Browse Source

Merge branch 'develop'

version-14
mbauskar 8 years ago
parent
commit
a6db906f1b
3 changed files with 19 additions and 12 deletions
  1. +1
    -1
      frappe/__init__.py
  2. +15
    -10
      frappe/public/js/frappe/form/control.js
  3. +3
    -1
      frappe/public/js/frappe/ui/filters/filters.js

+ 1
- 1
frappe/__init__.py View File

@@ -14,7 +14,7 @@ import os, sys, importlib, inspect, json
from .exceptions import * from .exceptions import *
from .utils.jinja import get_jenv, get_template, render_template from .utils.jinja import get_jenv, get_template, render_template


__version__ = '8.3.5'
__version__ = '8.3.6'
__title__ = "Frappe Framework" __title__ = "Frappe Framework"


local = Local() local = Local()


+ 15
- 10
frappe/public/js/frappe/form/control.js View File

@@ -282,7 +282,6 @@ frappe.ui.form.ControlInput = frappe.ui.form.Control.extend({
// mandatory style on refresh // mandatory style on refresh
refresh_input: function() { refresh_input: function() {
var me = this; var me = this;

var make_input = function() { var make_input = function() {
if(!me.has_input) { if(!me.has_input) {
me.make_input(); me.make_input();
@@ -1724,6 +1723,7 @@ frappe.ui.form.ControlTextEditor = frappe.ui.form.ControlCode.extend({
}); });
}, },
onChange: function(value) { onChange: function(value) {
if(this._setting_value) return;
me.parse_validate_and_set_in_model(value); me.parse_validate_and_set_in_model(value);
}, },
onKeydown: function(e) { onKeydown: function(e) {
@@ -1847,18 +1847,23 @@ frappe.ui.form.ControlTextEditor = frappe.ui.form.ControlCode.extend({
}, },
set_in_editor: function(value) { set_in_editor: function(value) {
// set value after user has stopped editing // set value after user has stopped editing
if(this.__setting_value) {
// we don't understand how the internal triggers work,
// so quit
return;
}

if(!this._last_change_on || (moment() - moment(this._last_change_on) > 3000)) { if(!this._last_change_on || (moment() - moment(this._last_change_on) > 3000)) {
this.__setting_value = setTimeout(() => this.__setting_value = null, 500);
this.editor.summernote('code', value); this.editor.summernote('code', value);
} else { } else {
if(!this._setting_value) {
this._setting_value = setInterval(() => {
if(moment() - moment(this._last_change_on) > 3000) {
this.editor.summernote('code', this.last_value);
clearInterval(this._setting_value);
this._setting_value = null;
}
}, 1000);
}
this._setting_value = setInterval(() => {
if(moment() - moment(this._last_change_on) > 3000) {
this.editor.summernote('code', this.last_value);
clearInterval(this._setting_value);
this._setting_value = null;
}
}, 1000);
} }
}, },
set_focus: function() { set_focus: function() {


+ 3
- 1
frappe/public/js/frappe/ui/filters/filters.js View File

@@ -408,7 +408,9 @@ frappe.ui.Filter = Class.extend({
} }
} }
} else if(in_list(["in", "not in"], this.get_condition())) { } else if(in_list(["in", "not in"], this.get_condition())) {
val = $.map(val.split(","), function(v) { return strip(v); });
if(val) {
val = $.map(val.split(","), function(v) { return strip(v); });
}
} if(val === '%') { } if(val === '%') {
val = ""; val = "";
} }


Loading…
Cancel
Save