Editor - FileUpload on Inline Edit

Editor - FileUpload on Inline Edit

amanaV36amanaV36 Posts: 20Questions: 9Answers: 0

Hi,

i am currently trying to implement a FIleUpload with the use of Editors Inline Edit. It seems the component is broken.
Attached there is a file showing what appens when you click on the column with the upload field definition. This element doesn't get rendered correctly and did not function as expected (component doing a submit with the click on "Durchsuchen")

This is the code of the field:

{ "name": "attachId", "type": "upload", "dragDrop": false, "uploadText": false, "clearText": false}, 

This is the data tables data field:

{ "name": "attachId", "targets": [33], "data": "attachId", "render": renderAttachment}, 

This is the used render functin (should not be involved in this problem):

function renderAttachment(data, type, full) {

                    var attachId = full.attachId;
                    var boKey = full.paymentId;
                    if(attachId === undefined || attachId == "" || attachId == -1)
                        return "---";
                    
                    var tag = "<a border=\"0\" title=\"" + attachId + "\"          href=\""+gJsAppBasePath+"paymentStatus2013.do?action=.downloadAttachment[" + boKey + "]\"><img src=\"../static/img/16/paperclip_next.png\"/></a>"; 
                    
                    return tag;
                }

debug code: ururec

Is it even possible to use the FIleUpload combined with Inline Edit and our own server side processing? If so, could you please provide an example.

Thanks in advance.

Best regards

Answers

  • allanallan Posts: 63,813Questions: 1Answers: 10,517 Site admin

    Hi,

    Thanks for your question - it looks like there might be a CSS issue there. Are you loading the dataTables.editor.css file?

    As a test case, if you load this example and in your browser's console enter:

    $('#example').on( 'click', 'tbody td', function () {
      editor.inline( this, {
        onBlur: 'submit'
      } );
    } );
    

    which will activate inline editing for the table.

    Click on a cell in the final column and the file upload is correctly rendered. You can upload files and then click outside the column to submit.

    If you can give me a link to the page I would be happy to take a look into it.

    Regards,
    Allan

  • amanaV36amanaV36 Posts: 20Questions: 9Answers: 0

    Hi allan,

    yes the css file is loaded. you are right in your example it's working fine.
    I'll try to make an example where i can reproduce this issue.

    Regards

  • allanallan Posts: 63,813Questions: 1Answers: 10,517 Site admin

    That would be great - thanks!

    Allan

This discussion has been closed.