$(document).ready(function() { $(".simple_text").editable("?act=partialsave" , { indicator : "", submit : 'OK', tooltip : "Click to edit...", cssclass :'inplace_input', name : 'common_input', width:"100%", type : "text", submitdata : function() { return {fieldName: $(this).attr("fieldName"),recordId: $(this).parents('tr').attr("recordId")} } }); $(".long_text").editable("?act=partialsave&memo=1" , { indicator : "", type : "textarea", submit : 'OK', tooltip : "Click to edit...", cssclass : 'inplace_input', name : 'common_input', rows : 20, width : "100%", submitdata : function() { return {fieldName: $(this).attr("fieldName"),recordId: $(this).parents('tr').attr("recordId")} } }); $(".limit_text").editable("?act=partialsave&memo=1", { indicator : "", type : "charcounter", submit : 'OK', tooltip : "Click to edit...", cssclass : 'inplace_input', name : 'common_input', charcounter : { characters : 120 }, submitdata : function() { return {fieldName: $(this).attr("fieldName"),recordId: $(this).parents('tr').attr("recordId")} } }); $('.file_attach').click(function (e) { e.preventDefault(); $.modal(''); }); $('.truefalse').click(function (e) { var objeto = $(this); // $(this).html(''); $.ajax({ url: '?act=active&fieldName='+objeto.attr("fieldName")+"&valorAnterior="+objeto.attr("valorAnterior")+"&recordId="+objeto.parents('tr').attr("recordId"), async: true, success:function(htmls){ objeto.html(htmls); if (objeto.attr("valorAnterior")== 1) objeto.attr("valorAnterior","0"); else objeto.attr("valorAnterior","1"); }, beforeSend:function (){objeto.html(''); } }); }); $('.html_attach').click(function (e) { e.preventDefault(); // load the contact form using ajax // $.modal(''); }); $(".priority").editable("?act=partialsave", { data : "{'1':'1','2':'2','3':'3','4':'4','5':'5', 'selected':'1'}", type : "select", submit : "OK", name : 'common_input', cssclass : 'inplace_input', submitdata : function() { return {fieldName: $(this).attr("fieldName"),recordId: $(this).parents('tr').attr("recordId")} } }); });