diff options
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/admin/holidays.js | 23 | ||||
-rw-r--r-- | app/assets/stylesheets/admin.scss | 5 |
2 files changed, 26 insertions, 2 deletions
diff --git a/app/assets/javascripts/admin/holidays.js b/app/assets/javascripts/admin/holidays.js index 81f269c80..55eae9e2a 100644 --- a/app/assets/javascripts/admin/holidays.js +++ b/app/assets/javascripts/admin/holidays.js @@ -14,14 +14,33 @@ $(function() { $('.holiday').each(function(index){ var holiday_row = $(this); var edit_button = holiday_row.find('.edit-button'); - edit_button.click(function(){ var edit_call = $.ajax({ type: 'GET', url: holiday_row.data('target') }); - edit_call.done(function(response) { holiday_row.html(response); }); return false; }); }); + + // Remove button removes form div for holiday from an import set + $('.remove-holiday').each(function(index){ + $(this).click(function(){ + $(this).parents('.import-holiday-info').remove(); + return false; + }); + }); + + if ($('#holiday_import_source_suggestions').is(':checked')){ + $('#holiday_import_ical_feed_url').attr("disabled", "disabled"); + } + // Enable and disable the feed element when that is selected as the import source + $('#holiday_import_source_feed').click(function(){ + $('#holiday_import_ical_feed_url').removeAttr("disabled"); + }); + + $('#holiday_import_source_suggestions').click(function(){ + $('#holiday_import_ical_feed_url').attr("disabled", "disabled"); + }); + }); diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss index 69fce108c..469c3ed91 100644 --- a/app/assets/stylesheets/admin.scss +++ b/app/assets/stylesheets/admin.scss @@ -143,5 +143,10 @@ body.admin { width: 200px; text-align: right; } + + #import_start_year, #import_end_year { + width: 75px; + } + } |