From: Coleman Watts Date: Sat, 6 Apr 2013 21:31:42 +0000 (-0700) Subject: Update status msgs in similar code in 3 other places X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=640c39339c180df2ea72378ff3df9c36618e4c6d;p=civicrm-core.git Update status msgs in similar code in 3 other places --- diff --git a/templates/CRM/Case/Page/CustomDataView.tpl b/templates/CRM/Case/Page/CustomDataView.tpl index de9cafd46b..0ca6104f5c 100644 --- a/templates/CRM/Case/Page/CustomDataView.tpl +++ b/templates/CRM/Case/Page/CustomDataView.tpl @@ -106,10 +106,9 @@ data: "valueID=" + valueID + "&groupID=" + groupID +"&contactId=" + contactID + "&key={/literal}{crmKey name='civicrm/ajax/customvalue'}{literal}", url: postUrl, success: function(html){ - cj( '#' + elementID ).hide( ); - var resourceBase = {/literal}"{$config->resourceBase}"{literal}; - var successMsg = '{/literal}{ts escape='js'}The selected record has been deleted.{/ts}{literal}   '; - cj( 'tr#statusmessg_' + groupID + '_' + valueID ).show( ).children().find('span').html( successMsg ); + cj('#'+ elementID).hide(); + hideStatus(valueID, groupID); + CRM.alert('', '{/literal}{ts escape="js"}Record Deleted{/ts}{literal}', 'success'); var element = cj( '.ui-tabs-nav #tab_custom_' + groupID + ' a' ); cj(element).html(cj(element).attr('title') + ' ('+ html+') '); } diff --git a/templates/CRM/Contact/Form/Edit/CustomData.tpl b/templates/CRM/Contact/Form/Edit/CustomData.tpl index 94bd375392..1f8aa892eb 100644 --- a/templates/CRM/Contact/Form/Edit/CustomData.tpl +++ b/templates/CRM/Contact/Form/Edit/CustomData.tpl @@ -83,12 +83,11 @@ data: "valueID=" + valueID + "&groupID=" + groupID +"&contactId=" + contactID + "&key={/literal}{crmKey name='civicrm/ajax/customvalue'}{literal}", url: postUrl, success: function(html){ - cj( '#'+ elementID ).hide( ); - var resourceBase = {/literal}"{$config->resourceBase}"{literal}; - var successMsg = '{/literal}{ts escape='js'}The selected record has been deleted.{/ts}{literal}   '; - cj( 'tr#statusmessg_' + groupID + '_' + valueID ).show( ).children().find('span').html( successMsg ); - var element = cj( '.ui-tabs-nav #tab_custom_' + groupID + ' a' ); - cj(element).html(cj(element).attr('title') + ' ('+ html+') '); + cj('#'+ elementID).hide(); + hideStatus(valueID, groupID); + CRM.alert('', '{/literal}{ts escape="js"}Record Deleted{/ts}{literal}', 'success'); + var element = cj( '.ui-tabs-nav #tab_custom_' + groupID + ' a' ); + cj(element).html(cj(element).attr('title') + ' ('+ html+') '); } }); } diff --git a/templates/CRM/Custom/Page/CustomDataView.tpl b/templates/CRM/Custom/Page/CustomDataView.tpl index 79e014d44b..06e994cd7e 100644 --- a/templates/CRM/Custom/Page/CustomDataView.tpl +++ b/templates/CRM/Custom/Page/CustomDataView.tpl @@ -135,12 +135,11 @@ data: "valueID=" + valueID + "&groupID=" + groupID +"&contactId=" + contactID + "&key={/literal}{crmKey name='civicrm/ajax/customvalue'}{literal}", url: postUrl, success: function(html){ - cj( '#' + elementID ).hide( ); - var resourceBase = {/literal}"{$config->resourceBase}"{literal}; - var successMsg = '{/literal}{ts escape="js"}The selected record has been deleted.{/ts}{literal}   '; - cj( 'tr#statusmessg_' + groupID + '_' + valueID ).show( ).children().find('span').html( successMsg ); - var element = cj( '.ui-tabs-nav #tab_custom_' + groupID + ' a' ); - cj(element).html(cj(element).attr('title') + ' ('+ html+') '); + cj('#'+ elementID).hide(); + hideStatus(valueID, groupID); + CRM.alert('', '{/literal}{ts escape="js"}Record Deleted{/ts}{literal}', 'success'); + var element = cj( '.ui-tabs-nav #tab_custom_' + groupID + ' a' ); + cj(element).html(cj(element).attr('title') + ' ('+ html+') '); } }); }