Skip to content

Fix the code to work with mock data. #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,8 @@ module.exports = function (grunt) {
'karma'
]);

grunt.registerTask('heroku', ['build']);

grunt.registerTask('build', [
'clean:dist',
'wiredep',
Expand Down
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: node app.js
7 changes: 7 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
var express = require('express');

var port = process.env.PORT || 3000;
var app = express();

app.use(express.static(__dirname + '/dist'));
app.listen(port);
6 changes: 3 additions & 3 deletions app/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,19 @@ angular
templateUrl: 'views/perfil.html',
controller: 'PerfilCtrl',
controllerAs: 'perfil'
,resolve: { loggedin: checkLoggedOut }
// ,resolve: { loggedin: checkLoggedOut }
})
.when('/mapa', {
templateUrl: 'views/mapa.html',
controller: 'MapaCtrl',
controllerAs: 'mapa'
,resolve: { loggedin: checkLoggedOut }
// ,resolve: { loggedin: checkLoggedOut }
})
.when('/favoritos', {
templateUrl: 'views/favoritos.html',
controller: 'FavoritosCtrl',
controllerAs: 'favoritos'
,resolve: { loggedin: checkLoggedOut }
// ,resolve: { loggedin: checkLoggedOut }
})
.otherwise({
redirectTo: '/login'
Expand Down
16 changes: 16 additions & 0 deletions app/scripts/controllers/mapa.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,22 @@
angular.module('hortalivreApp')
.controller('MapaCtrl', ['$scope', '$rootScope', 'Notification', 'LocalStorage', 'GardenApi', 'UserApi', 'FavoriteApi', function ($scope, $rootScope, Notification, LocalStorage, GardenApi, UserApi, FavoriteApi) {

$rootScope.user_logged = true; // altera o header
$scope.markerInfo = {
id: 2,
fullName: 'ManoChao Laricado',
email: '[email protected]',
address: 'Meu endereço é esse aqui',
// title: 'Title vem Aqui',
// rating_value: '5',

link: 'link-to-adress.html',
garden: [
{ item: 'Cebola', id: 1},
{ item: 'Cenoura', id: 2},
]
}

// ====
$scope.link = function(param) { link(param); };

Expand Down
6 changes: 3 additions & 3 deletions app/views/partials/header-user.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
<span class="caret" id="menuPrimary" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"></span>

<ul class="dropdown-menu" aria-labelledby="menuPrimary">
<li><a title="meu perfil" ng-href="#/perfil">meu perfil</a></li>
<li><a title="mapa" ng-href="#/mapa">mapa</a></li>
<li><a title="favoritos" ng-href="#/favoritos">favoritos</a></li>
<li><a title="meu perfil" ng-href="http://localhost:9000/#!/perfil">meu perfil</a></li>
<li><a title="mapa" ng-href="http://localhost:9000/#!/mapa">mapa</a></li>
<li><a title="favoritos" ng-href="http://localhost:9000/#!/favoritos">favoritos</a></li>
<li><a title="sair" ng-click="logout()">sair</a></li>
</ul>
</li>
Expand Down
4 changes: 2 additions & 2 deletions app/views/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<div class="collapse navbar-collapse pull-right" id="js-navbar-collapse">

<ul class="nav navbar-nav">
<li><a href="#/login" title="Entrar">entrar</a></li>
<li><a class="btn btn-primary small active" href="#/cadastro" title="Cadastrar-se">cadastrar-se</a></li>
<li><a href="!#/login" title="Entrar">entrar</a></li>
<li><a class="btn btn-primary small active" href="!#/cadastro" title="Cadastrar-se">cadastrar-se</a></li>
</ul>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions app/views/partials/search-garden.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

<button class="feira popup" ng-click="searchByFairs()" data-popup="Filtrar por Feiras" title="Filtrar por Feiras">Filtrar por Feiras</button>

<!--

<form ng-submit="search()">
<input type="search" placeholder="O que você procura?" ng-model="gardenMap.search" class="input-primary">
</form>
-->

Loading