mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-11 23:22:36 +01:00
get drag and drop for projects running
This commit is contained in:
parent
cde8ad35fd
commit
af80861725
7 changed files with 56 additions and 22 deletions
|
|
@ -7,6 +7,6 @@ set_page_badge(<%=@down_count%>);
|
|||
function remove_deleted_project() {
|
||||
$('div#<%=dom_id(@project, "container")%>').slideUp(1000,
|
||||
function() {
|
||||
$('div#<%=dom_id(@project, "container")%>').remove()
|
||||
$('div#<%=dom_id(@project, "container")%>').remove();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,8 +5,7 @@
|
|||
<% if source_view_is :project_list -%>
|
||||
|
||||
<% if @state_changed -%>
|
||||
remove_project();
|
||||
add_project();
|
||||
remove_and_re_add_project();
|
||||
<% else -%>
|
||||
replace_project_form_with_updated_project();
|
||||
<% end -%>
|
||||
|
|
@ -46,7 +45,7 @@ function show_errors() {
|
|||
}
|
||||
|
||||
function remove_project_edit_form() {
|
||||
$('#<%=dom_id(@project, 'edit')%>').hide(500);
|
||||
$('#<%=dom_id(@project, 'edit')%>').hide(500, function() {$('#<%=dom_id(@project, 'edit')%>').remove();} );
|
||||
}
|
||||
|
||||
function update_and_show_project_settings() {
|
||||
|
|
@ -60,7 +59,7 @@ function update_sidebar() {
|
|||
|
||||
function update_sortable() {
|
||||
<%#* page.sortable "list-#{@project.state}-projects", get_listing_sortable_options("list-#{@project.state}-projects")-%>
|
||||
console.log("Pending: update_sortable() on update project");
|
||||
/*console.log("Pending: update_sortable() on update project");*/
|
||||
}
|
||||
|
||||
function replace_project_form_with_updated_project() {
|
||||
|
|
@ -70,13 +69,11 @@ function replace_project_form_with_updated_project() {
|
|||
});
|
||||
}
|
||||
|
||||
function remove_project() {
|
||||
function remove_and_re_add_project() {
|
||||
$('#<%=dom_id(@project, 'container')%>').slideUp(500, function() {
|
||||
$('#<%=dom_id(@project, 'container')%>').remove();});
|
||||
}
|
||||
|
||||
function add_project() {
|
||||
$('#list-<%=@project.state%>-projects').append(html_for_project_listing);
|
||||
$('#<%=dom_id(@project, 'container')%>').remove();
|
||||
$('#list-<%=@project.state%>-projects').append(html_for_project_listing);
|
||||
});
|
||||
}
|
||||
|
||||
<%
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue