xautlx / s2jh

A Java/J2EE development framework for enterprise system based on Struts/Spring/JPA/Hibernate and jquery/bootstrap
GNU Lesser General Public License v3.0
321 stars 242 forks source link

建议普通和成功提示土司添加超时,频繁操作一个一个点太麻烦 #97

Open xiaolongyuan opened 10 years ago

xiaolongyuan commented 10 years ago

我的做法: 只对普通和成功提示做超时,其他不变

global.js:

    ,notify:function(type,text,title,timeout){
        if(type=="error"||type=="failure"){
            type="error";
            toastr.options.timeOut=5000;
            toastr.options.positionClass="toast-bottom-center"
        }
        else{
            //2014.11.04 longyuan 修改吐司超时
            if(timeout==undefined)
                toastr.options.timeOut=0;
            else
                toastr.options.timeOut=timeout;

            toastr.options.positionClass="toast-bottom-right"
        }
        if(title==undefined){
            title=""
        }
        toastr[type](text,title)
    }

form-validation.js

表单提交回调修改:

if (response.type == "success" || response.type == "warning") { //TODO 添加设置超时,2014.11.04 longyuan Global.notify(response.type, response.message,'',response.timeout);

OperationResult .java

修改后文件:

package lab.s2jh.core.web.view;

import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include;

/**