Browse Source

- Clean commented code

- Commenting the $loop->tick() in the linker (for the moment)
- Fix UI issues
- Order the getTop ContactDAO method by presence
- Fix some translations in the Vcard4 widget
pull/16/head
Jaussoin Timothée 10 years ago
parent
commit
3a00fef229
  1. 2
      app/models/contact/ContactDAO.php
  2. 2
      app/widgets/Group/_group_posts.tpl
  3. 3
      app/widgets/Roster/locales.ini
  4. 29
      app/widgets/Roster/roster.css
  5. 9
      app/widgets/Roster/roster.tpl
  6. 4
      app/widgets/Vcard4/_vcard4_form.tpl
  7. 8
      linker.php
  8. 1
      themes/material/css/style.css

2
app/models/contact/ContactDAO.php

@ -653,7 +653,7 @@ class ContactDAO extends SQL {
group by jid
) as b on ( a.id = b.id )
) presence on jidfrom = presence.jid
order by count desc
order by presence.value, count desc
limit :tunelenght';
$this->prepare(

2
app/widgets/Group/_group_posts.tpl

@ -83,7 +83,7 @@
{/loop}
{if="$posts != null"}
<ul class="active thick">
<li onclick="Group_ajaxGetHistory('{$server}', '{$node}', {$page+1}); this.parentNode.removeChild(this);">
<li onclick="Group_ajaxGetHistory('{$server}', '{$node}', {$page+1}); this.parentNode.parentNode.removeChild(this.parentNode);">
<span class="icon">
<i class="zmdi zmdi-time-restore"></i>
</span>

3
app/widgets/Roster/locales.ini

@ -5,7 +5,8 @@ hide_disconnected = Hide disconnected contacts
show_group = Show group %s
hide_group = Hide group %s
jid_error = Please enter a valid Jabber ID
no_contacts = No contacts ? You can add one using the + button bellow or going to the Explore page
no_contacts_title = No contacts ?
no_contacts_text = You can add one using the + button bellow
show_hide = Show/Hide
add_contact_info1 = Enter the Jabber ID of your contact.
add_contact_info2 = Press enter to validate.

29
app/widgets/Roster/roster.css

@ -11,7 +11,7 @@
position: relative;
}
#roster ul#rosterlist > div {
#roster ul#rosterlist > div:not(.empty) {
height: 5rem;
overflow: hidden;
}
@ -39,32 +39,9 @@
#roster ul#rosterlist.offlineshown > div.groupshown > li {
display: list-item;
}
/*
#roster ul#rosterlist.offlineshown div.groupshown li:not(:first-child),
#roster ul#rosterlist.offlineshown div li:not(:first-child),
#roster ul#rosterlist div.groupshown li:not(:first-child),
#roster ul#rosterlist div li:not(:first-child) {
display: none;
}
* */
/* Show some clients icons, Xabber style */
/*
#roster ul#rosterlist li.client a {
background-repeat: no-repeat;
background-position: 95% center;
}
#roster ul#rosterlist li.client.adium a { background-image: url(img/clients/adium.png); }
#roster ul#rosterlist li.client.pidgin a { background-image: url(img/clients/pidgin.png); }
#roster ul#rosterlist li.client.gajim a { background-image: url(img/clients/gajim.png); }
#roster ul#rosterlist li.client.telepathy a { background-image: url(img/clients/empathy.png); }
#roster ul#rosterlist li.client.xabber a { background-image: url(img/clients/xabber.png); }
#roster ul#rosterlist li.client.psi a,
#roster ul#rosterlist li.client.psi+ a { background-image: url(img/clients/psi.png); }
*/
/* Chat button */
/*
#roster ul#rosterlist li .chat {
width: 2rem;
height: 2rem;
@ -75,7 +52,7 @@
border-radius: 2em;
background-color: #DDD;
}
*/
/* Search */
#roster ul li.subheader.search,
#roster.search ul#rosterlist div.groupshown > li {

9
app/widgets/Roster/roster.tpl

@ -1,9 +1,10 @@
<div id="roster" ng-controller="RosterController as rosterCtrl">
<ul id="rosterlist" class="{if="isset($conf) && $conf.roster == 'show'"}offlineshown{/if} active all">
<span ng-if="contacts == null" class="nocontacts">
{$c->__('roster.no_contacts')}
</span>
<div ng-if="contacts == null" class="empty placeholder icon contacts">
<h1>{$c->__('roster.no_contacts_title')}</h1>
<h4>{$c->__('roster.no_contacts_text')}</h4>
</div>
<li class="subheader search">{$c->__('roster.results')}</li>
<div id="spinner">

4
app/widgets/Vcard4/_vcard4_form.tpl

@ -178,12 +178,12 @@
class="button color oppose"
id="vcard4validate"
>
{$c->__('vcard.submit')}
{$c->__('button.save')}
</a>
<a
onclick="document.querySelector('#vcard4form').reset();"
class="button flat oppose">
{$c->__('vcard.reset')}
{$c->__('button.reset')}
</a>
</div>
</form>

8
linker.php

@ -72,7 +72,7 @@ $stdin_behaviour = function ($data) use (&$conn, $loop, &$buffer, &$connector, &
$xml = \Moxl\API::commit();
\Moxl\API::clear();
$loop->tick();
//$loop->tick();
if(!empty($xml) && $conn) {
$conn->write(trim($xml));
@ -83,7 +83,7 @@ $stdin_behaviour = function ($data) use (&$conn, $loop, &$buffer, &$connector, &
$buffer .= $data;
}
$loop->tick();
//$loop->tick();
};
$xmpp_behaviour = function (React\Stream\Stream $stream) use (&$conn, $loop, &$stdin, $stdin_behaviour, $parser) {
@ -146,8 +146,8 @@ $xmpp_behaviour = function (React\Stream\Stream $stream) use (&$conn, $loop, &$s
}
// Two ticks to be sure that we get everything from the socket, sic…
$loop->tick();
$loop->tick();
//$loop->tick();
//$loop->tick();
});
$conn->on('error', function($msg) use ($conn, $loop) {

1
themes/material/css/style.css

@ -760,6 +760,7 @@ main section > div:first-child:nth-last-child(2) ~ div .actions.fixed > div:last
.icon.news { background-image: url(../img/icons/receipt.svg); }
.icon.forum { background-image: url(../img/icons/forum.svg); }
.icon.contacts { background-image: url(../img/icons/group.svg); }
.icon.media { background-image: url(../img/placeholder/media.png); }
.icon.explore { background-image: url(../img/placeholder/explore.png); }
.icon.plane { background-image: url(../img/placeholder/plane.png); }

Loading…
Cancel
Save