Exemple #1
0
     * script.legacy.js - freepbx library
     * tabber-minimized.js - sed for module admin (hiding content)
     */
    $html .= '<script type="text/javascript" src="assets/js/jquery.hotkeys.js' . $version_tag . '"></script>' . '<script type="text/javascript" src="assets/js/jquery.numeric.js' . $version_tag . '"></script>' . '<script type="text/javascript" src="assets/js/jquery.cookie.js' . $version_tag . '"></script>' . '<script type="text/javascript" src="assets/js/script.legacy.js' . $version_tag . '"></script>' . '<script type="text/javascript" src="assets/js/jquery.autosize.min.js' . $version_tag . '"></script>' . '<script type="text/javascript" src="assets/js/history.js' . $version_tag . '"></script>' . '<script type="text/javascript" src="assets/js/tabber-minimized.js' . $version_tag . '"></script>';
}
//Please see the BMO View class for more information about this
if (FreePBX::View()->replaceState()) {
    $html .= '<script>history.replaceState(null, null, "' . FreePBX::View()->getQueryString() . '");</script>';
}
$html .= '<script type="text/javascript" src="assets/js/typeahead.bundle.min.js' . $version_tag . '"></script>';
$html .= '<script type="text/javascript" src="assets/js/search.js' . $version_tag . '"></script>';
if ($amp_conf['BRAND_ALT_JS']) {
    $html .= '<script type="text/javascript" src="' . $amp_conf['BRAND_ALT_JS'] . $version_tag . '"></script>';
}
if (isset($module_name) && $module_name != '') {
    $html .= framework_include_js($module_name, $module_page);
}
if ($amp_conf['BROWSER_STATS']) {
    $ga = "<script>\n\t\t\t(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n\t\t\t(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n\t\t\tm=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n\t\t\t})(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n\n\t\t\tga('create', 'UA-25724109-1', 'auto');  // Replace with your property ID.\n\n\t\t\tga('set', 'type', fpbx.conf.dist.pbx_type);\n\t\t\tga('set', 'typever', fpbx.conf.dist.pbx_version);\n\t\t\tga('set', 'astver', fpbx.conf.ASTVERSION);\n\t\t\tga('set', 'fpbxver', fpbx.conf.ver);\n\t\t\tga('set', 'display', \$.urlParam('display'));\n\t\t\tga('set', 'uniqueid', fpbx.conf.uniqueid);\n\n\t\t\tga('send', 'pageview');\n\n\t\t</script>";
    $html .= str_replace(array("\t", "\n"), '', $ga);
}
if (!empty($js_content)) {
    $html .= $js_content;
}
//add IE specifc styling polyfills
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) {
    $html .= '<!--[if lte IE 10]>';
    $html .= '<link rel="stylesheet" href="assets/css/progress-polyfill.css" type="text/css">';
    $html .= '<script type="text/javascript" src="assets/js/progress-polyfill.min.js"></script>';
    $html .= '<![endif]-->';
    $html .= '<script type="text/javascript" src="assets/js/eventsource.min.js"></script>';
Exemple #2
0
// BRANDABLE COMPONENTS
//
// get version info to be used to version images, css, etc.
//
?>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js"></script>
<script type="text/javascript" >window.jQuery.ui || document.write('<script src="assets/js/jquery-ui-1.8.x.min.js"><\/script>')</script>
<?php 
if (isset($amp_conf['DEVEL']) && $amp_conf['DEVEL']) {
    $benchmark_time = number_format(microtime_float() - $benchmark_starttime, 4);
    echo '<div id="benchmark_time">Page loaded in ' . $benchmark_time . 's</div>';
}
// Production versions should include the packed consolidated javascript library but if it
// is not present (useful for development, then include each individual library below
if ($amp_conf['USE_PACKAGED_JS'] && file_exists("assets/js/pbxlib.js")) {
    $pbxlibver = '.' . filectime("assets/js/pbxlib.js");
    $html .= '<script type="text/javascript" src="assets/js/pbxlib.js' . $version_tag . $pbxlibver . '"></script>';
} else {
    /*
     * files below:
     * jquery.cookie.js - for setting cookies
     * script.legacy.js - freepbx library
     * jquery.toggleval.3.0.js - similar to html5 form's placeholder. depreciated
     * interface.dim.js - interface blocking (reload, modadmin)
     * tabber-minimized.js - sed for module admin (hiding content)
     */
    echo ' <script type="text/javascript" src="assets/js/menu.js' . $version_tag . '"></script>' . '<script type="text/javascript" src="assets/js/jquery.cookie.js' . $version_tag . '"></script>' . '<script type="text/javascript" src="assets/js/script.legacy.js' . $version_tag . '"></script>' . '<script type="text/javascript" src="assets/js/jquery.toggleval.3.0.js' . $version_tag . '"></script>' . '<script type="text/javascript" src="assets/js/interface.dim.js' . $version_tag . '"></script>' . '<script type="text/javascript" src="assets/js/tabber-minimized.js' . $version_tag . '"></script>';
}
if (isset($module_name) && $module_name != '') {
    echo framework_include_js($this_time_append, $version_tag);
}