Js fix for copyexcludedates for posting dates
authorunknown <priyanka.karan26@gmail.com>
Sat, 6 Sep 2014 23:45:31 +0000 (00:45 +0100)
committerdeepak-srivastava <deepak.srivastava.0303@gmail.com>
Fri, 3 Oct 2014 08:55:16 +0000 (09:55 +0100)
templates/CRM/Core/Form/RecurringEntity.tpl

index 4b38d67fbd57141891ad21264baaec7e5127593d..a471e81d0a1118a6fd7e09538fea5af223f74965 100644 (file)
     //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){
         }
         
     });
-    
-    
-    //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('<div class="crm-loading-element"><span class="loading-text">{/literal}{ts escape='js'}Just a moment, generating dates{/ts}{literal}...</span></div>');
         cj('#preview-dialog').dialog('open');
         cj('#preview-dialog').dialog({