plugins/calendar

Thomas Brüderli bruederli at kolabsys.com
Thu Oct 4 11:57:13 CEST 2012


 plugins/calendar/calendar.php |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit c431392119cf118d1cc7c1c8cd2fad4e9e36bdd7
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date:   Thu Oct 4 11:56:49 2012 +0200

    Fix calendar category configuration UI (#899)

diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php
index ba84758..dc6cd99 100644
--- a/plugins/calendar/calendar.php
+++ b/plugins/calendar/calendar.php
@@ -448,10 +448,19 @@ class calendar extends rcube_plugin
             var color = $("<input>").attr("type", "text").attr("name", "_colors[]").attr("size", 6).addClass("colors").val("000000");
             var button = $("<input>").attr("type", "button").attr("value", "X").addClass("button").click(function(){ $(this).parent().remove() });
             $("<div>").append(input).append(" ").append(color).append(" ").append(button).appendTo("#calendarcategories");
-            color.miniColors({ colorValues:mscolors });
+            color.miniColors({ colorValues:(rcmail.env.mscolors || []) });
+            $("#rcmfd_new_category").val("");
           }
         }');
 
+        $this->rc->output->add_script('$("#rcmfd_new_category").keypress(function(event){
+          if (event.which == 13) {
+            rcube_calendar_add_category();
+            event.preventDefault();
+          }
+        });
+        ', 'docready');
+
         // include color picker
         $this->include_script('lib/js/jquery.miniColors.min.js');
         $this->include_stylesheet($this->local_skin_path() . '/jquery.miniColors.css');





More information about the commits mailing list