| Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente |
| slam4:richclient:angularjs:boards-2 [2016/03/23 01:37] – [2.5- Url /stories ou / (3 points)] jcheron | slam4:richclient:angularjs:boards-2 [2019/08/31 14:21] (Version actuelle) – modification externe 127.0.0.1 |
|---|
| |**/** | Route par défaut || | |**/** | Route par défaut || |
| |
| ==== -- Service (2 points) ==== | ==== -- Service (1.5 points) ==== |
| <wrap mytodo>**<nowiki>//</nowiki>TODO 2.2**</wrap> | <wrap mytodo>**<nowiki>//</nowiki>TODO 2.2**</wrap> |
| |
| Le service **dataService** simule la connexion à un web service ; il est défini de la façon suivante : | Le service **dataService** simule la connexion à un web service ; il est défini de la façon suivante : |
| |
| **stories**, **tags** et **devs** seront définis "en dur" à l'intérieur du service dans l'équivalent de variables privées : | **steps**, **stories**, **tags** et **devs** seront définis "en dur" à l'intérieur du service dans l'équivalent de variables privées : |
| |
| <sxh javascript;title:variables privées> | <sxh javascript;title:variables privées> |
| ^::: | <html><span class="method">getDevs()</span></html>\\ Retourne **devs** | | ^::: | <html><span class="method">getDevs()</span></html>\\ Retourne **devs** | |
| ^::: | <html><span class="method">getStory(code)</span></html>\\ Retourne la user story correspondant au **code** donné, **null** si le code est inexistant | | ^::: | <html><span class="method">getStory(code)</span></html>\\ Retourne la user story correspondant au **code** donné, **null** si le code est inexistant | |
| ^::: | <html><span class="method">setStoryAvancement(story)</span></html>\\ ajoute et valorise le membre **avancement** de la **story** passée en paramètre (avancement=nb tâches réalisées/ nb tâches).\\ Une tâche est réalisée si son membre done=true.\\ A l'issue du passage **story.avancement** est existant et correctement valorisé | | |
| |
| Créez dataService, implémentez les méthodes publiques.\\ | Créez dataService, implémentez les méthodes publiques.\\ |
| Il faudra ensuite injecter **dataService** aux 2 contrôleurs **storiesController** et **StoryController** | Il faudra ensuite injecter **dataService** aux 2 contrôleurs **storiesController** et **StoryController** |
| |
| ==== -- Url /stories ou / (4 points) ==== | ==== -- Url /stories ou / (3.5 points) ==== |
| |
| <wrap mytodo>**<nowiki>//</nowiki>TODO 2.3**</wrap> | <wrap mytodo>**<nowiki>//</nowiki>TODO 2.3**</wrap> |
| |< 100% >| | |< 100% >| |
| ^**Controller** | **stories.js** (storiesController) | | ^**Controller** | **stories.js** (storiesController) | |
| ^Variables publique | <html><span class="variable">stories</span></html>\\ Tableau des user stories | | ^Variables publiques | <html><span class="variable">stories</span></html>\\ Tableau des user stories | |
| ^::: | <html><span class="variable">selected</span></html>\\ **story** sélectionnée | | ^::: | <html><span class="variable">selected</span></html>\\ **story** sélectionnée | |
| ^Méthodes publiques | <html><span class="method">goto(story)</span></html>\\ Accède à l'url **story/:code** en utilisant le service **$location** | | ^Méthodes publiques | <html><span class="method">goto(story)</span></html>\\ Accède à l'url **story/:code** en utilisant le service **$location** | |
| <meta charset="UTF-8"> | <meta charset="UTF-8"> |
| <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> | <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> |
| | <link rel="stylesheet" href="css/styles.css"> |
| |
| <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script> | <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script> |
| } | } |
| .story-panel{ | .story-panel{ |
| float: left; | |
| width: 300px; | |
| } | } |
| .story{ | .story{ |
| .assign-to{ | .assign-to{ |
| font-weight: bold; | font-weight: bold; |
| | } |
| | .selected{ |
| | background-color: #dff0d8; |
| | color: #3c763d; |
| | } |
| | .selected::after{ |
| | content: ''; |
| | display: block; |
| | clear: both; |
| } | } |
| </sxh> | </sxh> |
| ==== Bootstrap ==== | ==== Bootstrap ==== |
| |
| {{:slam4:richclient:angularjs:boards:glyphicon.png?|}} | {{:slam4:richclient:angularjs:boards:username.png?|}} |
| <sxh html;title:GlyphIcon> | <sxh html;title:GlyphIcon> |
| <span class="glyphicon glyphicon-tasks" aria-hidden="true"></span> Done | <span class="glyphicon glyphicon-user" aria-hidden="true"></span> James Gosling |
| </sxh> | </sxh> |
| |