Merge branch 'master' into develop

This commit is contained in:
mbauskar 2017-10-10 12:35:42 +05:30
commit ae6fa0b10f
3 changed files with 5 additions and 4 deletions

View file

@ -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__ = '9.1.4'
__version__ = '9.1.5'
__title__ = "Frappe Framework"
local = Local()

View file

@ -561,6 +561,7 @@ frappe.ui.form.Grid = Class.extend({
me.setup_download();
// upload
frappe.flags.no_socketio = true;
$(this.wrapper).find(".grid-upload").removeClass("hide").on("click", function() {
frappe.prompt({fieldtype:"Attach", label:"Upload File"},
function(data) {

View file

@ -239,12 +239,12 @@ frappe.upload = {
}
},
_upload_file: function(fileobj, args, opts) {
_upload_file: function(fileobj, args, opts, dataurl) {
if (args.file_size) {
frappe.upload.validate_max_file_size(args.file_size);
}
if(opts.on_attach) {
opts.on_attach(args)
opts.on_attach(args, dataurl)
} else {
if (opts.confirm_is_private) {
frappe.prompt({
@ -291,7 +291,7 @@ frappe.upload = {
freader.readAsDataURL(fileobj);
}
if (opts.no_socketio) {
if (opts.no_socketio || frappe.flags.no_socketio) {
upload_with_filedata();
return;
}