Add some top menu logic

This commit is contained in:
2014-04-06 23:04:34 +02:00
parent dd8f0df6d2
commit 7915cc6684
12 changed files with 143 additions and 22 deletions
@@ -0,0 +1,15 @@
App.ApplicationView = Ember.View.extend
didInsertElement: ->
$('.main-section').css 'min-height', ($(window).height() - $('.tab-bar:first').outerHeight())
$('.toggle-side-menu,.side-menu').click ->
menu = $('aside.side-menu')
toggle = $('.toggle-side-menu')
if menu.is(':visible')
menu.animate left: -255, -> $(@).hide()
toggle.animate left: 0, -> $(@).removeClass('open')
else
menu.show().animate left: 0
toggle.animate left: 222 - 30, -> $(@).addClass('open')
$(document).foundation()