var advman_str_delete_confirm = "You are about to permanently delete the %s ad:"; var advman_str_delete_confirm2 = "Are you sure?\n(Press 'Cancel' to keep, 'OK' to delete)"; function advman_set_action(action, id, name, network) { submit = true; if (action == 'delete') { if ( confirm(advman_str_delete_confirm.replace(/%s/, network) + '\n\n [' + id + '] ' + name + '\n\n' + advman_str_delete_confirm2) ) { submit = true; } else { submit = false; } } if (submit) { document.getElementById('advman-action').value = action; document.getElementById('advman-target').value = id; document.getElementById('advman-form').submit(); } } function advman_form_update(element){ //element is the calling element, element.id has the identifier //detect calling form element and action accordingly switch(element.id){ /* case 'advman-product':advman_update_product(); break; */ case 'advman-adformat':advman_update_custom(); break; case 'advman-adtype':advman_update_formats(); break; } } function advman_select_update(element) { element.style.color = (element.options[0].selected) ? 'gray' : 'black'; } function advman_update_ad(element,id,what) { target = document.getElementById(id); switch (what) { case 'bg': target.style.background='#' + element.value; break; case 'border': target.style.borderColor='#' + element.value; break; case 'font-link': case 'font-text': case 'font-title': target.style.fontFamily=element.value; break; default : target.style.color='#' + element.value; break; } } function advman_update_formats() { s = document.getElementById('advman-adtype'); if (s) { n = s.length; for (i=0; i' ).text( name ); } ); } ); }; $('#categorychecklist').wpList( { alt: '', what: 'link-category', response: 'category-ajax-response', addAfter: catAddAfter } ); $('a[href="#categories-all"]').click(function(){deleteUserSetting('cats');}); $('a[href="#categories-pop"]').click(function(){setUserSetting('cats','pop');}); if ( 'pop' == getUserSetting('cats') ) $('a[href="#categories-pop"]').click(); $('#category-add-toggle').click( function() { $(this).parents('div:first').toggleClass( 'wp-hidden-children' ); $('#category-tabs a[href="#categories-all"]').click(); return false; } ); $('.categorychecklist :checkbox').change( syncChecks ).filter( ':checked' ).change(); }); */ //End Initialise