Categories | Question details Back To List | ||
How to do this *************************************************************************** I have created . A new block. scheduler.form_blocks["my_editor"]={ render:function(sns){ return "<div class='dhx_cal_ltext' style='height:165px;'> Subject <input type='text'> Sales Rep <select style='width:200px;'><option value=''></option></select><br><br> Customer <select style='width:200px;'><option value=''></option></select> Ranking <select style='width:80px;'><option value=''></option></select> <br><br> Address <select style='width:200px;'><option value=''></option></select><br><br> State <input type='text'> City <input type='text' style='width:150px;'> Zip <input type='text' style='width:50px;'> <br><br> Location <input type='text' style='width:250px;'> </div>"; }, set_value:function(node,value,ev){ node.childNodes[1].value=value||""; node.childNodes[3].value=ev.details||""; }, get_value:function(node,ev){ ev.location = node.childNodes[3].value; return node.childNodes[1].value; }, focus:function(node){ var a=node.childNodes[1]; a.select(); a.focus(); } } And give scheduler.config.lightbox.sections=[ {name:"location1", height:100, type:"my_editor", map_to:"text" }, {name:"time", height:512, type:"time", map_to:"auto"}, {name:"description", height:100, map_to:"text", type:"textarea" , focus:true} ] ****************************************************************************** Now my problem is What chage I need to implement in scheduler.form_blocks["my_editor"] get and set method and in other script so how I can put every field in Scheduler_BasicConnector like .. c.render_table("events","event_id","start_date,end_date,Salesrep,details,itemDetail,Ranking,Customer,address,state,city,zip","","",companyId); please help Answer posted by Alex (support) on Dec 14, 2009 00:39 Both questions aren't clear. Please explain in details. Answer posted by amit on Dec 14, 2009 01:08 suppose , I am declaring a new block with name.... scheduler.form_blocks["my_editor"]={ render:function(sns){
NOW I NEED TO DECLARE........ set_value:function(node,value,ev){ and
can you write this two function for me..... i am confused , how to wriet get_value and set value function.................
please write... } Answer posted by Alex (support) on Dec 14, 2009 01:32 The answer depends on the reasult you want to achieve. You haven't described that at all. Method set_value is called when form opens. Here you can set values that will be shown in the block. The get_value fires after the detail form is closed and you can set properties of the event object here. The methods that you have defined looks correct. Please see ready examples here: http://dhtmlx.com/dhxdocs/doku.php?id=dhtmlxscheduler:custom_details_form |