Forum


12:57

25/10/2008

Hi again,
I'm trying to add a date time field to my columns, and I want to use a different date/time picker than UI, but to test it I've tried to call the function and output the formID to the console, however it doesn't seem to work. I've checked the forum and saw a similar post, but I just can't see why it won't even fire the event to the console. Here is my code:
{
'url': options.baseURL + 'list/',
'datatype': "json",
'colNames': ['Campaign Name', 'Campaign Type', 'Campaign End Date', 'Notes'],
'colModel': [{
'name': 'campaign_title',
'index': 'campaign_title',
'width': 75,
'editable':true,
'editoptions':{size:25}
}, {
'name': 'campaign_type',
'index': 'campaign_type',
'width': 75,
'editable':true,
'edittype':'select',
'editoptions':{'size':25, 'value':'0:Telephone'}
}, {
'name': 'campaign_end_date',
'index': 'campaign_end_date',
'width': 75,
'editable':true,
'sorttype':'date',
'datefmt':'d m Y H i s'
}, {
'name': 'body',
'index': 'body',
'width': 75,
'editable':true,
'edittype':'textarea',
'editoptions':{rows:"2",cols:"20"}
}],
'width':730,
'height':300,
'rowNum': 10,
'rowList': [10, 20, 50, 100],
'imgpath': '/sites/all/modules/manager/css/jqmodal/green/images',
'pager': jQuery('#campaigns-pager'),
'sortname': 'campaign_title',
'viewrecords': true,
'sortorder': "asc",
'caption': "Your Campaigns",
'editurl':options.baseURL + 'update/',
'afterInsertRow': function(rowid, rowdata, rowelem) {
if (rowelem.cell[1] == '0') {
jQuery("#campaigns-list").setCell(rowid, 'campaign_type', 'Telephone');
}
},
'ondblClickRow': function( rowid ) {
Qcall.Manager.Campaigns.Load({
'node_id': rowid
});
}
});
jQuery("#campaigns-list").navGrid('#campaigns-pager',{
'edit':true,
'add':true,
'del':true,
'search':true,
'onInitializeForm': function ( formid ) {
console.log(formid);
jQuery("#campaign_end_date",formid).datepicker({showOn: 'focus'});
}
});
Most Users Ever Online: 715
Currently Online:
69 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66