Edit-in-place for context name

This commit is contained in:
Eric Allen 2009-09-27 22:38:21 -04:00
parent 586b46661a
commit 83b17d2231
4 changed files with 49 additions and 4 deletions

View file

@ -329,6 +329,15 @@ $(document).ready(function() {
$('#recurring_edit_'+this.id.split('_')[5]).show();
});
$('div.context span#context_name').editable(function(value, settings){
context_id = $(this).parents('.container.context').get(0).id.split('c')[1];
highlight = function(){
$('div.context span#context_name').effect('highlight', {}, 500);
};
$.post('/contexts/update/'+context_id, {'context[name]': value}, highlight);
return(value);
}, {style: 'padding:0px'});
/* Projects behavior */
$('.alphabetize_link').click(function(evt){
evt.preventDefault();