mirror of
https://github.com/rickbarrette/stopwatch.git
synced 2026-04-02 09:51:57 -04:00
adds project_id arg to 'log time' link to preselect the current project, if any.
This commit is contained in:
@@ -75,6 +75,10 @@ window.initStopwatch = function(config){
|
||||
time_entry_id: entryId,
|
||||
time_spent: spentTime
|
||||
});
|
||||
},
|
||||
setProjectId: function(projectId){
|
||||
var a = $('a#stopwatch-menu');
|
||||
a.attr('href', a.attr('href').replace(/\/new.*$/, '/new?project_id='+projectId));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user