Commit a54cb3f7d993305ac1df616a49a1bbd051b44003
Committed by
GitHub
Exists in
amadeus_univasf
Merge pull request #575 from amadeusproject/refactoring
Daily Update - 30_09_2017
Showing
7 changed files
with
49 additions
and
9 deletions
Show diff stats
amadeus/static/css/base/amadeus.css
@@ -1297,12 +1297,13 @@ div.dataTables_wrapper div.dataTables_paginate { | @@ -1297,12 +1297,13 @@ div.dataTables_wrapper div.dataTables_paginate { | ||
1297 | /* Chat */ | 1297 | /* Chat */ |
1298 | .participants-group, .talks-group { | 1298 | .participants-group, .talks-group { |
1299 | margin-left: 40px; | 1299 | margin-left: 40px; |
1300 | + margin-right: 5px; | ||
1300 | } | 1301 | } |
1301 | 1302 | ||
1302 | .participant { | 1303 | .participant { |
1303 | margin-bottom: 10px; | 1304 | margin-bottom: 10px; |
1304 | padding-right: 10px; | 1305 | padding-right: 10px; |
1305 | - height: 70px; | 1306 | + min-height: 70px; |
1306 | } | 1307 | } |
1307 | 1308 | ||
1308 | .participant .user-img { | 1309 | .participant .user-img { |
amadeus/static/css/base/amadeus_responsive.css
@@ -209,6 +209,27 @@ | @@ -209,6 +209,27 @@ | ||
209 | .input-group .input-group-btn{ | 209 | .input-group .input-group-btn{ |
210 | padding: 0px; | 210 | padding: 0px; |
211 | } | 211 | } |
212 | + | ||
213 | + .talks-group, .participants-group { | ||
214 | + margin-left: 0px; | ||
215 | + margin-right: 0px; | ||
216 | + } | ||
217 | + | ||
218 | + #chat-modal-info .modal-dialog { | ||
219 | + margin: 0; | ||
220 | + } | ||
221 | + | ||
222 | + #chat-modal-info[style] { | ||
223 | + padding-left: 0px !important; | ||
224 | + } | ||
225 | + | ||
226 | + .talk-filter .checkbox { | ||
227 | + display: inline; | ||
228 | + } | ||
229 | + | ||
230 | + .talk-filter label { | ||
231 | + font-size: 13.2px; | ||
232 | + } | ||
212 | } | 233 | } |
213 | 234 | ||
214 | @media(min-width: 768px) { | 235 | @media(min-width: 768px) { |
amadeus/static/js/chat.js
1 | var new_msgs = {}; | 1 | var new_msgs = {}; |
2 | 2 | ||
3 | +var isMobile = false; //initiate as false | ||
4 | +// device detection | ||
5 | +if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent) | ||
6 | + || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4))) isMobile = true; | ||
7 | + | ||
3 | $(document).on('hidden.bs.modal', '.modal', function () { | 8 | $(document).on('hidden.bs.modal', '.modal', function () { |
4 | $('.modal:visible').length && $(document.body).addClass('modal-open'); //Fixing scroll bar for modals | 9 | $('.modal:visible').length && $(document.body).addClass('modal-open'); //Fixing scroll bar for modals |
5 | }); | 10 | }); |
@@ -463,6 +468,19 @@ function setFiltersSubmitAndPagination() { | @@ -463,6 +468,19 @@ function setFiltersSubmitAndPagination() { | ||
463 | } | 468 | } |
464 | }); | 469 | }); |
465 | }); | 470 | }); |
471 | + | ||
472 | + if (isMobile) { | ||
473 | + var favorite = filters.find("input[name='favorite']"), | ||
474 | + mine = filters.find("input[name='mine']"); | ||
475 | + | ||
476 | + favorite.on('change', function () { | ||
477 | + filters.submit(); | ||
478 | + }); | ||
479 | + | ||
480 | + mine.on('change', function () { | ||
481 | + filters.submit(); | ||
482 | + }); | ||
483 | + } | ||
466 | } | 484 | } |
467 | 485 | ||
468 | function getParticipants(btn) { | 486 | function getParticipants(btn) { |
chat/templates/chat/_view_participant.html
@@ -2,14 +2,14 @@ | @@ -2,14 +2,14 @@ | ||
2 | 2 | ||
3 | {% is_online participant as status %} | 3 | {% is_online participant as status %} |
4 | 4 | ||
5 | -<div class="col-md-12 col-sm-12 participant panel"> | ||
6 | - <div class="col-md-1 col-sm-1 user-img"> | 5 | +<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 participant panel"> |
6 | + <div class="col-md-1 col-sm-1 col-xs-2 user-img"> | ||
7 | <img src="{{ participant.image_url }}" class="img-responsive" /> | 7 | <img src="{{ participant.image_url }}" class="img-responsive" /> |
8 | </div> | 8 | </div> |
9 | - <div class="col-md-4 col-sm-4 user-info"> | 9 | + <div class="col-md-4 col-sm-4 col-xs-10 user-info"> |
10 | <h4><a class="user_{{ participant.id }}_status status {{ status }}" data-toggle="tooltip" title="{{ status|status_text }}"></a> {{ participant }}</h4> | 10 | <h4><a class="user_{{ participant.id }}_status status {{ status }}" data-toggle="tooltip" title="{{ status|status_text }}"></a> {{ participant }}</h4> |
11 | </div> | 11 | </div> |
12 | - <div class="col-md-6 col-sm-6 buttons pull-right text-center"> | 12 | + <div class="col-md-6 col-sm-6 col-xs-12 buttons pull-right text-center"> |
13 | <a href="#" onclick="getModalInfo($(this), '{{ space }}', '{{ space_type }}'); return false;" data-url='{% url "chat:profile" participant.email %}' class="btn btn-raised btn-default">{% trans 'See Profile' %}</a> | 13 | <a href="#" onclick="getModalInfo($(this), '{{ space }}', '{{ space_type }}'); return false;" data-url='{% url "chat:profile" participant.email %}' class="btn btn-raised btn-default">{% trans 'See Profile' %}</a> |
14 | <a href="#" onclick="getModalInfo($(this), '{{ space }}', '{{ space_type }}'); return false;" data-url='{% url "chat:talk" participant.email %}' class="btn btn-raised btn-success">{% trans 'Send Message' %}</a> | 14 | <a href="#" onclick="getModalInfo($(this), '{{ space }}', '{{ space_type }}'); return false;" data-url='{% url "chat:talk" participant.email %}' class="btn btn-raised btn-success">{% trans 'Send Message' %}</a> |
15 | </div> | 15 | </div> |
chat/templates/chat/list.html
@@ -41,7 +41,7 @@ | @@ -41,7 +41,7 @@ | ||
41 | <div class="panel category-panel-content panel-body"> | 41 | <div class="panel category-panel-content panel-body"> |
42 | <h2 class="my-subjects-title"><b>{% trans 'Conversations' %}</b></h2> | 42 | <h2 class="my-subjects-title"><b>{% trans 'Conversations' %}</b></h2> |
43 | 43 | ||
44 | - <div class="talks-group"> | 44 | + <div class="talks-group row"> |
45 | {% for chat in conversations %} | 45 | {% for chat in conversations %} |
46 | {% include 'chat/_view.html' with space="0" space_type='general' %} | 46 | {% include 'chat/_view.html' with space="0" space_type='general' %} |
47 | {% endfor %} | 47 | {% endfor %} |
chat/templates/chat/list_participants.html
@@ -43,7 +43,7 @@ | @@ -43,7 +43,7 @@ | ||
43 | <div class="panel category-panel-content panel-body"> | 43 | <div class="panel category-panel-content panel-body"> |
44 | <h2 class="my-subjects-title"><b>{% trans 'Participants' %}</b></h2> | 44 | <h2 class="my-subjects-title"><b>{% trans 'Participants' %}</b></h2> |
45 | 45 | ||
46 | - <div class="participants-group"> | 46 | + <div class="participants-group row"> |
47 | {% for participant in participants %} | 47 | {% for participant in participants %} |
48 | {% include 'chat/_view_participant.html' with space="0" space_type='general' %} | 48 | {% include 'chat/_view_participant.html' with space="0" space_type='general' %} |
49 | {% endfor %} | 49 | {% endfor %} |
chat/templates/chat/talk.html
@@ -33,8 +33,8 @@ | @@ -33,8 +33,8 @@ | ||
33 | <input name="mine" type="checkbox"> {% trans 'Only my messages' %} | 33 | <input name="mine" type="checkbox"> {% trans 'Only my messages' %} |
34 | </label> | 34 | </label> |
35 | </div> | 35 | </div> |
36 | - <button type="submit" class="btn btn-success btn-sm btn-raised">{% trans 'Filter' %}</button> | ||
37 | - <button type="button" id="clear_filter" class="btn btn-default btn-sm btn-raised clear_filter">{% trans 'Clean Filters' %}</button> | 36 | + <button type="submit" class="hidden-sm hidden-xs btn btn-success btn-sm btn-raised">{% trans 'Filter' %}</button> |
37 | + <button type="button" id="clear_filter" class="hidden-sm hidden-xs btn btn-default btn-sm btn-raised clear_filter">{% trans 'Clean Filters' %}</button> | ||
38 | </form> | 38 | </form> |
39 | </div> | 39 | </div> |
40 | </div> | 40 | </div> |