|
|
|
@ -45,35 +45,6 @@ App.Router.map(function() {
|
|
|
|
|
this.route('comingsoon'); |
|
|
|
|
this.route('older'); |
|
|
|
|
}); |
|
|
|
|
/* this.resource('nowshowing', { path: 'm/nowshowing' }); |
|
|
|
|
this.resource('comingsoon', { path: 'm/comingsoon' }); |
|
|
|
|
this.resource('older', { path: 'm/older' });*/ |
|
|
|
|
this.resource('login'); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
App.LoginRoute = Ember.Route.extend({ |
|
|
|
|
renderTemplate: function() { |
|
|
|
|
console.log("rendering!!"); |
|
|
|
|
this.render('login', { controller: 'login' }); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// Controllers
|
|
|
|
|
|
|
|
|
|
App.LoginController = Ember.Controller.extend({ |
|
|
|
|
login: function() { |
|
|
|
|
var self = this, data = this.getProperties('username', 'password'); |
|
|
|
|
|
|
|
|
|
self.set('errorMessage', null); |
|
|
|
|
Ember.$.post(restUrl+'/login/', data).then(function(response) { |
|
|
|
|
self.set('errorMessage', response.message); |
|
|
|
|
if (response.success) { |
|
|
|
|
self.set('token', request.token); |
|
|
|
|
console.log(request); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -195,11 +166,11 @@ App.MoviesComingsoonView = Ember.View.extend({
|
|
|
|
|
transitionDuration: '0.7s', |
|
|
|
|
isResizeBound: true |
|
|
|
|
}); |
|
|
|
|
/*echo.init({ |
|
|
|
|
echo.init({ |
|
|
|
|
offset: 100, |
|
|
|
|
throttle: 250, |
|
|
|
|
unload: false |
|
|
|
|
});*/ |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
@ -243,11 +214,11 @@ App.MoviesOlderView = Ember.View.extend({
|
|
|
|
|
transitionDuration: '0.7s', |
|
|
|
|
isResizeBound: true |
|
|
|
|
}); |
|
|
|
|
/*echo.init({ |
|
|
|
|
echo.init({ |
|
|
|
|
offset: 100, |
|
|
|
|
throttle: 250, |
|
|
|
|
unload: false |
|
|
|
|
});*/ |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|