Skip to content
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
66 changes: 33 additions & 33 deletions project/.jshintrc
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
{
"boss": true,
"browser": true,
"curly": true,
"eqeqeq": true,
"eqnull": true,
"immed": true,
"indent": 2,
"latedef": "nofunc",
"newcap": true,
"noarg": true,
"quotmark": "single",
"smarttabs": true,
"strict": true,
"sub": true,
"trailing": true,
"undef": true,
"globals": {
"jQuery": true,
"angular": true,
"console": true,
"$": true,
"_": true,
"moment": true,
"describe": true,
"beforeEach": true,
"module": true,
"inject": true,
"it": true,
"expect": true,
"xdescribe": true,
"xit": true,
"spyOn": true
}
"boss": true,
"browser": true,
"curly": true,
"eqeqeq": true,
"eqnull": true,
"immed": true,

"latedef": "nofunc",
"newcap": true,
"noarg": true,
"quotmark": "single",
"smarttabs": true,
"strict": true,
"sub": true,
"trailing": true,
"undef": true,
"globals": {
"jQuery": true,
"angular": true,
"console": true,
"$": true,
"_": true,
"moment": true,
"describe": true,
"beforeEach": true,
"module": true,
"inject": true,
"it": true,
"expect": true,
"xdescribe": true,
"xit": true,
"spyOn": true
}
}
35 changes: 31 additions & 4 deletions project/app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function() {
(function () {
'use strict';

angular.module('daproject', [
Expand All @@ -20,14 +20,41 @@
controller: 'HomeCtrl',
controllerAs: 'home',
})
.otherwise({redirectTo:'/'});
.when('/exo03', {
templateUrl: 'src/app/exo03/exo03.html',
controller: 'exo03Ctrl',
controllerAs: 'exo03',
})
.when('/exo03/detail-partial', {
templateUrl: 'src/app/exo03/detail-partial/detail.html',
controller: 'detailCtrl',
controllerAs: 'detail',
})
.when('/exo04', {
templateUrl: 'src/app/exo04/exo04.html',
controller: 'exo04Ctrl',
controllerAs: 'exo04',
})
.when('/more', {
templateUrl: 'src/app/more/more.html',
controller: 'moreCtrl',
controllerAs: 'more',
})
.when('/final', {
templateUrl: 'src/app/final/final.html',
controller: 'finalCtrl',
controllerAs: 'final',
})
.otherwise({
redirectTo: '/'
});
}

function RunUtils($rootScope) {
$rootScope.safeApply = function(fn) {
$rootScope.safeApply = function (fn) {
var phase = $rootScope.$$phase;
if (phase === '$apply' || phase === '$digest') {
if (fn && (typeof(fn) === 'function')) {
if (fn && (typeof (fn) === 'function')) {
fn();
}
} else {
Expand Down
16 changes: 15 additions & 1 deletion project/app.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,17 @@

@import "variables.less";
/* Add App LESS files below */

@import "src/app/home/home.less";
@import "src/app/exo03/exo03.less";
@import "src/app/exo03/detail-partial/detail.less";
@import "src/app/exo04/exo04.less";
@import "src/app/more/more.less";
@import "src/app/final/final.less";


/* Add Fonts below */

@fa-font-path: "bower_components/font-awesome/fonts";

body {
Expand Down Expand Up @@ -39,4 +47,10 @@ body {
}

/* Required for Angular UI Bootstrap */
.nav, .pagination, .carousel, .panel-title a { cursor: pointer; }

.nav,
.pagination,
.carousel,
.panel-title a {
cursor: pointer;
}
Binary file added project/img/baniere.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added project/img/bg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 12 additions & 1 deletion project/index.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<!DOCTYPE html>
<html ng-app="daproject">

<head>
<title>Find The Word - Yet another AngularJS experiment</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="utf-8" />
<meta charset="utf-8" />
<link href="app.less" type="text/css" rel="stylesheet/less" />
<link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
<link href="img/favicon.ico" rel="icon" type="image/x-icon" />
</head>

<body>

<!-- Livereload script for development only (stripped during dist build) -->
Expand All @@ -29,10 +31,19 @@
<!-- Main App JS -->
<script src="app.js"></script>
<script src="src/app/home/home.controller.js"></script>
<script src="src/app/exo03/exo03.controller.js"></script>
<script src="src/app/exo03/detail-partial/detail.controller.js"></script>
<script src="src/app/exo04/exo04.controller.js"></script>
<script src="src/app/more/more.controller.js"></script>
<script src="src/components/setting/setting.service.js"></script>
<script src="src/components/searchConfig/searchConfig.service.js"></script>
<script src="src/components/cocktailSearch/cocktailSearch.service.js"></script>
<script src="src/app/final/final.controller.js"></script>
<!-- Add New Component JS Above -->

<toast></toast>
<div ng-view></div>

</body>

</html>
22 changes: 22 additions & 0 deletions project/src/app/exo03/detail-partial/detail.controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
(function () {
'use strict';

function DetailCtrl($location) {
var vm = this;
vm.msg = 'Welcome All!';
vm.subMsg = 'A seed Project';
vm.goToExo = goToExo;

function goToExo(exoNumber) {
if (exoNumber === 3) {
$location.path('/exo03/detail-partial');
}
}
}

DetailCtrl.$inject = ['$location'];

angular.module('daproject')
.controller('detailCtrl', DetailCtrl);

})();
3 changes: 3 additions & 0 deletions project/src/app/exo03/detail-partial/detail.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div ng-controller="detailCtrl">
<p>Ah que COUCOU!</p>
</div>
23 changes: 23 additions & 0 deletions project/src/app/exo03/detail-partial/detail.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#container {
display: flex;
height: 100%; //width: 200px;
}

.smallBox {
background-color: darkorange;
flex-grow: 1;
height: 500px;
margin: 2px;

}

p {
text-align: center;
color: aliceblue;
font-size: 2em;
}


html {
height: 100%;
}
41 changes: 41 additions & 0 deletions project/src/app/exo03/exo03.controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
(function () {
'use strict';

function Exo03Ctrl($location) {
var vm = this;

vm.films = [
{
name: 'Fast and Furious',
img: 'https://image.tmdb.org/t/p/w600_and_h900_bestv2/AkSMd8AXSpA1L1SbBPc2AfVJfmE.jpg',
year: 2001
},
{
name: '2 Fast 2 Furious',
img: 'https://image.tmdb.org/t/p/w600_and_h900_bestv2/u1Snfl40rXmAJNiMyZUczUyFVuf.jpg',
year: 2003
},
{
name: 'Fast & Furious: Tokyo Drift',
img: 'https://image.tmdb.org/t/p/w600_and_h900_bestv2/4ceW7kWPAc2uFG5WzYDbP8Od3gw.jpg',
year: 2006
}
];

vm.select = select;

function select(film) {
vm.selected = film;
console.log("le film selectionné est " + film.name + " sorti en " + film.year);
}

}



Exo03Ctrl.$inject = ['$location'];

angular.module('daproject')
.controller('exo03Ctrl', Exo03Ctrl);

})();
12 changes: 12 additions & 0 deletions project/src/app/exo03/exo03.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<div id="container">

<div class="listeFilms">
<ul id="film">
<li ng-repeat="element in exo03.films"><img ng-click="exo03.select(element)" ng-class="{'superClass': exo03.selected.name === element.name}" ng-src="{{ element.img }}" /></li>
</ul>

</div>
<div class="detailFilm">
<ul>
<li ng-repeat="element in exo03.films">{{element.name}}</li>
</ul>
48 changes: 48 additions & 0 deletions project/src/app/exo03/exo03.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#container {
padding: 0;
margin: 0;
list-style: none;

display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;

-webkit-flex-flow: row wrap;
justify-content: space-around;
}

.listeFilms,
.detailFilm {
background: gray;
padding: 5px;
width: 40%;
height: 50%;
margin-top: 10px;

line-height: 50px;
color: white;
font-weight: bold;
font-size: 3em;
text-align: center;
}

#film {
padding: 0;

li {
list-style: none;
}
}

.superClass {
border: 5px solid pink;

}

img {
width: 140px;
height: auto;
margin: 5px;
}
26 changes: 26 additions & 0 deletions project/src/app/exo04/exo04.controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
(function () {
'use strict';

function Exo04Ctrl($location, settingService) {
var vm = this;
vm.input = 'input';
vm.superService = settingService;
vm.consol = consol;

function consol(input) {
vm.superService.city = input;
console.log(vm.superService.city);
}



}
Exo04Ctrl.$inject = ['$location', 'settingService'];


angular.module('daproject')
.controller('exo04Ctrl', Exo04Ctrl);



})();
6 changes: 6 additions & 0 deletions project/src/app/exo04/exo04.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<div id="input">
<input ng-model="exo04.input" />

<button ng-click="exo04.consol(exo04.input)">Search</button>
</div>
<div class="ville"> Ville : {{exo04.superService.city}}</div>
4 changes: 4 additions & 0 deletions project/src/app/exo04/exo04.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#input {
margin-top: 250px;
text-align: center;
}
Loading