jqGrid trigger “Loading…” overlay

后端 未结 9 1867
孤独总比滥情好
孤独总比滥情好 2020-12-03 08:24

Does anyone know how to trigger the stock jqGrid \"Loading...\" overlay that gets displayed when the grid is loading? I know that I can use a jquery plugin without much eff

9条回答
  •  佛祖请我去吃肉
    2020-12-03 08:49

    its is worling with $('div.loading').show(); This is also useful even other components

    $('#editDiv').dialog({
                modal : true,
                width : 'auto',
                height : 'auto',
                buttons : {
                    Ok : function() {
                        //Call Action to read wo and 
                         **$('div.loading').show();**
    
                        var status = call(...)
                        if(status){
                            $.ajax({
                                type : "POST",
                                url : "./test",
                                data : {
                                    ...
                                },
                                async : false,
                                success : function(data) {
    
                                    retVal = true;
                                },
                                error : function(xhr, status) {
    
    
                                    retVal = false;
                                }
                            });
                        }
                        if (retVal == true) {
                            retVal = true;
                            $(this).dialog('close');
                        }
                        **$('div.loading').hide();**
                    },
                    Cancel : function() {
                        retVal = false;
                        $(this).dialog('close');
                    }
    
                }
            });
    

提交回复
热议问题