From 40952f5ff5ee9094cc65aa7903285a807184ebff Wed, 13 Jul 2011 23:22:11 +0200 From: Bram Goffings Date: Wed, 13 Jul 2011 23:22:02 +0200 Subject: [PATCH] Remove colorpicker diff --git a/fullcalendar_colors/includes/fullcalendar_colors.admin.inc b/fullcalendar_colors/includes/fullcalendar_colors.admin.inc index 7704f3b..5dbf583 100644 --- a/fullcalendar_colors/includes/fullcalendar_colors.admin.inc +++ b/fullcalendar_colors/includes/fullcalendar_colors.admin.inc @@ -382,16 +382,8 @@ function _fullcalendar_colors_load_colorpicker() { // CSS for our custom form. ctools_add_css('fullcalendar_colors.admin', 'fullcalendar_colors'); - // JS for our Farbtastic integration. - ctools_add_js('fullcalendar_colors.admin', 'fullcalendar_colors'); - // CSS and JS for Farbtastic color picker. - drupal_add_library('system', 'farbtastic'); + // Load colors.admin.inc + module_load_include('inc', 'colors', 'includes/colors.admin'); - // Colorpicker. - return array( - 'color_picker' => array( - '#prefix' => '
', - '#suffix' => '
', - ), - ); + return _colors_load_colorpicker(); } diff --git a/fullcalendar_colors/js/fullcalendar_colors.admin.js b/fullcalendar_colors/js/fullcalendar_colors.admin.js deleted file mode 100644 index 073036f..0000000 --- a/fullcalendar_colors/js/fullcalendar_colors.admin.js +++ /dev/null @@ -1,27 +0,0 @@ -/** - * @file - * Bind the colorpicker event to the FullCalendar Colors form element. - */ - -(function ($) { - -Drupal.behaviors.fullCalendarColors = { - attach: function() { - - var farb = $.farbtastic('#colorpicker'); - - // Loop over each calendar_color type. - $('.colorpicker-input').each(function() { - - // Set the background colors of all of the textfields appropriately. - farb.linkTo(this); - - // When clicked, they get linked to the associated farbtastic colorpicker. - $(this).click(function () { - farb.linkTo(this); - }); - }); - } -}; - -})(jQuery);