This topic contains 1 reply, has 2 voices, and was last updated by Sean Sean 3 years, 7 months ago.

Changing text breaks functionary editable table


  • Fearghal
    Participant

    Member Reply #575

    Hi,

    Do you know why when I change the text “save” in the editrow function of table-editable.js it does not work? If I change it to anything other than save it will not work.

    I am only changing the text, none of the code, litterally changing “Save” to “SAVE” is enough to break it.

    Do you know why?

    Thanks

    Sean
    Sean
    Keymaster

    Posts: 4527
    Support Staff Reply #589

    Hi :),

    Please go to assets/admin/pages/scripts/table-editable.js and refer to below code and you will note that “Save” button title is used in the below condition:

    if (nEditing !== null && nEditing != nRow) {
    restoreRow(oTable, nEditing);
    editRow(oTable, nRow);
    nEditing = nRow;
    } else if (nEditing == nRow && this.innerHTML == “Save”) {
    /* Editing this row and want to save it */
    saveRow(oTable, nEditing);
    nEditing = null;
    alert(“Updated! Do not forget to do some ajax to sync with backend :)”);
    } else {
    /* No edit in progress – let’s start one */
    editRow(oTable, nRow);
    nEditing = nRow;
    }

    Thanks.

    • This reply was modified 3 years, 7 months ago by Sean Sean.
    • This reply was modified 3 years, 7 months ago by Sean Sean.
    • This reply was modified 3 years, 7 months ago by Sean Sean.
    • This reply was modified 3 years, 7 months ago by Sean Sean.
    • This reply was modified 3 years, 7 months ago by Sean Sean.

You must be logged in to reply to this topic.