From 2cd43f0e53d5bc22614fbb87cb8823e9e4fed9e7 Mon Sep 17 00:00:00 2001 From: Alexander Yakovlev Date: Sat, 20 Feb 2016 11:59:06 +0700 Subject: [PATCH] =?UTF-8?q?=D0=93=D0=BE=D1=82=D0=BE=D0=B2=D1=8B=D0=B9=20?= =?UTF-8?q?=D0=B8=D0=BD=D1=82=D0=B5=D1=80=D1=84=D0=B5=D0=B9=D1=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- candy-plugins/lefttabs/README.md | 24 --- candy-plugins/lefttabs/lefttabs.css | 239 ---------------------------- candy-plugins/lefttabs/lefttabs.js | 104 ------------ index.html | 6 +- style/style.css | 21 +++ style/style.js | 22 +++ 6 files changed, 46 insertions(+), 370 deletions(-) delete mode 100644 candy-plugins/lefttabs/README.md delete mode 100644 candy-plugins/lefttabs/lefttabs.css delete mode 100644 candy-plugins/lefttabs/lefttabs.js create mode 100644 style/style.css create mode 100644 style/style.js diff --git a/candy-plugins/lefttabs/README.md b/candy-plugins/lefttabs/README.md deleted file mode 100644 index 1fe116e..0000000 --- a/candy-plugins/lefttabs/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# Left Tabs + Bootstrap3 Icons - -A plugin for Candy Chat to enable left tabs with simple Bootstrap3 theme elements. - -![Left Tabs + Bootstrap3](screenshot.png) - -## Usage -Include the JavaScript and CSS files: -```HTML - - -``` -Remember to include your Bootstrap3 CSS/JS files! They are not included in this plugin. ;) - -To enable this Left Tabs plugin, add its `init` method _before_ you `init` Candy: -```JavaScript -CandyShop.LeftTabs.init(); -Candy.init('/http-bind', { ... -``` -## Compatibility with other plugins - -Make sure to `init` it after all other plugins, but before the Candy `init`. - -1. CreateRoom diff --git a/candy-plugins/lefttabs/lefttabs.css b/candy-plugins/lefttabs/lefttabs.css deleted file mode 100644 index 6641480..0000000 --- a/candy-plugins/lefttabs/lefttabs.css +++ /dev/null @@ -1,239 +0,0 @@ -/** - * LeftTabs CSS - * - * @author Melissa Adamaitis - */ - -/* Message pane/body CSS. */ -#chat-rooms { - display: inline-block; - float: right; - margin-left: 50%; - margin-right: 14.6%; - width: 30.5%; -} -.message-pane-wrapper { - float:right; - height: auto; - margin: 0; - position: relative; - width: 100%; -} -.message-pane { - height: 100%; - padding-top: 1px; - width: 69.8%; - overflow-y: scroll; - position: fixed; -} -.message-pane .label { - padding-top: 7px; -} - -/* Input form CSS. */ -.message-form-wrapper { - float: left; - margin-right:auto; - position: relative; - width: 100%; -} -.message-form { - margin: 0; - position: relative; - width: 100%; -} -.message-form input.submit { - margin: 2px 3px; - position: absolute; -} - -/* Roster (right) menu CSS. */ -.roster-pane { - background-color: initial; - border: 0; - box-shadow: none; - float:right; - margin: 0; - padding-right: 3px; - padding-top: 2px; - position: fixed; - right: 0; - width: 14%; -} -.roster-pane .label { - color: #555; - font-size: 0.85em; - line-height: 1em; - padding-left: 0; - text-shadow: none; - width: auto; -} -.roster-pane .user { - border: 0; - box-sizing: initial; - box-shadow: none; - font-size: 14px; - padding: 0; -} -.roster-pane .user ul { - float: right; - margin: 0; - position: relative; -} -.roster-pane .user:hover { - background-color: initial; -} -.roster-pane .user:hover .label { - color: #33bbfc; -} - -/* Toolbar CSS. (Below roster.) */ -#chat-toolbar { - height: 30px; - margin-bottom: 0; - width: 14.5%; -} -#chat-toolbar li { - background-image: none !important; - font-size: 1.25em; - line-height: 1em; -} -#emoticons-icon { - color: #F3E43C; -} -/* Volume. */ -#chat-sound-control, #chat-autoscroll-control { - color: #ccc; -} -#chat-sound-control .glyphicon { - display: none; -} -#chat-sound-control .glyphicon.glyphicon-volume-off { - display: initial; - color: #9b1414; -} -#chat-sound-control.checked .glyphicon.glyphicon-volume-off { - display: none; -} -#chat-sound-control.checked .glyphicon.glyphicon-volume-up { - display: block; -} -/* Scroll */ -#chat-autoscroll-control { - position: relative; -} -#chat-autoscroll-control .glyphicon.glyphicon-ban-circle { - display: initial; - color: #9b1414; - position: absolute; - left: 0; -} -#chat-autoscroll-control.checked .glyphicon.glyphicon-ban-circle { - display: none; -} -/* Status message */ -#chat-statusmessage-control { - position: relative; - color: #6EAEFF; -} -#chat-statusmessage-control .glyphicon.glyphicon-ban-circle { - display: initial; - color: #9b1414; - left: 0; - position: absolute; -} -#chat-statusmessage-control.checked .glyphicon.glyphicon-ban-circle { - display: none; -} -/* Users icon */ -.usercount span.glyphicon { - background-color: initial; -} - -/* Left menu CSS. */ -#left-menu-wrapper { - display: inline-block; - float: left; - position: fixed; - width: 50%; -} -#chat-tabs { - margin: 0; - float: right; - width: 99%; -} -#chat-tabs > li { - margin: 0; - margin-top: 2px; - width: 100% !important; -} -#chat-tabs > li:first-of-type { - margin-top: 0; -} -#chat-tabs a.transition { - display: none; -} -#chat-tabs a.label { - border-radius: 3px 0 0 3px; - text-align: left; - width: 100%; -} -#chat-tabs a.close { - right: -5px; - top: -7px; -} - -/* Extra details (badges, non-specific hovers, background colors, etc...) */ -#chat-tabs small.unread { - border-radius: 50%; - cursor: default; - height: 17px; - padding: 0; - top: 3px; - text-align: center; - width: 17px; -} -.label[href]:hover, .label[href]:focus { - color: #858585; -} -#chat-pane, #roster-pane { - background: #b0e1f2; /* Old browsers */ - background: -moz-linear-gradient(top, #b0e1f2 26%, #81bfe2 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(26%,#b0e1f2), color-stop(100%,#81bfe2)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #b0e1f2 26%,#81bfe2 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #b0e1f2 26%,#81bfe2 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #b0e1f2 26%,#81bfe2 100%); /* IE10+ */ - background: linear-gradient(to bottom, #b0e1f2 26%,#81bfe2 100%); /* W3C */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#b0e1f2', endColorstr='#81bfe2',GradientType=0 ); /* IE6-9 */ -} - -/* Compatibility with CreateRoom plugin. */ -#create-group { - background: #eee; - border-radius: 3px 0 0 3px; - cursor: pointer !important; - float: right; - height: 18px !important; - margin-right: 1px; - margin-top: 9px; - position: initial; - width: 99%; -} - -#create-group .click { - font-size: 75%; - font-weight: 700; - line-height: 1; - vertical-align: baseline; - position: initial; - text-align: left; -} - -.row { - margin: 0 !important; -} - -/* Align tooltip context menu properly in the roster. */ -#context-menu { - margin-top: 48px !important; -} diff --git a/candy-plugins/lefttabs/lefttabs.js b/candy-plugins/lefttabs/lefttabs.js deleted file mode 100644 index f2d68d8..0000000 --- a/candy-plugins/lefttabs/lefttabs.js +++ /dev/null @@ -1,104 +0,0 @@ -/** File: lefttabs.js - * Candy Plugin Left Tabs + Bootstrap3 Layout - * Author: Melissa Adamaitis - */ - -/* global window, Candy, jQuery */ - -var CandyShop = (function(self) { return self; }(CandyShop || {})); - -CandyShop.LeftTabs = (function(self, Candy, $) { - /** - * Initializes the LeftTabs plugin with the default settings. - */ - self.init = function(){ - Candy.View.Template.Chat = { - pane: '
{{> tabs}}{{> toolbar}}{{> rooms}}
{{> modal}}', - rooms: '
', - tabs: '
', - tab: '
  • ' + - '{{#privateUserChat}} {{/privateUserChat}}{{name}}' + - '\u00D7' + - '
  • ', - modal: '
    \u00D7' + - '' + - '' + - '
    ', - adminMessage: '
  • {{time}}
    ' + - '{{sender}}' + - '{{subject}} {{message}}
  • ', - infoMessage: '
  • {{time}}
    ' + - '{{subject}} {{message}}
  • ', - toolbar: '
      ' + - '
    • ' + - '
    • {{> soundcontrol}}
    • ' + - '
    • ' + - '
    • ' + - '
    • ' + - '
    • ' + - '
    ', - soundcontrol: '' + - '', - Context: { - menu: '
    ' + - '
      ', - menulinks: '
    • {{label}}
    • ', - contextModalForm: '
      ' + - '' + - '' + - '
      ', - adminMessageReason: '×' + - '

      {{_action}}

      {{#reason}}

      {{_reason}}

      {{/reason}}' - }, - tooltip: '
      ' + - '
      ' - }; - - // Make the message pane the full height of the window. - self.heights(); - - // Make sure that the window heights are the right size after the window is resized. - $(window).resize(function() { - self.heights(); - }); - - // Make sure that the window heights are the right size after a new room is added. - $(Candy).on('candy:view.room.after-add', function() { - self.heights(); - if(typeof CandyShop.CreateRoom === "object") { - self.createRoomPluginCompatibility(); - } - }); - - $(Candy).on('candy:view.message.after-show', function(ev, obj) { - if(Candy.View.Pane.Window.autoscroll) { - $('div[data-roomjid="' + obj.roomJid + '"] .message-pane').scrollTop($('div[data-roomjid="' + obj.roomJid + '"] .message-pane').prop('scrollHeight') + $('div[data-roomjid="' + obj.roomJid + '"] .message-form-wrapper').height()); - } - }); - - }; - - self.heights = function() { - var barless_height = $(window).height() - $('.message-form-wrapper').height(); - var message_pane_height = barless_height; - var message_pane_wrapper_height = (barless_height - parseInt($('.message-pane-wrapper').css('padding-bottom'))); - if(CandyShop.RoomBar) { - message_pane_height = barless_height - parseInt($('.roombar').css('height')); - $('.message-pane').css('margin-top', parseInt($('.roombar').css('height')) + 'px'); - } - $('.message-pane-wrapper').height(message_pane_wrapper_height + 'px'); - $('.message-pane').height(message_pane_height + 'px'); - $('.roster-pane').height(barless_height + 'px'); - }; - - self.createRoomPluginCompatibility = function() { - $('#create-group-form button').addClass('btn'); - $('#create-group-form .close-button').html(''); - }; - - return self; -}(CandyShop.LeftTabs || {}, Candy, jQuery)); diff --git a/index.html b/index.html index f17bb3a..deb16d8 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@ - + @@ -28,11 +28,11 @@ - +