change from labels to fieldname in cur_frm.cscript

This commit is contained in:
Anand Doshi
2012-04-05 13:03:35 +05:30
parent 130dfaee8c
commit fa0cd89a7c
204 changed files with 389 additions and 1663 deletions

View File

@@ -88,7 +88,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
unhide_field(fl); }
}
cur_frm.cscript['Add'] = function(doc, dt, dn) {
cur_frm.cscript.add = function(doc, dt, dn) {
var callback = function(r,rt) {
// refresh listing

View File

@@ -44,7 +44,7 @@ cur_frm.cscript.onload = function(doc,cdt,cdn){
cur_frm.cscript.refresh = function(doc,cdt,cdn) {
cur_frm.clear_custom_buttons();
if(doc.status == 'Pending Review' && (doc.senders_name == user_fullname || doc.senders_email == user)) {
cur_frm.add_custom_button('Declare Completed', cur_frm.cscript['Declare Completed']);
cur_frm.add_custom_button('Declare Completed', cur_frm.cscript.declare_completed);
cur_frm.add_custom_button('Reopen Task', cur_frm.cscript['Reopen Task']);
}
if(doc.status == 'Open' && !doc.__islocal) {
@@ -111,7 +111,7 @@ cur_frm.cscript['Cancel Task'] = function(){
});
}
cur_frm.cscript['Declare Completed'] = function(){
cur_frm.cscript.declare_completed = function(){
$c_obj(make_doclist(cur_frm.doc.doctype, cur_frm.doc.name),'declare_completed', '',function(r, rt) {
if(r.message == 'true'){
doc.status = 'Closed'; //for refresh

View File

@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
'creation': '2012-03-30 13:33:31',
'creation': '2012-04-03 12:49:51',
'docstatus': 0,
'modified': '2012-03-30 13:33:31',
'modified': '2012-04-03 12:49:51',
'modified_by': u'Administrator',
'owner': u'ashwini@webnotestech.com'
},

View File

@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
'creation': '2012-03-30 14:50:44',
'creation': '2012-04-03 12:49:52',
'docstatus': 0,
'modified': '2012-03-30 14:50:44',
'modified': '2012-04-03 12:49:52',
'modified_by': u'Administrator',
'owner': u'harshada@webnotestech.com'
},

View File

@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
'creation': '2012-03-30 13:33:32',
'creation': '2012-04-03 12:49:52',
'docstatus': 0,
'modified': '2012-03-30 13:33:32',
'modified': '2012-04-03 12:49:52',
'modified_by': u'Administrator',
'owner': u'ashwini@webnotestech.com'
},

View File

@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
'creation': '2012-03-30 13:33:32',
'creation': '2012-04-03 12:49:52',
'docstatus': 0,
'modified': '2012-03-30 13:33:32',
'modified': '2012-04-03 12:49:52',
'modified_by': u'Administrator',
'owner': u'ashwini@webnotestech.com'
},

View File

@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
'creation': '2012-03-30 13:33:32',
'creation': '2012-04-03 12:49:52',
'docstatus': 0,
'modified': '2012-03-30 13:33:32',
'modified': '2012-04-03 12:49:52',
'modified_by': u'Administrator',
'owner': u'harshada@webnotestech.com'
},

View File

@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
'creation': '2012-03-30 13:33:32',
'creation': '2012-04-03 12:49:52',
'docstatus': 0,
'modified': '2012-03-30 13:33:32',
'modified': '2012-04-03 12:49:52',
'modified_by': u'Administrator',
'owner': u'harshada@webnotestech.com'
},

View File

@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
'creation': '2012-03-30 14:50:44',
'creation': '2012-04-03 12:49:53',
'docstatus': 0,
'modified': '2012-03-30 14:50:44',
'modified': '2012-04-03 12:49:53',
'modified_by': u'Administrator',
'owner': u'ashwini@webnotestech.com'
},