Commit 1a20719b9d947b8ffa250fe70dfc128c4797ea03

Authored by OpenWapp Developer

Merge branch 'issue120' of /home/git/repositories/openwapp/openwapp

Showing 6 changed files

app/images/frame_contact_read.png View file @ 1a20719

1.6 KB

app/images/frame_contact_unread.png View file @ 1a20719

1.62 KB

app/scripts/templates/mini-conversation.hbs View file @ 1a20719
... ... @@ -2,8 +2,6 @@
2 2 data-conversation-id="{{id}}" data-conversation-name="{{title}}"
3 3 {{#if isGroup}}data-is-group="true"{{/if}}>
4 4 <a href="#" class="{{#if isGroup}}group{{/if}}">
5   - <aside class="avatar">
6   - </aside>
7 5 <dl>
8 6 <dt class="name">Name</dt>
9 7 <dd class="name">{{title}}</dd>
10 8  
... ... @@ -11,8 +9,11 @@
11 9 <dd
12 10 class="event {{lastMessageType}} {{#if isRead}}read{{else}}unread{{/if}}">
13 11 {{lastMessage}}</dd>
  12 + <dt class="time">Time</dt>
  13 + <dd class="time"><time>{{formattedMessageDate date}}</time></dd>
14 14 </dl>
15   - <p><time>{{formattedMessageDate date}}</time></p>
  15 + <aside class="avatar">
  16 + </aside>
16 17 </a>
17 18 </li>
app/scripts/views/contact-photo.js View file @ 1a20719
... ... @@ -7,8 +7,6 @@
7 7 ], function (Backbone, $, global, contactModel, templates) {
8 8 'use strict';
9 9 var Contacts = Backbone.View.extend({
10   - tagName: 'img',
11   -
12 10 template: templates['contact-photo'],
13 11  
14 12 model: contactModel,
15 13  
16 14  
... ... @@ -23,15 +21,18 @@
23 21  
24 22 _updatePicture: function () {
25 23 this._makeURL();
26   - this.$el.html(this.template({
  24 + var newElement = this.template({
27 25 photoURL: this.photoURL
28   - }));
29   - var _this = this;
  26 + });
  27 + if (this.$el) {
  28 + this.$el.replaceWith(newElement);
  29 + }
  30 + this.setElement(newElement);
30 31  
31 32 // Revoke the URL as the image data is already loaded by the image.
32   - this.$el.find('img')[0].onload = function () {
33   - _this._clear();
34   - };
  33 + this.el.onload = function () {
  34 + this._clear();
  35 + }.bind(this);
35 36 },
36 37  
37 38 _makeURL: function () {
app/styles/_common.sass View file @ 1a20719
... ... @@ -32,10 +32,7 @@
32 32  
33 33 @mixin common-row
34 34 +ellipsis-overflow
35   - background: #f2f2f2
36   - border-top: 0.1rem solid #fff
37   - border-bottom: 0.1rem solid #dadada
38   - color: #3d3d3d
  35 + background: #fff
39 36 font-size: 1.7rem
40 37 line-height: 3.2rem
41 38  
... ... @@ -87,18 +84,6 @@
87 84 img
88 85 width: $avatar-size
89 86 height: $avatar-size
90   - &:before
91   - content: ''
92   - position: absolute
93   - top: 0
94   - left: 0
95   - display: block
96   - width: $avatar-size
97   - height: $avatar-size
98   - z-index: 1
99   - background-position: top left
100   - background-repeat: no-repeat
101   - +background-size($avatar-size $avatar-size)
102 87  
103 88 dl
104 89 +vertical-aligned
app/styles/_inbox.sass View file @ 1a20719
... ... @@ -11,7 +11,7 @@
11 11  
12 12 #inbox .legend
13 13 +inbox-header
14   - background: #f2f2f2
  14 + background: #fff
15 15 text-transform: capitalize
16 16  
17 17 #inbox section.conversation-list
18 18  
19 19  
20 20  
21 21  
22 22  
23 23  
24 24  
25 25  
... ... @@ -42,34 +42,38 @@
42 42 line-height: 1.5rem
43 43 text-align: right
44 44 a
45   - padding: 0.7rem 1.3rem 0.7rem 0.7rem
  45 + white-space: nowrap
46 46 &:active
47 47 background-color: #cbf1fa
48 48 aside:before
49 49 background-image: url(/images/frame_contact_active.png)
50   - &.group
  50 + &.group dd.event
51 51 background-repeat: no-repeat
52 52 background-image: url(/images/shared/headers/images/icons/group.png)
53   - background-position: center right 1rem
54   - @include respond-to(peak)
55   - background-image: url(/images/shared/headers/icon/group2x.png)
  53 + background-position: center left
  54 + background-size: auto 100%
  55 + padding-left: 3rem
56 56 aside
57   - margin-right: 0.5rem
58   - &:before
59   - background-image: url(/images/frame_contact_read.png)
  57 + vertical-align: middle
  58 + display: inline-block
  59 + aside img
  60 + border-radius: 50%
60 61 dl
61   - width: -moz-calc(100% - 8rem) // 100% - (5 + 2)rem
62   - width: -webkit-calc(100% - 8rem) // 100% - (5 + 2)rem
  62 + vertical-align: middle
  63 + display: inline-block
  64 + width: calc(100% - 9.4rem) // 100% - (5 + 2)rem
  65 + padding-left: 1.4rem
  66 + padding-top: 0.7rem
  67 + padding-bottom: 0.7rem
  68 + border-bottom: 0.2rem solid #efefef
63 69 dd
  70 + font-size: 1.4rem
  71 + line-height: 2.2rem
64 72 &.name
  73 + font-weight: bold
  74 + color: #4c4c4c
65 75 font-size: 1.7rem
66   - line-height: 2rem
67 76 &.event
68   - font-size: 1.4rem
69   - line-height: 3rem
70   - padding-top: 0.5rem
71   - color: #646464
72   - max-height: 3rem
73 77 padding-right: 3rem
74 78 &.text
75 79 +message-icon(message)