Browse Source

Correction requested by tonton Etenil

pull/5/head
Jaussoin Timothée 15 years ago
parent
commit
bd574f9727
  1. 8
      lib/Widget.php
  2. 4
      lib/widgets/Chat/Chat.php
  3. 2
      lib/widgets/Config/Config.php
  4. 6
      lib/widgets/Friends/Friends.php

8
lib/Widget.php

@ -90,14 +90,18 @@ class Widget
}
protected function callAjax($funcname, $callback, $target)
{
echo $this->genCallAjax($funcname, $callback, $target);
}
protected function genCallAjax($funcname, $callback, $target)
{
$args = implode(', ', array_slice(func_get_args(), 3));
if($args != "") {
$args = ', ' . $args;
}
return get_class($this) . '_' . $funcname . "($callback, $target" . $args . ");";
}
/**

4
lib/widgets/Chat/Chat.php

@ -85,9 +85,9 @@ class Chat extends Widget
</div>
<div id="chatMessages">
</div>
<input type="text" id="chatInput" value="Message" onfocus="myFocus(this);" onblur="myBlur(this);" onkeypress="if(event.keyCode == 13) {<?php echo $this->callAjax('ajaxSendMessage', 'movim_drop', "'test'", "getDest()", "getMessageText()");?>}"/>
<input type="text" id="chatInput" value="Message" onfocus="myFocus(this);" onblur="myBlur(this);" onkeypress="if(event.keyCode == 13) {<?php $this->callAjax('ajaxSendMessage', 'movim_drop', "'test'", "getDest()", "getMessageText()");?>}"/>
<input type="text" id="chatTo" value="To" onfocus="myFocus(this);" onblur="myBlur(this);" />
<input type="button" id="chatSend" onclick="<?php echo $this->callAjax('ajaxSendMessage', 'movim_drop', "'test'", "getDest()", "getMessageText()");?>" value="<?php echo t('Send');?>"/>
<input type="button" id="chatSend" onclick="<?php $this->callAjax('ajaxSendMessage', 'movim_drop', "'test'", "getDest()", "getMessageText()");?>" value="<?php echo t('Send');?>"/>
</div>
<?php

2
lib/widgets/Config/Config.php

@ -33,7 +33,7 @@ class Config extends Widget
$usr = new User();
$conf = GetConf::getUserConf($usr->getLogin());
$submit = $this->callAjax('ajaxSubmit', "'movim_drop'", "'drop'", "movim_parse_form(document.forms['general'])");
$submit = $this->genCallAjax('ajaxSubmit', "'movim_drop'", "'drop'", "movim_parse_form(document.forms['general'])");
$form = new Form();
$form->startForm(basename($_SERVER['PHP_SELF']), false, false, 'post', 'general');

6
lib/widgets/Friends/Friends.php

@ -107,13 +107,13 @@ class Friends extends Widget
{
?>
<div id="friends">
<div class="config_button" onclick="<?php echo $this->callAjax('ajaxConfig', "'movim_drop'", "'drop'");?>">
<div class="config_button" onclick="<?php $this->callAjax('ajaxConfig', "'movim_drop'", "'drop'");?>">
</div>
<div id="drop" style="display: none;"></div>
<div id="avatar"></div>
<input type="button"
onclick="<?php echo $this->callAjax('ajaxRefreshVcard', "'movim_drop'", "'drop'");?>"
onclick="<?php $this->callAjax('ajaxRefreshVcard', "'movim_drop'", "'drop'");?>"
value="Refresh vcard" />
<h3><?php echo t('Contacts');?></h3>
@ -126,7 +126,7 @@ class Friends extends Widget
<li class="dnd">Do Not Disturb</li>
</ul>
</div>
<input type="button" onclick="<?php echo $this->callAjax('ajaxRefreshRoster', "'movim_drop'", "'drop'");?>"
<input type="button" onclick="<?php $this->callAjax('ajaxRefreshRoster', "'movim_drop'", "'drop'");?>"
value="Refresh Roster" />
<div id="testzone"></div>
</div>

Loading…
Cancel
Save