mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-23 18:50:12 +01:00
parent
cb612feb5e
commit
ae9e13bec0
2 changed files with 8 additions and 12 deletions
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -468,6 +468,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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue