4 * This is to standardize the header to ease ui standardization for developers.
6 * Example code in script:
7 * $include_standard_style_js = array("datetimepicker"); (php command and optional)
8 * require "{$GLOBALS['srcdir']}/templates/standard_header_template.php"; (php command)
10 * The $include_standard_style_js supports:
11 * jquery-ui (brings in just the js script)
12 * jquery-ui-darkness (brings in the darkness style)
17 * Copyright (C) 2017 Brady Miller <brady.g.miller@gmail.com>
19 * LICENSE: This program is free software; you can redistribute it and/or
20 * modify it under the terms of the GNU General Public License
21 * as published by the Free Software Foundation; either version 3
22 * of the License, or (at your option) any later version.
23 * This program is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU General Public License for more details.
27 * You should have received a copy of the GNU General Public License
28 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
31 * @author Brady Miller <brady.g.miller@gmail.com>
32 * @link http://www.open-emr.org
35 <link rel
="stylesheet" href
="<?php echo $GLOBALS['css_header'];?>" type
="text/css">
36 <link rel
="stylesheet" href
="<?php echo $GLOBALS['assets_static_relative'] ?>/bootstrap-3-3-4/dist/css/bootstrap.min.css">
37 <?php
if ($_SESSION['language_direction'] == 'rtl') { ?
>
38 <link rel
="stylesheet" href
="<?php echo $GLOBALS['assets_static_relative'] ?>/bootstrap-rtl-3-3-4/dist/css/bootstrap-rtl.min.css">
40 <?php
if (!empty($include_standard_style_js) && in_array("jquery-ui-darkness",$include_standard_style_js)) { ?
>
41 <link rel
="stylesheet" href
="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-ui-1-12-1/themes/ui-darkness/jquery-ui.min.css">
43 <link rel
="stylesheet" href
="<?php echo $GLOBALS['assets_static_relative'] ?>/font-awesome-4-6-3/css/font-awesome.min.css">
44 <?php
if (!empty($include_standard_style_js) && in_array("datetimepicker",$include_standard_style_js)) { ?
>
45 <link rel
="stylesheet" href
="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-datetimepicker-2-5-4/build/jquery.datetimepicker.min.css">
48 <script src
="<?php echo $GLOBALS['assets_static_relative'] ?>/jquery-min-3-1-1/index.js"></script
>
49 <script src
="<?php echo $GLOBALS['assets_static_relative'] ?>/bootstrap-3-3-4/dist/js/bootstrap.min.js"></script
>
50 <?php
if (!empty($include_standard_style_js) && in_array("jquery-ui",$include_standard_style_js)) { ?
>
51 <script type
="text/javascript" src
="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-ui-1-12-1/jquery-ui.min.js"></script
>
53 <?php
if (!empty($include_standard_style_js) && in_array("datetimepicker",$include_standard_style_js)) { ?
>
54 <script type
="text/javascript" src
="<?php echo $GLOBALS['assets_static_relative']; ?>/jquery-datetimepicker-2-5-4/build/jquery.datetimepicker.full.min.js"></script
>
56 <?php
if (!empty($include_standard_style_js) && in_array("report_helper.js",$include_standard_style_js)) { ?
>
57 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/js/report_helper.js?v=<?php echo $GLOBALS['v_js_includes']; ?>"></script
>
59 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/textformat.js?v=<?php echo $GLOBALS['v_js_includes']; ?>"></script
>
60 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot'] ?>/library/dialog.js?v=<?php echo $GLOBALS['v_js_includes']; ?>"></script
>
62 <?php
$include_standard_style_js = array(); //clear this to prevent issues if this is called again in an embedded script ?>