Fix including moment.js
This commit is contained in:
parent
eb85d762c7
commit
59fc3c8168
2 changed files with 18 additions and 14 deletions
|
@ -2447,21 +2447,15 @@ class calendar extends rcube_plugin
|
||||||
$title .= ' "' . $search . '"';
|
$title .= ' "' . $search . '"';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add CSS stylesheets to the page header
|
// Add CSS and JS to the page
|
||||||
$skin_path = $this->local_skin_path();
|
$this->ui->addCSS();
|
||||||
$this->include_stylesheet($skin_path . '/fullcalendar.css');
|
$this->ui->addJS();
|
||||||
$this->include_stylesheet($skin_path . '/print.css');
|
|
||||||
|
|
||||||
// Add JS files to the page header
|
|
||||||
$this->include_script('print.js');
|
|
||||||
$this->include_script('lib/js/moment.js');
|
|
||||||
$this->include_script('lib/js/fullcalendar.js');
|
|
||||||
|
|
||||||
$this->register_handler('plugin.calendar_css', array($this->ui, 'calendar_css'));
|
$this->register_handler('plugin.calendar_css', array($this->ui, 'calendar_css'));
|
||||||
$this->register_handler('plugin.calendar_list', array($this->ui, 'calendar_list'));
|
$this->register_handler('plugin.calendar_list', array($this->ui, 'calendar_list'));
|
||||||
|
|
||||||
$this->rc->output->set_pagetitle($title);
|
$this->rc->output->set_pagetitle($title);
|
||||||
$this->rc->output->send("calendar.print");
|
$this->rc->output->send('calendar.print');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -110,6 +110,10 @@ class calendar_ui
|
||||||
{
|
{
|
||||||
$skin_path = $this->cal->local_skin_path();
|
$skin_path = $this->cal->local_skin_path();
|
||||||
$this->cal->include_stylesheet($skin_path . '/fullcalendar.css');
|
$this->cal->include_stylesheet($skin_path . '/fullcalendar.css');
|
||||||
|
|
||||||
|
if ($this->rc->task == 'calendar' && $this->rc->action == 'print') {
|
||||||
|
$this->cal->include_stylesheet($skin_path . '/print.css');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -117,12 +121,18 @@ class calendar_ui
|
||||||
*/
|
*/
|
||||||
public function addJS()
|
public function addJS()
|
||||||
{
|
{
|
||||||
$this->cal->include_script('calendar_ui.js');
|
$this->cal->include_script('lib/js/moment.js');
|
||||||
$this->cal->include_script('lib/js/fullcalendar.js');
|
$this->cal->include_script('lib/js/fullcalendar.js');
|
||||||
$this->rc->output->include_script('treelist.js');
|
|
||||||
$this->cal->api->include_script('libkolab/libkolab.js');
|
|
||||||
|
|
||||||
jqueryui::miniColors();
|
if ($this->rc->task == 'calendar' && $this->rc->action == 'print') {
|
||||||
|
$this->cal->include_script('print.js');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$this->rc->output->include_script('treelist.js');
|
||||||
|
$this->cal->api->include_script('libkolab/libkolab.js');
|
||||||
|
$this->cal->include_script('calendar_ui.js');
|
||||||
|
jqueryui::miniColors();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue