Browse Source

- Merge with nodpounod

pull/16/head
Jaussoin Timothée 11 years ago
parent
commit
5fbb06f8d4
  1. 11
      app/widgets/Contact/Contact.php
  2. 4
      app/widgets/Roster/Roster.php
  3. 8
      app/widgets/Roster/roster.js

11
app/widgets/Contact/Contact.php

@ -108,10 +108,13 @@ class Contact extends WidgetCommon
if($jid == null) {
$cd = new \modl\ContactDAO();
$users = $cd->getAllPublic();
$view = $this->tpl();
$view->assign('users', array_reverse($users));
return $view->draw('_contact_explore', true);
if($users != null){
$view = $this->tpl();
$view->assign('users', array_reverse($users));
return $view->draw('_contact_explore', true);
} else {
return '';
}
} else {
$view = $this->tpl();
$view->assign('jid', $jid);

4
app/widgets/Roster/Roster.php

@ -72,6 +72,10 @@ class Roster extends WidgetBase
if($c->groupname == '')
$c->groupname = $this->__('roster.ungrouped');
else{
$c->groupname = htmlspecialchars_decode($c->groupname);
}
$c->rostername = htmlspecialchars_decode($c->rostername);
$ac = $c->toRoster();
$this->prepareContact($ac, $c, $this->getCaps());

8
app/widgets/Roster/roster.js

@ -79,8 +79,11 @@
&& !($scope.lookupjid[list.jid].ajiditems.groupname == list.groupname)){
/* Kill jid from old location or whole group if it's the only jid */
oldgroupname = $scope.lookupjid[list.jid].ajiditems.groupname;
if($scope.lookupgroups[oldgroupname].agroupitems.length == 1)
if($scope.lookupgroups[oldgroupname].agroupitems.length == 1){
$scope.lookupgroups[oldgroupname].tombstone = true;
/*Remove group from localStorage*/
delete $scope.lsGroupState['rosterGroup_'+oldgroupname];
}
else{
$scope.lookupjid[list.jid].tombstone = true;
}
@ -189,8 +192,7 @@ window.onunload = window.onbeforeunload = function(e){
}
*/
// Move this to disconnection moment ??
// Keep group states in jid_Roster.groupStates
// Update real localstorage
angular.element(roster).scope().lsRoster.groupState = angular.element(roster).scope().lsGroupState;
//angular.element(roster).scope().lsRoster.offlineShown = angular.element(rostermenu).scope().lsOfflineShown;
localStorage.setObject(lsjid + "_Roster", angular.element(roster).scope().lsRoster);

Loading…
Cancel
Save