diff options
Diffstat (limited to 'app/assets/javascripts/admin')
| -rw-r--r-- | app/assets/javascripts/admin/dashboard.coffee | 7 | ||||
| -rw-r--r-- | app/assets/javascripts/admin/init_ckeditor.coffee | 6 | ||||
| -rw-r--r-- | app/assets/javascripts/admin/records.coffee | 7 |
3 files changed, 14 insertions, 6 deletions
| diff --git a/app/assets/javascripts/admin/dashboard.coffee b/app/assets/javascripts/admin/dashboard.coffee index 24f83d1..bc48315 100644 --- a/app/assets/javascripts/admin/dashboard.coffee +++ b/app/assets/javascripts/admin/dashboard.coffee | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | # Place all the behaviors and hooks related to the matching controller here. | 1 | # Place all the behaviors and hooks related to the matching controller here. |
| 2 | # All this logic will automatically be available in application.js. | 2 | # All this logic will automatically be available in application.js. |
| 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ | 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ |
| 4 | dash_ready = -> | ||
| 5 | $(".datepicker").datepicker({"dateFormat": "yy-mm-dd"}) | ||
| 6 | $("#check_all").change -> | ||
| 7 | $(".comment_ids").prop("checked", $(this).prop("checked")) | ||
| 8 | |||
| 9 | $(document).ready(dash_ready) | ||
| 10 | $(document).on('turbolinks:load', dash_ready) | ||
| diff --git a/app/assets/javascripts/admin/init_ckeditor.coffee b/app/assets/javascripts/admin/init_ckeditor.coffee deleted file mode 100644 index 5f653af..0000000 --- a/app/assets/javascripts/admin/init_ckeditor.coffee +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | ready = -> | ||
| 2 | $('.ckeditor').each -> | ||
| 3 | CKEDITOR.replace $(this).attr('id') | ||
| 4 | |||
| 5 | $(document).ready(ready) | ||
| 6 | $(document).on('page:load', ready) | ||
| diff --git a/app/assets/javascripts/admin/records.coffee b/app/assets/javascripts/admin/records.coffee index 3a1ed51..3862b09 100644 --- a/app/assets/javascripts/admin/records.coffee +++ b/app/assets/javascripts/admin/records.coffee | |||
| @@ -23,3 +23,10 @@ $(document).on "turbolinks:load", -> | |||
| 23 | create_record_toggle($(this).prop("checked")) | 23 | create_record_toggle($(this).prop("checked")) |
| 24 | $(".published-field input[type=checkbox]").change -> | 24 | $(".published-field input[type=checkbox]").change -> |
| 25 | published_field_toggle($(this).prop("checked")) | 25 | published_field_toggle($(this).prop("checked")) |
| 26 | $("input[type=tags]").each -> | ||
| 27 | tagsInput(this) | ||
| 28 | $(".tags-input input[type=text]").autocomplete({ | ||
| 29 | source: Routes.suggest_tags_path() | ||
| 30 | }) | ||
| 31 | $(".image-uploads pre").click -> | ||
| 32 | navigator.clipboard.writeText($(this).text()); | ||
