Skip to content

Commit

Permalink
Merge pull request #2081 from LuckyCyborg/4.0
Browse files Browse the repository at this point in the history
Implementation of the Assets Service
  • Loading branch information
LuckyCyborg authored May 23, 2018
2 parents 4817ad8 + c38cf8c commit 78aee68
Show file tree
Hide file tree
Showing 22 changed files with 80 additions and 136 deletions.
12 changes: 3 additions & 9 deletions app/Config/App.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
<?php
/**
* Application Configuration
*
* @author David Carr - [email protected]
* @author Virgil-Adrian Teaca - [email protected]
* @version 3.0
*/


return array(
Expand Down Expand Up @@ -81,7 +74,7 @@
*/
'middleware' => array(
'Nova\Foundation\Http\Middleware\CheckForMaintenanceMode',
'Nova\Routing\Middleware\DispatchAssetFiles',
'Nova\Assets\Middleware\DispatchAssetFiles',
),

/**
Expand Down Expand Up @@ -119,6 +112,7 @@
'Nova\Auth\AuthServiceProvider',
'Nova\Bus\BusServiceProvider',
'Nova\Cache\CacheServiceProvider',
'Nova\Assets\AssetServiceProvider',
'Nova\Routing\RoutingServiceProvider',
'Nova\Cookie\CookieServiceProvider',
'Nova\Packages\PackageServiceProvider',
Expand Down Expand Up @@ -177,14 +171,14 @@
'aliases' => array(
// The Support Classes.
'Arr' => 'Nova\Support\Arr',
'Assets' => 'Nova\Support\Assets',
'Str' => 'Nova\Support\Str',

// The Database Seeder.
'Seeder' => 'Nova\Database\Seeder',

// The Support Facades.
'App' => 'Nova\Support\Facades\App',
'Asset' => 'Nova\Support\Facades\Asset',
'Auth' => 'Nova\Support\Facades\Auth',
'Broadcast' => 'Nova\Support\Facades\Broadcast',
'Bus' => 'Nova\Support\Facades\Bus',
Expand Down
6 changes: 0 additions & 6 deletions app/Config/Auth.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<?php
/**
* Auth configuration
*
* @author Virgil-Adrian Teaca - [email protected]
* @version 3.0
*/


return array(
Expand Down
1 change: 1 addition & 0 deletions app/Config/Broadcasting.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php


return array(

/*
Expand Down
6 changes: 0 additions & 6 deletions app/Config/Cache.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<?php
/**
* Cache configuration
*
* @author Virgil-Adrian Teaca - [email protected]
* @version 3.0
*/


return array(
Expand Down
7 changes: 0 additions & 7 deletions app/Config/Database.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
<?php
/**
* Database configuration
*
* @author David Carr - [email protected]
* @author Virgil-Adrian Teaca - [email protected]
* @version 3.0
*/


return array(
Expand Down
1 change: 1 addition & 0 deletions app/Config/Dompdf.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php


return array(

/*
Expand Down
6 changes: 0 additions & 6 deletions app/Config/FileField.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<?php
/**
* FileField configuration
*
* @author Virgil-Adrian Teaca - [email protected]
* @version 3.0
*/


return array(
Expand Down
7 changes: 0 additions & 7 deletions app/Config/Languages.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
<?php
/**
* All known Languages
*
* @author David Carr - [email protected]
* @author Virgil-Adrian Teaca - [email protected]
* @version 3.0
*/


return array(
Expand Down
6 changes: 0 additions & 6 deletions app/Config/Mail.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<?php
/**
* Mailer Configuration
*
* @author Virgil-Adrian Teaca - [email protected]
* @version 3.0
*/


return array(
Expand Down
1 change: 1 addition & 0 deletions app/Config/Packages.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php


return array(

/*
Expand Down
6 changes: 0 additions & 6 deletions app/Config/Profiler.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<?php
/**
* Profiler
*
* @author Virgil-Adrian Teaca - [email protected]
* @version 3.0
*/


return array(
Expand Down
7 changes: 1 addition & 6 deletions app/Config/Queue.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
<?php
/**
* Queue Configuration.
*
* @author Virgil-Adrian Teaca - [email protected]
* @version 4.0
*/


return array(

Expand Down
6 changes: 0 additions & 6 deletions app/Config/ReCaptcha.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<?php
/**
* ReCaptcha
*
* @author Virgil-Adrian Teaca - [email protected]
* @version 3.0
*/


return array(
Expand Down
6 changes: 0 additions & 6 deletions app/Config/Routing.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<?php
/**
* Routing - the Routing Configuration.
*
* @author Virgil-Adrian Teaca - [email protected]
* @version 3.0
*/


return array(
Expand Down
6 changes: 0 additions & 6 deletions app/Config/Session.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<?php
/**
* Session Configuration.
*
* @author Virgil-Adrian Teaca - [email protected]
* @version 3.0
*/


return array(
Expand Down
1 change: 1 addition & 0 deletions app/Config/Validation.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php


return array(

/*
Expand Down
7 changes: 1 addition & 6 deletions app/Config/View.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
<?php
/**
* View Configuration.
*
* @author Virgil-Adrian Teaca - [email protected]
* @version 4.0
*/


return array(

Expand Down
2 changes: 1 addition & 1 deletion app/Platform/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// Define The Application Version
//--------------------------------------------------------------------------

define('VERSION', '4.0.63');
define('VERSION', '4.0.64');

//--------------------------------------------------------------------------
// Set PHP Error Reporting Options
Expand Down
30 changes: 21 additions & 9 deletions app/Views/Layouts/Default.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,20 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ $title or 'Page' }} - {{ Config::get('app.name'); }}</title>
@php

@assets('css', array(
'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css',
'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css',
'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css',
asset_url('css/bootstrap-xl-mod.min.css'),
asset_url('css/style.css'),
))
echo Asset::build('css', array(
'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css',
'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css',
'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css',
asset_url('css/bootstrap-xl-mod.min.css'),
asset_url('css/style.css'),
));

echo Asset::render('css', 'header');
echo Asset::render('js', 'header');

@endphp

</head>
<body>
Expand All @@ -28,10 +34,16 @@

@show

@assets('js', array(
@php

echo Asset::build('js', array(
'https://code.jquery.com/jquery-1.12.4.min.js',
'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js'
))
));

echo Asset::render('js', 'footer');

@endphp

</body>
</html>
33 changes: 17 additions & 16 deletions themes/AdminLite/Views/Layouts/Backend.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@
<?= isset($meta) ? $meta : ''; // Place to pass data ?>
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<?php
Assets::css(array(
<?php

echo Asset::build('css', array(
// Bootstrap 3.3.7
vendor_url('bower_components/bootstrap/dist/css/bootstrap.min.css', 'almasaeed2010/adminlte'),
// Font Awesome
Expand All @@ -46,7 +47,7 @@
asset_url('css/style.css', 'themes/admin-lite'),
));

echo isset($css) ? $css : ''; // Place to pass data
echo Asset::render('css', 'header');
?>

<style>
Expand All @@ -58,17 +59,6 @@
padding: 5px 10px;
}
</style>

<?php
//Add Controller specific JS files.
Assets::js(array(
vendor_url('bower_components/jquery/dist/jquery.min.js', 'almasaeed2010/adminlte'),
asset_url('js/sprintf.min.js'),
asset_url('js/bootstrap-notify.min.js'),
));

?>

<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
Expand All @@ -78,6 +68,16 @@

<!-- Google Font -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
<?php

echo Asset::build('js', array(
vendor_url('bower_components/jquery/dist/jquery.min.js', 'almasaeed2010/adminlte'),
asset_url('js/sprintf.min.js'),
asset_url('js/bootstrap-notify.min.js'),
));

echo Asset::render('js', 'header');
?>
</head>

<body class="hold-transition skin-<?= Config::get('app.color_scheme', 'blue'); ?> sidebar-mini">
Expand Down Expand Up @@ -205,7 +205,8 @@

<!-- REQUIRED JS SCRIPTS -->
<?php
Assets::js(array(

echo Asset::build('js', array(
// Bootstrap 3.3.5
vendor_url('bower_components/bootstrap/dist/js/bootstrap.min.js', 'almasaeed2010/adminlte'),
// SlimScroll
Expand All @@ -225,7 +226,7 @@
asset_url('vendor/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.js'),
));

echo isset($js) ? $js : ''; // Place to pass data
echo Asset::render('js', 'footer');

?>

Expand Down
Loading

0 comments on commit 78aee68

Please sign in to comment.