From: unknown Date: Sat, 6 Sep 2014 23:45:31 +0000 (+0100) Subject: Js fix for copyexcludedates for posting dates X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b657be1884ba491df18a9897f6176f853e436d97;p=civicrm-core.git Js fix for copyexcludedates for posting dates --- diff --git a/templates/CRM/Core/Form/RecurringEntity.tpl b/templates/CRM/Core/Form/RecurringEntity.tpl index 4b38d67fbd..a471e81d0a 100644 --- a/templates/CRM/Core/Form/RecurringEntity.tpl +++ b/templates/CRM/Core/Form/RecurringEntity.tpl @@ -209,12 +209,6 @@ //Select all options in selectbox before submitting cj(this).submit(function() { cj('#exclude_date_list option').attr('selected',true); - var dateTxt=[]; - cj('#exclude_date_list option:selected').each(function(){ - dateTxt.push(cj(this).text()); - }); - var completeDateText = dateTxt.join(','); - cj('#copyExcludeDates').val(completeDateText); //Check form for values submitted if(cj('input[name=ends]:checked').val() == 1){ @@ -238,36 +232,19 @@ } }); - - - //Dialog for changes in repeat configuration -/* cj('#dialog').dialog({ autoOpen: false }); - cj('#_qf_Repeat_submit-top, #_qf_Repeat_submit-bottom').click( - function () { - cj('#dialog').dialog('open'); - cj('#dialog').dialog({ - title: 'Save recurring event', - width: '600', - position: 'center', - //draggable: false, - buttons: { - Yes: function() { - cj(this).dialog( "close" ); - cj('#isChangeInRepeatConfiguration').val('1'); - cj('form').submit(); - }, - No: function() { //cancel - cj(this).dialog( "close" ); - } - } - }); - return false; - } - );*/ - + //Dialog for preview repeat Configuration dates cj('#preview-dialog').dialog({ autoOpen: false }); cj('#_qf_Repeat_submit-top, #_qf_Repeat_submit-bottom').click( function (){ + cj('#exclude_date_list option').attr('selected',true); + //Copy exclude dates + var dateTxt=[]; + cj('#exclude_date_list option:selected').each(function(){ + dateTxt.push(cj(this).text()); + }); + var completeDateText = dateTxt.join(','); + cj('#copyExcludeDates').val(completeDateText); + cj('#generated_dates').html('').html('
{/literal}{ts escape='js'}Just a moment, generating dates{/ts}{literal}...
'); cj('#preview-dialog').dialog('open'); cj('#preview-dialog').dialog({