MCPcopy Index your code
hub / github.com/TruthHun/BookStack / alertTips

Function alertTips

static/js/main.js:56–83  ·  view source on GitHub ↗
(cls,msg,timeout,url)

Source from the content-addressed store, hash-verified

54}
55
56function alertTips(cls,msg,timeout,url) {
57 if(!msg) return false;
58 var title="";
59 if (cls=="error" || cls=="fail" || cls=="danger"){
60 title='错误';
61 cls="error"
62 }else{
63 title='成功';
64 cls="success"
65
66 }
67 $.Toast(title,msg,cls, {
68 stack: true,
69 has_icon:true,
70 has_close_btn:true,
71 fullscreen:false,
72 timeout:parseInt(timeout),
73 sticky:false,
74 has_progress:true,
75 rtl:false,
76 // position_class:'toast-top-center',
77 });
78 setTimeout(function () {
79 if(url){
80 location.href=url
81 }
82 },parseInt(timeout));
83}
84
85// 上传文件
86function upload(url, formData, callback){

Callers 2

bookstack.jsFile · 0.85
main.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected