Patches for email digest and remove page break from defaults

This commit is contained in:
Anand Doshi 2011-12-15 14:24:55 +05:30
parent a51aefbced
commit 7f18dd3b94
4 changed files with 16 additions and 7 deletions

View File

@ -0,0 +1,3 @@
def execute():
from webnotes.modules.module_manager import reload_doc
reload_doc('Setup', 'DocType', 'Email Digest')

View File

@ -0,0 +1,5 @@
def execute():
import webnotes
webnotes.conn.sql("""\
DELETE FROM `tabDefaultValue`
WHERE parent='Control Panel' AND defkey='page_break'""")

View File

@ -2,6 +2,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
doc = locals[dt][dn];
var save_msg = "You must <b>Save</b> the form before proceeding";
var err_msg = "There was an error. One probable reason could be that you haven't saved the form. Please contact support@erpnext.com if the problem persists."
cur_frm.add_custom_button('View Now', function() {
if(doc.__unsaved != 1) {
$c_obj(make_doclist(dt, dn), 'get', '', function(r, rt) {
@ -41,7 +42,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
}, 1);
}
cur_frm.cscript['Add Recipients'] = function(doc, dt, dn) {
cur_frm.cscript['Add/Remove Recipients'] = function(doc, dt, dn) {
// Get profile list
$c_obj(make_doclist(dt, dn), 'get_profiles', '', function(r, rt) {
if(r.exc) {
@ -50,7 +51,7 @@ cur_frm.cscript['Add Recipients'] = function(doc, dt, dn) {
// Open a dialog and display checkboxes against email addresses
doc = locals[dt][dn];
var d = new wn.widgets.Dialog({
title: 'Add Recipients',
title: 'Add/Remove Recipients',
width: 400
});
var dialog_div = $a(d.body, 'div', 'dialog-div', '', '');

View File

@ -3,16 +3,16 @@
# These values are common in all dictionaries
{
'creation': '2011-11-28 13:11:56',
'creation': '2011-12-12 10:41:40',
'docstatus': 0,
'modified': '2011-12-08 19:21:26',
'modified': '2011-12-15 13:53:08',
'modified_by': 'Administrator',
'owner': 'Administrator'
},
# These values are common for all DocType
{
'_last_update': '1323352149',
'_last_update': '1323353260',
'autoname': 'Prompt',
'colour': 'White:FFF',
'doctype': 'DocType',
@ -21,7 +21,7 @@
'name': '__common__',
'section_style': 'Simple',
'show_in_menu': 0,
'version': 78
'version': 79
},
# These values are common for all DocField
@ -145,7 +145,7 @@
{
'doctype': 'DocField',
'fieldtype': 'Button',
'label': 'Add Recipients',
'label': 'Add/Remove Recipients',
'permlevel': 0,
'trigger': 'Client'
},