Don't use project default context when in context view

Closes #934
This commit is contained in:
Eric Allen 2010-04-02 13:30:10 -04:00
parent 9ab69adb38
commit 9ccd6d11d8

View file

@ -170,10 +170,16 @@ function update_order(event, ui){
/* Unobtrusive jQuery behavior */
function project_defaults(){
if(defaultContexts[$(this).val()] !== undefined) {
context_name = $(this).parents('form').find('input[name=context_name]');
if(context_name.attr('edited') === undefined){
context_name.val(defaultContexts[$(this).val()]);
if($('body').hasClass('contexts')){
// don't change the context
// see ticket #934
}
else {
if(defaultContexts[$(this).val()] !== undefined) {
context_name = $(this).parents('form').find('input[name=context_name]');
if(context_name.attr('edited') === undefined){
context_name.val(defaultContexts[$(this).val()]);
}
}
}
if(defaultTags[$(this).val()] !== undefined) {