Somehow I forgot this little piece of jQuery

Fixes #989
This commit is contained in:
Eric Allen 2010-02-21 13:05:55 -05:00
parent cb612feb5e
commit ae9e13bec0
2 changed files with 8 additions and 12 deletions

View file

@ -73,12 +73,6 @@
<%= options_from_collection_for_select(@active_contexts, "id", "name", @active_contexts.first.id) unless @active_projects.empty?-%>
<%= options_from_collection_for_select(@hidden_contexts, "id", "name") -%>
</select>
<%= observe_field "feed-contexts", :update => "feeds-for-context",
:with => 'context_id',
:url => { :controller => "feedlist", :action => "get_feeds_for_context" },
:before => "$('feeds-for-context').startWaiting()",
:complete => "$('feeds-for-context').stopWaiting()"
-%>
</li>
<li>Step 2 - Select the feed for this context
<div id="feedicons-context">
@ -101,12 +95,6 @@
<%= options_from_collection_for_select(@hidden_projects, "id", "name") -%>
<%= options_from_collection_for_select(@completed_projects, "id", "name") -%>
</select>
<%= observe_field "feed-projects", :update => "feeds-for-project",
:with => 'project_id',
:url => { :controller => "feedlist", :action => "get_feeds_for_project" },
:before => "$('feeds-for-project').startWaiting()",
:complete => "$('feeds-for-project').stopWaiting()"
-%>
</li>
<li>Step 2 - Select the feed for this project
<div id="feedicons-project">

View file

@ -469,6 +469,14 @@ $(document).ready(function() {
$("#list-contexts-active").sortable({handle: '.handle', update: update_order});
$("#list-contexts-hidden").sortable({handle: '.handle', update: update_order});
/* Feeds page */
$("#feed-contexts").change(function(){
$("#feeds-for-context").load('/feedlist/get_feeds_for_context?context_id='+this.value);
});
$("#feed-projects").change(function(){
$("#feeds-for-project").load('/feedlist/get_feeds_for_project?project_id='+this.value);
});
/* Gets called from some AJAX callbacks, too */
enable_rich_interaction();
});