use banners js in new legislative process
This commit is contained in:
@@ -1,13 +1,5 @@
|
|||||||
App.LegislationAdmin =
|
App.LegislationAdmin =
|
||||||
|
|
||||||
update_background_color: (selector, text_selector, background_color) ->
|
|
||||||
$(selector).css('background-color', background_color);
|
|
||||||
$(text_selector).val(background_color);
|
|
||||||
|
|
||||||
update_font_color: (selector, text_selector, font_color) ->
|
|
||||||
$(selector).css('color', font_color);
|
|
||||||
$(text_selector).val(font_color);
|
|
||||||
|
|
||||||
initialize: ->
|
initialize: ->
|
||||||
$("input[type='checkbox'][data-disable-date]").on
|
$("input[type='checkbox'][data-disable-date]").on
|
||||||
change: ->
|
change: ->
|
||||||
@@ -22,23 +14,3 @@ App.LegislationAdmin =
|
|||||||
|
|
||||||
$("#nested_question_options").on "cocoon:after-insert", ->
|
$("#nested_question_options").on "cocoon:after-insert", ->
|
||||||
App.Globalize.refresh_visible_translations()
|
App.Globalize.refresh_visible_translations()
|
||||||
|
|
||||||
#banner colors for proccess header
|
|
||||||
|
|
||||||
$("#legislation_process_background_color_picker").on
|
|
||||||
change: ->
|
|
||||||
App.LegislationAdmin.update_background_color("#js-legislation_process-background", "#legislation_process_background_color", $(this).val());
|
|
||||||
|
|
||||||
$("#legislation_process_background_color").on
|
|
||||||
change: ->
|
|
||||||
App.LegislationAdmin.update_background_color("#js-legislation_process-background", "#legislation_process_background_color_picker", $(this).val());
|
|
||||||
|
|
||||||
$("#legislation_process_font_color_picker").on
|
|
||||||
change: ->
|
|
||||||
App.LegislationAdmin.update_font_color("#js-legislation_process-title", "#legislation_process_font_color", $(this).val());
|
|
||||||
App.LegislationAdmin.update_font_color("#js-legislation_process-description", "#legislation_process_font_color", $(this).val());
|
|
||||||
|
|
||||||
$("#legislation_process_font_color").on
|
|
||||||
change: ->
|
|
||||||
App.LegislationAdmin.update_font_color("#js-legislation_process-title", "#legislation_process_font_color_picker", $(this).val());
|
|
||||||
App.LegislationAdmin.update_font_color("#js-legislation_process-description", "#legislation_process_font_color_picker", $(this).val());
|
|
||||||
|
|||||||
@@ -216,13 +216,13 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="small-3 column">
|
<div class="small-3 column">
|
||||||
<%= f.label :sections, "Background color" %>
|
<%= f.label :sections, "Background color" %>
|
||||||
<%= color_field(:process, :background_color, id: 'legislation_process_background_color_picker') %>
|
<%= color_field(:process, :background_color, id: 'banner_background_color_picker') %>
|
||||||
<%= f.text_field :background_color, label: false %>
|
<%= f.text_field :background_color, label: false, id: 'banner_background_color' %>
|
||||||
</div>
|
</div>
|
||||||
<div class="small-3 column end">
|
<div class="small-3 column end">
|
||||||
<%= f.label :sections, "Font color" %>
|
<%= f.label :sections, "Font color" %>
|
||||||
<%= color_field(:process, :font_color, id: 'legislation_process_font_color_picker') %>
|
<%= color_field(:process, :font_color, id: 'banner_font_color_picker') %>
|
||||||
<%= f.text_field :font_color, label: false %>
|
<%= f.text_field :font_color, label: false, id: 'banner_font_color' %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user