[minor] fix ux for report
This commit is contained in:
parent
612cef5364
commit
33f8941f7c
4 changed files with 26 additions and 1 deletions
9
frappe/core/doctype/report/test_records.json
Normal file
9
frappe/core/doctype/report/test_records.json
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
[
|
||||
{
|
||||
"doctype": "Report",
|
||||
"name": "_Test Report 1",
|
||||
"report_type": "Query Report",
|
||||
"is_standard": "No",
|
||||
"ref_doctype": "Event"
|
||||
}
|
||||
]
|
||||
10
frappe/core/doctype/report/test_report.py
Normal file
10
frappe/core/doctype/report/test_report.py
Normal 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
|
||||
|
|
@ -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")),
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue