瀏覽代碼

Merge branch 'develop'

version-14
mbauskar 8 年之前
父節點
當前提交
9896b04f59
共有 3 個檔案被更改,包括 15 行新增5 行删除
  1. +1
    -1
      frappe/__init__.py
  2. +1
    -1
      frappe/public/js/frappe/form/control.js
  3. +13
    -3
      frappe/public/js/frappe/form/script_manager.js

+ 1
- 1
frappe/__init__.py 查看文件

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

__version__ = '8.3.3'
__version__ = '8.3.4'
__title__ = "Frappe Framework"

local = Local()


+ 1
- 1
frappe/public/js/frappe/form/control.js 查看文件

@@ -129,7 +129,7 @@ frappe.ui.form.Control = Class.extend({
};

value = this.validate(value);
if (value.then) {
if (value && value.then) {
// got a promise
return value.then((value) => set(value));
} else {


+ 13
- 3
frappe/public/js/frappe/form/script_manager.js 查看文件

@@ -101,11 +101,21 @@ frappe.ui.form.ScriptManager = Class.extend({

// make list of functions to be run serially
handlers.new_style.forEach((_function) => {
tasks.push(() => runner(_function, false));
if(event_name==='setup') {
// setup must be called immediately
runner(_function, false);
} else {
tasks.push(() => runner(_function, false));
}
});

handlers.old_style.forEach((_function) => {
tasks.push(() => runner(_function, true));
if(event_name==='setup') {
// setup must be called immediately
runner(_function, false);
} else {
tasks.push(() => runner(_function, true));
}
});

// run them serially
@@ -147,7 +157,7 @@ frappe.ui.form.ScriptManager = Class.extend({

if(doctype.__custom_js) {
try {
eval(doctype.__custom_js)
eval(doctype.__custom_js);
} catch(e) {
frappe.msgprint({
title: __('Error in Custom Script'),


Loading…
取消
儲存