Commit 3fab47906430167c9b1fb926085bf9d0a8e24611
1 parent
ebb86d65
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
New chat layout
Showing
11 changed files
with
348 additions
and
307 deletions
Show diff stats
app/controllers/public/chat_controller.rb
@@ -25,12 +25,12 @@ class ChatController < PublicController | @@ -25,12 +25,12 @@ class ChatController < PublicController | ||
25 | end | 25 | end |
26 | 26 | ||
27 | def index | 27 | def index |
28 | - presence = current_user.last_chat_status | ||
29 | - if presence.blank? or presence == 'chat' | ||
30 | - render :action => 'auto_connect_online' | ||
31 | - else | ||
32 | - render :action => 'auto_connect_busy' | ||
33 | - end | 28 | + #presence = current_user.last_chat_status |
29 | + #if presence.blank? or presence == 'chat' | ||
30 | + # render :action => 'auto_connect_online' | ||
31 | + #else | ||
32 | + # render :action => 'auto_connect_busy' | ||
33 | + #end | ||
34 | end | 34 | end |
35 | 35 | ||
36 | def update_presence_status | 36 | def update_presence_status |
app/helpers/layout_helper.rb
@@ -27,6 +27,7 @@ module LayoutHelper | @@ -27,6 +27,7 @@ module LayoutHelper | ||
27 | 'thickbox', | 27 | 'thickbox', |
28 | 'lightbox', | 28 | 'lightbox', |
29 | 'colorbox', | 29 | 'colorbox', |
30 | + 'chat', | ||
30 | pngfix_stylesheet_path, | 31 | pngfix_stylesheet_path, |
31 | ] + tokeninput_stylesheets | 32 | ] + tokeninput_stylesheets |
32 | plugins_stylesheets = @plugins.select(&:stylesheet?).map { |plugin| plugin.class.public_path('style.css') } | 33 | plugins_stylesheets = @plugins.select(&:stylesheet?).map { |plugin| plugin.class.public_path('style.css') } |
@@ -0,0 +1,70 @@ | @@ -0,0 +1,70 @@ | ||
1 | + <%= javascript_include_tag 'strophejs-1.0.1/strophe', 'jquery.emoticon', '../designs/icons/pidgin/emoticons.js', 'ba-linkify', 'jquery.ba-hashchange', 'jquery.sound', 'chat', 'perfect-scrollbar.min.js', 'perfect-scrollbar.with-mousewheel.min.js', :cache => 'cache/chat' %> | ||
2 | + <%= stylesheet_link_tag 'perfect-scrollbar.min.css' %> | ||
3 | + | ||
4 | + <% extend ChatHelper %> | ||
5 | + | ||
6 | + <script type='text/javascript'> | ||
7 | + var $presence_status_label = { | ||
8 | + chat: '<%= _('Online') %>', | ||
9 | + dnd: '<%= _('Busy') %>', | ||
10 | + '': '<%= _('Offline') %>' | ||
11 | + }; | ||
12 | + var $own_name = '<%= user.name %>'; | ||
13 | + var $starting_chat_notice = '<%= _("starting chat with %{name}") %>'; | ||
14 | + var $muc_domain = '<%= "conference.#{environment.default_hostname}" %>'; | ||
15 | + var $user_unavailable_error = '<%= _("<strong>ooops!</strong> The message could not be sent because the user is not online") %>'; | ||
16 | + var $update_presence_status_every = <%= User.expires_chat_status_every.minutes %>; | ||
17 | + </script> | ||
18 | + | ||
19 | + <div id='chat'> | ||
20 | + <div id='title-bar'> | ||
21 | + <h1 class='title'><%= _("Online") % h(page_title) %> (<span id='friends-online'>0</span>)</h1> | ||
22 | + </div> | ||
23 | + <div id='buddy-list'> | ||
24 | + <div class='toolbar'> | ||
25 | + <div id='user-status'><%= user_status_menu('icon-menu-offline', _('Offline')) %></div> | ||
26 | + <div class='dialog-error' style='display: none'></div> | ||
27 | + </div> | ||
28 | + <ul class='buddy-list'> | ||
29 | + </ul> | ||
30 | + </div> | ||
31 | + <div id='chat-window' class='tabs-bottom'> | ||
32 | + <div id='tabs'> | ||
33 | + <ul> | ||
34 | + </ul> | ||
35 | + </div> | ||
36 | + </div> | ||
37 | + | ||
38 | + <div id="chat-templates"> | ||
39 | + <div class='conversation'> | ||
40 | + <a href="#" class="back"><%= _('Back') %></a> | ||
41 | + <div class='history'></div> | ||
42 | + <div class='input-div'> | ||
43 | + <div class='icon-chat'></div> | ||
44 | + <textarea class='input'></textarea> | ||
45 | + </div> | ||
46 | + </div> | ||
47 | + | ||
48 | + <div class="buddy-item"> | ||
49 | + <li class='%{presence_status}'> | ||
50 | + <a id='%{jid_id}' class='icon-menu-%{presence_status}-11' href='#'> | ||
51 | + <img class="avatar" src="%{avatar_url}"/> | ||
52 | + <span class="name">%{name}<span> | ||
53 | + </a> | ||
54 | + </li> | ||
55 | + </div> | ||
56 | + | ||
57 | + <div class="message"> | ||
58 | + <div data-who="%{who}" class="message %{who}"> | ||
59 | + <div class="author"> | ||
60 | + <img class="avatar" src="%{avatar_url}"/> | ||
61 | + <h5 class="%{who}-name">%{name}</h5> | ||
62 | + </div> | ||
63 | + <div class="content"> | ||
64 | + <span class="time">%{time}</span> | ||
65 | + <p>%{message}</p> | ||
66 | + </div> | ||
67 | + </div> | ||
68 | + </div> | ||
69 | + </div> | ||
70 | + </div> |
app/views/layouts/application-ng.html.erb
@@ -88,5 +88,6 @@ | @@ -88,5 +88,6 @@ | ||
88 | if content.respond_to?(:call) then instance_exec(&content).html_safe else content.html_safe end | 88 | if content.respond_to?(:call) then instance_exec(&content).html_safe else content.html_safe end |
89 | end.join("\n") | 89 | end.join("\n") |
90 | %> | 90 | %> |
91 | + <%= render :file => 'chat/index' if logged_in? %> | ||
91 | </body> | 92 | </body> |
92 | </html> | 93 | </html> |
public/javascripts/application.js
@@ -599,9 +599,7 @@ function display_notice(message) { | @@ -599,9 +599,7 @@ function display_notice(message) { | ||
599 | } | 599 | } |
600 | 600 | ||
601 | function open_chat_window(self_link, anchor) { | 601 | function open_chat_window(self_link, anchor) { |
602 | - anchor = anchor || '#'; | ||
603 | - var noosfero_chat_window = window.open('/chat' + anchor,'noosfero_chat','width=900,height=500'); | ||
604 | - noosfero_chat_window.focus(); | 602 | + jQuery('#chat').toggle('fast'); |
605 | return false; | 603 | return false; |
606 | } | 604 | } |
607 | 605 |
public/javascripts/chat.js
@@ -20,7 +20,7 @@ jQuery(function($) { | @@ -20,7 +20,7 @@ jQuery(function($) { | ||
20 | var Jabber = { | 20 | var Jabber = { |
21 | debug: true, | 21 | debug: true, |
22 | connection: null, | 22 | connection: null, |
23 | - bosh_service: '/http-bind', | 23 | + bosh_service: 'http://10.32.113.131/http-bind', |
24 | muc_domain: $muc_domain, | 24 | muc_domain: $muc_domain, |
25 | muc_supported: false, | 25 | muc_supported: false, |
26 | presence_status: '', | 26 | presence_status: '', |
@@ -30,10 +30,8 @@ jQuery(function($) { | @@ -30,10 +30,8 @@ jQuery(function($) { | ||
30 | rooms: {}, | 30 | rooms: {}, |
31 | 31 | ||
32 | templates: { | 32 | templates: { |
33 | - buddy_item: "<li class='%{presence_status}'><a id='%{jid_id}' class='icon-menu-%{presence_status}-11' href='#'>%{name}</a></li>", | ||
34 | occupant_item: "<li class='%{presence_status}'><a data-id='%{jid_id}' class='icon-menu-%{presence_status}-11' href='#'>%{name}</a></li>", | 33 | occupant_item: "<li class='%{presence_status}'><a data-id='%{jid_id}' class='icon-menu-%{presence_status}-11' href='#'>%{name}</a></li>", |
35 | room_item: "<li class='room'><a id='%{jid_id}' class='icon-chat' href='#'>%{name}</a></li>", | 34 | room_item: "<li class='room'><a id='%{jid_id}' class='icon-chat' href='#'>%{name}</a></li>", |
36 | - message: $balloon_template, | ||
37 | error: "<span class='error'>%{text}</span>", | 35 | error: "<span class='error'>%{text}</span>", |
38 | occupant_list: "<div class='occupant-list'><ul class='occupant-list'></ul></div>" | 36 | occupant_list: "<div class='occupant-list'><ul class='occupant-list'></ul></div>" |
39 | }, | 37 | }, |
@@ -58,9 +56,11 @@ jQuery(function($) { | @@ -58,9 +56,11 @@ jQuery(function($) { | ||
58 | 56 | ||
59 | insert_or_update_user: function (list, item, jid, name, presence, template) { | 57 | insert_or_update_user: function (list, item, jid, name, presence, template) { |
60 | var jid_id = Jabber.jid_to_id(jid); | 58 | var jid_id = Jabber.jid_to_id(jid); |
59 | + var identifier = Strophe.getNodeFromJid(jid); | ||
61 | var html = template | 60 | var html = template |
62 | .replace('%{jid_id}', jid_id) | 61 | .replace('%{jid_id}', jid_id) |
63 | .replace(/%{presence_status}/g, presence) | 62 | .replace(/%{presence_status}/g, presence) |
63 | + .replace('%{avatar_url}', '/chat/avatar/' + identifier) | ||
64 | .replace('%{name}', name); | 64 | .replace('%{name}', name); |
65 | if ($(item).length > 0) { | 65 | if ($(item).length > 0) { |
66 | $(item).parent('li').replaceWith(html); | 66 | $(item).parent('li').replaceWith(html); |
@@ -75,7 +75,7 @@ jQuery(function($) { | @@ -75,7 +75,7 @@ jQuery(function($) { | ||
75 | var item = $('#' + jid_id); | 75 | var item = $('#' + jid_id); |
76 | presence = presence || ($(item).length > 0 ? $(item).parent('li').attr('class') : 'offline'); | 76 | presence = presence || ($(item).length > 0 ? $(item).parent('li').attr('class') : 'offline'); |
77 | log('adding or updating contact ' + jid + ' as ' + presence); | 77 | log('adding or updating contact ' + jid + ' as ' + presence); |
78 | - Jabber.insert_or_update_user(list, item, jid, name, presence, Jabber.templates.buddy_item); | 78 | + Jabber.insert_or_update_user(list, item, jid, name, presence, $('#chat #chat-templates .buddy-item').clone().html()); |
79 | $("#chat-window .tab a[href='#"+ Jabber.tab_prefix + jid_id +"']") | 79 | $("#chat-window .tab a[href='#"+ Jabber.tab_prefix + jid_id +"']") |
80 | .removeClass() | 80 | .removeClass() |
81 | .addClass('icon-menu-' + presence + '-11'); | 81 | .addClass('icon-menu-' + presence + '-11'); |
@@ -115,12 +115,12 @@ jQuery(function($) { | @@ -115,12 +115,12 @@ jQuery(function($) { | ||
115 | var jid_id = Jabber.jid_to_id(jid); | 115 | var jid_id = Jabber.jid_to_id(jid); |
116 | var tab_id = '#' + Jabber.tab_prefix + jid_id; | 116 | var tab_id = '#' + Jabber.tab_prefix + jid_id; |
117 | if ($(tab_id).find('.message').length > 0 && $(tab_id).find('.message:last').attr('data-who') == who) { | 117 | if ($(tab_id).find('.message').length > 0 && $(tab_id).find('.message:last').attr('data-who') == who) { |
118 | - $(tab_id).find('.history').find('.message:last .comment-balloon-content').append('<p>' + body + '</p>'); | 118 | + $(tab_id).find('.history').find('.message:last .content').append('<p>' + body + '</p>'); |
119 | } | 119 | } |
120 | else { | 120 | else { |
121 | var time = new Date(); | 121 | var time = new Date(); |
122 | time = time.getHours() + ':' + checkTime(time.getMinutes()); | 122 | time = time.getHours() + ':' + checkTime(time.getMinutes()); |
123 | - var message_html = Jabber.templates.message | 123 | + var message_html = $('#chat #chat-templates .message').clone().html() |
124 | .replace('%{message}', body) | 124 | .replace('%{message}', body) |
125 | .replace(/%{who}/g, who) | 125 | .replace(/%{who}/g, who) |
126 | .replace('%{time}', time) | 126 | .replace('%{time}', time) |
@@ -189,14 +189,14 @@ jQuery(function($) { | @@ -189,14 +189,14 @@ jQuery(function($) { | ||
189 | Jabber.update_chat_title(); | 189 | Jabber.update_chat_title(); |
190 | $('#chat-window .tab a').removeClass().addClass('icon-menu-offline-11'); | 190 | $('#chat-window .tab a').removeClass().addClass('icon-menu-offline-11'); |
191 | $('#buddy-list .toolbar').removeClass('small-loading-dark'); | 191 | $('#buddy-list .toolbar').removeClass('small-loading-dark'); |
192 | - $('textarea').attr('disabled', 'disabled'); | 192 | + $('textarea').prop('disabled', 'disabled'); |
193 | break; | 193 | break; |
194 | case Strophe.Status.CONNECTED: | 194 | case Strophe.Status.CONNECTED: |
195 | log('connected'); | 195 | log('connected'); |
196 | case Strophe.Status.ATTACHED: | 196 | case Strophe.Status.ATTACHED: |
197 | log('XMPP/BOSH session attached'); | 197 | log('XMPP/BOSH session attached'); |
198 | $('#buddy-list .toolbar').removeClass('small-loading-dark'); | 198 | $('#buddy-list .toolbar').removeClass('small-loading-dark'); |
199 | - $('textarea').attr('disabled', ''); | 199 | + $('textarea').prop('disabled', ''); |
200 | break; | 200 | break; |
201 | } | 201 | } |
202 | }, | 202 | }, |
@@ -526,11 +526,17 @@ jQuery(function($) { | @@ -526,11 +526,17 @@ jQuery(function($) { | ||
526 | $('.conversation textarea:visible').focus(); | 526 | $('.conversation textarea:visible').focus(); |
527 | }); | 527 | }); |
528 | 528 | ||
529 | + $('.conversation .back').live('click', function() { | ||
530 | + $(this).parents('.conversation').hide(); | ||
531 | + }); | ||
532 | + | ||
529 | function create_conversation_tab(title, jid_id) { | 533 | function create_conversation_tab(title, jid_id) { |
530 | - if (! $('#' + Jabber.tab_prefix + jid_id).length > 0) { | 534 | + var conversation_id = Jabber.tab_prefix + jid_id; |
535 | + if (! $('#' + conversation_id).length > 0) { | ||
531 | // opening chat with selected online friend | 536 | // opening chat with selected online friend |
532 | - var panel = $('<div id="'+Jabber.tab_prefix + jid_id+'"></div>').appendTo($tabs); | ||
533 | - panel.append("<div class='conversation'><div class='history'></div><div class='input-div'><div class='icon-chat'></div><textarea class='input'></textarea></div></div>"); | 537 | + var panel = $('<div id="'+conversation_id +'"></div>').appendTo($tabs); |
538 | + panel.append($('#chat #chat-templates .conversation').clone()); | ||
539 | + $('#chat .history').perfectScrollbar(); | ||
534 | 540 | ||
535 | //FIXME | 541 | //FIXME |
536 | //var notice = $starting_chat_notice.replace('%{name}', $(ui.tab).html()); | 542 | //var notice = $starting_chat_notice.replace('%{name}', $(ui.tab).html()); |
@@ -545,11 +551,12 @@ jQuery(function($) { | @@ -545,11 +551,12 @@ jQuery(function($) { | ||
545 | } | 551 | } |
546 | 552 | ||
547 | $tabs.find('.ui-tabs-nav').append( "<li><a href='"+('#' + Jabber.tab_prefix + jid_id)+"'><span class=\"unread-messages\" style=\"display:none\"></span>"+title+"</a></li>" ); | 553 | $tabs.find('.ui-tabs-nav').append( "<li><a href='"+('#' + Jabber.tab_prefix + jid_id)+"'><span class=\"unread-messages\" style=\"display:none\"></span>"+title+"</a></li>" ); |
548 | - $tabs.tabs('refresh'); | ||
549 | 554 | ||
550 | var jid = Jabber.jid_of(jid_id); | 555 | var jid = Jabber.jid_of(jid_id); |
551 | $("a[href='#" + Jabber.tab_prefix + jid_id + "']").addClass($('#' + jid_id).attr('class') || 'icon-chat'); | 556 | $("a[href='#" + Jabber.tab_prefix + jid_id + "']").addClass($('#' + jid_id).attr('class') || 'icon-chat'); |
552 | $('#' + Jabber.tab_prefix + jid_id).find('textarea').attr('data-to', jid); | 557 | $('#' + Jabber.tab_prefix + jid_id).find('textarea').attr('data-to', jid); |
558 | + } else { | ||
559 | + $('#' + conversation_id).find('.conversation').show(); | ||
553 | } | 560 | } |
554 | } | 561 | } |
555 | 562 | ||
@@ -568,78 +575,7 @@ jQuery(function($) { | @@ -568,78 +575,7 @@ jQuery(function($) { | ||
568 | } | 575 | } |
569 | 576 | ||
570 | // creating tabs | 577 | // creating tabs |
571 | - var $tabs = $('#chat-window #tabs').tabs({ | ||
572 | - tabTemplate: '<li class="tab"><a href="#{href}"><span class="unread-messages" style="display:none"></span>#{label}</a></li>', | ||
573 | - panelTemplate: "<div class='conversation'><div class='history'></div><div class='input-div'><div class='icon-chat'></div><textarea class='input'></textarea></div></div>", | ||
574 | - add: function(event, ui) { //FIXME DEPRECATED | ||
575 | - var jid_id = ui.panel.id.replace(Jabber.tab_prefix, ''); | ||
576 | - | ||
577 | - var notice = $starting_chat_notice.replace('%{name}', $(ui.tab).html()); | ||
578 | - Jabber.show_notice(jid_id, notice); | ||
579 | - | ||
580 | - // define textarea name as '<TAB_ID>' | ||
581 | - $(ui.panel).find('textarea').attr('name', ui.panel.id); | ||
582 | - | ||
583 | - if (Jabber.is_a_room(jid_id)) { | ||
584 | - $(ui.panel).append(Jabber.templates.occupant_list); | ||
585 | - $(ui.panel).find('.history').addClass('room'); | ||
586 | - } | ||
587 | - }, | ||
588 | - show: function(event, ui) { | ||
589 | - $(ui.panel).find('.history').scrollTo({top:'100%', left:'0%'}); | ||
590 | - $(ui.panel).find('textarea').focus(); | ||
591 | - var jid_id = ui.panel.id.replace(Jabber.tab_prefix, ''); | ||
592 | - count_unread_messages(jid_id, true); | ||
593 | - }, | ||
594 | - remove: function(event, ui) { //FIXME DEPRECATED | ||
595 | - var jid_id = ui.panel.id.replace(Jabber.tab_prefix, ''); | ||
596 | - if (Jabber.is_a_room(jid_id)) { | ||
597 | - // exiting from a chat room | ||
598 | - var jid = Jabber.jid_of(jid_id); | ||
599 | - log('leaving chatroom ' + jid); | ||
600 | - Jabber.leave_room(jid); | ||
601 | - } | ||
602 | - else { | ||
603 | - // TODO notify to friend when I close chat window | ||
604 | - } | ||
605 | - } | ||
606 | - }).scrollabletab({ | ||
607 | - closable: true | ||
608 | - }); | ||
609 | - | ||
610 | - // remove some unnecessary css classes to apply style for tabs in bottom | ||
611 | - $(".tabs-bottom .ui-tabs-nav, .tabs-bottom .ui-tabs-nav > *") | ||
612 | - .removeClass("ui-corner-all ui-corner-top ui-helper-clearfix"); | ||
613 | - $('#chat-window #tabs').removeClass("ui-corner-all ui-widget-content"); | ||
614 | - | ||
615 | - // positionting scrollabletab wrapper at bottom and tabs next/prev buttons | ||
616 | - $('#stTabswrapper,#tabs').css({'position':'absolute', 'top':0, 'bottom':0, 'left': 0, 'right': 0, 'width': 'auto'}); | ||
617 | - $('.stNavWrapper').css('position', 'absolute').css('bottom', 0).css('left', 0).css('right', 0) | ||
618 | - .find('.stNav').css('top', null).css('bottom', '12px').css('height', '22px') | ||
619 | - .find('.ui-icon').css('margin-top', '2px'); | ||
620 | - $('.webkit .stNavWrapper .stNav').css('height', '20px'); | ||
621 | - | ||
622 | - // // blink window title alerting about new unread messages | ||
623 | - // | ||
624 | - // FIXME disabling window blinking for now | ||
625 | - // | ||
626 | - // $(window).blur(function() { | ||
627 | - // setTimeout(function() { | ||
628 | - // window.blinkInterval = setInterval(function() { | ||
629 | - // if (document.title.match(/\*.+\* .+/)) { | ||
630 | - // document.title = document.title.replace(/\*.+\* /g, ''); | ||
631 | - // } | ||
632 | - // else if (document.alert_title) { | ||
633 | - // document.title = '*'+ document.alert_title +'* '+ document.title.replace(/\*.+\* /g, ''); | ||
634 | - // }}, 2000 | ||
635 | - // ); | ||
636 | - // }, 2000); | ||
637 | - // }, false); | ||
638 | - // $(window).focus(function() { | ||
639 | - // clearInterval(window.blinkInterval); | ||
640 | - // document.alert_title = null; | ||
641 | - // document.title = document.title.replace(/\*.+\* /g, ''); | ||
642 | - // }, false); | 578 | + var $tabs = $('#chat-window #tabs'); |
643 | 579 | ||
644 | function log(msg) { | 580 | function log(msg) { |
645 | if(Jabber.debug && window.console && window.console.log) { | 581 | if(Jabber.debug && window.console && window.console.log) { |
@@ -0,0 +1,4 @@ | @@ -0,0 +1,4 @@ | ||
1 | +/*! perfect-scrollbar - v0.4.11 | ||
2 | +* http://noraesae.github.com/perfect-scrollbar/ | ||
3 | +* Copyright (c) 2014 Hyeonje Alex Jun; Licensed MIT */ | ||
4 | +(function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(jQuery)})(function(e){"use strict";var t={wheelSpeed:10,wheelPropagation:!1,minScrollbarLength:null,maxScrollbarLength:null,useBothWheelAxes:!1,useKeyboard:!0,suppressScrollX:!1,suppressScrollY:!1,scrollXMarginOffset:0,scrollYMarginOffset:0,includePadding:!1},o=function(){var e=0;return function(){var t=e;return e+=1,".perfect-scrollbar-"+t}}();e.fn.perfectScrollbar=function(r,n){return this.each(function(){var l=e.extend(!0,{},t),s=e(this);if("object"==typeof r?e.extend(!0,l,r):n=r,"update"===n)return s.data("perfect-scrollbar-update")&&s.data("perfect-scrollbar-update")(),s;if("destroy"===n)return s.data("perfect-scrollbar-destroy")&&s.data("perfect-scrollbar-destroy")(),s;if(s.data("perfect-scrollbar"))return s.data("perfect-scrollbar");s.addClass("ps-container");var a,c,i,u,d,p,f,h,v,b,g=e("<div class='ps-scrollbar-x-rail'></div>").appendTo(s),m=e("<div class='ps-scrollbar-y-rail'></div>").appendTo(s),w=e("<div class='ps-scrollbar-x'></div>").appendTo(g),T=e("<div class='ps-scrollbar-y'></div>").appendTo(m),L=parseInt(g.css("bottom"),10),y=L===L,I=y?null:parseInt(g.css("top"),10),S=parseInt(m.css("right"),10),x=S===S,C=x?null:parseInt(m.css("left"),10),P="rtl"===s.css("direction"),D=o(),X=parseInt(g.css("borderLeftWidth"),10)+parseInt(g.css("borderRightWidth"),10),Y=parseInt(g.css("borderTopWidth"),10)+parseInt(g.css("borderBottomWidth"),10),k=function(e,t){var o=e+t,r=u-v;b=0>o?0:o>r?r:o;var n=parseInt(b*(p-u)/(u-v),10);s.scrollTop(n),y?g.css({bottom:L-n}):g.css({top:I+n})},M=function(e,t){var o=e+t,r=i-f;h=0>o?0:o>r?r:o;var n=parseInt(h*(d-i)/(i-f),10);s.scrollLeft(n),x?m.css({right:S-n}):m.css({left:C+n})},W=function(e){return l.minScrollbarLength&&(e=Math.max(e,l.minScrollbarLength)),l.maxScrollbarLength&&(e=Math.min(e,l.maxScrollbarLength)),e},j=function(){var e={width:i,display:a?"inherit":"none"};e.left=P?s.scrollLeft()+i-d:s.scrollLeft(),y?e.bottom=L-s.scrollTop():e.top=I+s.scrollTop(),g.css(e);var t={top:s.scrollTop(),height:u,display:c?"inherit":"none"};x?t.right=P?d-s.scrollLeft()-S-T.outerWidth():S-s.scrollLeft():t.left=P?s.scrollLeft()+2*i-d-C-T.outerWidth():C+s.scrollLeft(),m.css(t),w.css({left:h,width:f-X}),T.css({top:b,height:v-Y}),a?s.addClass("ps-active-x"):s.removeClass("ps-active-x"),c?s.addClass("ps-active-y"):s.removeClass("ps-active-y")},E=function(){i=l.includePadding?s.innerWidth():s.width(),u=l.includePadding?s.innerHeight():s.height(),d=s.prop("scrollWidth"),p=s.prop("scrollHeight"),!l.suppressScrollX&&d>i+l.scrollXMarginOffset?(a=!0,f=W(parseInt(i*i/d,10)),h=parseInt(s.scrollLeft()*(i-f)/(d-i),10)):(a=!1,f=0,h=0,s.scrollLeft(0)),!l.suppressScrollY&&p>u+l.scrollYMarginOffset?(c=!0,v=W(parseInt(u*u/p,10)),b=parseInt(s.scrollTop()*(u-v)/(p-u),10)):(c=!1,v=0,b=0,s.scrollTop(0)),b>=u-v&&(b=u-v),h>=i-f&&(h=i-f),j()},O=function(){var t,o;w.bind("mousedown"+D,function(e){o=e.pageX,t=w.position().left,g.addClass("in-scrolling"),e.stopPropagation(),e.preventDefault()}),e(document).bind("mousemove"+D,function(e){g.hasClass("in-scrolling")&&(M(t,e.pageX-o),e.stopPropagation(),e.preventDefault())}),e(document).bind("mouseup"+D,function(){g.hasClass("in-scrolling")&&g.removeClass("in-scrolling")}),t=o=null},q=function(){var t,o;T.bind("mousedown"+D,function(e){o=e.pageY,t=T.position().top,m.addClass("in-scrolling"),e.stopPropagation(),e.preventDefault()}),e(document).bind("mousemove"+D,function(e){m.hasClass("in-scrolling")&&(k(t,e.pageY-o),e.stopPropagation(),e.preventDefault())}),e(document).bind("mouseup"+D,function(){m.hasClass("in-scrolling")&&m.removeClass("in-scrolling")}),t=o=null},A=function(e,t){var o=s.scrollTop();if(0===e){if(!c)return!1;if(0===o&&t>0||o>=p-u&&0>t)return!l.wheelPropagation}var r=s.scrollLeft();if(0===t){if(!a)return!1;if(0===r&&0>e||r>=d-i&&e>0)return!l.wheelPropagation}return!0},B=function(){l.wheelSpeed/=10;var e=!1;s.bind("mousewheel"+D,function(t,o,r,n){var i=t.deltaX*t.deltaFactor||r,u=t.deltaY*t.deltaFactor||n;e=!1,l.useBothWheelAxes?c&&!a?(u?s.scrollTop(s.scrollTop()-u*l.wheelSpeed):s.scrollTop(s.scrollTop()+i*l.wheelSpeed),e=!0):a&&!c&&(i?s.scrollLeft(s.scrollLeft()+i*l.wheelSpeed):s.scrollLeft(s.scrollLeft()-u*l.wheelSpeed),e=!0):(s.scrollTop(s.scrollTop()-u*l.wheelSpeed),s.scrollLeft(s.scrollLeft()+i*l.wheelSpeed)),E(),e=e||A(i,u),e&&(t.stopPropagation(),t.preventDefault())}),s.bind("MozMousePixelScroll"+D,function(t){e&&t.preventDefault()})},F=function(){var t=!1;s.bind("mouseenter"+D,function(){t=!0}),s.bind("mouseleave"+D,function(){t=!1});var o=!1;e(document).bind("keydown"+D,function(r){if(!(r.isDefaultPrevented&&r.isDefaultPrevented()||!t||e(document.activeElement).is(":input,[contenteditable]"))){var n=0,l=0;switch(r.which){case 37:n=-30;break;case 38:l=30;break;case 39:n=30;break;case 40:l=-30;break;case 33:l=90;break;case 32:case 34:l=-90;break;case 35:l=-u;break;case 36:l=u;break;default:return}s.scrollTop(s.scrollTop()-l),s.scrollLeft(s.scrollLeft()+n),o=A(n,l),o&&r.preventDefault()}})},H=function(){var e=function(e){e.stopPropagation()};T.bind("click"+D,e),m.bind("click"+D,function(e){var t=parseInt(v/2,10),o=e.pageY-m.offset().top-t,r=u-v,n=o/r;0>n?n=0:n>1&&(n=1),s.scrollTop((p-u)*n)}),w.bind("click"+D,e),g.bind("click"+D,function(e){var t=parseInt(f/2,10),o=e.pageX-g.offset().left-t,r=i-f,n=o/r;0>n?n=0:n>1&&(n=1),s.scrollLeft((d-i)*n)})},K=function(){var t=function(e,t){s.scrollTop(s.scrollTop()-t),s.scrollLeft(s.scrollLeft()-e),E()},o={},r=0,n={},l=null,a=!1;e(window).bind("touchstart"+D,function(){a=!0}),e(window).bind("touchend"+D,function(){a=!1}),s.bind("touchstart"+D,function(e){var t=e.originalEvent.targetTouches[0];o.pageX=t.pageX,o.pageY=t.pageY,r=(new Date).getTime(),null!==l&&clearInterval(l),e.stopPropagation()}),s.bind("touchmove"+D,function(e){if(!a&&1===e.originalEvent.targetTouches.length){var l=e.originalEvent.targetTouches[0],s={};s.pageX=l.pageX,s.pageY=l.pageY;var c=s.pageX-o.pageX,i=s.pageY-o.pageY;t(c,i),o=s;var u=(new Date).getTime(),d=u-r;d>0&&(n.x=c/d,n.y=i/d,r=u),e.preventDefault()}}),s.bind("touchend"+D,function(){clearInterval(l),l=setInterval(function(){return.01>Math.abs(n.x)&&.01>Math.abs(n.y)?(clearInterval(l),void 0):(t(30*n.x,30*n.y),n.x*=.8,n.y*=.8,void 0)},10)})},z=function(){s.bind("scroll"+D,function(){E()})},Q=function(){s.unbind(D),e(window).unbind(D),e(document).unbind(D),s.data("perfect-scrollbar",null),s.data("perfect-scrollbar-update",null),s.data("perfect-scrollbar-destroy",null),w.remove(),T.remove(),g.remove(),m.remove(),g=m=w=T=a=c=i=u=d=p=f=h=L=y=I=v=b=S=x=C=P=D=null},R=function(t){s.addClass("ie").addClass("ie"+t);var o=function(){var t=function(){e(this).addClass("hover")},o=function(){e(this).removeClass("hover")};s.bind("mouseenter"+D,t).bind("mouseleave"+D,o),g.bind("mouseenter"+D,t).bind("mouseleave"+D,o),m.bind("mouseenter"+D,t).bind("mouseleave"+D,o),w.bind("mouseenter"+D,t).bind("mouseleave"+D,o),T.bind("mouseenter"+D,t).bind("mouseleave"+D,o)},r=function(){j=function(){var e={left:h+s.scrollLeft(),width:f};y?e.bottom=L:e.top=I,w.css(e);var t={top:b+s.scrollTop(),height:v};x?t.right=S:t.left=C,T.css(t),w.hide().show(),T.hide().show()}};6===t&&(o(),r())},G="ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch,J=function(){var e=navigator.userAgent.toLowerCase().match(/(msie) ([\w.]+)/);e&&"msie"===e[1]&&R(parseInt(e[2],10)),E(),z(),O(),q(),H(),G&&K(),s.mousewheel&&B(),l.useKeyboard&&F(),s.data("perfect-scrollbar",s),s.data("perfect-scrollbar-update",E),s.data("perfect-scrollbar-destroy",Q)};return J(),s})}}); | ||
0 | \ No newline at end of file | 5 | \ No newline at end of file |
public/javascripts/perfect-scrollbar.with-mousewheel.min.js
0 → 100644
@@ -0,0 +1,4 @@ | @@ -0,0 +1,4 @@ | ||
1 | +/*! perfect-scrollbar - v0.4.11 | ||
2 | +* http://noraesae.github.com/perfect-scrollbar/ | ||
3 | +* Copyright (c) 2014 Hyeonje Alex Jun; Licensed MIT */ | ||
4 | +(function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(jQuery)})(function(e){"use strict";var t={wheelSpeed:10,wheelPropagation:!1,minScrollbarLength:null,maxScrollbarLength:null,useBothWheelAxes:!1,useKeyboard:!0,suppressScrollX:!1,suppressScrollY:!1,scrollXMarginOffset:0,scrollYMarginOffset:0,includePadding:!1},o=function(){var e=0;return function(){var t=e;return e+=1,".perfect-scrollbar-"+t}}();e.fn.perfectScrollbar=function(n,r){return this.each(function(){var l=e.extend(!0,{},t),s=e(this);if("object"==typeof n?e.extend(!0,l,n):r=n,"update"===r)return s.data("perfect-scrollbar-update")&&s.data("perfect-scrollbar-update")(),s;if("destroy"===r)return s.data("perfect-scrollbar-destroy")&&s.data("perfect-scrollbar-destroy")(),s;if(s.data("perfect-scrollbar"))return s.data("perfect-scrollbar");s.addClass("ps-container");var a,i,c,u,d,p,f,h,v,b,g=e("<div class='ps-scrollbar-x-rail'></div>").appendTo(s),m=e("<div class='ps-scrollbar-y-rail'></div>").appendTo(s),w=e("<div class='ps-scrollbar-x'></div>").appendTo(g),L=e("<div class='ps-scrollbar-y'></div>").appendTo(m),T=parseInt(g.css("bottom"),10),y=T===T,x=y?null:parseInt(g.css("top"),10),S=parseInt(m.css("right"),10),I=S===S,P=I?null:parseInt(m.css("left"),10),D="rtl"===s.css("direction"),M=o(),C=parseInt(g.css("borderLeftWidth"),10)+parseInt(g.css("borderRightWidth"),10),X=parseInt(g.css("borderTopWidth"),10)+parseInt(g.css("borderBottomWidth"),10),Y=function(e,t){var o=e+t,n=u-v;b=0>o?0:o>n?n:o;var r=parseInt(b*(p-u)/(u-v),10);s.scrollTop(r),y?g.css({bottom:T-r}):g.css({top:x+r})},k=function(e,t){var o=e+t,n=c-f;h=0>o?0:o>n?n:o;var r=parseInt(h*(d-c)/(c-f),10);s.scrollLeft(r),I?m.css({right:S-r}):m.css({left:P+r})},W=function(e){return l.minScrollbarLength&&(e=Math.max(e,l.minScrollbarLength)),l.maxScrollbarLength&&(e=Math.min(e,l.maxScrollbarLength)),e},j=function(){var e={width:c,display:a?"inherit":"none"};e.left=D?s.scrollLeft()+c-d:s.scrollLeft(),y?e.bottom=T-s.scrollTop():e.top=x+s.scrollTop(),g.css(e);var t={top:s.scrollTop(),height:u,display:i?"inherit":"none"};I?t.right=D?d-s.scrollLeft()-S-L.outerWidth():S-s.scrollLeft():t.left=D?s.scrollLeft()+2*c-d-P-L.outerWidth():P+s.scrollLeft(),m.css(t),w.css({left:h,width:f-C}),L.css({top:b,height:v-X}),a?s.addClass("ps-active-x"):s.removeClass("ps-active-x"),i?s.addClass("ps-active-y"):s.removeClass("ps-active-y")},O=function(){c=l.includePadding?s.innerWidth():s.width(),u=l.includePadding?s.innerHeight():s.height(),d=s.prop("scrollWidth"),p=s.prop("scrollHeight"),!l.suppressScrollX&&d>c+l.scrollXMarginOffset?(a=!0,f=W(parseInt(c*c/d,10)),h=parseInt(s.scrollLeft()*(c-f)/(d-c),10)):(a=!1,f=0,h=0,s.scrollLeft(0)),!l.suppressScrollY&&p>u+l.scrollYMarginOffset?(i=!0,v=W(parseInt(u*u/p,10)),b=parseInt(s.scrollTop()*(u-v)/(p-u),10)):(i=!1,v=0,b=0,s.scrollTop(0)),b>=u-v&&(b=u-v),h>=c-f&&(h=c-f),j()},E=function(){var t,o;w.bind("mousedown"+M,function(e){o=e.pageX,t=w.position().left,g.addClass("in-scrolling"),e.stopPropagation(),e.preventDefault()}),e(document).bind("mousemove"+M,function(e){g.hasClass("in-scrolling")&&(k(t,e.pageX-o),e.stopPropagation(),e.preventDefault())}),e(document).bind("mouseup"+M,function(){g.hasClass("in-scrolling")&&g.removeClass("in-scrolling")}),t=o=null},H=function(){var t,o;L.bind("mousedown"+M,function(e){o=e.pageY,t=L.position().top,m.addClass("in-scrolling"),e.stopPropagation(),e.preventDefault()}),e(document).bind("mousemove"+M,function(e){m.hasClass("in-scrolling")&&(Y(t,e.pageY-o),e.stopPropagation(),e.preventDefault())}),e(document).bind("mouseup"+M,function(){m.hasClass("in-scrolling")&&m.removeClass("in-scrolling")}),t=o=null},A=function(e,t){var o=s.scrollTop();if(0===e){if(!i)return!1;if(0===o&&t>0||o>=p-u&&0>t)return!l.wheelPropagation}var n=s.scrollLeft();if(0===t){if(!a)return!1;if(0===n&&0>e||n>=d-c&&e>0)return!l.wheelPropagation}return!0},q=function(){l.wheelSpeed/=10;var e=!1;s.bind("mousewheel"+M,function(t,o,n,r){var c=t.deltaX*t.deltaFactor||n,u=t.deltaY*t.deltaFactor||r;e=!1,l.useBothWheelAxes?i&&!a?(u?s.scrollTop(s.scrollTop()-u*l.wheelSpeed):s.scrollTop(s.scrollTop()+c*l.wheelSpeed),e=!0):a&&!i&&(c?s.scrollLeft(s.scrollLeft()+c*l.wheelSpeed):s.scrollLeft(s.scrollLeft()-u*l.wheelSpeed),e=!0):(s.scrollTop(s.scrollTop()-u*l.wheelSpeed),s.scrollLeft(s.scrollLeft()+c*l.wheelSpeed)),O(),e=e||A(c,u),e&&(t.stopPropagation(),t.preventDefault())}),s.bind("MozMousePixelScroll"+M,function(t){e&&t.preventDefault()})},B=function(){var t=!1;s.bind("mouseenter"+M,function(){t=!0}),s.bind("mouseleave"+M,function(){t=!1});var o=!1;e(document).bind("keydown"+M,function(n){if(!(n.isDefaultPrevented&&n.isDefaultPrevented()||!t||e(document.activeElement).is(":input,[contenteditable]"))){var r=0,l=0;switch(n.which){case 37:r=-30;break;case 38:l=30;break;case 39:r=30;break;case 40:l=-30;break;case 33:l=90;break;case 32:case 34:l=-90;break;case 35:l=-u;break;case 36:l=u;break;default:return}s.scrollTop(s.scrollTop()-l),s.scrollLeft(s.scrollLeft()+r),o=A(r,l),o&&n.preventDefault()}})},F=function(){var e=function(e){e.stopPropagation()};L.bind("click"+M,e),m.bind("click"+M,function(e){var t=parseInt(v/2,10),o=e.pageY-m.offset().top-t,n=u-v,r=o/n;0>r?r=0:r>1&&(r=1),s.scrollTop((p-u)*r)}),w.bind("click"+M,e),g.bind("click"+M,function(e){var t=parseInt(f/2,10),o=e.pageX-g.offset().left-t,n=c-f,r=o/n;0>r?r=0:r>1&&(r=1),s.scrollLeft((d-c)*r)})},z=function(){var t=function(e,t){s.scrollTop(s.scrollTop()-t),s.scrollLeft(s.scrollLeft()-e),O()},o={},n=0,r={},l=null,a=!1;e(window).bind("touchstart"+M,function(){a=!0}),e(window).bind("touchend"+M,function(){a=!1}),s.bind("touchstart"+M,function(e){var t=e.originalEvent.targetTouches[0];o.pageX=t.pageX,o.pageY=t.pageY,n=(new Date).getTime(),null!==l&&clearInterval(l),e.stopPropagation()}),s.bind("touchmove"+M,function(e){if(!a&&1===e.originalEvent.targetTouches.length){var l=e.originalEvent.targetTouches[0],s={};s.pageX=l.pageX,s.pageY=l.pageY;var i=s.pageX-o.pageX,c=s.pageY-o.pageY;t(i,c),o=s;var u=(new Date).getTime(),d=u-n;d>0&&(r.x=i/d,r.y=c/d,n=u),e.preventDefault()}}),s.bind("touchend"+M,function(){clearInterval(l),l=setInterval(function(){return.01>Math.abs(r.x)&&.01>Math.abs(r.y)?(clearInterval(l),void 0):(t(30*r.x,30*r.y),r.x*=.8,r.y*=.8,void 0)},10)})},K=function(){s.bind("scroll"+M,function(){O()})},Q=function(){s.unbind(M),e(window).unbind(M),e(document).unbind(M),s.data("perfect-scrollbar",null),s.data("perfect-scrollbar-update",null),s.data("perfect-scrollbar-destroy",null),w.remove(),L.remove(),g.remove(),m.remove(),g=m=w=L=a=i=c=u=d=p=f=h=T=y=x=v=b=S=I=P=D=M=null},R=function(t){s.addClass("ie").addClass("ie"+t);var o=function(){var t=function(){e(this).addClass("hover")},o=function(){e(this).removeClass("hover")};s.bind("mouseenter"+M,t).bind("mouseleave"+M,o),g.bind("mouseenter"+M,t).bind("mouseleave"+M,o),m.bind("mouseenter"+M,t).bind("mouseleave"+M,o),w.bind("mouseenter"+M,t).bind("mouseleave"+M,o),L.bind("mouseenter"+M,t).bind("mouseleave"+M,o)},n=function(){j=function(){var e={left:h+s.scrollLeft(),width:f};y?e.bottom=T:e.top=x,w.css(e);var t={top:b+s.scrollTop(),height:v};I?t.right=S:t.left=P,L.css(t),w.hide().show(),L.hide().show()}};6===t&&(o(),n())},N="ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch,Z=function(){var e=navigator.userAgent.toLowerCase().match(/(msie) ([\w.]+)/);e&&"msie"===e[1]&&R(parseInt(e[2],10)),O(),K(),E(),H(),F(),N&&z(),s.mousewheel&&q(),l.useKeyboard&&B(),s.data("perfect-scrollbar",s),s.data("perfect-scrollbar-update",O),s.data("perfect-scrollbar-destroy",Q)};return Z(),s})}}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(e){function t(t){var s=t||window.event,a=i.call(arguments,1),c=0,u=0,d=0,p=0;if(t=e.event.fix(s),t.type="mousewheel","detail"in s&&(d=-1*s.detail),"wheelDelta"in s&&(d=s.wheelDelta),"wheelDeltaY"in s&&(d=s.wheelDeltaY),"wheelDeltaX"in s&&(u=-1*s.wheelDeltaX),"axis"in s&&s.axis===s.HORIZONTAL_AXIS&&(u=-1*d,d=0),c=0===d?u:d,"deltaY"in s&&(d=-1*s.deltaY,c=d),"deltaX"in s&&(u=s.deltaX,0===d&&(c=-1*u)),0!==d||0!==u){if(1===s.deltaMode){var f=e.data(this,"mousewheel-line-height");c*=f,d*=f,u*=f}else if(2===s.deltaMode){var h=e.data(this,"mousewheel-page-height");c*=h,d*=h,u*=h}return p=Math.max(Math.abs(d),Math.abs(u)),(!l||l>p)&&(l=p,n(s,p)&&(l/=40)),n(s,p)&&(c/=40,u/=40,d/=40),c=Math[c>=1?"floor":"ceil"](c/l),u=Math[u>=1?"floor":"ceil"](u/l),d=Math[d>=1?"floor":"ceil"](d/l),t.deltaX=u,t.deltaY=d,t.deltaFactor=l,t.deltaMode=0,a.unshift(t,c,u,d),r&&clearTimeout(r),r=setTimeout(o,200),(e.event.dispatch||e.event.handle).apply(this,a)}}function o(){l=null}function n(e,t){return u.settings.adjustOldDeltas&&"mousewheel"===e.type&&0===t%120}var r,l,s=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],a="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(e.event.fixHooks)for(var c=s.length;c;)e.event.fixHooks[s[--c]]=e.event.mouseHooks;var u=e.event.special.mousewheel={version:"3.1.9",setup:function(){if(this.addEventListener)for(var o=a.length;o;)this.addEventListener(a[--o],t,!1);else this.onmousewheel=t;e.data(this,"mousewheel-line-height",u.getLineHeight(this)),e.data(this,"mousewheel-page-height",u.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=a.length;e;)this.removeEventListener(a[--e],t,!1);else this.onmousewheel=null},getLineHeight:function(t){return parseInt(e(t)["offsetParent"in e.fn?"offsetParent":"parent"]().css("fontSize"),10)},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0}};e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}); | ||
0 | \ No newline at end of file | 5 | \ No newline at end of file |
public/stylesheets/application.css
@@ -5018,220 +5018,6 @@ h1#agenda-title { | @@ -5018,220 +5018,6 @@ h1#agenda-title { | ||
5018 | height: 16px; | 5018 | height: 16px; |
5019 | padding-left: 18px; | 5019 | padding-left: 18px; |
5020 | } | 5020 | } |
5021 | -/* chat window {{{ */ | ||
5022 | - | ||
5023 | -#title-bar { | ||
5024 | - height: 25px; | ||
5025 | - width: 100%; | ||
5026 | - position: absolute; | ||
5027 | - background: #ccc url(/images/icons-app/chat-22x22.png) 2px 2px no-repeat; | ||
5028 | -} | ||
5029 | -#title-bar .title { | ||
5030 | - margin: 0; | ||
5031 | - font-size: 12px; | ||
5032 | - margin: 4px 0; | ||
5033 | - padding-left: 30px; | ||
5034 | -} | ||
5035 | -#buddy-list { | ||
5036 | - position: absolute; | ||
5037 | - bottom: 0; | ||
5038 | - top: 25px; | ||
5039 | - -webkit-top: 5px; | ||
5040 | - width: 250px; | ||
5041 | - overflow-y: scroll; | ||
5042 | -} | ||
5043 | -#buddy-list .buddy-list { | ||
5044 | - list-style-type: none; | ||
5045 | - padding: 0; | ||
5046 | - margin: 10px 0; | ||
5047 | -} | ||
5048 | -#buddy-list .buddy-list li { | ||
5049 | - line-height: 21px; | ||
5050 | -} | ||
5051 | -#buddy-list .buddy-list li a, .occupant-list li a { | ||
5052 | - background-position: 15px 50%; | ||
5053 | - padding-left: 30px; | ||
5054 | - display: block; | ||
5055 | - text-decoration: none; | ||
5056 | - border-top: 1px solid transparent; | ||
5057 | - border-bottom: 1px solid transparent; | ||
5058 | -} | ||
5059 | -#buddy-list #environment-logo { | ||
5060 | - text-align: center; | ||
5061 | - padding: 15px 0; | ||
5062 | -} | ||
5063 | -#buddy-list .buddy-list li.offline, .occupant-list li.offline { | ||
5064 | - display: none; | ||
5065 | -} | ||
5066 | -#buddy-list .toolbar { | ||
5067 | - border-left: 0; | ||
5068 | - border-right: 0; | ||
5069 | - background-position: 90%; | ||
5070 | - position: relative; | ||
5071 | - height: 20px; | ||
5072 | -} | ||
5073 | -#buddy-list .toolbar .dialog-error { | ||
5074 | - position: absolute; | ||
5075 | - top: 30px; | ||
5076 | - left: 10px; | ||
5077 | - padding: 5px; | ||
5078 | - width: 170px; | ||
5079 | - -moz-border-radius: 5px; | ||
5080 | - -webkit-border-radius: 5px; | ||
5081 | - background: white; | ||
5082 | - border: 1px solid #888; | ||
5083 | -} | ||
5084 | -#buddy-list .toolbar .dialog-error p { | ||
5085 | - margin: 0 0 5px 0; | ||
5086 | -} | ||
5087 | -#chat-window { | ||
5088 | - position: absolute; | ||
5089 | - bottom: 0; | ||
5090 | - right: 0; | ||
5091 | - top: 25px; | ||
5092 | - left: 250px; | ||
5093 | - background: white; | ||
5094 | -} | ||
5095 | -.conversation { | ||
5096 | - margin: 15px; | ||
5097 | -} | ||
5098 | -.conversation .input-div { | ||
5099 | - position: absolute; | ||
5100 | - left: 0; | ||
5101 | - right: 25px; | ||
5102 | - bottom: 40px; | ||
5103 | - padding: 0 20px 10px 15px; | ||
5104 | -} | ||
5105 | -.msie7 .conversation .input-div { | ||
5106 | - padding-left: 5px; | ||
5107 | - margin-right: 10px; | ||
5108 | -} | ||
5109 | -.conversation .input-div .icon-chat { | ||
5110 | - width: 16px; | ||
5111 | - height: 16px; | ||
5112 | - position: relative; | ||
5113 | - bottom: -23px; | ||
5114 | - left: 5px; | ||
5115 | -} | ||
5116 | -.msie7 .conversation .input-div .icon-chat { | ||
5117 | - left: 20px; | ||
5118 | -} | ||
5119 | -.conversation textarea { | ||
5120 | - height: 60px; | ||
5121 | - width: 100%; | ||
5122 | - padding-left: 25px; | ||
5123 | - overflow: auto; | ||
5124 | -} | ||
5125 | -.conversation .history { | ||
5126 | - position: absolute; | ||
5127 | - right: 0px; | ||
5128 | - top: 0px; | ||
5129 | - bottom: 125px; | ||
5130 | - left: 18px; | ||
5131 | - overflow-y: scroll; | ||
5132 | - padding-top: 5px; | ||
5133 | -} | ||
5134 | -.msie7 #chat-window .conversation .history { | ||
5135 | - overflow-x: hidden; | ||
5136 | -} | ||
5137 | -#chat .unread-messages { | ||
5138 | - background: red; | ||
5139 | - position: absolute; | ||
5140 | - right: 22px; | ||
5141 | - margin: 2px 0; | ||
5142 | - padding: 0 2px; | ||
5143 | - color: white; | ||
5144 | - display: block; | ||
5145 | - line-height: 1em; | ||
5146 | -} | ||
5147 | -#chat .tabs-bottom .ui-tabs-nav { | ||
5148 | - position: absolute; | ||
5149 | - left: 0; | ||
5150 | - bottom: 0; | ||
5151 | - right:0; | ||
5152 | - padding: 0 5px 10px 5px; | ||
5153 | - border: 0; | ||
5154 | - background: #eee; | ||
5155 | -} | ||
5156 | -#chat .tabs-bottom .ui-tabs-nav li { | ||
5157 | - top: 0; | ||
5158 | - margin-top: 0; | ||
5159 | - margin-bottom: 0; | ||
5160 | - border: 1px solid transparent; | ||
5161 | - border-top: none; | ||
5162 | -} | ||
5163 | -#chat .tabs-bottom .ui-tabs-nav li a { | ||
5164 | - padding: 0.3em 0.5em 0.3em 2.0em; | ||
5165 | - background-position: 0.5em 50%; | ||
5166 | -} | ||
5167 | -#chat .tabs-bottom .ui-tabs-nav li:hover, #chat .tabs-bottom .ui-tabs-nav .ui-state-active { | ||
5168 | - border: 1px solid #AAAAAA !important; | ||
5169 | - border-top: 0 !important; | ||
5170 | -} | ||
5171 | -#chat .tabs-bottom li .ui-icon-close { | ||
5172 | - margin: 0.4em 0.5em 0 0 !important; | ||
5173 | -} | ||
5174 | -#chat .ui-tabs .ui-tabs-panel { | ||
5175 | - border: none; | ||
5176 | -} | ||
5177 | -#chat-window .history .message { | ||
5178 | - padding: 0 50px 0 40px; | ||
5179 | - position: relative; | ||
5180 | -} | ||
5181 | -#chat-window .history .message .time { | ||
5182 | - position: absolute; | ||
5183 | - right: 10px; | ||
5184 | - top: 5px; | ||
5185 | - color: gray; | ||
5186 | - font-style: italic; | ||
5187 | - font-size: 11px; | ||
5188 | -} | ||
5189 | -#chat-window .history .message h5, #chat-window .history .message p { | ||
5190 | - margin: 0; | ||
5191 | -} | ||
5192 | -#chat-window .history .message p { | ||
5193 | - max-width: 100%; | ||
5194 | - overflow: auto; | ||
5195 | -} | ||
5196 | - | ||
5197 | -#chat-window .history .message .avatar { | ||
5198 | - position: absolute; | ||
5199 | - left: 0; | ||
5200 | - max-height: 32px; | ||
5201 | - max-width: 32px; | ||
5202 | - top: 10px; | ||
5203 | -} | ||
5204 | -#chat-window .history .notice { | ||
5205 | - font-size: 10px; | ||
5206 | - font-style: italic; | ||
5207 | - color: gray; | ||
5208 | - text-align: center; | ||
5209 | - display: block; | ||
5210 | -} | ||
5211 | -.conversation .occupant-list { | ||
5212 | - position: absolute; | ||
5213 | - top: 0; | ||
5214 | - right: 0; | ||
5215 | - width: 200px; | ||
5216 | - bottom: 125px; | ||
5217 | -} | ||
5218 | -.conversation .occupant-list ul { | ||
5219 | - padding: 0; | ||
5220 | - list-style: none; | ||
5221 | - font-size: 12px; | ||
5222 | -} | ||
5223 | -#chat-window .history.room { | ||
5224 | - right: 200px | ||
5225 | -} | ||
5226 | -#chat-window .comment-balloon-content { | ||
5227 | - min-height: 50px; | ||
5228 | - padding: 5px 0 5px 25px; | ||
5229 | - position: relative; | ||
5230 | -} | ||
5231 | -#chat-window .comment-wrapper-1 { | ||
5232 | - margin-left: 0; | ||
5233 | -} | ||
5234 | -/* chat window }}} */ | ||
5235 | 5021 | ||
5236 | #profile-activity ul, #profile-network ul, #profile-wall ul { | 5022 | #profile-activity ul, #profile-network ul, #profile-wall ul { |
5237 | padding-left: 0; | 5023 | padding-left: 0; |
@@ -0,0 +1,236 @@ | @@ -0,0 +1,236 @@ | ||
1 | +#chat { | ||
2 | + width: 250px; | ||
3 | +} | ||
4 | + | ||
5 | +#buddy-list { | ||
6 | + background-color: #303030; | ||
7 | + position: absolute; | ||
8 | + bottom: 0; | ||
9 | + top: 25px; | ||
10 | + -webkit-top: 5px; | ||
11 | + width: 250px; | ||
12 | + overflow-y: auto; | ||
13 | + right: 0; | ||
14 | +} | ||
15 | +#buddy-list .buddy-list { | ||
16 | + list-style-type: none; | ||
17 | + padding: 0; | ||
18 | + margin: 0; | ||
19 | +} | ||
20 | +#buddy-list .buddy-list li { | ||
21 | + line-height: 30px; | ||
22 | + border-bottom: 1px solid #383838; | ||
23 | +} | ||
24 | +#buddy-list .buddy-list li a, .occupant-list li a { | ||
25 | + background: none; | ||
26 | + display: block; | ||
27 | + padding-left: 30px; | ||
28 | + padding-top: 10px; | ||
29 | + text-decoration: none; | ||
30 | + color: rgb(238, 238, 238); | ||
31 | +} | ||
32 | +#buddy-list .buddy-list li a .name, .occupant-list li a .name { | ||
33 | + vertical-align: top; | ||
34 | +} | ||
35 | +#buddy-list .buddy-list li a img, .occupant-list li a img { | ||
36 | + max-height: 32px; | ||
37 | + max-width: 32px; | ||
38 | +} | ||
39 | +#buddy-list .buddy-list li.offline, .occupant-list li.offline { | ||
40 | + display: none; | ||
41 | +} | ||
42 | +#buddy-list .toolbar { | ||
43 | + border-left: 0; | ||
44 | + border-right: 0; | ||
45 | + background-position: 90%; | ||
46 | + position: relative; | ||
47 | + height: 20px; | ||
48 | +} | ||
49 | +#buddy-list .toolbar .dialog-error { | ||
50 | + position: absolute; | ||
51 | + top: 30px; | ||
52 | + left: 10px; | ||
53 | + padding: 5px; | ||
54 | + width: 170px; | ||
55 | + -moz-border-radius: 5px; | ||
56 | + -webkit-border-radius: 5px; | ||
57 | + background: white; | ||
58 | + border: 1px solid #888; | ||
59 | +} | ||
60 | +#buddy-list .toolbar .dialog-error p { | ||
61 | + margin: 0 0 5px 0; | ||
62 | +} | ||
63 | +#chat-window { | ||
64 | + background: white; | ||
65 | +} | ||
66 | +.conversation { | ||
67 | + margin: 15px; | ||
68 | +} | ||
69 | +.conversation .input-div { | ||
70 | + position: absolute; | ||
71 | + right: 0; | ||
72 | + bottom: 40px; | ||
73 | + padding: 0 20px 10px 15px; | ||
74 | +} | ||
75 | +.msie7 .conversation .input-div { | ||
76 | + padding-left: 5px; | ||
77 | + margin-right: 10px; | ||
78 | +} | ||
79 | +.conversation .input-div .icon-chat { | ||
80 | + width: 16px; | ||
81 | + height: 16px; | ||
82 | + position: relative; | ||
83 | + bottom: -23px; | ||
84 | + left: 5px; | ||
85 | +} | ||
86 | +.msie7 .conversation .input-div .icon-chat { | ||
87 | + left: 20px; | ||
88 | +} | ||
89 | +.conversation textarea { | ||
90 | + height: 60px; | ||
91 | + padding-left: 25px; | ||
92 | + overflow: auto; | ||
93 | +} | ||
94 | +.conversation .history { | ||
95 | + position: absolute; | ||
96 | + right: 0; | ||
97 | + top: 25px; | ||
98 | + bottom: 125px; | ||
99 | + overflow: hidden; | ||
100 | + padding-top: 5px; | ||
101 | + width: 250px; | ||
102 | + background-color: #303030; | ||
103 | +} | ||
104 | +.msie7 #chat-window .conversation .history { | ||
105 | + overflow-x: hidden; | ||
106 | +} | ||
107 | +#chat .unread-messages { | ||
108 | + background: red; | ||
109 | + position: absolute; | ||
110 | + right: 22px; | ||
111 | + margin: 2px 0; | ||
112 | + padding: 0 2px; | ||
113 | + color: white; | ||
114 | + display: block; | ||
115 | + line-height: 1em; | ||
116 | +} | ||
117 | +#chat .tabs-bottom .ui-tabs-nav { | ||
118 | + position: absolute; | ||
119 | + left: 0; | ||
120 | + bottom: 0; | ||
121 | + right:0; | ||
122 | + padding: 0 5px 10px 5px; | ||
123 | + border: 0; | ||
124 | + background: #eee; | ||
125 | +} | ||
126 | +#chat .tabs-bottom .ui-tabs-nav li { | ||
127 | + top: 0; | ||
128 | + margin-top: 0; | ||
129 | + margin-bottom: 0; | ||
130 | + border: 1px solid transparent; | ||
131 | + border-top: none; | ||
132 | +} | ||
133 | +#chat .tabs-bottom .ui-tabs-nav li a { | ||
134 | + padding: 0.3em 0.5em 0.3em 2.0em; | ||
135 | + background-position: 0.5em 50%; | ||
136 | +} | ||
137 | +#chat .tabs-bottom .ui-tabs-nav li:hover, #chat .tabs-bottom .ui-tabs-nav .ui-state-active { | ||
138 | + border: 1px solid #AAAAAA !important; | ||
139 | + border-top: 0 !important; | ||
140 | +} | ||
141 | +#chat .tabs-bottom li .ui-icon-close { | ||
142 | + margin: 0.4em 0.5em 0 0 !important; | ||
143 | +} | ||
144 | +#chat .ui-tabs .ui-tabs-panel { | ||
145 | + border: none; | ||
146 | +} | ||
147 | +#chat-window .history .message { | ||
148 | + padding: 0 10px; | ||
149 | + /*position: relative;*/ | ||
150 | +} | ||
151 | +#chat-window .history .message .time { | ||
152 | + position: absolute; | ||
153 | + right: 10px; | ||
154 | + top: 5px; | ||
155 | + color: gray; | ||
156 | + font-style: italic; | ||
157 | + font-size: 11px; | ||
158 | +} | ||
159 | +#chat-window .history .message h5, #chat-window .history .message p { | ||
160 | + margin: 0; | ||
161 | +} | ||
162 | +#chat-window .history .message p { | ||
163 | + max-width: 100%; | ||
164 | + overflow: auto; | ||
165 | +} | ||
166 | + | ||
167 | +#chat-window .history .message .content { | ||
168 | + background-color: #383838; | ||
169 | + color: rgb(223, 223, 223); | ||
170 | + padding: 5px; | ||
171 | +} | ||
172 | + | ||
173 | +#chat-window .history .message .avatar { | ||
174 | + max-height: 32px; | ||
175 | + max-width: 32px; | ||
176 | +} | ||
177 | +#chat-window .history .notice { | ||
178 | + font-size: 10px; | ||
179 | + font-style: italic; | ||
180 | + color: gray; | ||
181 | + text-align: center; | ||
182 | + display: block; | ||
183 | +} | ||
184 | +.conversation .occupant-list { | ||
185 | + position: absolute; | ||
186 | + top: 0; | ||
187 | + right: 0; | ||
188 | + width: 200px; | ||
189 | + bottom: 125px; | ||
190 | +} | ||
191 | +.conversation .occupant-list ul { | ||
192 | + padding: 0; | ||
193 | + list-style: none; | ||
194 | + font-size: 12px; | ||
195 | +} | ||
196 | +#chat-window .history.room { | ||
197 | + right: 200px | ||
198 | +} | ||
199 | +#chat-window .comment-balloon-content { | ||
200 | + min-height: 50px; | ||
201 | + padding: 5px 0 5px 25px; | ||
202 | + position: relative; | ||
203 | +} | ||
204 | +#chat-window .comment-wrapper-1 { | ||
205 | + margin-left: 0; | ||
206 | +} | ||
207 | + | ||
208 | +#title-bar { | ||
209 | + top: 0; | ||
210 | + height: 25px; | ||
211 | + position: absolute; | ||
212 | + background: #ccc url(/images/icons-app/chat-22x22.png) 2px 2px no-repeat; | ||
213 | + width: 250px; | ||
214 | + right: 0; | ||
215 | +} | ||
216 | +#title-bar .title { | ||
217 | + margin: 0; | ||
218 | + font-size: 12px; | ||
219 | + margin: 4px 0; | ||
220 | + padding-left: 30px; | ||
221 | +} | ||
222 | +#chat #chat-templates { | ||
223 | + display: none; | ||
224 | +} | ||
225 | +.conversation .back { | ||
226 | + position: absolute; | ||
227 | + top: 5px; | ||
228 | + right: 8px; | ||
229 | + color: white; | ||
230 | +} | ||
231 | +#chat #chat-window .history .other-name { | ||
232 | + color: #6C9EDD; | ||
233 | +} | ||
234 | +#chat #chat-window .history .self-name { | ||
235 | + color: #6C87DD; | ||
236 | +} |
@@ -0,0 +1,5 @@ | @@ -0,0 +1,5 @@ | ||
1 | +/*! perfect-scrollbar - v0.4.11 | ||
2 | +* http://noraesae.github.com/perfect-scrollbar/ | ||
3 | +* Copyright (c) 2014 Hyeonje Alex Jun; Licensed MIT */ | ||
4 | + | ||
5 | +.ps-container .ps-scrollbar-x-rail{position:absolute;bottom:3px;height:8px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;opacity:0;filter:alpha(opacity=0);-o-transition:background-color .2s linear,opacity .2s linear;-webkit-transition:background-color .2s linear,opacity .2s linear;-moz-transition:background-color .2s linear,opacity .2s linear;transition:background-color .2s linear,opacity .2s linear}.ps-container:hover .ps-scrollbar-x-rail,.ps-container.hover .ps-scrollbar-x-rail{opacity:.6;filter:alpha(opacity=60)}.ps-container .ps-scrollbar-x-rail:hover,.ps-container .ps-scrollbar-x-rail.hover{background-color:#eee;opacity:.9;filter:alpha(opacity=90)}.ps-container .ps-scrollbar-x-rail.in-scrolling{background-color:#eee;opacity:.9;filter:alpha(opacity=90)}.ps-container .ps-scrollbar-y-rail{position:absolute;right:3px;width:8px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;opacity:0;filter:alpha(opacity=0);-o-transition:background-color .2s linear,opacity .2s linear;-webkit-transition:background-color .2s linear,opacity .2s linear;-moz-transition:background-color .2s linear,opacity .2s linear;transition:background-color .2s linear,opacity .2s linear}.ps-container:hover .ps-scrollbar-y-rail,.ps-container.hover .ps-scrollbar-y-rail{opacity:.6;filter:alpha(opacity=60)}.ps-container .ps-scrollbar-y-rail:hover,.ps-container .ps-scrollbar-y-rail.hover{background-color:#eee;opacity:.9;filter:alpha(opacity=90)}.ps-container .ps-scrollbar-y-rail.in-scrolling{background-color:#eee;opacity:.9;filter:alpha(opacity=90)}.ps-container .ps-scrollbar-x{position:absolute;bottom:0;height:8px;background-color:#aaa;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-o-transition:background-color .2s linear;-webkit-transition:background-color.2s linear;-moz-transition:background-color .2s linear;transition:background-color .2s linear}.ps-container.ie6 .ps-scrollbar-x{font-size:0}.ps-container .ps-scrollbar-x-rail:hover .ps-scrollbar-x,.ps-container .ps-scrollbar-x-rail.hover .ps-scrollbar-x{background-color:#999}.ps-container .ps-scrollbar-y{position:absolute;right:0;width:8px;background-color:#aaa;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-o-transition:background-color .2s linear;-webkit-transition:background-color.2s linear;-moz-transition:background-color .2s linear;transition:background-color .2s linear}.ps-container.ie6 .ps-scrollbar-y{font-size:0}.ps-container .ps-scrollbar-y-rail:hover .ps-scrollbar-y,.ps-container .ps-scrollbar-y-rail.hover .ps-scrollbar-y{background-color:#999}.ps-container.ie .ps-scrollbar-x,.ps-container.ie .ps-scrollbar-y{visibility:hidden}.ps-container.ie:hover .ps-scrollbar-x,.ps-container.ie:hover .ps-scrollbar-y,.ps-container.ie.hover .ps-scrollbar-x,.ps-container.ie.hover .ps-scrollbar-y{visibility:visible} | ||
0 | \ No newline at end of file | 6 | \ No newline at end of file |