Removed default async property for Javascript

This commit is contained in:
dignajar 2020-07-23 12:59:37 +02:00
parent 861e44b78c
commit f33466af01

View file

@ -206,7 +206,7 @@ class Theme {
return $links;
}
public static function javascript($files, $base=DOMAIN_THEME, $attributes="async")
public static function javascript($files, $base=DOMAIN_THEME, $attributes='')
{
if( !is_array($files) ) {
$files = array($files);
@ -220,7 +220,7 @@ class Theme {
return $scripts;
}
public static function js($files, $base=DOMAIN_THEME, $attributes="async")
public static function js($files, $base=DOMAIN_THEME, $attributes='')
{
return self::javascript($files, $base, $attributes);
}
@ -251,9 +251,9 @@ class Theme {
return '<script src="'.DOMAIN_CORE_JS.'jquery.min.js?version='.BLUDIT_VERSION.'"></script>'.PHP_EOL;
}
public static function jsBootstrap()
public static function jsBootstrap($attributes='')
{
return '<script async src="'.DOMAIN_CORE_JS.'bootstrap.bundle.min.js?version='.BLUDIT_VERSION.'"></script>'.PHP_EOL;
return '<script '.$attributes.' src="'.DOMAIN_CORE_JS.'bootstrap.bundle.min.js?version='.BLUDIT_VERSION.'"></script>'.PHP_EOL;
}
public static function cssBootstrap()
@ -266,10 +266,10 @@ class Theme {
return '<link rel="stylesheet" type="text/css" href="'.DOMAIN_CORE_CSS.'line-awesome/css/line-awesome-font-awesome.min.css?version='.BLUDIT_VERSION.'">'.PHP_EOL;
}
public static function jsSortable()
public static function jsSortable($attributes='')
{
// https://github.com/psfpro/bootstrap-html5sortable
return '<script async src="'.DOMAIN_CORE_JS.'jquery.sortable.min.js?version='.BLUDIT_VERSION.'"></script>'.PHP_EOL;
return '<script '.$attributes.' src="'.DOMAIN_CORE_JS.'jquery.sortable.min.js?version='.BLUDIT_VERSION.'"></script>'.PHP_EOL;
}
}