- Renamed function backwardCompatibleJSMsIe to generateBackwardCompatibleJSMsIe in fhc_header_helper

- Now function fhc_header_helper accept the path and file name as parameter
- Added jquerytreetable to FHC-Header
- Fixed includes in FHC-Header
- Now composer uses as much as possible stable releases of the packages (no git directly, no master branch directly...)
- Updated composer.json and composer.lock
This commit is contained in:
Paolo
2018-07-11 15:44:13 +02:00
parent 04e2e1c54b
commit 02cde41939
4 changed files with 206 additions and 133 deletions
+4 -7
View File
@@ -148,12 +148,9 @@ function generateAddonsJSsInclude($calledFrom)
/**
* This function merely print some useful HTML to help some vacuous browsers to handle modern JS features
*/
function backwardCompatibleJSMsIe()
function generateBackwardCompatibleJSMsIe($js)
{
echo '<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->'."\n";
echo '<!-- WARNING: Respond.js does not work if you view the page via file:// -->'."\n";
echo '<!--[if lt IE 9]>'."\n";
echo ' <script type="text/javascript" src="vendor/afarkas/html5shiv/dist/html5shiv.min.js"></script>'."\n";
echo ' <script type="text/javascript" src="vendor/scottjehl/Respond/dest/respond.min.js"></script>'."\n";
echo '<![endif]-->'."\n";
echo "<!--[if lt IE 9]>\n";
echo ' <script type="text/javascript" src="'.$js.'"></script>'."\n";
echo "<![endif]-->\n";
}
+35 -15
View File
@@ -15,17 +15,18 @@
$phrases = isset($phrases) ? $phrases : null;
// By default set the parameters to false
$jquery = isset($jquery) ? $jquery : false;
$jqueryui = isset($jqueryui) ? $jqueryui : false;
$addons = isset($addons) ? $addons : false;
$ajaxlib = isset($ajaxlib) ? $ajaxlib : false;
$bootstrap = isset($bootstrap) ? $bootstrap : false;
$filterwidget = isset($filterwidget) ? $filterwidget : false;
$fontawesome = isset($fontawesome) ? $fontawesome : false;
$jquery = isset($jquery) ? $jquery : false;
$jqueryui = isset($jqueryui) ? $jqueryui : false;
$jquerytreetable = isset($jquerytreetable) ? $jquerytreetable : false;
$navigationwidget = isset($navigationwidget) ? $navigationwidget : false;
$sbadmintemplate = isset($sbadmintemplate) ? $sbadmintemplate : false;
$tablesorter = isset($tablesorter) ? $tablesorter : false;
$tinymce = isset($tinymce) ? $tinymce : false;
$sbadmintemplate = isset($sbadmintemplate) ? $sbadmintemplate : false;
$addons = isset($addons) ? $addons : false;
$filterwidget = isset($filterwidget) ? $filterwidget : false;
$navigationwidget = isset($navigationwidget) ? $navigationwidget : false;
?>
<!-- Header start -->
@@ -40,6 +41,9 @@
// --------------------------------------------------------------------------------------------------------
// CSS
// --------------------------------------------------------------------------------------------------------
// From vendor folder
// jQuery UI CSS
if ($jqueryui === true) generateCSSsInclude('vendor/components/jqueryui/themes/base/jquery-ui.min.css');
@@ -49,9 +53,6 @@
// Font Awesome CSS
if ($fontawesome === true) generateCSSsInclude('vendor/components/font-awesome/css/font-awesome.min.css');
// AjaxLib CSS
if ($ajaxlib === true) generateCSSsInclude('public/css/AjaxLib.css');
// Table sorter CSS
if ($tablesorter === true)
{
@@ -66,6 +67,15 @@
generateCSSsInclude('vendor/BlackrockDigital/startbootstrap-sb-admin-2/dist/css/sb-admin-2.min.css');
}
// jQuery treetable
if ($jquerytreetable === true) generateCSSsInclude('vendor/ludo/jquery-treetable/css/jquery.treetable.css');
// --------------------------------------------------------------------------------------------------------
// From public folder
// AjaxLib CSS
if ($ajaxlib === true) generateCSSsInclude('public/css/AjaxLib.css');
// FilterWidget CSS
if ($filterwidget === true) generateCSSsInclude('public/css/FilterWidget.css');
@@ -87,10 +97,13 @@
// NOTE: must be called before including the PhrasesLib.js
if ($phrases != null) generateJSPhrasesStorageObject($phrases);
// JQuery V3
// --------------------------------------------------------------------------------------------------------
// From vendor folder
// jQuery V3
if ($jquery === true) generateJSsInclude('vendor/components/jquery/jquery.min.js');
// JQuery UI
// jQuery UI
if ($jqueryui === true)
{
generateJSsInclude('vendor/components/jqueryui/jquery-ui.min.js');
@@ -109,16 +122,23 @@
}
// Tinymce JS
if($tinymce === true) generateJSsInclude('vendor/tinymce/tinymce/tinymce.min.js') ;
if ($tinymce === true) generateJSsInclude('vendor/tinymce/tinymce/tinymce.min.js');
// SB Admin 2 template JS
if ($sbadmintemplate === true)
{
generateJSsInclude('vendor/BlackrockDigital/startbootstrap-sb-admin-2/vendor/metisMenu/metisMenu.min.js');
generateJSsInclude('vendor/BlackrockDigital/startbootstrap-sb-admin-2/dist/js/sb-admin-2.min.js');
backwardCompatibleJSMsIe();
generateBackwardCompatibleJSMsIe('vendor/afarkas/html5shiv/dist/html5shiv.min.js');
generateBackwardCompatibleJSMsIe('vendor/scottjehl/Respond/dest/respond.min.js');
}
// jQuery treetable
if ($jquerytreetable === true) generateJSsInclude('vendor/ludo/jquery-treetable/jquery.treetable.js');
// --------------------------------------------------------------------------------------------------------
// From public folder
// AjaxLib JS
// NOTE: must be called before including others JS libraries that use it
if ($ajaxlib === true) generateJSsInclude('public/js/AjaxLib.js');
@@ -127,10 +147,10 @@
if ($phrases != null) generateJSsInclude('public/js/PhrasesLib.js');
// FilterWidget JS
if($filterwidget === true) generateJSsInclude('public/js/FilterWidget.js') ;
if ($filterwidget === true) generateJSsInclude('public/js/FilterWidget.js');
// NavigationWidget JS
if($navigationwidget === true) generateJSsInclude('public/js/NavigationWidget.js') ;
if ($navigationwidget === true) generateJSsInclude('public/js/NavigationWidget.js');
// Load addon hooks JS
if ($addons === true) generateAddonsJSsInclude($calledPath.'/'.$calledMethod);
+42 -47
View File
@@ -64,11 +64,10 @@
"type": "package",
"package": {
"name": "borgar/textile-js",
"version": "1.0",
"source": {
"url": "https://github.com/borgar/textile-js.git",
"type": "git",
"reference": "master"
"version": "2.0.4",
"dist": {
"url": "https://github.com/borgar/textile-js/archive/v2.0.4.zip",
"type": "zip"
}
}
},
@@ -77,10 +76,9 @@
"package": {
"name": "rmariuzzo/jquery-checkboxes",
"version": "1.0.7",
"source": {
"url": "https://github.com/rmariuzzo/checkboxes.js.git",
"type": "git",
"reference": "081cac1eb9b504dc32be27b57f32f6d1d29a5253"
"dist": {
"url": "https://github.com/rmariuzzo/checkboxes.js/archive/v1.0.7.zip",
"type": "zip"
}
}
},
@@ -139,30 +137,6 @@
}
}
},
{
"type": "package",
"package": {
"name": "jquery-archive/jquery-metadata",
"version": "1.0",
"source": {
"url": "https://github.com/jquery-archive/jquery-metadata.git",
"type": "git",
"reference": "e5a9e4315675bf4d68716872ca754e858088f8ab"
}
}
},
{
"type": "package",
"package": {
"name": "tomazdragar/SimpleCropper",
"version": "1.0",
"source": {
"url": "https://github.com/tomazdragar/SimpleCropper.git",
"type": "git",
"reference": "9750b81fa55ed07b3b429297d18ffbeac07a2cde"
}
}
},
{
"type": "package",
"package": {
@@ -190,10 +164,9 @@
"package": {
"name": "nicolaskruchten/pivottable",
"version": "2.15.0",
"source": {
"url": "https://github.com/nicolaskruchten/pivottable.git",
"type": "git",
"reference": "b15ea33268b587d986371c0b6f215c36ffbb860c"
"dist": {
"url": "https://github.com/nicolaskruchten/pivottable/archive/v2.15.0.zip",
"type": "zip"
}
}
},
@@ -201,11 +174,10 @@
"type": "package",
"package": {
"name": "BlackrockDigital/startbootstrap-sb-admin-2",
"version": "3.3.7",
"source": {
"url": "https://github.com/BlackrockDigital/startbootstrap-sb-admin-2.git",
"type": "git",
"reference": "e85ee3814ba12b7095024d31424cc9d19d791d05"
"version": "3.3.7.1",
"dist": {
"url": "https://github.com/BlackrockDigital/startbootstrap-sb-admin-2/archive/v3.3.7+1.zip",
"type": "zip"
}
}
},
@@ -214,10 +186,9 @@
"package": {
"name": "ludo/jquery-treetable",
"version": "3.2.0",
"source": {
"url": "https://github.com/ludo/jquery-treetable.git",
"type": "git",
"reference": "73690a9df26dbc1a49981f9335df2a9cd9808813"
"dist": {
"url": "https://github.com/ludo/jquery-treetable/archive/3.2.0.zip",
"type": "zip"
}
}
},
@@ -231,6 +202,30 @@
"type": "zip"
}
}
},
{
"type": "package",
"package": {
"name": "jquery-archive/jquery-metadata",
"version": "1.0",
"source": {
"url": "https://github.com/jquery-archive/jquery-metadata.git",
"type": "git",
"reference": "e5a9e4315675bf4d68716872ca754e858088f8ab"
}
}
},
{
"type": "package",
"package": {
"name": "tomazdragar/SimpleCropper",
"version": "1.0",
"source": {
"url": "https://github.com/tomazdragar/SimpleCropper.git",
"type": "git",
"reference": "9750b81fa55ed07b3b429297d18ffbeac07a2cde"
}
}
}
],
"require": {
@@ -239,7 +234,7 @@
"afarkas/html5shiv": "^3.7",
"alvaro-prieto/colResizable": "^1.6",
"borgar/textile-js": "1.0",
"borgar/textile-js": "2.0.4",
"BlackrockDigital/startbootstrap-sb-admin-2": "^3.3",
"christianbach/tablesorter": "^1.0",
Generated
+125 -64
View File
@@ -4,16 +4,17 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "3f0f6c60692efa0e8970d047b507f988",
"content-hash": "114153c22310130fed0c1c41f74c5a62",
"hash": "db46edf729b6e4d5f0508eba65d3d201",
"content-hash": "201f046d574ccb1447f8d9b820b6b9e2",
"packages": [
{
"name": "BlackrockDigital/startbootstrap-sb-admin-2",
"version": "3.3.7",
"source": {
"type": "git",
"url": "https://github.com/BlackrockDigital/startbootstrap-sb-admin-2.git",
"reference": "master"
"version": "3.3.7.1",
"dist": {
"type": "zip",
"url": "https://github.com/BlackrockDigital/startbootstrap-sb-admin-2/archive/v3.3.7+1.zip",
"reference": null,
"shasum": null
},
"type": "library"
},
@@ -61,11 +62,12 @@
},
{
"name": "borgar/textile-js",
"version": "1.0",
"source": {
"type": "git",
"url": "https://github.com/borgar/textile-js.git",
"reference": "master"
"version": "2.0.4",
"dist": {
"type": "zip",
"url": "https://github.com/borgar/textile-js/archive/v2.0.4.zip",
"reference": null,
"shasum": null
},
"type": "library"
},
@@ -100,16 +102,16 @@
},
{
"name": "codeigniter/framework",
"version": "3.1.8",
"version": "3.1.9",
"source": {
"type": "git",
"url": "https://github.com/bcit-ci/CodeIgniter.git",
"reference": "71e647782764184e3aab4faffe6d99176758979f"
"reference": "30e2eafa86c4c7b6b39cea3e7089a90df9f603fb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/bcit-ci/CodeIgniter/zipball/71e647782764184e3aab4faffe6d99176758979f",
"reference": "71e647782764184e3aab4faffe6d99176758979f",
"url": "https://api.github.com/repos/bcit-ci/CodeIgniter/zipball/30e2eafa86c4c7b6b39cea3e7089a90df9f603fb",
"reference": "30e2eafa86c4c7b6b39cea3e7089a90df9f603fb",
"shasum": ""
},
"require": {
@@ -129,7 +131,7 @@
],
"description": "The CodeIgniter framework",
"homepage": "https://codeigniter.com",
"time": "2018-03-22 14:48:55"
"time": "2018-06-12 13:45:46"
},
{
"name": "components/angular.js",
@@ -864,16 +866,16 @@
},
{
"name": "kevinlebrun/colors.php",
"version": "1.0.2",
"version": "1.0.3",
"source": {
"type": "git",
"url": "https://github.com/kevinlebrun/colors.php.git",
"reference": "6d7140aeedef46c97c2324f09b752c599ef17dac"
"reference": "cdda5eee41314b87cd5a8bb91b1ffc7c0210e673"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/kevinlebrun/colors.php/zipball/6d7140aeedef46c97c2324f09b752c599ef17dac",
"reference": "6d7140aeedef46c97c2324f09b752c599ef17dac",
"url": "https://api.github.com/repos/kevinlebrun/colors.php/zipball/cdda5eee41314b87cd5a8bb91b1ffc7c0210e673",
"reference": "cdda5eee41314b87cd5a8bb91b1ffc7c0210e673",
"shasum": ""
},
"require": {
@@ -911,7 +913,7 @@
"console",
"shell"
],
"time": "2016-04-12 20:58:34"
"time": "2018-05-30 08:34:23"
},
{
"name": "kingsquare/json-schema-form",
@@ -950,10 +952,11 @@
{
"name": "ludo/jquery-treetable",
"version": "3.2.0",
"source": {
"type": "git",
"url": "https://github.com/ludo/jquery-treetable.git",
"reference": "73690a9df26dbc1a49981f9335df2a9cd9808813"
"dist": {
"type": "zip",
"url": "https://github.com/ludo/jquery-treetable/archive/3.2.0.zip",
"reference": null,
"shasum": null
},
"type": "library"
},
@@ -1107,16 +1110,16 @@
},
{
"name": "mottie/tablesorter",
"version": "v2.30.1",
"version": "v2.30.7",
"source": {
"type": "git",
"url": "https://github.com/Mottie/tablesorter.git",
"reference": "c74a34b070002776133757faa5b8613988b42470"
"reference": "90f7326819c573ee5ab333f4a0672623d7c52e1e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Mottie/tablesorter/zipball/c74a34b070002776133757faa5b8613988b42470",
"reference": "c74a34b070002776133757faa5b8613988b42470",
"url": "https://api.github.com/repos/Mottie/tablesorter/zipball/90f7326819c573ee5ab333f4a0672623d7c52e1e",
"reference": "90f7326819c573ee5ab333f4a0672623d7c52e1e",
"shasum": ""
},
"require": {
@@ -1154,7 +1157,7 @@
"sorting",
"table"
],
"time": "2018-03-19 12:17:24"
"time": "2018-07-10 13:32:19"
},
{
"name": "netcarver/textile",
@@ -1212,10 +1215,11 @@
{
"name": "nicolaskruchten/pivottable",
"version": "2.15.0",
"source": {
"type": "git",
"url": "https://github.com/nicolaskruchten/pivottable.git",
"reference": "b15ea33268b587d986371c0b6f215c36ffbb860c"
"dist": {
"type": "zip",
"url": "https://github.com/nicolaskruchten/pivottable/archive/v2.15.0.zip",
"reference": null,
"shasum": null
},
"type": "library"
},
@@ -1330,10 +1334,11 @@
{
"name": "rmariuzzo/jquery-checkboxes",
"version": "1.0.7",
"source": {
"type": "git",
"url": "https://github.com/rmariuzzo/checkboxes.js.git",
"reference": "081cac1eb9b504dc32be27b57f32f6d1d29a5253"
"dist": {
"type": "zip",
"url": "https://github.com/rmariuzzo/checkboxes.js/archive/v1.0.7.zip",
"reference": null,
"shasum": null
},
"type": "library"
},
@@ -1643,16 +1648,16 @@
},
{
"name": "symfony/console",
"version": "v2.8.38",
"version": "v2.8.42",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "7f78892d900c72a40acd1fe793c856ef0c110f26"
"reference": "e8e59b74ad1274714dad2748349b55e3e6e630c7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/7f78892d900c72a40acd1fe793c856ef0c110f26",
"reference": "7f78892d900c72a40acd1fe793c856ef0c110f26",
"url": "https://api.github.com/repos/symfony/console/zipball/e8e59b74ad1274714dad2748349b55e3e6e630c7",
"reference": "e8e59b74ad1274714dad2748349b55e3e6e630c7",
"shasum": ""
},
"require": {
@@ -1666,7 +1671,7 @@
"symfony/process": "~2.1|~3.0.0"
},
"suggest": {
"psr/log": "For using the console logger",
"psr/log-implementation": "For using the console logger",
"symfony/event-dispatcher": "",
"symfony/process": ""
},
@@ -1700,7 +1705,7 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
"time": "2018-04-03 05:20:27"
"time": "2018-05-15 21:17:45"
},
{
"name": "symfony/debug",
@@ -1760,17 +1765,72 @@
"time": "2016-07-30 07:22:48"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.7.0",
"name": "symfony/polyfill-ctype",
"version": "v1.8.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b"
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/78be803ce01e55d3491c1397cf1c64beb9c1b63b",
"reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/7cc359f1b7b80fc25ed7796be7d96adc9b354bae",
"reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.8-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Ctype\\": ""
},
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
},
{
"name": "Gert de Pagter",
"email": "BackEndTea@gmail.com"
}
],
"description": "Symfony polyfill for ctype functions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"ctype",
"polyfill",
"portable"
],
"time": "2018-04-30 19:57:29"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.8.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "3296adf6a6454a050679cde90f95350ad604b171"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/3296adf6a6454a050679cde90f95350ad604b171",
"reference": "3296adf6a6454a050679cde90f95350ad604b171",
"shasum": ""
},
"require": {
@@ -1782,7 +1842,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.7-dev"
"dev-master": "1.8-dev"
}
},
"autoload": {
@@ -1816,24 +1876,25 @@
"portable",
"shim"
],
"time": "2018-01-30 19:27:44"
"time": "2018-04-26 10:06:28"
},
{
"name": "symfony/yaml",
"version": "v2.8.38",
"version": "v2.8.42",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "be720fcfae4614df204190d57795351059946a77"
"reference": "51356b7a2ff7c9fd06b2f1681cc463bb62b5c1ff"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/be720fcfae4614df204190d57795351059946a77",
"reference": "be720fcfae4614df204190d57795351059946a77",
"url": "https://api.github.com/repos/symfony/yaml/zipball/51356b7a2ff7c9fd06b2f1681cc463bb62b5c1ff",
"reference": "51356b7a2ff7c9fd06b2f1681cc463bb62b5c1ff",
"shasum": ""
},
"require": {
"php": ">=5.3.9"
"php": ">=5.3.9",
"symfony/polyfill-ctype": "~1.8"
},
"type": "library",
"extra": {
@@ -1865,7 +1926,7 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
"time": "2018-01-03 07:36:31"
"time": "2018-05-01 22:52:40"
},
{
"name": "tapmodo/Jcrop",
@@ -1880,16 +1941,16 @@
},
{
"name": "tinymce/tinymce",
"version": "4.7.11",
"version": "4.8.0",
"source": {
"type": "git",
"url": "https://github.com/tinymce/tinymce-dist.git",
"reference": "a7178e20d6053b92a177900531ffd2cdcb77f77c"
"reference": "0ca397b293d81cfb83de39c0952091233f6a6977"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/tinymce/tinymce-dist/zipball/a7178e20d6053b92a177900531ffd2cdcb77f77c",
"reference": "a7178e20d6053b92a177900531ffd2cdcb77f77c",
"url": "https://api.github.com/repos/tinymce/tinymce-dist/zipball/0ca397b293d81cfb83de39c0952091233f6a6977",
"reference": "0ca397b293d81cfb83de39c0952091233f6a6977",
"shasum": ""
},
"type": "component",
@@ -1922,7 +1983,7 @@
"tinymce",
"wysiwyg"
],
"time": "2018-04-11 09:26:11"
"time": "2018-07-11 08:59:33"
},
{
"name": "tomazdragar/SimpleCropper",