I'm trying to build a GUI Extension for Audience Manager to disable the Email address field. My attempt (below) is failing because the field is disabled by default (at the point that I attempt to disable it in my code) and then re-enabled when the data has finished loading.
Is there an event I can hook into which will tell me when the whole view or the specific field have finished loading?
$evt.addEventHandler($display, 'start', function() {
var handlers = {
'GeneralTab': handleGeneralTab,
'DetailsTab': handleDetailsTab,
'CategoriesAndKeywordsTab': handleCategoriesTab
}
function handleGeneralTab($display) {
// This works, but is overridden when details are loaded
$j('#EmailAddress').attr('disabled', 'disabled');
}
var tabs = $display.getView().properties.controls.TabControl;
tabs && tabs.addEventListener('select', function(e) {
var id = e.data.element.id;
handlers[id] && handlers[id].call(this, $display);
});
// Initially we'll be in the general tab
handleGeneralTab($display);
});