REFACTOR: Category / Tag Dropdown headers had extra classes
This commit is contained in:
parent
e4c2b5e430
commit
67556e6381
|
@ -35,7 +35,7 @@ export default Ember.Component.extend({
|
|||
}.property('category'),
|
||||
|
||||
dropdownButtonClass: function() {
|
||||
var result = 'badge-category category-dropdown-button';
|
||||
let result = 'dropdown-header category-dropdown-button';
|
||||
if (Em.isNone(this.get('category'))) {
|
||||
result += ' home';
|
||||
}
|
||||
|
@ -85,7 +85,9 @@ export default Ember.Component.extend({
|
|||
}
|
||||
}
|
||||
|
||||
if (categoryStyle === 'box') {
|
||||
return "background-color: #eee; color: #333".htmlSafe();
|
||||
}
|
||||
}.property('category'),
|
||||
|
||||
clickEventName: function() {
|
||||
|
|
|
@ -69,7 +69,7 @@ export default Ember.Component.extend({
|
|||
|
||||
@computed('tag')
|
||||
dropdownButtonClass() {
|
||||
let result = 'badge-category category-dropdown-button';
|
||||
let result = 'dropdown-header category-dropdown-button';
|
||||
if (Em.isNone(this.get('tag'))) {
|
||||
result += ' home';
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{#if category}}
|
||||
<a href {{action "expand"}} class="badge-category" style={{badgeStyle}} aria-label={{i18n 'categories.category_list'}} aria-expanded={{expanded}}>
|
||||
<a href {{action "expand"}} class="dropdown-header" style={{badgeStyle}} aria-label={{i18n 'categories.category_list'}} aria-expanded={{expanded}}>
|
||||
<span class="badge-category-bg" style={{categoryColor}}></span>
|
||||
{{#if category.read_restricted}}
|
||||
{{d-icon "lock"}}
|
||||
|
@ -8,9 +8,9 @@
|
|||
</a>
|
||||
{{else}}
|
||||
{{#if noSubcategories}}
|
||||
<a href {{action "expand"}} class='badge-category home' style={{badgeStyle}} aria-label={{i18n 'categories.category_list'}} aria-expanded={{expanded}}>{{i18n 'categories.no_subcategory'}}</a>
|
||||
<a href {{action "expand"}} class='dropdown-header home' style={{badgeStyle}} aria-label={{i18n 'categories.category_list'}} aria-expanded={{expanded}}>{{i18n 'categories.no_subcategory'}}</a>
|
||||
{{else}}
|
||||
<a href {{action "expand"}} class='badge-category home' style={{badgeStyle}} aria-label={{i18n 'categories.category_list'}} aria-expanded={{expanded}}>{{allCategoriesLabel}}</a>
|
||||
<a href {{action "expand"}} class='dropdown-header home' style={{badgeStyle}} aria-label={{i18n 'categories.category_list'}} aria-expanded={{expanded}}>{{allCategoriesLabel}}</a>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{{#if showTagDropdown}}
|
||||
{{#if tagId}}
|
||||
{{#if noTagsSelected}}
|
||||
<a href {{action "expand"}} class="badge-category {{tagClass}} home">{{noTagsLabel}}</a>
|
||||
<a href {{action "expand"}} class="dropdown-header {{tagClass}} home">{{noTagsLabel}}</a>
|
||||
{{else}}
|
||||
<a href {{action "expand"}} class="badge-category {{tagClass}}">{{tagId}}</a>
|
||||
<a href {{action "expand"}} class="dropdown-header {{tagClass}}">{{tagId}}</a>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
<a href {{action "expand"}} class="badge-category {{tagClass}} home">{{allTagsLabel}}</a>
|
||||
<a href {{action "expand"}} class="dropdown-header {{tagClass}} home">{{allTagsLabel}}</a>
|
||||
{{/if}}
|
||||
|
||||
{{#if tags}}
|
||||
|
@ -14,8 +14,8 @@
|
|||
{{d-icon expandedIcon}}
|
||||
</a>
|
||||
<section class="{{unless expanded 'hidden'}} category-dropdown-menu chooser">
|
||||
<div class='cat'><a href={{allTagsUrl}} data-drop-close="true" class='badge-category home'>{{allTagsLabel}}</a></div>
|
||||
<div class='cat'><a href={{noTagsUrl}} data-drop-close="true" class='badge-category home'>{{noTagsLabel}}</a></div>
|
||||
<div class='cat'><a href={{allTagsUrl}} data-drop-close="true" class='dropdown-header home'>{{allTagsLabel}}</a></div>
|
||||
<div class='cat'><a href={{noTagsUrl}} data-drop-close="true" class='dropdown-header home'>{{noTagsLabel}}</a></div>
|
||||
{{#if renderTags}}
|
||||
{{#each tags as |t|}}
|
||||
<div class='cat'>
|
||||
|
|
|
@ -247,7 +247,7 @@ ol.category-breadcrumb {
|
|||
overflow:hidden;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
a.badge-category {
|
||||
a.badge-category, .dropdown-header {
|
||||
font-size: 0.929em;
|
||||
font-weight: bold;
|
||||
float: none;
|
||||
|
|
|
@ -149,7 +149,7 @@
|
|||
|
||||
.list-controls {
|
||||
.category-breadcrumb {
|
||||
a.badge-category {
|
||||
a.badge-category, .dropdown-header {
|
||||
display: inline-block;
|
||||
padding: 5px 8px;
|
||||
line-height: 20px;
|
||||
|
@ -164,16 +164,17 @@
|
|||
}
|
||||
}
|
||||
|
||||
li.bar>.badge-category:not(.home):first-child {
|
||||
li.bar>.dropdown-header:not(.home):first-child {
|
||||
border-left: 5px solid;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
li.bar>.badge-category {
|
||||
li.bar>.dropdown-header {
|
||||
background: $primary-low;
|
||||
color: $primary;
|
||||
}
|
||||
|
||||
li.bullet>.badge-category {
|
||||
li.bullet>.dropdown-header {
|
||||
background: $primary-low;
|
||||
color: $primary;
|
||||
|
||||
|
@ -189,7 +190,7 @@
|
|||
}
|
||||
|
||||
.category-dropdown-menu {
|
||||
.badge-category {
|
||||
.dropdown-header {
|
||||
&.home {
|
||||
margin-left: 4px;
|
||||
padding-left: 0;
|
||||
|
|
|
@ -23,8 +23,7 @@
|
|||
float: none;
|
||||
}
|
||||
|
||||
|
||||
a.badge-category {
|
||||
a.badge-category, .dropdown-header {
|
||||
padding: 3px 12px;
|
||||
font-size: 1.143em;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue