Merge remote-tracking branch 'upstream/4.6' into 4.6-master-2015-07-27-10-02-15
[civicrm-core.git] / templates / CRM / Contact / Page / View / Summary.js
index b38941d962927ebbf1e695a75ad544b4737d2ebb..76d7bb46927f73a275ed8decca64bfb08b842c65 100644 (file)
         }
       })
       .on('crmFormSuccess', function(e, data) {
-        // Refresh changeLog - advanced logging
-        if (CRM.reloadChangeLogTab) {
-          CRM.reloadChangeLogTab();
-        }
-        // Refresh changeLog - simple logging
-        // If we didn't get a changelog count in the response, force refresh the changelog tab to populate it
-        else {
-          CRM.tabHeader.resetTab('#tab_log', !(data && data.changeLog && data.changeLog.count));
+        // Advanced logging... just increment the changelog tab count to avoid the overhead of reloading the data
+        if (CRM.incrementChangeLogTab) {
+          CRM.incrementChangeLogTab();
         }
+        // Refresh changelog tab next time it is opened
+        CRM.tabHeader.resetTab('#tab_log');
         // Refresh dependent blocks
         if (data && data.reloadBlocks) {
           reloadBlock(data.reloadBlocks.join(','));