Skip to content

Instantly share code, notes, and snippets.

View pavloo's full-sized avatar
🎯
Focusing

Pavlo Osadchyi pavloo

🎯
Focusing
View GitHub Profile
{{else}}
{{#view Teachertrainingv2.Carousel contentBinding="carouselCuepoints"}}
{{view view.itemsView}}
<a class="carousel-control left cur-ptr" data-slide="prev" {{action "previousSlide" target="view"}}>
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a class="carousel-control right cur-ptr" data-slide="next" {{action "nextSlide" target="view"}}>
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
<p class="text-center carousel-pos">
initialize: (container, application)->
sharedStore = Ember.Object.create()
auth = Ember.Object.extend
token: null
currentUser: (->
result = application.LoginLogic.retrieveCurrentUser(@get('token'))
if result
initialize: (container, application)->
shared = container.lookup('globals:shared')
shared.set('auth.token', window.localStorage.auth_token)
needs: 'application'.w()
...
currentUser = @get('controllers.application.model')
Application = Ember.Route.extend
model: (_, transition)->
@_needsAuth(transition.targetName) and @store.find('user', 'current').catch( =>
@transitionTo('sign_in')
Ember.RSVP.resolve()
)
createRegularPayment: (period) ->
payment = @get('store').createRecord('RegularPayment',
{
period: period.period
date: period.date
})
payment.save().then (regular) ->
console.log 'here'
template = @get('store').createRecord('paymentTemplate',
{
createRegularPayment: (period) ->
payment = @get('store').createRecord('RegularPayment',
{
period: period.period
date: period.date
})
template = @get('store').createRecord('paymentTemplate',
{
title: @get('paymentTitle')