Draft Version page
This commit is contained in:
@@ -50,8 +50,7 @@
|
||||
//= require markdown_editor
|
||||
//= require cocoon
|
||||
//= require allegations
|
||||
//= require legislation_debate
|
||||
//= require legislation_questions
|
||||
//= require legislation
|
||||
//= require custom
|
||||
|
||||
var initialize_modules = function() {
|
||||
@@ -76,8 +75,7 @@ var initialize_modules = function() {
|
||||
App.SocialShare.initialize();
|
||||
App.MarkdownEditor.initialize();
|
||||
App.Allegations.initialize();
|
||||
App.LegislationDebate.initialize();
|
||||
App.LegislationQuestions.initialize();
|
||||
App.Legislation.initialize();
|
||||
};
|
||||
|
||||
$(function(){
|
||||
|
||||
16
app/assets/javascripts/legislation.js.coffee
Normal file
16
app/assets/javascripts/legislation.js.coffee
Normal file
@@ -0,0 +1,16 @@
|
||||
App.Legislation =
|
||||
|
||||
initialize: ->
|
||||
$('#js-toggle-debate').on
|
||||
click: ->
|
||||
$('#debate-info').toggle()
|
||||
|
||||
$('form#new_legislation_answer input.button').hide()
|
||||
$('form#new_legislation_answer input[type=radio]').on
|
||||
click: ->
|
||||
$('form#new_legislation_answer').submit()
|
||||
|
||||
$('form#draft_version_go_to_version input.button').hide()
|
||||
$('form#draft_version_go_to_version select').on
|
||||
change: ->
|
||||
$('form#draft_version_go_to_version').submit()
|
||||
@@ -1,6 +0,0 @@
|
||||
App.LegislationDebate =
|
||||
|
||||
initialize: ->
|
||||
$('#js-toggle-debate').on
|
||||
click: ->
|
||||
$('#debate-info').toggle()
|
||||
@@ -1,8 +0,0 @@
|
||||
App.LegislationQuestions =
|
||||
|
||||
initialize: ->
|
||||
$('form#new_legislation_answer input.button').hide()
|
||||
$('form#new_legislation_answer input[type=radio]').on
|
||||
click: ->
|
||||
$('form#new_legislation_answer').submit()
|
||||
|
||||
@@ -4,7 +4,6 @@ App.MarkdownEditor =
|
||||
textarea_content = element.find('textarea').val()
|
||||
result = md.render(textarea_content)
|
||||
element.find('#markdown-preview').html(result)
|
||||
element.find('#markdown-result input').val(result)
|
||||
|
||||
initialize: ->
|
||||
$('.markdown-editor').each ->
|
||||
|
||||
Reference in New Issue
Block a user