Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2014-08-04-22-25-32
[civicrm-core.git] / templates / CRM / Event / Form / ManageEvent / Tab.tpl
index 4d659c01857e7590ff3b7c91e607bd907a256209..c77a9455ab3d5e32a69ea9621d30c018aeef6c61 100644 (file)
@@ -1,8 +1,8 @@
 {*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.4                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
 
 {literal}
 <script>
-
-cj('body').click(function() {
-  cj('#crm-event-links-list').hide();
-  cj('#crm-participant-list').hide();
+CRM.$(function($) {
+  $('body').click(function() {
+    $('#crm-event-links-list, #crm-participant-list').hide();
   });
 
-cj('#crm-event-links-link').click(function(event) {
-  cj('#crm-event-links-list').toggle();
-  cj('#crm-participant-list').hide();
-  event.stopPropagation();
-  return false;
-});
+  $('#crm-event-links-link').click(function(event) {
+    $('#crm-event-links-list').toggle();
+    $('#crm-participant-list').hide();
+    event.stopPropagation();
+    return false;
+  });
+  
+  $('#crm-participant-link').click(function(event) {
+    $('#crm-participant-list').toggle();
+    $('#crm-event-links-list').hide();
+    event.stopPropagation();
+    return false;
+  });
 
-cj('#crm-participant-link').click(function(event) {
-  cj('#crm-participant-list').toggle();
-  cj('#crm-event-links-list').hide();
-  event.stopPropagation();
-  return false;
+  // Update title dynamically
+  $('h1').each(function() {
+    var title = {/literal}{$title|json_encode}{literal};
+    $(this).html($(this).html().replace(title, '<span id="crm-event-name-page-title">' + title + '</span>'));
+  });
+  $('#crm-main-content-wrapper').on('keyup change', 'input#title', function() {
+    $('#crm-event-name-page-title').text($(this).val());
+  });
+  
 });
-
-cj().crmAccordions();
-
 </script>
 {/literal}