1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-07-02 22:45:02 +03:00

main.js: если url для ajax-запроса начинается с "/", то нефиг добавлять

к нему начало
This commit is contained in:
Sergey S Yaglov 2012-02-29 09:42:01 +03:00
parent d5d327b5d7
commit 92445fe144

View file

@ -340,7 +340,7 @@ ls = (function ($) {
}
});
if (url.indexOf('http://')!=0 && url.indexOf('https://')!=0) {
if (url.indexOf('http://')!=0 && url.indexOf('https://')!=0 && url.indexOf('/')!=0) {
url=aRouter['ajax']+url+'/';
}
@ -376,7 +376,7 @@ ls = (function ($) {
if (typeof(form)=='string') {
form=$('#'+form);
}
if (url.indexOf('http://')!=0 && url.indexOf('https://')!=0) {
if (url.indexOf('http://')!=0 && url.indexOf('https://')!=0 && url.indexOf('/')!=0) {
url=aRouter['ajax']+url+'/';
}