[minor] fix ux for report

This commit is contained in:
Rushabh Mehta 2014-10-06 15:04:12 +05:30
parent 612cef5364
commit 33f8941f7c
4 changed files with 26 additions and 1 deletions

View file

@ -0,0 +1,9 @@
[
{
"doctype": "Report",
"name": "_Test Report 1",
"report_type": "Query Report",
"is_standard": "No",
"ref_doctype": "Event"
}
]

View file

@ -0,0 +1,10 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# See license.txt
import frappe
import unittest
test_records = frappe.get_test_records('Report')
class TestReport(unittest.TestCase):
pass

View file

@ -596,6 +596,10 @@ frappe.ui.form.ControlAttach = frappe.ui.form.ControlData.extend({
})
},
onclick: function() {
if(this.doc && this.doc.__islocal) {
frappe.msgprint(__("Please save the document before uploading."));
return;
}
if(!this.dialog) {
this.dialog = new frappe.ui.Dialog({
title: __(this.df.label || __("Upload")),

View file

@ -53,7 +53,7 @@ frappe.get_value = function(field, callback) {
}
var msg_dialog=null;
function msgprint(msg, title) {
frappe.msgprint = function(msg, title) {
if(!msg) return;
if(msg instanceof Array) {
@ -104,6 +104,8 @@ function msgprint(msg, title) {
return msg_dialog;
}
var msgprint = frappe.msgprint;
// Floating Message
function show_alert(txt, seconds) {
if(!$('#dialog-container').length) {