Use entypo icons for left navbar
This commit is contained in:
parent
d3c0259026
commit
73d04b706e
10 changed files with 43 additions and 55 deletions
|
|
@ -8,7 +8,7 @@ app.views.Aspect = app.views.Base.extend({
|
||||||
className: 'hoverable',
|
className: 'hoverable',
|
||||||
|
|
||||||
events: {
|
events: {
|
||||||
'click .icons-check_yes_ok+a': 'toggleAspect'
|
'click .entypo.check+a': 'toggleAspect'
|
||||||
},
|
},
|
||||||
|
|
||||||
toggleAspect: function(evt) {
|
toggleAspect: function(evt) {
|
||||||
|
|
|
||||||
|
|
@ -58,9 +58,9 @@ app.views.AspectsList = app.views.Base.extend({
|
||||||
this.collection.each(function(aspect) {
|
this.collection.each(function(aspect) {
|
||||||
var element = this.$("li[data-aspect_id="+aspect.get('id')+"]");
|
var element = this.$("li[data-aspect_id="+aspect.get('id')+"]");
|
||||||
if (aspect.get('selected')) {
|
if (aspect.get('selected')) {
|
||||||
element.find('.icons-check_yes_ok').addClass('selected');
|
element.find('.entypo.check').addClass('selected');
|
||||||
} else {
|
} else {
|
||||||
element.find('.icons-check_yes_ok').removeClass('selected');
|
element.find('.entypo.check').removeClass('selected');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -31,13 +31,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.modify_aspect {
|
|
||||||
background: url("icons/pencil.png") no-repeat;
|
|
||||||
width: 12px;
|
|
||||||
height: 12px;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
#new_aspect {
|
#new_aspect {
|
||||||
.checkbox {
|
.checkbox {
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
|
|
|
||||||
|
|
@ -41,15 +41,34 @@
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
.action {
|
#aspects_list, #tags_list {
|
||||||
width: 12px;
|
.hoverable > .action {
|
||||||
height: 12px;
|
visibility: hidden;
|
||||||
display: none;
|
float: right;
|
||||||
float: right;
|
margin: 0 3px;
|
||||||
margin: 3px;
|
}
|
||||||
|
|
||||||
|
.hoverable:hover > .action {
|
||||||
|
visibility: visible;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.hoverable:hover > .action {
|
#aspects_list {
|
||||||
display: block;
|
.entypo.check {
|
||||||
|
float: left;
|
||||||
|
visibility: hidden;
|
||||||
|
&.selected { visibility: visible; }
|
||||||
|
}
|
||||||
|
|
||||||
|
.selected + a {
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#tags_list {
|
||||||
|
.delete_tag_following {
|
||||||
|
font-size: 20px;
|
||||||
|
line-height: 15px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,36 +26,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#aspects_list {
|
|
||||||
.icons-check_yes_ok {
|
|
||||||
height:18px;
|
|
||||||
width:18px;
|
|
||||||
background: url('icons/check_yes_ok.png') no-repeat;
|
|
||||||
float: left;
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.selected {
|
|
||||||
visibility: visible;
|
|
||||||
}
|
|
||||||
|
|
||||||
.selected + a {
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.modify_aspect {
|
|
||||||
background: url("icons/pencil.png") no-repeat;
|
|
||||||
width: 12px;
|
|
||||||
height: 12px;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
#tags_list {
|
#tags_list {
|
||||||
.delete_tag_following {
|
|
||||||
background: url("icons/deletelabel.png") no-repeat;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ---- override app/stylesheets/vendor/autoSuggest.css ---- */
|
/* ---- override app/stylesheets/vendor/autoSuggest.css ---- */
|
||||||
.tag_input {
|
.tag_input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
<a href="/contacts?a_id={{id}}" class="action modify_aspect"></a>
|
<a href="/contacts?a_id={{id}}" class="action modify_aspect">
|
||||||
|
<i class="entypo pencil"></i>
|
||||||
|
</a>
|
||||||
{{#if selected}}
|
{{#if selected}}
|
||||||
<div class="icons-check_yes_ok selected"></div>
|
<i class="entypo check selected"></i>
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class="icons-check_yes_ok"></div>
|
<div class="entypo check"></div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<a href="/aspects/query" class="selectable" data-guid="{{id}}"> {{name}} </a>
|
<a href="/aspects/query" class="selectable" data-guid="{{id}}"> {{name}} </a>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<a href="#" id="unfollow_{{name}}" rel="nofollow" class="action delete_tag_following" title="{{t "delete"}}"><a/>
|
<a href="#" id="unfollow_{{name}}" rel="nofollow" class="action delete_tag_following" title="{{t "delete"}}">×<a/>
|
||||||
<a href="/tags/{{name}}" class="selectable">
|
<a href="/tags/{{name}}" class="selectable">
|
||||||
#{{ name }}
|
#{{ name }}
|
||||||
</a>
|
</a>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
When(/^I unfollow the "(.*?)" tag$/) do |tag|
|
When(/^I unfollow the "(.*?)" tag$/) do |tag|
|
||||||
page.execute_script("$('#unfollow_#{tag}').css('display', 'block')")
|
within("#tags_list") do
|
||||||
find("#unfollow_#{tag}").click
|
li = find('li', text: tag)
|
||||||
|
li.hover
|
||||||
|
li.find('.delete_tag_following').click
|
||||||
|
end
|
||||||
step 'I confirm the alert'
|
step 'I confirm the alert'
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ describe("app.views.Aspect", function(){
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should show the aspect selected', function(){
|
it('should show the aspect selected', function(){
|
||||||
expect(this.view.$el.children('.icons-check_yes_ok').hasClass('selected')).toBeTruthy();
|
expect(this.view.$el.children('.entypo.check').hasClass('selected')).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should show the name of the aspect', function(){
|
it('should show the name of the aspect', function(){
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ describe("app.views.AspectsList", function(){
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should show all the aspects', function(){
|
it('should show all the aspects', function(){
|
||||||
var aspect_selectors = this.view.$('.icons-check_yes_ok + a.selectable');
|
var aspect_selectors = this.view.$('.entypo.check + a.selectable');
|
||||||
expect(aspect_selectors.length).toBe(3);
|
expect(aspect_selectors.length).toBe(3);
|
||||||
expect(aspect_selectors[0].text).toMatch('Work');
|
expect(aspect_selectors[0].text).toMatch('Work');
|
||||||
expect(aspect_selectors[1].text).toMatch('Friends');
|
expect(aspect_selectors[1].text).toMatch('Friends');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue