Skip to content

Commit

Permalink
tabs and header padding
Browse files Browse the repository at this point in the history
  • Loading branch information
kevzettler committed Apr 3, 2012
1 parent 3130e21 commit a94ce20
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
13 changes: 10 additions & 3 deletions app/assets/javascripts/backbone/kandan.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,23 @@ window.Kandan =

initTabs: ()->
$('#channels').tabs({
create: (event, ui)->
$('ul.ui-tabs-nave').css({top: $('.header').offset().top + "px"})

select: (event, ui)->
$(document).data('active_channel_id',
Kandan.Helpers.Channels.getChannelIdByTabIndex(ui.index))
Kandan.Helpers.Channels.getChannelIdByTabIndex(ui.index))
Kandan.Data.Channels.runCallbacks('change')
})

$("#channels").tabs 'option', 'tabTemplate', '''
<li>
<a href="#{href}">#{label}</a>
<a href="#" class="ui-icon ui-icon-close">x</a>
<span class="tab_right"></span>
<span class="tab_left"></span>
<span class="tab_content">
<a href="#{href}">#{label}</a>
<a href="#" class="ui-icon ui-icon-close">x</a>
</span>
</li>
'''

Expand Down
3 changes: 3 additions & 0 deletions app/assets/stylesheets/_base.sass
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
+background-image(linear-gradient($header-bg-1, $header-bg-2))
z-index: 10
padding: 0 5px
-webkit-box-shadow: inset -7px -7px 6px -5px #3a4547
-moz-box-shadow: inset -7px -7px 6px -5px #3a4547
box-shadow: inset -7px -7px 6px -5px #3a4547

.logo
padding-top: 5px
Expand Down
3 changes: 3 additions & 0 deletions app/assets/stylesheets/_sidebar.sass
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@
color: #CCC
padding-left: 10px
padding-right: 10px
padding-top: 4px
height: 20px
line-height: 20px
img
vertical-align: middle
width: 20px
Expand Down
8 changes: 6 additions & 2 deletions app/assets/templates/chatarea.jst.eco
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
<ul>
<% for channel in @channels.models: %>
<li>
<a href="#<%= "channels-#{channel.get('id')}" %>"><%= channel.get('name') %></a>
<a href="#" class="close_channel" title="close channel">x</a>
<span class="tab_right"></span>
<span class="tab_left"></span>
<span class="tab_content">
<a href="#<%= "channels-#{channel.get('id')}" %>"><%= channel.get('name') %></a>
<a href="#" class="close_channel" title="close channel">x</a>
</span>
</li>
<% end %>
<li>
Expand Down

0 comments on commit a94ce20

Please sign in to comment.