Few JS improvisations
authorunknown <priyanka.karan26@gmail.com>
Tue, 30 Sep 2014 13:49:02 +0000 (14:49 +0100)
committerdeepak-srivastava <deepak.srivastava.0303@gmail.com>
Fri, 3 Oct 2014 09:08:27 +0000 (10:08 +0100)
templates/CRM/Core/Form/RecurringEntity.tpl

index 6aa60e7b5caa6a57d7d71319c8570e4bf272aa67..5bccb258f8e45696d01cf66746ab3a5308b5fc4c 100644 (file)
             <td>{$form.repeats_by.2.html}&nbsp;&nbsp;{$form.entity_status_1.html}&nbsp;&nbsp;{$form.entity_status_2.html} {help id="id-repeats-by-week"}
             </td>
           </tr>
-          {*<tr class="crm-core-form-recurringentity-block-event_start_date">
-            <td class="label">{$form.repeat_event_start_date.label}</td>
-            <td>{include file="CRM/common/jcalendar.tpl" elementName=repeat_event_start_date}</td>
-          </tr>*}
           <tr class="crm-core-form-recurringentity-block-ends">
             <td class="label">{$form.ends.label}</td>
             <td>{$form.ends.1.html}&nbsp;{$form.start_action_offset.html}&nbsp;occurrences&nbsp;{help id="id-ends-after"}</td>
@@ -92,9 +88,6 @@
       </div>
     </div>
 </div>
-<!--<div id="dialog" style="display:none">
-    Changing Repeat configuration may affect all other connected repeating events, Are you sure?
-</div>-->
 <div id="preview-dialog" style="display:none;height:auto;">
     <div style="display:block;" id="generated_dates"></div>
     
               cj('#preview-dialog').css('overflow-y', 'auto');
             }
           }else{
+            cj('div.ui-dialog-buttonset button span:contains(Ok)').hide();
             cj('#generated_dates').append("<span style='color:red;'>Sorry, no dates could be generated for the given criteria!</span>");
           }
         },
     
 });
     
-    //Exclude list function
-    function addToExcludeList(val) {
-      if(val !== ""){
-        var exists = false;
-        for(var i = 0, opts = document.getElementById('exclude_date_list').options; i < opts.length; ++i){
-          if(opts[i].text == val){
-            exists = true;
-            break;
-          }
-        }
-        if (exists == false){
-          cj('#exclude_date_list').append('<option>'+val+'</option>');
+  //Exclude list function
+  function addToExcludeList(val) {
+    if(val !== ""){
+      var exists = false;
+      for(var i = 0, opts = document.getElementById('exclude_date_list').options; i < opts.length; ++i){
+        if(opts[i].text == val){
+          exists = true;
+          break;
         }
       }
+      if (exists == false){
+        cj('#exclude_date_list').append('<option>'+val+'</option>');
+      }
     }
-    
-    function removeFromExcludeList(sourceID) {
-      var src = document.getElementById(sourceID);
-      for(var count= src.options.length-1; count >= 0; count--) {
-        if(src.options[count].selected == true) {
-          try{
-            src.remove(count, null);
-          }catch(error){
-            src.remove(count);
-          }
+  }
+
+  function removeFromExcludeList(sourceID) {
+    var src = document.getElementById(sourceID);
+    for(var count= src.options.length-1; count >= 0; count--) {
+      if(src.options[count].selected == true) {
+        try{
+          src.remove(count, null);
+        }catch(error){
+          src.remove(count);
         }
       }
     }
+  }
 </script>
 {/literal}