mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-07-08 01:14:24 +03:00
fix js - в jQuery 1.7 trigger() пытается вызвать одноименный метод у текущего объекта, в связи с этим пришлось переименовать события в методе trigger
This commit is contained in:
parent
dfd31a09ab
commit
5574fc3bb0
|
@ -58,7 +58,7 @@ ls.blocks = (function ($) {
|
||||||
* Обработка результатов загрузки
|
* Обработка результатов загрузки
|
||||||
*/
|
*/
|
||||||
this.onLoad = function(content,id,result) {
|
this.onLoad = function(content,id,result) {
|
||||||
$(this).trigger('load',[content,id,result]);
|
$(this).trigger('loadSuccessful',[content,id,result]);
|
||||||
content.empty();
|
content.empty();
|
||||||
if (result.bStateError) {
|
if (result.bStateError) {
|
||||||
ls.msg.error(null, result.sMsg);
|
ls.msg.error(null, result.sMsg);
|
||||||
|
|
|
@ -38,7 +38,7 @@ ls.favourite = (function ($) {
|
||||||
params[this.options.type[type].targetName] = idTarget;
|
params[this.options.type[type].targetName] = idTarget;
|
||||||
|
|
||||||
ls.ajax(this.options.type[type].url, params, function(result) {
|
ls.ajax(this.options.type[type].url, params, function(result) {
|
||||||
$(this).trigger('toggle',[idTarget,objFavourite,type,params,result]);
|
$(this).trigger('toggleSuccessful',[idTarget,objFavourite,type,params,result]);
|
||||||
if (result.bStateError) {
|
if (result.bStateError) {
|
||||||
ls.msg.error(null, result.sMsg);
|
ls.msg.error(null, result.sMsg);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -97,7 +97,7 @@ ls.vote = (function ($) {
|
||||||
this[method].apply(this,[idTarget, objVote, value, type, result]);
|
this[method].apply(this,[idTarget, objVote, value, type, result]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$(this).trigger('vote',[idTarget, objVote, value, type, result]);
|
$(this).trigger('voteSuccessful',[idTarget, objVote, value, type, result]);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.onVoteUser = function(idTarget, objVote, value, type, result) {
|
this.onVoteUser = function(idTarget, objVote, value, type, result) {
|
||||||
|
|
|
@ -58,7 +58,7 @@ ls.blocks = (function ($) {
|
||||||
* Обработка результатов загрузки
|
* Обработка результатов загрузки
|
||||||
*/
|
*/
|
||||||
this.onLoad = function(content,id,result) {
|
this.onLoad = function(content,id,result) {
|
||||||
$(this).trigger('load',[content,id,result]);
|
$(this).trigger('loadSuccessful',[content,id,result]);
|
||||||
content.empty();
|
content.empty();
|
||||||
if (result.bStateError) {
|
if (result.bStateError) {
|
||||||
ls.msg.error(null, result.sMsg);
|
ls.msg.error(null, result.sMsg);
|
||||||
|
|
|
@ -40,7 +40,7 @@ ls.favourite = (function ($) {
|
||||||
params[this.options.type[type].targetName] = idTarget;
|
params[this.options.type[type].targetName] = idTarget;
|
||||||
|
|
||||||
ls.ajax(this.options.type[type].url, params, function(result) {
|
ls.ajax(this.options.type[type].url, params, function(result) {
|
||||||
$(this).trigger('toggle',[idTarget,objFavourite,type,params,result]);
|
$(this).trigger('toggleSuccessful',[idTarget,objFavourite,type,params,result]);
|
||||||
if (result.bStateError) {
|
if (result.bStateError) {
|
||||||
ls.msg.error(null, result.sMsg);
|
ls.msg.error(null, result.sMsg);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -97,7 +97,7 @@ ls.vote = (function ($) {
|
||||||
this[method].apply(this,[idTarget, objVote, value, type, result]);
|
this[method].apply(this,[idTarget, objVote, value, type, result]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$(this).trigger('vote',[idTarget, objVote, value, type, result]);
|
$(this).trigger('voteSuccessful',[idTarget, objVote, value, type, result]);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.onVoteUser = function(idTarget, objVote, value, type, result) {
|
this.onVoteUser = function(idTarget, objVote, value, type, result) {
|
||||||
|
|
Loading…
Reference in a new issue