Skip to content

Commit

Permalink
Merge branch 'master' into stage
Browse files Browse the repository at this point in the history
  • Loading branch information
lautarobock committed Dec 11, 2013
2 parents 02c0763 + 6726144 commit 56dab39
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 69 deletions.
65 changes: 21 additions & 44 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<title>Brew-o-Matic {{env}}</title>
<link rel='stylesheet' href='/css/style.css' />
<meta name="viewport" content="width=device-width, initial-scale=1.0">


<link rel="canonical" href="http://brew-o-matic.eu01.aws.af.cm" />
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.1/css/bootstrap.min.css">
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.1/css/bootstrap-theme.min.css">
Expand All @@ -20,24 +22,6 @@
<script src="js/lib/ui-bootstrap-tpls-0.6.0-SNAPSHOT.min.js"></script>

<script src="js/all.js"></script>
<!-- <script src="js/index.js"></script>
<script src="js/helper.js"></script>
<script src="js/RecipeCtrl.js"></script>
<script src="js/RecipeListCtrl.js"></script>
<script src="js/RecipeDetailCtrl.js"></script>
<script src="js/LoginController.js"></script>
<script src="js/CommentController.js"></script>
<script src="js/FermentationCtrl.js"></script>
<script src="js/LogCtrl.js"></script>
<script src="js/notification.js"></script>
<script src="js/data/AbmCtrl.js"></script>
<script src="js/admin/AdminCtrl.js"></script>
<script src="js/resources.js"></script>
<script src="js/util/util.js"></script>
<script src="js/Data.js"></script>
<script src="js/env.js"></script>
<script src="js/ObjTree.js"></script>
<script src="js/directive/abm.js"></script>-->
</head>
<body ng-controller="MainController" id="MainController">
<div id="fb-root"></div>
Expand Down Expand Up @@ -90,36 +74,29 @@ <h1>Bienvenido!</h1>
<div ng-view></div>
</div>
</div>
<footer >
<!--<p>-->
<!-- Esto comenzo como un sistema para cerveceros de uso propio. Luego decidi compartirlo porque crei que podia servirle a mas personas.-->
<!--</p>-->
<!--<p>-->
<!-- Bajo ningun punto de vista esto es un emprendimiento comercial, la siguiente es una donacion 100% optativa con el objetivo de solventar los costos minimos que me genera.-->
<!--</p>-->
<!---->
<!--<a href="https://www.mercadopago.com/mla/checkout/pay?pref_id=23414019-4887f1eb-cc74-4f2a-9d98-5f4921551deb" name="MP-payButton" class="blue-l-rn-ar">Donar AR$ 20</a>-->
<!--<script type="text/javascript">-->
<!--(function(){function $MPBR_load(){window.$MPBR_loaded !== true && (function(){var s = document.createElement("script");s.type = "text/javascript";s.async = true;s.src = ("https:"==document.location.protocol?"https://www.mercadopago.com/org-img/jsapi/mptools/buttons/":"http://mp-tools.mlstatic.com/buttons/")+"render.js";var x = document.getElementsByTagName('script')[0];x.parentNode.insertBefore(s, x);window.$MPBR_loaded = true;})();}window.$MPBR_loaded !== true ? (window.attachEvent ?window.attachEvent('onload', $MPBR_load) : window.addEventListener('load', $MPBR_load, false)) : null;})();-->
<!--</script> -->
<!-- <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">-->
<!-- <input type="hidden" name="cmd" value="_s-xclick">-->
<!-- <input type="hidden" name="hosted_button_id" value="5TPK7JKXEW2AG">-->
<!-- <input type="image" src="https://www.paypalobjects.com/es_ES/ES/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal. La forma rápida y segura de pagar en Internet.">-->
<!-- <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">-->
<!-- </form>-->
</footer>
<!--<footer>-->
<!-- <fb:login-button show-faces="true" width="200" max-rows="1"></fb:login-button>-->
<!--</footer>-->
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/client:plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
var po = document.createElement('script');
po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/client:plusone.js?onload=apiLoaded';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(po, s);
})();

var additionalParams = {
'callback': cb,
'clientid': "819410194566.apps.googleusercontent.com",
'cookiepolicy': "single_host_origin",
'scope': "https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile",
'requestvisibleactions': "http://schemas.google.com/AddActivity",
approvalprompt: 'auto'
};

function signinCallback(authResult) {
function apiLoaded() {
gapi.auth.signIn(additionalParams);
}

function cb(authResult) {
var $scope = angular.element(document.getElementById('LoginController')).scope();
$scope.$emit('g+login', authResult)
}
Expand Down
3 changes: 3 additions & 0 deletions public/js/LoginController.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@
}
});

$scope.googleSignIn = function() {
gapi.auth.signIn(additionalParams);
};

notificationData.listener = function() {
$scope.notificationClass = '';
Expand Down
33 changes: 8 additions & 25 deletions public/partial/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
<a href="/#/data/Bottle">Datos</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right" ng-hide="user">
<li >
<button class="btn btn-danger" style="margin-top: 0.5em" id="signinButton" ng-hide="user" ng-click="googleSignIn()">
Google Sign-In
</button>
</li>
</ul>
<ul class="nav navbar-nav navbar-right" ng-show="user">
<li class="dropdown">
<a href="" class="dropdown-toggle" data-toggle="dropdown"><span>{{user.name}}</span> <b class="caret"></b></a>
Expand All @@ -30,31 +37,7 @@
</ul>
</li>
</ul>
<span class="navbar-form navbar-right">
<!-- Place this tag where you want the +1 button to render. -->
<div class="g-plusone" data-annotation="inline" data-width="300"></div>

<!-- Place this tag after the last +1 button tag. -->
<script type="text/javascript">
window.___gcfg = {lang: 'es-419'};

(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</span>
<span id="signinButton" class="navbar-form navbar-right" ng-hide="user">
<span
class="g-signin"
data-callback="signinCallback"
data-clientid="819410194566.apps.googleusercontent.com"
data-cookiepolicy="single_host_origin"
data-requestvisibleactions="http://schemas.google.com/AddActivity"
data-scope="https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile">
</span>
</span>

</div>
</div>
</nav>
Expand Down

0 comments on commit 56dab39

Please sign in to comment.