简体   繁体   English

jQuery Flexigrid更改标签编辑

[英]JQuery Flexigrid change label edit

How to change label edit to another text? 如何将标签编辑更改为其他文本? Normally the label is Add, Edit, Delete. 通常,标签为添加,编辑,删除。 I will change edit to view or display as my goal when user click on this link, it will go to edit form but all field are readonly (user unable to edit data) so it looks strange when the title is edit 当用户单击此链接时,我将更改编辑以查看或显示为我的目标,它将进入编辑表单,但所有字段均为只读(用户无法编辑数据),因此在标题编辑时看起来很奇怪

maybe this can help u 也许这可以帮助你

    function conditionalDialog(mode){
    var theButtons = {};
    var theautoOpen = true;
    var title = "";

    if (mode=='first'){
        theautoOpen = false;    }
    if (mode=='Add'){
        title = "Add Product Record";
        theButtons["Save"] = function() { simpan('add'); Tambah(); };
        theButtons["Close"] = function() { $(this).dialog("close"); };
    }else{
        title = "Edit Product Record";
        theButtons["Save"] = function() { simpan('edit'); $(this).dialog("close"); };
        theButtons["Cancel"] = function() { $(this).dialog("close"); };
    }
    $('#form').dialog("option","title",title);
    $('#form')
    .dialog({
        autoOpen: theautoOpen,
        width: 600, 
        buttons: theButtons,
        show:"slide"
    }); 
}   

u can see at line $('#form').dialog("option","title",title); 您可以在$('#form')。dialog(“ option”,“ title”,title)行中看到; it will change label 它将更改标签

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM