diff --git a/app/assets/images/tabs/tab-active-bg.png b/app/assets/images/tabs/tab-active-bg.png
new file mode 100644
index 00000000..481dff78
Binary files /dev/null and b/app/assets/images/tabs/tab-active-bg.png differ
diff --git a/app/assets/images/tabs/tab-active-left.png b/app/assets/images/tabs/tab-active-left.png
new file mode 100644
index 00000000..f3516465
Binary files /dev/null and b/app/assets/images/tabs/tab-active-left.png differ
diff --git a/app/assets/images/tabs/tab-active-middle.png b/app/assets/images/tabs/tab-active-middle.png
new file mode 100644
index 00000000..5f70390b
Binary files /dev/null and b/app/assets/images/tabs/tab-active-middle.png differ
diff --git a/app/assets/images/tabs/tab-active-right.png b/app/assets/images/tabs/tab-active-right.png
new file mode 100644
index 00000000..0cd3505b
Binary files /dev/null and b/app/assets/images/tabs/tab-active-right.png differ
diff --git a/app/assets/images/tabs/tab-inactive-left.png b/app/assets/images/tabs/tab-inactive-left.png
new file mode 100644
index 00000000..b9c6542f
Binary files /dev/null and b/app/assets/images/tabs/tab-inactive-left.png differ
diff --git a/app/assets/images/tabs/tab-inactive-middle.png b/app/assets/images/tabs/tab-inactive-middle.png
new file mode 100644
index 00000000..689a2b08
Binary files /dev/null and b/app/assets/images/tabs/tab-inactive-middle.png differ
diff --git a/app/assets/images/tabs/tab-inactive-right.png b/app/assets/images/tabs/tab-inactive-right.png
new file mode 100644
index 00000000..443a111d
Binary files /dev/null and b/app/assets/images/tabs/tab-inactive-right.png differ
diff --git a/app/assets/images/tabs/tab-new.png b/app/assets/images/tabs/tab-new.png
new file mode 100644
index 00000000..0eb1115c
Binary files /dev/null and b/app/assets/images/tabs/tab-new.png differ
diff --git a/app/assets/javascripts/backbone/kandan.js.coffee b/app/assets/javascripts/backbone/kandan.js.coffee
index 18f3ec04..d07ce03b 100644
--- a/app/assets/javascripts/backbone/kandan.js.coffee
+++ b/app/assets/javascripts/backbone/kandan.js.coffee
@@ -66,14 +66,16 @@ window.Kandan =
})
$("#kandan").tabs 'option', 'tabTemplate', '''
-
-
-
-
- #{label}
- x
-
-
+
+
+
+
+
+ #{label}
+ x
+
+
+
'''
initChatArea: (channels)->
diff --git a/app/assets/javascripts/backbone/views/channel_tabs.js.coffee b/app/assets/javascripts/backbone/views/channel_tabs.js.coffee
index 4c0d56ea..f986d7a7 100644
--- a/app/assets/javascripts/backbone/views/channel_tabs.js.coffee
+++ b/app/assets/javascripts/backbone/views/channel_tabs.js.coffee
@@ -2,11 +2,6 @@ class Kandan.Views.ChannelTabs extends Backbone.View
template: JST['channel_tabs']
tagName: 'ul'
- events:
- "click .close_channel" : "deleteChannel"
- "click #create_channel": "createChannel"
-
-
render: ()->
$(@el).html @template({channels: @options.channels})
@
diff --git a/app/assets/javascripts/backbone/views/chatarea.js.coffee b/app/assets/javascripts/backbone/views/chatarea.js.coffee
index 3fb07e5d..b46f63f1 100644
--- a/app/assets/javascripts/backbone/views/chatarea.js.coffee
+++ b/app/assets/javascripts/backbone/views/chatarea.js.coffee
@@ -3,8 +3,10 @@ class Kandan.Views.ChatArea extends Backbone.View
render: ->
tabView = new Kandan.Views.ChannelTabs({channels: @options.channels})
$('.header .logo').after(tabView.render().el)
- console.log(tabView);
+
+ # Binding tab events here, backbone can't properly attach
$('#create_channel').click(tabView.createChannel)
+ $('.header ul a').delegate('.close_channel', 'click', tabView.deleteChannel)
for channel in @options.channels.models
view = new Kandan.Views.ChannelPane({channel: channel})
diff --git a/app/assets/stylesheets/_base.sass b/app/assets/stylesheets/_base.sass
index 125b150f..bef36e6c 100644
--- a/app/assets/stylesheets/_base.sass
+++ b/app/assets/stylesheets/_base.sass
@@ -19,7 +19,7 @@
+background-image(linear-gradient($header-bg-1, $header-bg-2))
z-index: 10
padding: 0 5px
- +box-shadow(inset 0px -7px 6px -5px #3a4547)
+ +box-shadow(inset 0px -10px 10px -10px #000000)
border-bottom: 1px solid #FFF
margin-top: -2px
@@ -30,6 +30,9 @@
.user_flag
float: right
+cite
+ font-style: normal
+
.user_flag
display: block
border-color: #a8aeb0 transparent transparent transparent
diff --git a/app/assets/stylesheets/_chat_area.sass b/app/assets/stylesheets/_chat_area.sass
index ce82c4af..44382bb1 100644
--- a/app/assets/stylesheets/_chat_area.sass
+++ b/app/assets/stylesheets/_chat_area.sass
@@ -10,22 +10,54 @@
border: none
a
color: $active-tab-color !important
- &:hover
- text-decoration: underline
.close_channel
font-size: 12px
html body .ui-tabs .ui-tabs-nav li
top: 2px !important
- margin-right: 5px
-
+ margin-right: 0px !important
.create_channel
cursor: hover
-.ui-tabs-nav
-
+.ui-tabs .ui-tabs-nav
+ .ui-state-default
+ .tab_left, .tab_content, .tab_right
+ display: block
+ height: 30px
+ background: transparent
+ .tab_left, .tab_right
+ width: 30px
+ .tab_left
+ background: url(image_path('tabs/tab-inactive-left.png')) no-repeat
+ float: left
+ .tab_content
+ background: url(image_path('tabs/tab-inactive-middle.png')) repeat-x
+ float: left
+ padding-top: 7px
+ color: #585d5f !important
+ position: relative
+ .close_channel
+ cursor: pointer
+ padding-left: 5px
+ .tab_right
+ background: url(image_path('tabs/tab-inactive-right.png')) no-repeat
+ float: right
+ .ui-state-active
+ .tab_left
+ background-image: url(image_path('tabs/tab-active-left.png'))
+ .tab_content
+ background-image: url(image_path('tabs/tab-active-middle.png'))
+ .tab_right
+ background-image: url(image_path('tabs/tab-active-right.png'))
+ #create_channel
+ display: block
+ width: 70px
+ height: 30px
+ background: url(image_path('tabs/tab-new.png')) no-repeat top left
+ &:hover
+ background-position-x: -70px
.ui-tabs
+border-radius(0px)
padding: 0px
@@ -39,24 +71,20 @@ html body .ui-tabs .ui-tabs-nav li
float: left
padding: 0px !important
margin-left: 80px
- margin-bottom: 1px !important
- li a
+ li span
font-size: 14px
.ui-state-default
- background: #9da7aa
border: none
- border-top: 1px solid #bbc2c4
- +box-shadow(inset 0px -6px 7px -5px #3a4547)
color: #7f8587
+ background: transparent !important
a
+ padding: 0px !important
color: $active-tab-color
+ &:hover
+ span.tab_content
+ text-decoration: underline
.ui-state-active
- background: $active-tab-bg !important
- +box-shadow(none)
- border-top: 1px solid #FFF
text-shadow: 0px 0px 2px #FFF
- li a
- padding: 3px 8px
.ui-tabs-panel
padding: 0px
padding-right: 20px
diff --git a/app/assets/templates/channel_tabs.jst.eco b/app/assets/templates/channel_tabs.jst.eco
index 40db865a..d52992dd 100644
--- a/app/assets/templates/channel_tabs.jst.eco
+++ b/app/assets/templates/channel_tabs.jst.eco
@@ -1,11 +1,13 @@
<% for channel in @channels.models: %>
+ ">
- "><%= channel.get('name') %>
- x
+ <%= channel.get('name') %>
+ x
+
<% end %>
<%- JST['create_channel']() %>
diff --git a/app/assets/templates/create_channel.jst.eco b/app/assets/templates/create_channel.jst.eco
index dd65b659..4510ba57 100644
--- a/app/assets/templates/create_channel.jst.eco
+++ b/app/assets/templates/create_channel.jst.eco
@@ -1,3 +1,3 @@
- +
+