AsgardCms / Platform

A modular multilingual CMS built with Laravel 5.
https://asgardcms.com/
MIT License
781 stars 241 forks source link

AsgardCms/AdminLTE AsgardCms/AdminLTE need some optimization... #132

Closed oimken closed 8 years ago

oimken commented 8 years ago

when I delete /public/assets/themes/adminlte and run bower update , php artisan stylist:publish , back-end will mess up, some css and js are missing.

edit elixir.json

{
  "srcDir": "Themes/AdminLTE",
  "assetsDir": "assets/",
  "cssOutput": "assets/css/",
  "jsOutput": "assets/js/",
  "bowerDir": "assets/vendor/"
}

could make back-end works gain。

And there is lots of duplicate files in Themes/Adminlte, such as Themes/Adminlte/assets/js/vendor Themes/Adminlte/assets/vendor Themes/Adminlte/resources/js/vendor

.....

nWidart commented 8 years ago

Hello, thanks for reporting.

Did some clean-up, and the jquery path has indeed changed. I've fixed that now.

The reason there are 3 vendor folders (assets/js/vendor, assets/css/vendor and assets/vendor) is because the first 2 are for vendor scripts being pulled in manually, and the latter is for vendor assets pulled in from bower.

The ressources/vendor folder was indeed from before bower, it has been removed.

I tested removing the published folder for AdminLTE, public/themes/adminlte, and publishing it again, works now. :smile:

nWidart commented 8 years ago

Fixed on version 1.10.0 of AdminLTE.

Thanks.

oimken commented 8 years ago

still got 404 for some js and css.

re-produce:

http://asgardcms.loc/themes/adminlte/css/vendor/datatables/dataTables.bootstrap.css 
http://asgardcms.loc/themes/adminlte/css/vendor/iCheck/flat/blue.css 
http://asgardcms.loc/themes/adminlte/vendor/jquery/dist/jquery.min.js 
http://asgardcms.loc/themes/adminlte/js/vendor/datatables/jquery.dataTables.js 
http://asgardcms.loc/themes/adminlte/js/vendor/datatables/dataTables.bootstrap.js 
nWidart commented 8 years ago

I can't reproduce this here. I delete my published adminlte theme, then re-published, everything working fine.

Please update to the latest versions of modules to remove the iCheck error. And run bower update in the adminlte theme before republishing.

nWidart commented 8 years ago

Oh I see, I was able to re-produce on the platform installation.

It is due to the update Core module, core configuration file. config/asgard.core.core.php. You can copy the contents of the one in Modules/Core/Config/core.php to the published one.

nWidart commented 8 years ago

This commit : https://github.com/AsgardCms/Platform/commit/be89773b1e71737d1af93f63eeef4787415608aa

oimken commented 8 years ago

thanks you for your quick reply! Update Platform and asgard.core.core.php fixed the most path error, I did run bower update in Themes/Adminlte, and stylist:publish again. still got iCheck path error: http://asgardcms.loc/themes/adminlte/css/vendor/iCheck/flat/blue.css in fact that css lies in public/themes/adminlte/vendor/iCheck/skins/flat/blue.css

nWidart commented 8 years ago

if you have that on a custom module, you need to remove the iCheck include in the file itself. That has now been included by default on every view.

Example commit: https://github.com/AsgardCms/Blog/commit/52efa4ca1b1e975e44e3c3218ab25d589507ff73

donaldinho commented 8 years ago

I just ran into a similar issue after upgrading core. Would it be possible to add a note about copying the contents of Modules/Core/Config/core.php to config/asgard.core.core.php to the upgrade guide for core

nWidart commented 8 years ago

I will thanks.