File: /var/www/html/assets/js/angular/controllers/root.js
(function() {
if (typeof App !== "undefined" && App !== null) {
App.controller('RootCtrl', [
'$scope', function($scope) {
$scope.init = function(){
if(jQuery('#loginmodal .login #wpmem_msg')[0]) {
$scope.loginModal = true;
$scope.userCat = 'login';
} else if(jQuery('#loginmodal .register #wpmem_msg')[0]){
$scope.loginModal = true;
$scope.userCat = 'register';
} else {
$scope.loginModal = false;
}
};
$scope.showLoginModal = function(cat) {
$scope.loginModal = true;
$scope.userCat = cat;
};
$scope.hideLoginModal = function() {
$scope.loginModal = false;
$scope.userCat = null;
};
}
]);
}
}).call(this);