Closed (fixed)
Project:
Date
Version:
6.x-2.9
Component:
Date Popup
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Jun 2012 at 02:15 UTC
Updated:
25 Jun 2013 at 02:22 UTC
The "force loading base jquery-ui.css" will break other modules while using custom UI.
/**
* Implementation of hook_init().
*/
function date_popup_init() {
global $user;
if (!module_exists('jquery_ui')) {
if ($user->uid == 1) {
drupal_set_message(t('The Date Popup module now requires the <a href="@link">jQuery UI module</a> as a source for the datepicker. Please install it immediately.', array('@link' => 'http://drupal.org/project/jquery_ui')), 'error');
}
return;
}
$date_popup_css_file = variable_get('date_popup_css_file', date_popup_css_default());
// Force loading base jquery-ui.css when using date_popup default theme,
// otherwise the popup calendar will be displayed with no theme at all.
if ($date_popup_css_file == date_popup_css_default()) {
//drupal_add_css(jquery_ui_get_path() .'/themes/base/jquery-ui.css');
}
// Otherwise, load the CSS file in the corresponding theme directory.
else {
drupal_add_css(dirname($date_popup_css_file) .'/jquery-ui.css');
}
drupal_add_css($date_popup_css_file);
if (variable_get('date_popup_timepicker', 'default') == 'default') {
drupal_add_css(drupal_get_path('module', 'date_popup') .'/themes/jquery.timeentry.css');
}
}
Comments
Comment #1
hefox commentedMay be related to #898324: Datepicker CSS, but quick browsing the issues.
Please use php tags to format php code (see PHP button in the editor), makes it much easier to read.
Comment #2
pandaski commentedI have found the reason - there is a configure in date field so that the nature css can be chosen.
Cheers,
Comment #3
pandaski commentedComment #3.0
pandaski commentedupdate the codes in php tag