| 24 | | JsHttpRequest.query( |
| 25 | | 'POST '+aRouter['talk']+'ajaxdeletetalkuser/', |
| 26 | | { idTarget:idTarget,idTalk:idTalk, security_ls_key: LIVESTREET_SECURITY_KEY }, |
| 27 | | function(result, errors) { |
| 28 | | if (!result) { |
| | 24 | new Request.JSON({ |
| | 25 | url: aRouter['talk']+'ajaxdeletetalkuser/', |
| | 26 | noCache: true, |
| | 27 | data: { idTarget:idTarget,idTalk:idTalk, security_ls_key: LIVESTREET_SECURITY_KEY }, |
| | 28 | onSuccess: function(result){ |
| | 29 | if (!result) { |
| 75 | | JsHttpRequest.query( |
| 76 | | 'POST '+aRouter['talk']+'ajaxaddtalkuser/', |
| 77 | | { users: sUsers, idTalk: idTalk, security_ls_key: LIVESTREET_SECURITY_KEY }, |
| 78 | | function(result, errors) { |
| 79 | | if (!result) { |
| 80 | | msgErrorBox.alert('Error','Please try again later'); |
| 81 | | } |
| 82 | | if (result.bStateError) { |
| 83 | | msgErrorBox.alert(result.sMsgTitle,result.sMsg); |
| 84 | | } else { |
| 85 | | var aUsers = result.aUsers; |
| 86 | | aUsers.each(function(item,index) { |
| 87 | | if(item.bStateError){ |
| 88 | | msgErrorBox.alert(item.sMsgTitle, item.sMsg); |
| 89 | | } else { |
| 90 | | addListItem(item.sUserId,item.sUserLogin,item.sUserLink,idTalk); |
| 91 | | } |
| 92 | | }); |
| 93 | | } |
| 94 | | }, |
| 95 | | true |
| 96 | | ); |
| | 77 | new Request.JSON({ |
| | 78 | url: aRouter['talk']+'ajaxaddtalkuser/', |
| | 79 | noCache: true, |
| | 80 | data: { users: sUsers, idTalk: idTalk, security_ls_key: LIVESTREET_SECURITY_KEY }, |
| | 81 | onSuccess: function(result){ |
| | 82 | if (!result) { |
| | 83 | msgErrorBox.alert('Error','Please try again later'); |
| | 84 | } |
| | 85 | if (result.bStateError) { |
| | 86 | msgErrorBox.alert(result.sMsgTitle,result.sMsg); |
| | 87 | } else { |
| | 88 | var aUsers = result.aUsers; |
| | 89 | aUsers.each(function(item,index) { |
| | 90 | if(item.bStateError){ |
| | 91 | msgErrorBox.alert(item.sMsgTitle, item.sMsg); |
| | 92 | } else { |
| | 93 | addListItem(item.sUserId,item.sUserLogin,item.sUserLink,idTalk); |
| | 94 | } |
| | 95 | }); |
| | 96 | } |
| | 97 | }, |
| | 98 | onFailure: function(){ |
| | 99 | msgErrorBox.alert('Error','Please try again later'); |
| | 100 | } |
| | 101 | }).send(); |