You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
661 B
1 line
661 B
2 years ago
|
define(["jquery","core/config"],function(a,b){return{fileUrl:function(a,c){var d=b.wwwroot+a;return"/"!=c.charAt(0)&&(c="/"+c),d+=b.slasharguments?c:"?file="+encodeURIComponent(c)},relativeUrl:function(c,d,e){if(0===c.indexOf("http:")||0===c.indexOf("https:")||c.indexOf("://")>=0)throw new Error("relativeUrl function does not accept absolute urls");"/"!=c.charAt(0)&&(c="/"+c),"admin"!==b.admin&&(c=c.replace(/^\/admin\//,"/"+b.admin+"/")),d=d||{},e&&(d.sesskey=b.sesskey);var f="";return Object.keys(d).length&&(f=a.map(d,function(a,b){return b+"="+a}).join("&")),""!==f?b.wwwroot+c+"?"+f:b.wwwroot+c},imageUrl:function(a,b){return M.util.image_url(a,b)}}});
|