diff --git a/less/header.less b/less/header.less index d920c81..73be6a5 100644 --- a/less/header.less +++ b/less/header.less @@ -374,3 +374,79 @@ body.skin-default .header { } } } + +label.dropdown-toggle { + cursor: pointer; + margin: 0; +} + +#user-control-list-check:checked + #user-control-list { + display: block; +} + +.navbar-default { + .navbar-nav { + > li > label { + color: @navbar-default-link-color; + + &:hover, + &:focus { + color: @navbar-default-link-hover-color; + background-color: @navbar-default-link-hover-bg; + } + } + > .active > label { + &, + &:hover, + &:focus { + color: @navbar-default-link-active-color; + background-color: @navbar-default-link-active-bg; + } + } + > .disabled > label { + &, + &:hover, + &:focus { + color: @navbar-default-link-disabled-color; + background-color: @navbar-default-link-disabled-bg; + } + } + > .open > label { + &, + &:hover, + &:focus { + background-color: @navbar-default-link-active-bg; + color: @navbar-default-link-active-color; + } + } + } +} + +.dropdown-menu > li > form { + > button, > .btn-link { + text-align: left; + width: 100%; + background: none; + border: none; + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: @line-height-base; + color: @dropdown-link-color; + white-space: nowrap; // prevent links from randomly breaking onto new lines + + &:hover, + &:focus { + text-decoration: none; + color: @dropdown-link-hover-color; + background-color: @dropdown-link-hover-bg; + } + } +} + +html[data-dir="rtl"] { + .dropdown-menu > li > form > button { + text-align: right; + } +} diff --git a/less/mobile.less b/less/mobile.less index e571963..0b0a930 100644 --- a/less/mobile.less +++ b/less/mobile.less @@ -63,13 +63,13 @@ background-color: #1D1F20; background-image: linear-gradient(145deg, #1D1F20, #404348); - a { + a, button { color: #fff; text-decoration: none; - } - a:hover { - text-decoration: underline; + &:hover { + text-decoration: underline; + } } .chat-list { @@ -81,15 +81,15 @@ color: #fff; position: relative; height: 60px; - + &:hover { background: none; } - + &:not(:last-child) { border-bottom: none; } - + .main-avatar { position: absolute; top: 0; @@ -102,11 +102,11 @@ border-radius: 0; } } - + .members { display: none; } - + .room-name { display: block; overflow: hidden; @@ -114,7 +114,7 @@ text-overflow: ellipsis; padding-left: 60px; } - + .teaser-content { padding-left: 60px; display: block; @@ -186,18 +186,20 @@ } .menu-section-list { - padding:0; + padding: 0; margin: 10px 0; - list-style:none; + list-style: none; - a { + a, button { display: block; padding: 10px 20px; - } + text-align: left; + width: 100%; - a:hover { - background-color: rgba(255, 255, 255, 0.1); - text-decoration: none; + &:hover { + background-color: rgba(255, 255, 255, 0.1); + text-decoration: none; + } } } diff --git a/lib/client/chats.js b/lib/client/chats.js deleted file mode 100644 index a907b07..0000000 --- a/lib/client/chats.js +++ /dev/null @@ -1,20 +0,0 @@ -define('persona/chats', ['components', 'forum/chats'], function(components, coreChats) { - var Chats = {}; - - Chats.init = function() { - var env = utils.findBootstrapEnvironment(); - if (ajaxify.data.hasOwnProperty('roomId') && (env === 'sm' || env === 'xs')) { - app.openChat(ajaxify.data.roomId, ajaxify.data.uid); - } - components.get('chat/recent').on('click', '[component="chat/recent/room"]', function(e) { - env = utils.findBootstrapEnvironment(); - if (env === 'xs' || env === 'sm') { - app.openChat($(this).attr('data-roomid')); - } else { - coreChats.switchChat($(this).attr('data-roomid')); - } - }); - }; - - return Chats; -}); \ No newline at end of file diff --git a/lib/modules/quickreply.js b/lib/modules/quickreply.js index b7f322f..a79ae83 100644 --- a/lib/modules/quickreply.js +++ b/lib/modules/quickreply.js @@ -3,29 +3,30 @@ /*globals $, app, ajaxify, socket*/ define('persona/quickreply', ['components'], function(components) { - var QuickReply = {}; - - QuickReply.init = function() { - - var element = components.get('topic/quickreply/text'); - var data = { - element: element, - strategies: [], - options: { - zIndex: 100, - listPosition: function(position) { - this.$el.css(this._applyPlacement(position)); + var QuickReply = {}; + + QuickReply.init = function() { + + var element = components.get('topic/quickreply/text'); + var data = { + element: element, + strategies: [], + options: { + zIndex: 100, + listPosition: function(position) { + this.$el.css(this._applyPlacement(position)); this.$el.css('position', 'absolute'); return this; - } - } - }; - - $(window).trigger('composer:autocomplete:init', data); + } + } + }; + + $(window).trigger('composer:autocomplete:init', data); data.element.textcomplete(data.strategies, data.options); $('.textcomplete-wrapper').css('height', '100%').find('textarea').css('height', '100%'); - + components.get('topic/quickreply/button').on('click', function(e) { + e.preventDefault(); var replyMsg = components.get('topic/quickreply/text').val(); var replyData = { tid: ajaxify.data.tid, @@ -41,6 +42,6 @@ define('persona/quickreply', ['components'], function(components) { }); }); }; - - return QuickReply; + + return QuickReply; }); diff --git a/lib/persona.js b/lib/persona.js index 532603d..fc14723 100644 --- a/lib/persona.js +++ b/lib/persona.js @@ -26,11 +26,7 @@ $(document).ready(function() { NProgress.done(); setupHoverCards(); - if (data.url && data.url.match('^user/.+/chats')) { - require(['persona/chats'], function(chats) { - chats.init(); - }); - } else if (data.url && data.url.match('user/')) { + if (data.url && data.url.match('user/')) { setupFavouriteButtonOnProfile(); } }); diff --git a/plugin.json b/plugin.json index 2aea4b9..342429b 100644 --- a/plugin.json +++ b/plugin.json @@ -14,8 +14,7 @@ "lib/modules/nprogress.js", "lib/modules/autohidingnavbar.min.js", "lib/modules/slideout.min.js", - "lib/modules/quickreply.js", - "lib/client/chats.js" + "lib/modules/quickreply.js" ], "acpScripts": [ "lib/admin.js" diff --git a/templates/category.tpl b/templates/category.tpl index c9d58e9..6800957 100644 --- a/templates/category.tpl +++ b/templates/category.tpl @@ -12,7 +12,7 @@
{error}