unnati Posted May 15, 2014 Share Posted May 15, 2014 (edited) I have gotten special requirement in prestashop admin side order listing page. In that i need one filed custom_note which is only for admin in order listing page. custom_note should be editable like textfield or textarea at listing page only and update or save it at listing page.custom_note should be edit and update at listing. i have completed to displaying filed in listing of orders .but i cant figure out how i can edit custom_note at listing page only and update it. i attached screenshot what i have done. please help me Edited May 16, 2014 by unnati (see edit history) Link to comment Share on other sites More sharing options...
unnati Posted May 22, 2014 Author Share Posted May 22, 2014 I have solved it i have done it with jquery only $(document).ready(function() { $('.custom_note_edit').dblclick(function(e) { $(this).addClass("cellEditing"); var trobj = $(this).closest('tr'); var order = $.trim(trobj.children('td.order_id').text()); var cval = $.trim($(this).text()); $(this).html("<input type='text' id='editable_note' value='" + cval + "' />"); $(this).children().first().focus(); $(this).children().first().blur(function(){ var newContent = $(this).val(); /** here call your function for updating the field value to database **/ $(this).parent().text(newContent); $(this).parent().removeClass("cellEditing"); }); }); }); here custom_note_edit is class associate with td which contain custom_note on order list page Link to comment Share on other sites More sharing options...
Recommended Posts