Commit 323f15747a9bc2f2a6761a8b3f3c551052a17506
Exists in
master
and in
4 other branches
Merge branch 'page-a11y'
Showing
5 changed files
with
30 additions
and
1 deletions
Show diff stats
src/app/components/a11y-bar/a11y-bar.html
@@ -27,7 +27,7 @@ | @@ -27,7 +27,7 @@ | ||
27 | <div class="col-sm-6"> | 27 | <div class="col-sm-6"> |
28 | <ul class="action-links list-inline list-unstyled"> | 28 | <ul class="action-links list-inline list-unstyled"> |
29 | <li> | 29 | <li> |
30 | - <a id="siteaction-accessibility" class="color-theme-common-fg" href="http://portalpadrao.gov.br/acessibilidade" target="_blank" title="Acessibilidade" accesskey="5">Acessibilidade</a> | 30 | + <a id="siteaction-accessibility" class="color-theme-common-fg" ui-sref="acessibilidade" title="Leia sobre a acessibilidade do Dialoga Brasil" accesskey="5">Acessibilidade</a> |
31 | </li> | 31 | </li> |
32 | <li> | 32 | <li> |
33 | <a id="siteaction-contrast" class="color-theme-common-fg" href="#" title="Alto Contraste" accesskey="6" ng-click="actionContrast()">Alto Contraste</a> | 33 | <a id="siteaction-contrast" class="color-theme-common-fg" href="#" title="Alto Contraste" accesskey="6" ng-click="actionContrast()">Alto Contraste</a> |
src/app/components/dialoga-service/dialoga.service.js
@@ -14,6 +14,7 @@ | @@ -14,6 +14,7 @@ | ||
14 | extendedService.serviceDialoga = $rootScope.basePath + '/api/v1/dialoga_plugin/'; | 14 | extendedService.serviceDialoga = $rootScope.basePath + '/api/v1/dialoga_plugin/'; |
15 | extendedService.getHome = getHome; | 15 | extendedService.getHome = getHome; |
16 | extendedService.getAbout = getAbout; | 16 | extendedService.getAbout = getAbout; |
17 | + extendedService.getAcessibility = getAcessibility; | ||
17 | extendedService.getTerms = getTerms; | 18 | extendedService.getTerms = getTerms; |
18 | extendedService.getThemes = getThemes; | 19 | extendedService.getThemes = getThemes; |
19 | extendedService.getThemeBySlug = getThemeBySlug; | 20 | extendedService.getThemeBySlug = getThemeBySlug; |
@@ -68,6 +69,19 @@ | @@ -68,6 +69,19 @@ | ||
68 | } | 69 | } |
69 | } | 70 | } |
70 | 71 | ||
72 | + function getAcessibility (cbSuccess, cbError) { | ||
73 | + if( !!CACHE.acessibility ){ | ||
74 | + cbSuccess(CACHE.acessibility); | ||
75 | + }else{ | ||
76 | + // load article content | ||
77 | + ArticleService.getArticleById(API.articleId.acessibility, {}, function (article){ | ||
78 | + CACHE.acessibility = article; | ||
79 | + | ||
80 | + cbSuccess(CACHE.acessibility); | ||
81 | + }, cbError); | ||
82 | + } | ||
83 | + } | ||
84 | + | ||
71 | function getTerms (cbSuccess, cbError) { | 85 | function getTerms (cbSuccess, cbError) { |
72 | if( !!CACHE.terms ){ | 86 | if( !!CACHE.terms ){ |
73 | cbSuccess(CACHE.terms); | 87 | cbSuccess(CACHE.terms); |
src/app/index.constants.js
src/app/index.route.js
@@ -171,6 +171,17 @@ | @@ -171,6 +171,17 @@ | ||
171 | } | 171 | } |
172 | } | 172 | } |
173 | }) | 173 | }) |
174 | + .state('acessibilidade', { | ||
175 | + url: '/acessibilidade', | ||
176 | + ncyBreadcrumb: {label: 'Acessibilidade'}, | ||
177 | + views: { | ||
178 | + 'main': { | ||
179 | + templateUrl: 'app/pages/article/article.html', | ||
180 | + controller: 'ArticlePageController', | ||
181 | + controllerAs: 'pageArticle' | ||
182 | + } | ||
183 | + } | ||
184 | + }) | ||
174 | .state('mapa-do-site', { | 185 | .state('mapa-do-site', { |
175 | url: '/mapa-do-site', | 186 | url: '/mapa-do-site', |
176 | ncyBreadcrumb: {label: 'Mapa do Site'}, | 187 | ncyBreadcrumb: {label: 'Mapa do Site'}, |
src/app/pages/article/article.controller.js
@@ -37,6 +37,9 @@ | @@ -37,6 +37,9 @@ | ||
37 | var vm = this; | 37 | var vm = this; |
38 | 38 | ||
39 | switch (vm.page){ | 39 | switch (vm.page){ |
40 | + case 'acessibilidade': | ||
41 | + vm.DialogaService.getAcessibility(handleSuccess, handleError); | ||
42 | + break; | ||
40 | case 'sobre': | 43 | case 'sobre': |
41 | vm.DialogaService.getAbout(handleSuccess, handleError); | 44 | vm.DialogaService.getAbout(handleSuccess, handleError); |
42 | break; | 45 | break; |