- <(title)> OpenPSA</title> <link type="image/x-icon" href="<?php echo MIDCOM_STATIC_URL; ?> /org.openpsa.core/openpsa-16x16.png" rel="shortcut icon"/> <?php $head->add_stylesheet(MIDCOM_STATIC_URL . '/OpenPsa2/style.css', 'screen,projection'); $head->add_stylesheet(MIDCOM_STATIC_URL . '/OpenPsa2/content.css', 'all'); $head->add_stylesheet(MIDCOM_STATIC_URL . '/OpenPsa2/print.css', 'print'); $head->add_stylesheet(MIDCOM_STATIC_URL . '/OpenPsa2/ui-elements.css', 'all'); $head->enable_jquery(); $head->add_jsfile(MIDCOM_JQUERY_UI_URL . '/ui/jquery.ui.core.min.js'); $head->add_jsfile(MIDCOM_JQUERY_UI_URL . '/ui/jquery.ui.widget.min.js'); $head->add_jsfile(MIDCOM_JQUERY_UI_URL . '/ui/jquery.ui.mouse.min.js'); $head->add_jsfile(MIDCOM_JQUERY_UI_URL . '/ui/jquery.ui.draggable.min.js'); org_openpsa_widgets_ui::add_head_elements(); org_openpsa_widgets_ui::initialize_search(); $head->add_jscript("var MIDGARD_ROOT = '" . midcom_connection::get_url('self') . "';"); $head->add_jscript("var TOOLBAR_MORE_LABEL = '" . midcom::get('i18n')->get_l10n('org.openpsa.widgets')->get('more') . "';"); $head->print_head_elements(); if ($pref_found) { ?> <style type="text/css"> #container #leftframe { width: &(navigation_width);px; } #container #content { margin-left: &(content_offset);px;
/** * function that loads the necessary javascript & css files for jqgrid */ public static function add_head_elements() { if (self::$_head_elements_added) { return; } $version = midcom_baseclasses_components_configuration::get('org.openpsa.widgets', 'config')->get('jqgrid_version'); $jqgrid_path = '/org.openpsa.widgets/jquery.jqGrid-' . $version . '/'; $head = midcom::get('head'); //first enable jquery - just in case it isn't loaded $head->enable_jquery(); $head->add_jsfile(MIDCOM_JQUERY_UI_URL . '/ui/jquery.ui.core.min.js'); //needed js/css-files for jqgrid $lang = "en"; $language = midcom::get('i18n')->get_current_language(); if (file_exists(MIDCOM_STATIC_ROOT . $jqgrid_path . 'js/i18n/grid.locale-' . $language . '.js')) { $lang = $language; } $head->add_jsfile(MIDCOM_STATIC_URL . $jqgrid_path . 'js/i18n/grid.locale-' . $lang . '.js'); $head->add_jsfile(MIDCOM_STATIC_URL . $jqgrid_path . 'js/jquery.jqGrid.min.js'); org_openpsa_widgets_ui::add_head_elements(); $head->add_jsfile(MIDCOM_STATIC_URL . '/org.openpsa.widgets/jqGrid.custom.js'); $head->add_jsfile(MIDCOM_JQUERY_UI_URL . '/ui/jquery.ui.widget.min.js'); $head->add_jsfile(MIDCOM_JQUERY_UI_URL . '/ui/jquery.ui.mouse.min.js'); $head->add_jsfile(MIDCOM_JQUERY_UI_URL . '/ui/jquery.ui.resizable.min.js'); $head->add_stylesheet(MIDCOM_STATIC_URL . $jqgrid_path . 'css/ui.jqgrid.css'); $head->add_stylesheet(MIDCOM_STATIC_URL . '/org.openpsa.widgets/jqGrid.custom.css'); $head->add_jquery_ui_theme(); self::$_head_elements_added = true; }