mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-18 00:00:12 +01:00
Edit-in-place for context name
This commit is contained in:
parent
586b46661a
commit
83b17d2231
4 changed files with 49 additions and 4 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue