jEasyUI更改destroyMsg上的按钮文本

时间:2019-06-07 12:24:31

标签: jquery-easyui

我正在使用jQuery的EasyUI库。我想更改对话框中的按钮文本。默认情况下设置为确定取消。我希望在EasyUI结构中进行设置:

$.fn.edatagrid.defaults = $.extend({}, $.fn.datagrid.defaults, {
        singleSelect: true,
        editing: true,
        editIndex: -1,
        destroyMsg:{            
            norecord:{
                title:'Ostrzeżenie',
                msg:'Nie został wybrany żaden wiersz.'
            },
            confirm:{
                title:'Potwierdzenie',
                msg:'Czy na pewno chcesz usunąć wybrany wiersz?'
            }
        },        
        poster: function(url, data, success, error){
            $.ajax({
                type: 'post',
                url: url,
                data: data,
                dataType: 'json',
                success: function(data){
                    success(data);
                },
                error: function(jqXHR, textStatus, errorThrown){
                    error({
                        jqXHR: jqXHR,
                        textStatus: textStatus,
                        errorThrown: errorThrown
                    });
                }
            });
        },
        autoSave: false,    
        url: null,  
        saveUrl: null,  
        updateUrl: null,    
        destroyUrl: null,   
        tree: null,     
        treeUrl: null,  
        treeDndUrl: null,   
        treeTextField: 'name',
        treeParentField: 'parentId',

        onAdd: function(index, row){},
        onEdit: function(index, row){},
        onBeforeSave: function(index){},
        onSave: function(index, row){},
        onSuccess: function(index, row){},
        onDestroy: function(index, row){},
        onError: function(index, row){}
    });

我尝试添加cancel:'Anuluj',但仍然无法正常运行

0 个答案:

没有答案