0010866: Frozen whole day events
authorPhilipp Schüle <p.schuele@metaways.de>
Thu, 26 Feb 2015 14:36:30 +0000 (15:36 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Fri, 27 Feb 2015 16:29:13 +0000 (17:29 +0100)
checks if all day event is visible in redrawWholeDayEvents()

https://forge.tine20.org/view.php?id=10866

Change-Id: Icf363e68ea519d5f3dfa708dac812b20860b378b
Reviewed-on: http://gerrit.tine20.com/customers/1695
Tested-by: Jenkins CI (http://ci.tine20.com/)
Tested-by: sstamer <s.stamer@metaways.de>
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Calendar/js/DaysView.js
tine20/Calendar/js/EventUI.js

index c393b21..3054f0e 100644 (file)
@@ -838,7 +838,8 @@ Ext.extend(Tine.Calendar.DaysView, Ext.Container, {
     
     redrawWholeDayEvents: function() {
         this.store.each(function(event) {
-            if (event.ui && event.get('is_all_day_event')) {
+            // check if event is currently visible by looking into ui.domIds
+            if (event.ui && event.ui.domIds.length > 0 && event.get('is_all_day_event')) {
                 this.removeEvent(event);
                 this.insertEvent(event);
             }
index fb96844..bf2999f 100644 (file)
@@ -48,7 +48,7 @@ Tine.Calendar.EventUI.prototype = {
      */
     getEls: function() {
         var domEls = [];
-        for (var i=0; i<this.domIds.length; i++) {
+        for (var i=0; i < this.domIds.length; i++) {
             var el = Ext.get(this.domIds[i]);
             if (el) {
                 domEls.push(el);