update form with new context name

This commit is contained in:
Carsten Otto 2015-04-02 17:00:55 +02:00
parent 556c68c2e6
commit ae4ce272ff
4 changed files with 15 additions and 2 deletions

View file

@ -659,7 +659,7 @@ var ContextListPage = {
$.post(relative_to_root('contexts/'+context_id), {
'context[name]': value,
'_method': 'put'
}, highlight);
}, highlight, 'script');
return value;
},
setup_behavior: function() {

View file

@ -18,6 +18,7 @@ var <%=object_name%> = {
<% else -%>
<%=object_name%>.replace_context_form_with_updated_context();
<% end -%>
TracksForm.set_context_name("<%= escape_javascript(@context.name)%>");
},
remove_and_re_add_context: function() {
$('#<%=dom_id(@context, 'container')%>').slideUp(500, function() {