plugins/calendar

Thomas Brüderli bruederli at kolabsys.com
Wed Aug 6 16:23:32 CEST 2014


 plugins/calendar/calendar_ui.js |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 944985314edc94a229f1ba9d5f9151c3ca2e799f
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date:   Wed Aug 6 16:23:24 2014 +0200

    Hide compare button if changelog only has one single entry

diff --git a/plugins/calendar/calendar_ui.js b/plugins/calendar/calendar_ui.js
index 23a7d54..932e7ea 100644
--- a/plugins/calendar/calendar_ui.js
+++ b/plugins/calendar/calendar_ui.js
@@ -1060,7 +1060,7 @@ function rcube_calendar_ui(settings)
           op_append = '';
         }
 
-        $('<tr class="' + (i == last ? 'last' : (i == first ? 'first' : '')) + (accessible ? '' : 'undisclosed') + '">')
+        $('<tr class="' + (i == first ? 'first' : (i == last ? 'last' : '')) + (accessible ? '' : 'undisclosed') + '">')
           .append('<td class="diff">' + (accessible && change.op != 'DELETE' ? 
             '<input type="radio" name="rev1" class="diff-rev1" value="' + change.rev + '" title="" '+ (i == last ? 'checked="checked"' : '') +' /> '+
             '<input type="radio" name="rev2" class="diff-rev2" value="' + change.rev + '" title="" '+ (i == first ? 'checked="checked"' : '') +' /></td>'
@@ -1073,7 +1073,8 @@ function rcube_calendar_ui(settings)
           .appendTo(tbody);
       }
 
-      $('#eventhistory .compare-button').fadeIn(200);
+      if (first > 0)
+        $('#eventhistory .compare-button').fadeIn(200);
 
       // set dialog size according to content
       me.dialog_resize($dialog.get(0), $dialog.height(), 600);




More information about the commits mailing list