Merge branch 'master' into legislation-module-stable
This commit is contained in:
12
app/assets/javascripts/allow_participation.js.coffee
Normal file
12
app/assets/javascripts/allow_participation.js.coffee
Normal file
@@ -0,0 +1,12 @@
|
||||
App.AllowParticipation =
|
||||
|
||||
initialize: ->
|
||||
$(document).on {
|
||||
'mouseenter focus': ->
|
||||
$(this).find(".js-participation-not-allowed").show();
|
||||
$(this).find(".js-participation-allowed").hide();
|
||||
mouseleave: ->
|
||||
$(this).find(".js-participation-not-allowed").hide();
|
||||
$(this).find(".js-participation-allowed").show();
|
||||
}, ".js-participation"
|
||||
false
|
||||
@@ -36,12 +36,14 @@
|
||||
//= require tags
|
||||
//= require users
|
||||
//= require votes
|
||||
//= require allow_participation
|
||||
//= require annotatable
|
||||
//= require advanced_search
|
||||
//= require registration_form
|
||||
//= require suggest
|
||||
//= require forms
|
||||
//= require tracks
|
||||
//= require valuation_budget_investment_form
|
||||
//= require valuation_spending_proposal_form
|
||||
//= require embed_video
|
||||
//= require banners
|
||||
@@ -58,6 +60,7 @@ var initialize_modules = function() {
|
||||
App.Comments.initialize();
|
||||
App.Users.initialize();
|
||||
App.Votes.initialize();
|
||||
App.AllowParticipation.initialize();
|
||||
App.Tags.initialize();
|
||||
App.Dropdown.initialize();
|
||||
App.LocationChanger.initialize();
|
||||
@@ -70,6 +73,7 @@ var initialize_modules = function() {
|
||||
App.Suggest.initialize();
|
||||
App.Forms.initialize();
|
||||
App.Tracks.initialize();
|
||||
App.ValuationBudgetInvestmentForm.initialize();
|
||||
App.ValuationSpendingProposalForm.initialize();
|
||||
App.EmbedVideo.initialize();
|
||||
App.Banners.initialize();
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
App.ValuationBudgetInvestmentForm =
|
||||
|
||||
showFeasibleFields: ->
|
||||
$('#valuation_budget_investment_edit_form #unfeasible_fields').hide('down')
|
||||
$('#valuation_budget_investment_edit_form #feasible_fields').show()
|
||||
|
||||
showNotFeasibleFields: ->
|
||||
$('#valuation_budget_investment_edit_form #feasible_fields').hide('down')
|
||||
$('#valuation_budget_investment_edit_form #unfeasible_fields').show()
|
||||
|
||||
showAllFields: ->
|
||||
$('#valuation_budget_investment_edit_form #feasible_fields').show('down')
|
||||
$('#valuation_budget_investment_edit_form #unfeasible_fields').show('down')
|
||||
|
||||
showFeasibilityFields: ->
|
||||
feasibility = $("#valuation_budget_investment_edit_form input[type=radio][name='budget_investment[feasibility]']:checked").val()
|
||||
if feasibility == 'feasible'
|
||||
App.ValuationBudgetInvestmentForm.showFeasibleFields()
|
||||
else if feasibility == 'unfeasible'
|
||||
App.ValuationBudgetInvestmentForm.showNotFeasibleFields()
|
||||
|
||||
|
||||
showFeasibilityFieldsOnChange: ->
|
||||
$("#valuation_budget_investment_edit_form input[type=radio][name='budget_investment[feasibility]']").change ->
|
||||
App.ValuationBudgetInvestmentForm.showAllFields()
|
||||
App.ValuationBudgetInvestmentForm.showFeasibilityFields()
|
||||
|
||||
|
||||
initialize: ->
|
||||
App.ValuationBudgetInvestmentForm.showFeasibilityFields()
|
||||
App.ValuationBudgetInvestmentForm.showFeasibilityFieldsOnChange()
|
||||
false
|
||||
@@ -76,7 +76,7 @@ $check: #46DB91;
|
||||
$proposals: #FFA42D;
|
||||
$proposals-dark: #794500;
|
||||
|
||||
$budget: #454372;
|
||||
$budget: #7E328A;
|
||||
$budget-hover: #7571BF;
|
||||
|
||||
$highlight: #E7F2FC;
|
||||
|
||||
@@ -37,12 +37,21 @@ body.admin {
|
||||
input[type="text"], textarea {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.input-group input[type="text"] {
|
||||
border-radius: 0;
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
table {
|
||||
|
||||
th {
|
||||
text-align: left;
|
||||
|
||||
&.with-button {
|
||||
line-height: $line-height*2;
|
||||
}
|
||||
}
|
||||
|
||||
tr {
|
||||
@@ -376,7 +385,7 @@ body.admin {
|
||||
}
|
||||
}
|
||||
|
||||
.admin-content .select-geozone {
|
||||
.admin-content .select-geozone, .admin-content .select-heading {
|
||||
|
||||
a {
|
||||
display: block;
|
||||
|
||||
@@ -180,6 +180,9 @@
|
||||
.icon-arrow-top:before {
|
||||
content: "\57";
|
||||
}
|
||||
.icon-help-1:before {
|
||||
content: "\58";
|
||||
}
|
||||
.icon-checkmark-circle:before {
|
||||
content: "\59";
|
||||
}
|
||||
|
||||
@@ -600,12 +600,28 @@ h2.sidebar-title {
|
||||
// --------------
|
||||
|
||||
.auth-page {
|
||||
|
||||
.wrapper {
|
||||
margin: 0 auto (-$line-height)*14;
|
||||
}
|
||||
}
|
||||
|
||||
.auth-image {
|
||||
background: $brand image-url("auth_bg.jpg");
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
|
||||
h1:not(.logo) {
|
||||
@include logo;
|
||||
@include breakpoint(medium) {
|
||||
min-height: $line-height*42;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin-top: $line-height;
|
||||
|
||||
img {
|
||||
height: rem-calc(80);
|
||||
width: rem-calc(80);
|
||||
}
|
||||
|
||||
a {
|
||||
color: white;
|
||||
@@ -621,15 +637,27 @@ h2.sidebar-title {
|
||||
}
|
||||
}
|
||||
|
||||
.auth {
|
||||
.auth-form {
|
||||
|
||||
@include breakpoint(medium) {
|
||||
padding-top: $line-height*4;
|
||||
}
|
||||
|
||||
p, a, .checkbox {
|
||||
font-size: $small-font-size;
|
||||
}
|
||||
}
|
||||
|
||||
.panel {
|
||||
.auth-divider {
|
||||
border-bottom: 1px solid $border;
|
||||
height: $line-height/2;
|
||||
margin: $line-height 0;
|
||||
text-align: center;
|
||||
|
||||
span {
|
||||
background: white;
|
||||
border: 0;
|
||||
font-weight: bold;
|
||||
padding: 0 $line-height/2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -805,6 +833,11 @@ form {
|
||||
.callout {
|
||||
font-size: $small-font-size;
|
||||
|
||||
a {
|
||||
font-weight: bold;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
&.success, &.notice {
|
||||
background-color: $success-bg;
|
||||
border-color: $success-border;
|
||||
@@ -821,12 +854,6 @@ form {
|
||||
background-color: $warning-bg;
|
||||
border-color: $warning-border;
|
||||
color: $color-warning;
|
||||
|
||||
a {
|
||||
color: $color-warning;
|
||||
font-weight: bold;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
&.alert, &.error {
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
// 03. Show participation
|
||||
// 04. List participation
|
||||
// 05. Featured
|
||||
// 06. Proposals successfull
|
||||
// 06. Budget
|
||||
// 07. Proposals successfull
|
||||
//
|
||||
|
||||
// 01. Votes and supports
|
||||
@@ -238,6 +239,7 @@
|
||||
|
||||
.debate-form,
|
||||
.proposal-form,
|
||||
.budget-investment-form,
|
||||
.spending-proposal-form {
|
||||
|
||||
.icon-debates, .icon-proposals, .icon-budget {
|
||||
@@ -295,7 +297,8 @@
|
||||
.debate-show,
|
||||
.proposal-show,
|
||||
.investment-project-show,
|
||||
.debate-quiz {
|
||||
.debate-quiz,
|
||||
.budget-investment-show {
|
||||
|
||||
p {
|
||||
word-wrap: break-word;
|
||||
@@ -322,14 +325,14 @@
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.debate-info, .proposal-info, .investment-project-info {
|
||||
.debate-info, .proposal-info, .investment-project-info, .budget-investment-show {
|
||||
clear: both;
|
||||
color: $text-medium;
|
||||
font-size: $small-font-size;
|
||||
margin-bottom: $line-height/2;
|
||||
position: relative;
|
||||
|
||||
span {
|
||||
span:not(.label) {
|
||||
line-height: rem-calc(32); // Same as avatar height
|
||||
}
|
||||
|
||||
@@ -456,11 +459,11 @@
|
||||
color: $border;
|
||||
}
|
||||
|
||||
.investment-project-show p {
|
||||
.investment-project-show p, .budget-investment-show p {
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.proposal-show, .investment-project-show {
|
||||
.proposal-show, .investment-project-show, .budget-investment-show {
|
||||
|
||||
.supports {
|
||||
padding: $line-height/2 0 0;
|
||||
@@ -474,21 +477,21 @@
|
||||
// 04. List participation
|
||||
// ----------------------
|
||||
|
||||
.debates-list, .proposals-list, .investment-projects-list {
|
||||
.debates-list, .proposals-list, .investment-projects-list, .budget-investments-list {
|
||||
|
||||
@include breakpoint(medium) {
|
||||
margin-bottom: rem-calc(48);
|
||||
}
|
||||
}
|
||||
|
||||
.investment-projects-list {
|
||||
.investment-projects-list, .budget-investments-list {
|
||||
|
||||
@include breakpoint(medium) {
|
||||
min-height: $line-height*15;
|
||||
}
|
||||
}
|
||||
|
||||
.debate, .proposal, .investment-project, .legislation {
|
||||
.debate, .proposal, .investment-project, .budget-investment, .legislation {
|
||||
margin: $line-height/4 0;
|
||||
|
||||
.panel {
|
||||
@@ -506,7 +509,7 @@
|
||||
padding-bottom: rem-calc(12);
|
||||
}
|
||||
|
||||
.label-debate, .label-proposal, .label-investment-project {
|
||||
.label-debate, .label-proposal, .label-investment-project, .label-budget-investment {
|
||||
background: none;
|
||||
clear: both;
|
||||
display: block;
|
||||
@@ -531,6 +534,10 @@
|
||||
color: $budget;
|
||||
}
|
||||
|
||||
.label-budget-investment {
|
||||
color: $budget;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-weight: bold;
|
||||
margin: 0;
|
||||
@@ -540,7 +547,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.debate-content, .proposal-content, .investment-project-content {
|
||||
.debate-content, .proposal-content, .investment-project-content, .budget-investment-content {
|
||||
margin: 0;
|
||||
min-height: rem-calc(180);
|
||||
position: relative;
|
||||
@@ -570,7 +577,7 @@
|
||||
font-size: $small-font-size;
|
||||
}
|
||||
|
||||
.debate-info, .proposal-info, .investment-project-info {
|
||||
.debate-info, .proposal-info, .investment-project-info, .budget-investment-info {
|
||||
color: $text-medium;
|
||||
font-size: $small-font-size;
|
||||
margin: rem-calc(6) 0 0;
|
||||
@@ -585,7 +592,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.debate-description, .proposal-description, .investment-project-description {
|
||||
.debate-description, .proposal-description, .investment-project-description, .budget-investment-description {
|
||||
color: $text;
|
||||
font-size: rem-calc(13);
|
||||
height: rem-calc(72);
|
||||
@@ -670,12 +677,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
.investment-project, .investment-project-show {
|
||||
.investment-project, .investment-project-show,
|
||||
.budget-investment, .budget-investment-show {
|
||||
|
||||
.supports {
|
||||
@include supports;
|
||||
|
||||
.investment-project-amount {
|
||||
.investment-project-amount,
|
||||
.budget-investment-amount {
|
||||
color: $budget;
|
||||
font-size: rem-calc(20);
|
||||
font-weight: bold;
|
||||
@@ -704,6 +713,7 @@
|
||||
}
|
||||
|
||||
.remove .icon-check-circle {
|
||||
color: $budget;
|
||||
display: block;
|
||||
font-size: rem-calc(70);
|
||||
line-height: rem-calc(70);
|
||||
@@ -711,6 +721,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
.investment-project-show .supports,
|
||||
.budget-investment-show .supports {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.proposals-summary {
|
||||
|
||||
.panel {
|
||||
@@ -719,11 +734,38 @@
|
||||
}
|
||||
|
||||
.investment-project .supports .total-supports.no-button,
|
||||
.investment-project-show .supports .total-supports.no-button {
|
||||
.investment-project-show .supports .total-supports.no-button,
|
||||
.budget-investment .supports .total-supports.no-button,
|
||||
.budget-investment-show .supports .total-supports.no-button {
|
||||
display: block;
|
||||
margin-top: $line-height*1.5;
|
||||
}
|
||||
|
||||
.budget-investment-show {
|
||||
|
||||
.label-budget-investment {
|
||||
background: none;
|
||||
clear: both;
|
||||
color: $budget;
|
||||
display: block;
|
||||
font-size: rem-calc(12);
|
||||
font-weight: bold;
|
||||
line-height: $line-height;
|
||||
padding-bottom: 0;
|
||||
padding-left: 0;
|
||||
padding-top: 0;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.icon-budget {
|
||||
color: $budget;
|
||||
font-size: $small-font-size;
|
||||
line-height: $line-height;
|
||||
margin-left: rem-calc(6);
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// 05. Featured
|
||||
// ------------
|
||||
|
||||
@@ -835,7 +877,281 @@
|
||||
}
|
||||
}
|
||||
|
||||
// 06. Proposals successfull
|
||||
// 06. Budget
|
||||
// ----------
|
||||
|
||||
.expanded.budget {
|
||||
background: $budget;
|
||||
|
||||
h1, h2, p, a.back, .icon-angle-left {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.button {
|
||||
background: white;
|
||||
color: $budget;
|
||||
}
|
||||
|
||||
.info {
|
||||
background: #6A2A72;
|
||||
|
||||
@include breakpoint(medium) {
|
||||
border-top: rem-calc(6) solid #54225C;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.jumbo-budget {
|
||||
background: $budget;
|
||||
border-bottom: 1px solid $budget;
|
||||
|
||||
&.budget-heading {
|
||||
min-height: $line-height*10;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
h1, h2, .back, .icon-angle-left, p, a {
|
||||
color: white;
|
||||
}
|
||||
|
||||
&.welcome {
|
||||
background: $budget image-url('spending_proposals_bg.jpg');
|
||||
background-position: 50% 50%;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
|
||||
.spending-proposal-timeline {
|
||||
padding-top: $line-height;
|
||||
|
||||
ul li {
|
||||
margin-right: $line-height;
|
||||
padding-top: $line-height/2;
|
||||
|
||||
.icon-calendar {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: underline;
|
||||
|
||||
&.button {
|
||||
background: white;
|
||||
color: $brand;
|
||||
margin-bottom: rem-calc(3);
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
.social-share-button a {
|
||||
color: white;
|
||||
|
||||
&.social-share-button-twitter:hover {
|
||||
color: #40A2D1;
|
||||
}
|
||||
|
||||
&.social-share-button-facebook:hover {
|
||||
color: #354F88;
|
||||
}
|
||||
|
||||
&.social-share-button-google_plus:hover {
|
||||
color: #CE3E26;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.progress-votes {
|
||||
position: relative;
|
||||
|
||||
.progress {
|
||||
background: #212033;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.progress-meter {
|
||||
background: #fdcb10;
|
||||
border-radius: 0;
|
||||
-webkit-transition: width 2s;
|
||||
transition: width 2s;
|
||||
}
|
||||
|
||||
.spent-amount-progress,
|
||||
.spent-amount-meter {
|
||||
background: none !important;
|
||||
}
|
||||
|
||||
.spent-amount-text {
|
||||
color: white;
|
||||
font-size: $base-font-size;
|
||||
font-weight: normal;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
text-align: right;
|
||||
top: 16px;
|
||||
width: 100%;
|
||||
|
||||
&:before {
|
||||
color: #a5a1ff;
|
||||
content: "\57";
|
||||
font-family: 'icons';
|
||||
font-size: $small-font-size;
|
||||
position: absolute;
|
||||
right: -6px;
|
||||
top: -17px;
|
||||
}
|
||||
}
|
||||
|
||||
.total-amount {
|
||||
color: white;
|
||||
font-size: rem-calc(18);
|
||||
font-weight: bold;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.amount-available {
|
||||
display: block;
|
||||
text-align: right;
|
||||
|
||||
span {
|
||||
font-size: rem-calc(24);
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.big-number {
|
||||
color: $budget;
|
||||
font-size: rem-calc(60);
|
||||
line-height: rem-calc(120);
|
||||
|
||||
@include breakpoint(large) {
|
||||
font-size: rem-calc(90);
|
||||
line-height: rem-calc(240);
|
||||
}
|
||||
}
|
||||
|
||||
.ballot {
|
||||
|
||||
h2, h3 {
|
||||
font-weight: normal;
|
||||
|
||||
span {
|
||||
color: $budget;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
h3.subtitle {
|
||||
border-bottom: 3px solid $budget;
|
||||
|
||||
span {
|
||||
font-size: $base-font-size;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.amount-spent {
|
||||
background: $success-bg;
|
||||
font-weight: normal;
|
||||
padding: $line-height/2;
|
||||
|
||||
span {
|
||||
font-size: rem-calc(24);
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ul.ballot-list {
|
||||
list-style: none;
|
||||
margin-left: 0;
|
||||
|
||||
li {
|
||||
background: #f9f9f9;
|
||||
line-height: $line-height;
|
||||
margin-bottom: $line-height/4;
|
||||
padding: $line-height/2;
|
||||
position: relative;
|
||||
|
||||
a {
|
||||
color: $text;
|
||||
}
|
||||
|
||||
span {
|
||||
color: #9f9f9f;
|
||||
display: block;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.remove-investment-project {
|
||||
display: block;
|
||||
height: 0;
|
||||
|
||||
.icon-x {
|
||||
color: #9f9f9f;
|
||||
font-size: rem-calc(24);
|
||||
line-height: $line-height/2;
|
||||
position: absolute;
|
||||
right: 6px;
|
||||
text-decoration: none;
|
||||
top: 6px;
|
||||
|
||||
@include breakpoint(medium) {
|
||||
font-size: $base-font-size;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: $budget;
|
||||
color: white;
|
||||
|
||||
a, span {
|
||||
color: white;
|
||||
outline: 0;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.remove-investment-project .icon-x {
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.select-district a {
|
||||
display: inline-block;
|
||||
margin: $line-height/4 0;
|
||||
padding: $line-height/4;
|
||||
}
|
||||
|
||||
.select-district .active a {
|
||||
background: #f9f9f9;
|
||||
border-radius: rem-calc(3);
|
||||
color: $budget;
|
||||
font-weight: bold;
|
||||
|
||||
&:after {
|
||||
content: "\56";
|
||||
font-family: "icons";
|
||||
font-size: $small-font-size;
|
||||
font-weight: normal;
|
||||
line-height: $line-height;
|
||||
padding-left: rem-calc(3);
|
||||
vertical-align: baseline;
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 07. Proposals successfull
|
||||
// -------------------------
|
||||
|
||||
.dark-heading {
|
||||
|
||||
Reference in New Issue
Block a user