diff --git a/app/assets/images/full logo on dark.svg b/app/assets/images/full logo on dark.svg index e9a5ab8d2..c6979f697 100644 --- a/app/assets/images/full logo on dark.svg +++ b/app/assets/images/full logo on dark.svg @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/app/assets/images/logotype on dark.svg b/app/assets/images/logotype on dark.svg new file mode 100644 index 000000000..ec4360a20 --- /dev/null +++ b/app/assets/images/logotype on dark.svg @@ -0,0 +1,17 @@ + + \ No newline at end of file diff --git a/app/assets/images/logotype.svg b/app/assets/images/logotype.svg deleted file mode 100644 index 4e29ad919..000000000 --- a/app/assets/images/logotype.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/app/assets/javascripts/app/controllers/_application_controller_generic.js.coffee b/app/assets/javascripts/app/controllers/_application_controller_generic.js.coffee index 2245d5604..2a05ee2d8 100644 --- a/app/assets/javascripts/app/controllers/_application_controller_generic.js.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller_generic.js.coffee @@ -477,16 +477,21 @@ class App.ActionRow extends App.Controller ) class App.Sidebar extends App.Controller + elements: + '.tabsSidebar-tab': 'tabs' + '.sidebar': 'sidebars' + events: 'click .tabsSidebar-tab': 'toggleTab' 'click .tabsSidebar-close': 'toggleSidebar' + 'click .sidebar-header h2': 'toggleDropdown' constructor: -> super @render() # get first tab - name = @el.find('.tabsSidebar-tab').first().data('tab') + name = @tabs.first().data('tab') # activate first tab @toggleTabAction(name) @@ -508,7 +513,11 @@ class App.Sidebar extends App.Controller type: 'small' ) - toggleSidebar: -> + toggleDropdown: (e) => + e.stopPropagation() + $(e.currentTarget).next('.js-actions').find('.dropdown-toggle').dropdown('toggle') + + toggleSidebar: => @el.parent().find('.tabsSidebar-sidebarSpacer').toggleClass('is-closed') @el.parent().find('.tabsSidebar').toggleClass('is-closed') @el.parent().next('.attributeBar').toggleClass('is-closed') @@ -518,7 +527,7 @@ class App.Sidebar extends App.Controller @el.parent().find('.tabsSidebar').removeClass('is-closed') @el.parent().next('.attributeBar').addClass('is-closed') - toggleTab: (e) -> + toggleTab: (e) => # get selected tab name = $(e.target).closest('.tabsSidebar-tab').data('tab') @@ -537,13 +546,13 @@ class App.Sidebar extends App.Controller return if !name # remove active state - @el.find('.tabsSidebar-tab').removeClass('active') + @tabs.removeClass('active') # add active state @el.find('.tabsSidebar-tab[data-tab=' + name + ']').addClass('active') # hide all content tabs - @el.find('.sidebar').addClass('hide') + @sidebars.addClass('hide') # show active tab content tabContent = @el.find('.sidebar[data-tab=' + name + ']') diff --git a/app/assets/javascripts/app/views/generic/sidebar_tabs.jst.eco b/app/assets/javascripts/app/views/generic/sidebar_tabs.jst.eco index 8f7777e48..ba1be18e0 100644 --- a/app/assets/javascripts/app/views/generic/sidebar_tabs.jst.eco +++ b/app/assets/javascripts/app/views/generic/sidebar_tabs.jst.eco @@ -2,7 +2,7 @@