mirror of
https://github.com/Mibew/tray.git
synced 2025-01-23 02:20:35 +03:00
fixed javascript for demo chat
git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@179 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
parent
6a204b7d78
commit
f0c0293889
@ -85,7 +85,7 @@ Class.inherit( Ajax.ChatThreadUpdater, Ajax.Base, {
|
|||||||
},
|
},
|
||||||
|
|
||||||
updateOptions: function(act) {
|
updateOptions: function(act) {
|
||||||
this._options.parameters = 'act='+act+'&thread=' + (this._options.threadid || -1) +
|
this._options.parameters = 'act='+act+'&thread=' + (this._options.threadid || 0) +
|
||||||
'&token=' + (this._options.token || 0)+
|
'&token=' + (this._options.token || 0)+
|
||||||
'&lastid=' + (this._options.lastid || 0);
|
'&lastid=' + (this._options.lastid || 0);
|
||||||
if( this._options.user )
|
if( this._options.user )
|
||||||
@ -151,7 +151,7 @@ Class.inherit( Ajax.ChatThreadUpdater, Ajax.Base, {
|
|||||||
|
|
||||||
changeName: function(newname) {
|
changeName: function(newname) {
|
||||||
this.skipNextsound = true;
|
this.skipNextsound = true;
|
||||||
new Ajax.Request(this._options.servl, {parameters:'act=rename&thread=' + (this._options.threadid || -1) +
|
new Ajax.Request(this._options.servl, {parameters:'act=rename&thread=' + (this._options.threadid || 0) +
|
||||||
'&token=' + (this._options.token || 0) + '&name=' + encodeURIComponent(newname)});
|
'&token=' + (this._options.token || 0) + '&name=' + encodeURIComponent(newname)});
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -165,7 +165,7 @@ Class.inherit( Ajax.ChatThreadUpdater, Ajax.Base, {
|
|||||||
},
|
},
|
||||||
|
|
||||||
closeThread: function() {
|
closeThread: function() {
|
||||||
var _params = 'act=close&thread=' + (this._options.threadid || -1) + '&token=' + (this._options.token || 0);
|
var _params = 'act=close&thread=' + (this._options.threadid || 0) + '&token=' + (this._options.token || 0);
|
||||||
if( this._options.user )
|
if( this._options.user )
|
||||||
_params += "&user=true";
|
_params += "&user=true";
|
||||||
new Ajax.Request(this._options.servl, {parameters:_params, onComplete: this.onThreadClosed.bind(this)});
|
new Ajax.Request(this._options.servl, {parameters:_params, onComplete: this.onThreadClosed.bind(this)});
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user