app/assets/javascripts/event_rules.js.coffee in ffcrm_cloudfuji-0.2.11 vs app/assets/javascripts/event_rules.js.coffee in ffcrm_cloudfuji-0.3.0
- old
+ new
@@ -46,9 +46,14 @@
false
$('.event_category_select').live "change", ->
event_rules.show_field_group this, 'event_category', $(this).val()
+ # Set 'cloudfuji_event' to 'page_loaded' if event category is page_loaded.
+ if $(this).val() == "page_loaded"
+ index = $(this).closest('li.event_rule').data('index')
+ $("#event_rules_#{index}_cloudfuji_event").val('page_loaded')
+
$('.action_select').live "change", ->
event_rules.show_field_group this, 'action', $(this).val()
) jQuery