-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
98fab25
commit 93df61c
Showing
8 changed files
with
50 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2.0.0-p247 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#= require jquery | ||
#= require jquery_ujs | ||
#= require turbolinks | ||
#= require_tree . | ||
#= require social-share-button | ||
#= require_tree . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
click_msg = (msg) -> | ||
if msg.is(':visible') | ||
msg.hide() | ||
else | ||
msg.show() | ||
|
||
show_submit_btn = (form) -> | ||
$(form).find('input[type="submit"]').show() | ||
|
||
$ -> | ||
$('.excuse .msg').hide() | ||
$('.excuse input[type="submit"]').hide() | ||
$('.excuse label').on 'click', -> | ||
click_msg($(this).parent().find('.msg')) | ||
$('.excuse .msg input[type="text"]').on 'change', -> | ||
show_submit_btn(this.form) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,10 @@ | ||
- @excuses.each do |excuse| | ||
p = excuse.msg | ||
.excuse | ||
= form_for excuse, remote: true do |f| | ||
label = excuse.msg[I18n.locale.to_s] | ||
= f.submit | ||
.msg | ||
= fields_for :msg do |ff| | ||
- excuse.msg.each do |key, value| | ||
div class = key | ||
= ff.text_field key.to_sym, value: value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
$('#edit_excuse_<%= @excuse.id %>').find('input[type="submit"]').hide(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters