| 26 | | JsHttpRequest.query( |
| 27 | | 'POST '+aRouter['talk']+'ajaxdeletetalkuser/', |
| 28 | | { idTarget:idTarget,idTalk:idTalk, security_ls_key: LIVESTREET_SECURITY_KEY }, |
| 29 | | function(result, errors) { |
| 30 | | if (!result) { |
| 31 | | msgErrorBox.alert('Error','Please try again later'); |
| 32 | | element.getParent().fade(1); |
| 33 | | } |
| 34 | | if (result.bStateError) { |
| 35 | | msgErrorBox.alert(result.sMsgTitle,result.sMsg); |
| 36 | | element.getParent().fade(1); |
| 37 | | } else { |
| 38 | | element.getParent('li').destroy(); |
| 39 | | } |
| 40 | | }, |
| 41 | | true |
| 42 | | ); |
| 43 | | |
| | 26 | new Request.JSON({ |
| | 27 | url: aRouter['talk']+'ajaxdeletetalkuser/', |
| | 28 | noCache: true, |
| | 29 | data: { idTarget:idTarget,idTalk:idTalk, security_ls_key: LIVESTREET_SECURITY_KEY }, |
| | 30 | onSuccess: function(result){ |
| | 31 | if (!result) { |
| | 32 | msgErrorBox.alert('Error','Please try again later'); |
| | 33 | element.getParent().fade(1); |
| | 34 | } |
| | 35 | if (result.bStateError) { |
| | 36 | msgErrorBox.alert(result.sMsgTitle,result.sMsg); |
| | 37 | element.getParent().fade(1); |
| | 38 | } else { |
| | 39 | element.getParent('li').destroy(); |
| | 40 | } |
| | 41 | }, |
| | 42 | onFailure: function(){ |
| | 43 | msgErrorBox.alert('Error','Please try again later'); |
| | 44 | } |
| | 45 | }).send(); |
| 77 | | JsHttpRequest.query( |
| 78 | | 'POST '+aRouter['talk']+'ajaxaddtalkuser/', |
| 79 | | { users: sUsers, idTalk: idTalk, security_ls_key: LIVESTREET_SECURITY_KEY }, |
| 80 | | function(result, errors) { |
| 81 | | if (!result) { |
| 82 | | msgErrorBox.alert('Error','Please try again later'); |
| 83 | | } |
| 84 | | if (result.bStateError) { |
| 85 | | msgErrorBox.alert(result.sMsgTitle,result.sMsg); |
| 86 | | } else { |
| 87 | | var aUsers = result.aUsers; |
| 88 | | aUsers.each(function(item,index) { |
| 89 | | if(item.bStateError){ |
| 90 | | msgErrorBox.alert(item.sMsgTitle, item.sMsg); |
| 91 | | } else { |
| 92 | | addListItem(item.sUserId,item.sUserLogin,item.sUserLink,idTalk); |
| 93 | | } |
| 94 | | }); |
| 95 | | } |
| 96 | | }, |
| 97 | | true |
| 98 | | ); |
| | 79 | |
| | 80 | new Request.JSON({ |
| | 81 | url: aRouter['talk']+'ajaxaddtalkuser/', |
| | 82 | noCache: true, |
| | 83 | data: { users: sUsers, idTalk: idTalk, security_ls_key: LIVESTREET_SECURITY_KEY }, |
| | 84 | onSuccess: function(result){ |
| | 85 | if (!result) { |
| | 86 | msgErrorBox.alert('Error','Please try again later'); |
| | 87 | } |
| | 88 | if (result.bStateError) { |
| | 89 | msgErrorBox.alert(result.sMsgTitle,result.sMsg); |
| | 90 | } else { |
| | 91 | var aUsers = result.aUsers; |
| | 92 | aUsers.each(function(item,index) { |
| | 93 | if(item.bStateError){ |
| | 94 | msgErrorBox.alert(item.sMsgTitle, item.sMsg); |
| | 95 | } else { |
| | 96 | addListItem(item.sUserId,item.sUserLogin,item.sUserLink,idTalk); |
| | 97 | } |
| | 98 | }); |
| | 99 | } |
| | 100 | }, |
| | 101 | onFailure: function(){ |
| | 102 | msgErrorBox.alert('Error','Please try again later'); |
| | 103 | } |
| | 104 | }).send(); |