From d6d1119a694c3647ef3bf26e2a78f125f576e3cf Mon Sep 17 00:00:00 2001 From: Rafael Diego Date: Mon, 7 Sep 2015 16:44:30 -0300 Subject: [PATCH] Refatoração do proposta --- src/app/components/proposal-box/proposal-box.directive.js | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/app/components/proposal-box/proposal-box.html | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/app/components/proposal-box/proposal-box.scss | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/app/components/proposal-related/proposal-related.directive.js | 54 ------------------------------------------------------ src/app/components/proposal-related/proposal-related.html | 58 ---------------------------------------------------------- src/app/components/proposal-related/proposal-related.scss | 77 ----------------------------------------------------------------------------- src/app/pages/auth/error-messages.html | 6 ------ src/app/pages/geral/error-messages.html | 6 ------ src/app/pages/programas/programa.html | 4 ++-- src/assets/images/icons/sprite.png | Bin 0 -> 109333 bytes 10 files changed, 195 insertions(+), 203 deletions(-) create mode 100644 src/app/components/proposal-box/proposal-box.directive.js create mode 100644 src/app/components/proposal-box/proposal-box.html create mode 100644 src/app/components/proposal-box/proposal-box.scss delete mode 100644 src/app/components/proposal-related/proposal-related.directive.js delete mode 100644 src/app/components/proposal-related/proposal-related.html delete mode 100644 src/app/components/proposal-related/proposal-related.scss delete mode 100644 src/app/pages/auth/error-messages.html delete mode 100644 src/app/pages/geral/error-messages.html create mode 100644 src/assets/images/icons/sprite.png diff --git a/src/app/components/proposal-box/proposal-box.directive.js b/src/app/components/proposal-box/proposal-box.directive.js new file mode 100644 index 0000000..128e1cd --- /dev/null +++ b/src/app/components/proposal-box/proposal-box.directive.js @@ -0,0 +1,58 @@ +(function() { + 'use strict'; + + angular + .module('dialoga') + .directive('proposalBox', proposalBox); + + /** @ngInject */ + function proposalBox() { + + /** @ngInject */ + function ProposalBoxController($state, $log) { + $log.debug('ProposalBoxController'); + + var vm = this; + vm.$state = $state; + vm.$log = $log; + + vm.init($log); + } + + ProposalBoxController.prototype.init = function () { + + var vm = this; + + if (!vm.vote) { vm.vote = false}; + + }; + + ProposalBoxController.prototype.showContent = function (program) { + var vm = this; + + vm.$state.go('programa-conteudo', { + slug: program.slug + }, { + location: true + }); + }; + + var directive = { + restrict: 'E', + templateUrl: 'app/components/proposal-box/proposal-box.html', + scope: { + proposal: '=', + topic: '=', + category: '=', + vote: '=' + }, + controller: ProposalBoxController, + controllerAs: 'vm', + bindToController: true + }; + + + return directive; + } + +})(); diff --git a/src/app/components/proposal-box/proposal-box.html b/src/app/components/proposal-box/proposal-box.html new file mode 100644 index 0000000..e466623 --- /dev/null +++ b/src/app/components/proposal-box/proposal-box.html @@ -0,0 +1,58 @@ +
+
+
{{::vm.category.name}}
+
{{::vm.topic.title}}
+
+
+
+
+
+
+ +
+
+
+
+
+
+ +
+
Apoio
+
+
+
+ +
+
+
+
+ +
+
Não Apoio
+
+
+
+
+
+
+ +
+
+ + Colocação nos resultados: + {{::vm.proposal.ranking_position}}º +
+
+
+
diff --git a/src/app/components/proposal-box/proposal-box.scss b/src/app/components/proposal-box/proposal-box.scss new file mode 100644 index 0000000..4253be3 --- /dev/null +++ b/src/app/components/proposal-box/proposal-box.scss @@ -0,0 +1,77 @@ +.proposal-box { + background-color: #f1f1f1; + border-radius: 5px; + // overflow: hidden; + + &.focus { + border: 7px solid #000; + border-radius: 12px; + border-color: #5E769C; + } + + &--top { + color: #fff; + font-weight: bold; + + border-top-left-radius: 5px; + border-top-right-radius: 5px; + overflow: hidden; + } + + &--middle { + padding: 30px; + } + + &--bottom { + border-bottom-left-radius: 5px; + border-bottom-right-radius: 5px; + // overflow: hidden; + border-bottom: 5px solid #dadada; + } + + &--theme { + padding: 10px 15px 5px 15px; + } + + &--program { + padding: 20px 15px; + } + + &--content { + padding-bottom: 20px; + } + + &--share { + padding: 15px 0; + background-color: #e8e8e8; + } + + &--ranking { + font-weight: bold; + padding: 10px 0; + background-color: #dadada; + } + + .action-label { + margin-top: 10px; + } + + .dropdown { + display: inline-block; + } + .dropdown-menu { + padding: 0; + margin: 0; + } + + .glyphicon { + color: #fff; + } + .icon-circle { + cursor: pointer; + + -webkit-box-shadow: 0px 2px 2px 0px rgba(0,0,0,0.3); + -moz-box-shadow: 0px 2px 2px 0px rgba(0,0,0,0.3); + box-shadow: 0px 2px 2px 0px rgba(0,0,0,0.3); + } +} diff --git a/src/app/components/proposal-related/proposal-related.directive.js b/src/app/components/proposal-related/proposal-related.directive.js deleted file mode 100644 index 79f1575..0000000 --- a/src/app/components/proposal-related/proposal-related.directive.js +++ /dev/null @@ -1,54 +0,0 @@ -(function() { - 'use strict'; - - angular - .module('dialoga') - .directive('proposalRelated', proposalRelated); - - /** @ngInject */ - function proposalRelated() { - - /** @ngInject */ - function ProposalRelatedController($state, $log) { - $log.debug('ProposalRelatedController'); - - var vm = this; - vm.$state = $state; - vm.$log = $log; - - vm.init(); - } - - ProposalRelatedController.prototype.init = function () { - // initial values - // var vm = this; - }; - - ProposalRelatedController.prototype.showContent = function (program) { - var vm = this; - - vm.$state.go('programa-conteudo', { - slug: program.slug - }, { - location: true - }); - }; - - var directive = { - restrict: 'E', - templateUrl: 'app/components/proposal-related/proposal-related.html', - scope: { - proposal: '=', - topic: '=', - category: '=' - }, - controller: ProposalRelatedController, - controllerAs: 'vm', - bindToController: true - }; - - - return directive; - } - -})(); diff --git a/src/app/components/proposal-related/proposal-related.html b/src/app/components/proposal-related/proposal-related.html deleted file mode 100644 index e9eca78..0000000 --- a/src/app/components/proposal-related/proposal-related.html +++ /dev/null @@ -1,58 +0,0 @@ - diff --git a/src/app/components/proposal-related/proposal-related.scss b/src/app/components/proposal-related/proposal-related.scss deleted file mode 100644 index 6a87e89..0000000 --- a/src/app/components/proposal-related/proposal-related.scss +++ /dev/null @@ -1,77 +0,0 @@ -.proposal-related { - background-color: #f1f1f1; - border-radius: 5px; - // overflow: hidden; - - &.focus { - border: 7px solid #000; - border-radius: 12px; - border-color: #5E769C; - } - - &--top { - color: #fff; - font-weight: bold; - - border-top-left-radius: 5px; - border-top-right-radius: 5px; - overflow: hidden; - } - - &--middle { - padding: 30px; - } - - &--bottom { - border-bottom-left-radius: 5px; - border-bottom-right-radius: 5px; - // overflow: hidden; - border-bottom: 5px solid #dadada; - } - - &--theme { - padding: 10px 15px 5px 15px; - } - - &--program { - padding: 20px 15px; - } - - &--content { - padding-bottom: 20px; - } - - &--share { - padding: 15px 0; - background-color: #e8e8e8; - } - - &--ranking { - font-weight: bold; - padding: 10px 0; - background-color: #dadada; - } - - .action-label { - margin-top: 10px; - } - - .dropdown { - display: inline-block; - } - .dropdown-menu { - padding: 0; - margin: 0; - } - - .glyphicon { - color: #fff; - } - .icon-circle { - cursor: pointer; - - -webkit-box-shadow: 0px 2px 2px 0px rgba(0,0,0,0.3); - -moz-box-shadow: 0px 2px 2px 0px rgba(0,0,0,0.3); - box-shadow: 0px 2px 2px 0px rgba(0,0,0,0.3); - } -} diff --git a/src/app/pages/auth/error-messages.html b/src/app/pages/auth/error-messages.html deleted file mode 100644 index 996583e..0000000 --- a/src/app/pages/auth/error-messages.html +++ /dev/null @@ -1,6 +0,0 @@ -
-
Ops, o campo é obrigatório.
-
O campo deve ser maior.
-
O campo deve ser menor
-
O endereço de e-mail deve ser válido
-
\ No newline at end of file diff --git a/src/app/pages/geral/error-messages.html b/src/app/pages/geral/error-messages.html deleted file mode 100644 index 996583e..0000000 --- a/src/app/pages/geral/error-messages.html +++ /dev/null @@ -1,6 +0,0 @@ -
-
Ops, o campo é obrigatório.
-
O campo deve ser maior.
-
O campo deve ser menor
-
O endereço de e-mail deve ser válido
-
\ No newline at end of file diff --git a/src/app/pages/programas/programa.html b/src/app/pages/programas/programa.html index cbf5b4b..8e791b6 100644 --- a/src/app/pages/programas/programa.html +++ b/src/app/pages/programas/programa.html @@ -60,11 +60,11 @@

Propostas mais votadas

- +

Propostas nesse programa

- +

Programas sem propostas

diff --git a/src/assets/images/icons/sprite.png b/src/assets/images/icons/sprite.png new file mode 100644 index 0000000..95efc05 Binary files /dev/null and b/src/assets/images/icons/sprite.png differ -- libgit2 0.21.2