1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-07-04 23:44:25 +03:00

fix js - в jQuery 1.7 trigger() пытается вызвать одноименный метод у текущего объекта, в связи с этим пришлось переименовать события в методе trigger

This commit is contained in:
Mzhelskiy Maxim 2011-11-05 10:40:09 +04:00
parent dfd31a09ab
commit 5574fc3bb0
6 changed files with 6 additions and 6 deletions

View file

@ -58,7 +58,7 @@ ls.blocks = (function ($) {
* Обработка результатов загрузки
*/
this.onLoad = function(content,id,result) {
$(this).trigger('load',[content,id,result]);
$(this).trigger('loadSuccessful',[content,id,result]);
content.empty();
if (result.bStateError) {
ls.msg.error(null, result.sMsg);

View file

@ -38,7 +38,7 @@ ls.favourite = (function ($) {
params[this.options.type[type].targetName] = idTarget;
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) {
ls.msg.error(null, result.sMsg);
} else {

View file

@ -97,7 +97,7 @@ ls.vote = (function ($) {
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) {

View file

@ -58,7 +58,7 @@ ls.blocks = (function ($) {
* Обработка результатов загрузки
*/
this.onLoad = function(content,id,result) {
$(this).trigger('load',[content,id,result]);
$(this).trigger('loadSuccessful',[content,id,result]);
content.empty();
if (result.bStateError) {
ls.msg.error(null, result.sMsg);

View file

@ -40,7 +40,7 @@ ls.favourite = (function ($) {
params[this.options.type[type].targetName] = idTarget;
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) {
ls.msg.error(null, result.sMsg);
} else {

View file

@ -97,7 +97,7 @@ ls.vote = (function ($) {
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) {