changed inline css to civicrm core classes and added custom classes for repeat dialog
authorunknown <priyanka.karan26@gmail.com>
Fri, 3 Oct 2014 14:23:18 +0000 (15:23 +0100)
committerunknown <priyanka.karan26@gmail.com>
Fri, 3 Oct 2014 14:23:18 +0000 (15:23 +0100)
CRM/Core/Form/RecurringEntity.php
css/civicrm.css
templates/CRM/Core/Form/RecurringEntity.tpl
templates/CRM/Event/Form/ManageEvent/ConfirmRepeatMode.tpl
templates/CRM/Event/Form/ManageEvent/Repeat.tpl

index 888c49b9f1d6b3a3e47ec0ec534558c6908df844..38937fcf433e506a9afa1f9c12483cbd154a63b9 100644 (file)
@@ -90,7 +90,7 @@ class CRM_Core_Form_RecurringEntity {
         '2' => ts('On'),
       );
     $form->addRadio('ends', ts("Ends:"), $eoptionTypes, array(), NULL, TRUE);
-    $form->add('text', 'start_action_offset', ts(''), array('maxlength' => 2));
+    $form->add('text', 'start_action_offset', ts(''), array('size' => 3, 'maxlength' => 2));
     $form->addFormRule(array('CRM_Core_Form_RecurringEntity', 'formRule'));
     $form->addDate('repeat_absolute_date', ts('On'), FALSE, array('formatType' => 'mailing'));
     $form->addDate('exclude_date', ts('Exclude Date(s)'), FALSE);
index 5f98ad78fbde4fc8cd226ce758efdb468eca089d..f5e660ccba27efe6590e73284698833523335816 100644 (file)
@@ -4539,3 +4539,27 @@ span.crm-status-icon {
 .crm-container .blockUI.blockOverlay {
   background: url("../i/loading-overlay.gif") center center no-repeat white !important;
 }
+
+/* Recurring Dialog */
+.crm-container .recurring-dialog-inner-wrapper {
+  display: inline-block;
+  width: 100%;
+}
+.crm-container .recurring-dialog-inner-left{
+  width: 30%;
+  float: left;
+}
+.crm-container .recurring-dialog-inner-right{
+  width: 70%;
+  float: left;
+}
+.crm-container .recurring-dialog-button{
+  background: #f5f5f5;
+  background-image: -webkit-linear-gradient(top,#f5f5f5,#f1f1f1);
+  border: 1px solid rgba(0,0,0,0.1);
+  padding: 5px 8px;
+  text-align: center;
+  border-radius: 2px;
+  cursor: pointer;  
+  font-size: 11px !important;
+}
\ No newline at end of file
index 5bccb258f8e45696d01cf66746ab3a5308b5fc4c..06de2b0766141360949861127987903d820cf38e 100644 (file)
       </div>
     </div>
 </div>
-<div id="preview-dialog" style="display:none;height:auto;">
-    <div style="display:block;" id="generated_dates"></div>
+<div id="preview-dialog" class="hide-block">
+    <div id="generated_dates" class="show-block"></div>
     
 </div>
 {literal}
-<style type="text/css">
-    .highlight-record{
-        font-weight:  bold !important;
-        background-color: #FFFFCC !important;
-    }
-    #start_action_offset{
-        width: 40px;
-    }
-</style>
 <script type="text/javascript">
   cj(document).ready(function() {
     cj('#repetition_start_date_display').closest("tr").hide();
             if(errors.length > 0){
               html = '';
               for (var j = 0; j < errors.length; j++) {
-                html += '<span style="color: #8A1F11;">*&nbsp;' + errors[j] + '</span><br/>';
+                html += '<span class="crm-error">*&nbsp;' + errors[j] + '</span><br/>';
               }
             }
             if(warningHtml != ""){
             }
           }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>");
+            cj('#generated_dates').append("<span class='crm-error'>Sorry, no dates could be generated for the given criteria!</span>");
           }
         },
         complete: function(){
index 71d3116f306486a1918d618a4b66f90b3c5a29b7..5bb588f5fc2031d0bd70a9aa97ba7a5f8d4d945e 100644 (file)
  +--------------------------------------------------------------------+
 *}
 
-<div id="repeat-mode-dailog" style="display:none;">
-    How would you like this change to affect other events in the repetition set?<br/><br/>
-    <div style="display: inline-block">
-        <div style="display:inline-block;width:100%;">
-            <div style="width:30%;float:left;">
-                <button class="repeat-mode-dailog-button only-this-event">Only this Event</button>
+<div id="recurring-dialog" class="hide-block">
+    {ts}How would you like this change to affect other events in the repetition set?{/ts}<br/><br/>
+    <div class="show-block">
+        <div class="recurring-dialog-inner-wrapper">
+            <div class="recurring-dialog-inner-left">
+                <button class="recurring-dialog-button only-this-event">{ts}Only this Event{/ts}</button>
             </div>
