From 4ac91374b90bff7c15f63da942eb3c99dff1c8ab Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Wed, 17 Sep 2014 11:48:10 +0200 Subject: [PATCH] Unified style for clickable buttons --- public_html/css/core.css | 11 +++++++++++ public_html/css/top-navigation.css | 7 ------- public_html/css/user-list.css | 4 ---- public_html/css/user.css | 4 ---- .../js/Presenters/TopNavigationPresenter.js | 6 +++--- public_html/js/Presenters/UserListPresenter.js | 4 ++-- public_html/templates/top-navigation.tpl | 2 +- public_html/templates/user-list.tpl | 8 ++++---- public_html/templates/user.tpl | 16 ++++++++++++---- 9 files changed, 33 insertions(+), 29 deletions(-) diff --git a/public_html/css/core.css b/public_html/css/core.css index 378f8567..3777b025 100644 --- a/public_html/css/core.css +++ b/public_html/css/core.css @@ -41,3 +41,14 @@ hr { border-top: 1px solid #eee; box-sizing: content-box; } + +.big-button.active { + background: #f7fbfc; + color: #8ba !important; +} + +.big-button:focus, +.big-button:hover { + background: #f3f7f8; + color: #7a9 !important; +} diff --git a/public_html/css/top-navigation.css b/public_html/css/top-navigation.css index dafd6b57..70ddf104 100644 --- a/public_html/css/top-navigation.css +++ b/public_html/css/top-navigation.css @@ -21,16 +21,9 @@ font-size: 15px; } -#top-navigation li.active a { - color: #8ba; - background: #f7fbfc; -} - #top-navigation li a:focus, #top-navigation li a:hover { outline: 0; - background: #f3f7f8; - color: #7a9; } #top-navigation li:first-child a { diff --git a/public_html/css/user-list.css b/public_html/css/user-list.css index 6a60fe0f..0bbea8e1 100644 --- a/public_html/css/user-list.css +++ b/public_html/css/user-list.css @@ -17,10 +17,6 @@ margin: 0 0.5em; } -#user-list ul.order li.active a { - background: #f7fbfc; -} - #user-list ul.order a { cursor: pointer; display: inline-block; diff --git a/public_html/css/user.css b/public_html/css/user.css index 022a3a91..bf9f049c 100644 --- a/public_html/css/user.css +++ b/public_html/css/user.css @@ -28,10 +28,6 @@ padding: 0.2em 0.5em; } -#user-view ul a.active { - background: #f7fbfc; -} - #user-view .tab { display: none; margin-top: 1.5em; diff --git a/public_html/js/Presenters/TopNavigationPresenter.js b/public_html/js/Presenters/TopNavigationPresenter.js index 011e9de2..51696c70 100644 --- a/public_html/js/Presenters/TopNavigationPresenter.js +++ b/public_html/js/Presenters/TopNavigationPresenter.js @@ -23,8 +23,8 @@ App.Presenters.TopNavigationPresenter = function( function select(newSelectedElement) { selectedElement = newSelectedElement; - $el.find('li').removeClass('active'); - $el.find('li.' + selectedElement).addClass('active'); + $el.find('li a').removeClass('active'); + $el.find('li.' + selectedElement).find('a').addClass('active'); } function loginStateChanged() { @@ -42,7 +42,7 @@ App.Presenters.TopNavigationPresenter = function( canListTags: auth.hasPrivilege(auth.privileges.listTags), canUploadPosts: auth.hasPrivilege(auth.privileges.uploadPosts), })); - $el.find('li.' + selectedElement).addClass('active'); + $el.find('li.' + selectedElement).find('a').addClass('active'); } function changeTitle(subTitle) { diff --git a/public_html/js/Presenters/UserListPresenter.js b/public_html/js/Presenters/UserListPresenter.js index 6935ac18..f86260a2 100644 --- a/public_html/js/Presenters/UserListPresenter.js +++ b/public_html/js/Presenters/UserListPresenter.js @@ -61,8 +61,8 @@ App.Presenters.UserListPresenter = function( } function updateActiveOrder(activeOrder) { - $el.find('.order li').removeClass('active'); - $el.find('.order [data-order="' + activeOrder + '"]').parent('li').addClass('active'); + $el.find('.order li a').removeClass('active'); + $el.find('.order [data-order="' + activeOrder + '"]').addClass('active'); } function renderUsers(users, clear) { diff --git a/public_html/templates/top-navigation.tpl b/public_html/templates/top-navigation.tpl index 34258010..b0173174 100644 --- a/public_html/templates/top-navigation.tpl +++ b/public_html/templates/top-navigation.tpl @@ -27,7 +27,7 @@ <% _.each(links, function(link) { %><% var className = link[0], target=link[1], title=link[2], iconClassName=link[3] %>
  • - +
    <%= title %>
    diff --git a/public_html/templates/user-list.tpl b/public_html/templates/user-list.tpl index 9d08fc8f..30766f04 100644 --- a/public_html/templates/user-list.tpl +++ b/public_html/templates/user-list.tpl @@ -1,16 +1,16 @@
    diff --git a/public_html/templates/user.tpl b/public_html/templates/user.tpl index 1c37a6dd..696cb134 100644 --- a/public_html/templates/user.tpl +++ b/public_html/templates/user.tpl @@ -12,24 +12,32 @@