From ccc1230828337c6c44c9ebe23dac6c92291b9b4d Mon Sep 17 00:00:00 2001 From: Matteo Pagliazzi Date: Tue, 4 Feb 2014 22:21:12 +0100 Subject: [PATCH] refactor(bs3): misc --- public/css/tasks.styl | 4 ++-- public/js/controllers/authCtrl.js | 10 ++++++---- views/shared/footer.jade | 10 +++++----- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/public/css/tasks.styl b/public/css/tasks.styl index bde1603316..35daa3e10a 100644 --- a/public/css/tasks.styl +++ b/public/css/tasks.styl @@ -61,8 +61,8 @@ for $stage in $stages margin: 0 0 0.5em padding: 0 -// 50% width columns with scrollbars -@media (max-width: 960px) +// 50% width columns with scrollbars for tablets +@media (min-width: 768px) and (max-width: 970px) .task-column max-height: 18.6em overflow-y: scroll diff --git a/public/js/controllers/authCtrl.js b/public/js/controllers/authCtrl.js index 9c65ee3541..1312b40d35 100644 --- a/public/js/controllers/authCtrl.js +++ b/public/js/controllers/authCtrl.js @@ -5,8 +5,8 @@ */ angular.module('authCtrl', []) - .controller("AuthCtrl", ['$scope', '$rootScope', 'User', '$http', '$location', '$window','API_URL', - function($scope, $rootScope, User, $http, $location, $window, API_URL) { + .controller("AuthCtrl", ['$scope', '$rootScope', 'User', '$http', '$location', '$window','API_URL', '$modal', + function($scope, $rootScope, User, $http, $location, $window, API_URL, $modal) { var runAuth; var showedFacebookMessage; @@ -71,8 +71,10 @@ angular.module('authCtrl', []) if (User.authenticated()) { window.location.href = '/#/tasks'; } else { - // Using controller: 'AuthCtrl' it causes problems - $rootScope.openModal('login'); + $modal.open({ + templateUrl: 'modals/login.html' + // Using controller: 'AuthCtrl' it causes problems + }); } } diff --git a/views/shared/footer.jade b/views/shared/footer.jade index f5a1df5666..231ab211e0 100644 --- a/views/shared/footer.jade +++ b/views/shared/footer.jade @@ -1,14 +1,14 @@ footer.footer(ng-controller='FooterCtrl') .container .row - .col-md-3 + .col-sm-3 h4=env.t('footerMobile') ul.list-unstyled li a(href='https://itunes.apple.com/us/app/habitrpg/id689569235?mt=8', target='_blank')=env.t('mobileIOS') li a(href='https://play.google.com/store/apps/details?id=com.ocdevel.habitrpg', target='_blank')=env.t('mobileAndroid') - .col-md-3 + .col-sm-3 h4=env.t('footerCompany') ul.list-unstyled.list-unstyled if (!env.isFrontPage) @@ -28,7 +28,7 @@ footer.footer(ng-controller='FooterCtrl') a(href='/static/privacy')=env.t('companyPrivacy') li a(href='/static/terms')=env.t('companyTerms') - .col-md-3 + .col-sm-3 h4=env.t('footerCommunity') ul.list-unstyled li @@ -47,7 +47,7 @@ footer.footer(ng-controller='FooterCtrl') a(target='_blank', href='https://www.facebook.com/Habitrpg')=env.t('communityFacebook') li a(target='_blank', href='http://www.reddit.com/r/habitrpg/')=env.t('communityReddit') - .col-md-3 + .col-sm-3 if (env.NODE_ENV=='production') h4=env.t('footerSocial') .addthis_toolbox.addthis_default_style(addthis:url='https://habitrpg.com', addthis:title=env.t('socialTitle')) @@ -64,7 +64,7 @@ footer.footer(ng-controller='FooterCtrl') tr td a.addthis_button_google_plusone(g:plusone:size='medium') - else + else if(!env.isFrontPage) h4 Debug ul.list-unstyled li