abort.push(fn);
}
}
- if (abort.length > 0) {
- $('save').setAttribute('disabled','true');
+ if (xulG.unified_interface) {
+ if (abort.length > 0) {
+ if (typeof xulG.lock_save_button == 'function') {
+ xulG.lock_save_button();
+ }
+ } else {
+ if (typeof xulG.unlock_save_button == 'function') {
+ xulG.unlock_save_button();
+ }
+ }
} else {
- $('save').setAttribute('disabled','false');
+ if (abort.length > 0) {
+ $('save').setAttribute('disabled','true');
+ } else {
+ $('save').setAttribute('disabled','false');
+ }
}
}
},0
);
}
+ xulG.lock_save_button = function() {
+ g.save_button_locked = true;
+ document.getElementById("Create").disabled = true;
+ }
+ xulG.unlock_save_button = function() {
+ g.save_button_locked = false;
+ document.getElementById("Create").disabled = false;
+ }
} else {
$('Create').hidden = true;
}
document.getElementById("EditThenCreate").disabled = false;
document.getElementById("CreateWithDefaults").disabled = false;
} else {
- document.getElementById("Create").disabled = false;
+ if (! g.save_button_locked) {
+ document.getElementById("Create").disabled = false;
+ }
}
}
document.getElementById("EditThenCreate").disabled = false;
document.getElementById("CreateWithDefaults").disabled = false;
} else {
- document.getElementById("Create").disabled = false;
+ if (! g.save_button_locked) {
+ document.getElementById("Create").disabled = false;
+ }
}
}