-            <div style="width:70%;float:left;">All other events in the series will remain same.</div>
+          <div class="recurring-dialog-inner-right">{ts}All other events in the series will remain same.{/ts}</div>
         </div>
-        <div style="display:inline-block;width:100%;">
-            <div style="width:30%;float:left;">
-                <button class="repeat-mode-dailog-button this-and-all-following-event">This and Following Events</button>
+        <div class="recurring-dialog-inner-wrapper">
+            <div class="recurring-dialog-inner-left">
+                <button class="recurring-dialog-button this-and-all-following-event">{ts}This and Following Events{/ts}</button>
             </div>
-            <div style="width:70%;float:left;">Change applies to this and all the following events.</div>
+            <div class="recurring-dialog-inner-right">{ts}Change applies to this and all the following events.{/ts}</div>
         </div>
-        <div style="display:inline-block;width:100%;">
-            <div style="width:30%;float:left;">
-                <button class="repeat-mode-dailog-button all-events">All the Events</button>
+        <div class="recurring-dialog-inner-wrapper">
+            <div class="recurring-dialog-inner-left">
+                <button class="recurring-dialog-button all-events">{ts}All the Events{/ts}</button>
             </div>
-            <div style="width:70%;float:left;">Change applies to all the events in the series.</div>
+            <div class="recurring-dialog-inner-right">{ts}Change applies to all the events in the series.{/ts}</div>
         </div>
     </div>
 </div>
 <input type="hidden" value="" name="isRepeatingEvent" id="is-repeating-event"/>
-{literal}
-   <style type="text/css">
-      .repeat-mode-dailog-button{
-         background: #f5f5f5;
-         background-image: -webkit-linear-gradient(top,#f5f5f5,#f1f1f1);
-         border: 1px solid rgba(0,0,0,0.1);
-         padding: 5px 8px;
-         text-align: center;
-         border-radius: 2px;
-         cursor: pointer;  
-         font-size: 11px !important;
-      }
-   </style>
-{/literal}
-
-
 {if $isRepeat eq 'repeat'}
 {literal}
 <script>
@@ -81,8 +65,8 @@
     $('#crm-main-content-wrapper').on('click', 'div.crm-submit-buttons span.crm-button input[value="Save"], div.crm-submit-buttons span.crm-button input[value="Save and Done"]', function() {
         form = $(this).parents('form:first').attr('class');
         if( form != "" && mapper.hasOwnProperty(form) ){
-          $("#repeat-mode-dailog").dialog({
-            title: 'How does this change affect other repeating events in the set?',
+          $("#recurring-dialog").dialog({
+            title: ts('How does this change affect other repeating events in the set?'),
             modal: true,
             width: '650',
             buttons: {
           url:  ajaxurl,
           success: function (result) {
             if(result.status != "" && result.status == 'Done'){
-              $("#repeat-mode-dailog").dialog('close');
+              $("#recurring-dialog").dialog('close');
               $('#mainTabContainer div:visible Form').submit();
             }else if(result.status != "" && result.status == 'Error'){
-              var errorBox = confirm("Mode could not be updated, save only this event?");
+              var errorBox = confirm(ts("Mode could not be updated, save only this event?"));
               if (errorBox == true) {
-                $("#repeat-mode-dailog").dialog('close');
+                $("#recurring-dialog").dialog('close');
                 $('#mainTabContainer div:visible Form').submit();
               } else {
-                $("#repeat-mode-dailog").dialog('close');
+                $("#recurring-dialog").dialog('close');
                 return false;
               }
             }
index 39504999a9b95c3bd8544d7fdd1b69117cd1dc61..55c0da04e0c5e26412a09981161b5f5dba632d99 100644 (file)
@@ -27,7 +27,7 @@
 {include file="CRM/Core/Form/RecurringEntity.tpl"}
 {if $rows}
 <div id="event_status_id" class="crm-block crm-manage-events crm-accordion-wrapper">
-  <div class="crm-accordion-header">Connected Repeating Events</div>
+  <div class="crm-accordion-header">{ts}Connected Repeating Events{/ts}</div>
   <div class="crm-accordion-body">
   {strip}
   {include file="CRM/common/jsortable.tpl"}
@@ -47,7 +47,7 @@
       {foreach from=$rows key=keys item=row}
         {if $keys neq 'tab'}
           {if $currentEventId eq $row.id}
-              {assign var="highlight" value=" highlight-record"}
+              {assign var="highlight" value=" status bold"}
           {else}
               {assign var="highlight" value=""}
           {/if}