Commit 3b72d6bf authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Include jquery & blocktype js on all view pages


Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
parent 9434f0dc
......@@ -57,8 +57,11 @@ if ($group->public) {
$headers[] = '<link rel="alternate" type="application/atom+xml" href="' . $feedlink . '" />';
}
$javascript = array('paginator', 'jquery');
$javascript = array_merge($javascript, $view->get_blocktype_javascript());
$smarty = smarty(
array(),
$javascript,
$headers,
array(),
array('stylesheets' => array('style/views.css'))
......
......@@ -51,9 +51,11 @@ if ($USER->is_logged_in()) {
require_once(get_config('libroot') . 'view.php');
$view = $USER->get_view_by_type('dashboard');
$javascript = array('paginator', 'jquery');
$javascript = array_merge($javascript, $view->get_blocktype_javascript());
$stylesheets = array('<link rel="stylesheet" type="text/css" href="' . get_config('wwwroot') . 'theme/views.css">');
$smarty = smarty(
array('paginator'),
$javascript,
$stylesheets,
array(),
array(
......
......@@ -70,7 +70,7 @@ if (!$view || !can_view_view($viewid)) {
throw new AccessDeniedException(get_string('youcannotviewthisusersprofile', 'error'));
}
$javascript = array('paginator', 'lib/pieforms/static/core/pieforms.js', 'artefact/resume/resumeshowhide.js');
$javascript = array('paginator', 'jquery', 'lib/pieforms/static/core/pieforms.js', 'artefact/resume/resumeshowhide.js');
$javascript = array_merge($view->get_blocktype_javascript());
// Set up theme
......
......@@ -154,7 +154,7 @@ $viewbeingwatched = (int)record_exists('usr_watchlist_view', 'usr', $USER->get('
$feedback = ArtefactTypeComment::get_comments($limit, $offset, $showcomment, $view);
$javascript = array('paginator', 'viewmenu', 'artefact/resume/resumeshowhide.js');
$javascript = array('paginator', 'viewmenu', 'jquery', 'artefact/resume/resumeshowhide.js');
$javascript = array_merge($javascript, $view->get_blocktype_javascript());
// Set up theme
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment