ahoiroman / pagekit-assets Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
I can create the CSS to override shariff-buttons, but can never get it to apply. 'Assets' doesn't insert either the style block or css file link that it creates at the absolute end of the linked references... trying it with border-radius as a test, i.e.:
<link href="/packages/friendlyit/search/assets/css/searchwidget.css?v=748a" rel="stylesheet">
<style>shariff-button a {
border-radius: 10px 10px 10px 10px;
-moz-border-radius: 10px 10px 10px 10px;
-webkit-border-radius: 10px 10px 10px 10px;
}</style>
<link href="/packages/spqr/shariff/app/assets/shariff/build/shariff.complete.css?v=748a" rel="stylesheet">
or
<link href="/packages/spqr/assets/assets/custom/shariff-override.css?v=748a" rel="stylesheet">
<link href="/packages/spqr/shariff/app/assets/shariff/build/shariff.complete.css?v=748a" rel="stylesheet">
<script>var $pagekit = {"url":"","csrf":"618f0f4cb8ac20f68e0d7ef465cf958857f6a45d"};</script>
I don't know if the same thing happens with any of your other extensions, since I'm only using these 2 at the moment.
e.g.
I add a custom js script which requires moment.js. So I create a second assets of type 'url' which is for the cdns of moment.js which I load on the same page as my custom script.
Assets does not care about the order of adding the scripts, so it depends on which assets you created first. So if moment.js is added after my custom script, its utitility can not be used, as my script does not know about moment.
I got an assets, javascript, which uses jquery. Now the problem is, that my assets is inserted before jquery (also before all other 'standard pagekit' assets).
In pagekit its very easy to add dependency via the scriptmanager/loader. Is it possible to do the same with your asset manager (via the UI)?
Thanks for your effort.
I think it could be useful hide things that role cannot use, adding an 'access' parameter in the definition of menu. If a role cannot access the any permission of an extension, neither shoud see the related menu item.
I found this problem in sqpr/assets
Solved it adding a row in main index.php:
/pagekit/packages/spqr/assets/index.php
...
'menu' => [
'assets' => [
'label' => 'Assets',
'url' => '@assets/asset',
'active' => '@assets/asset*',
'icon' => 'spqr/assets:icon.svg',
'access' => 'assets: manage assets || assets: manage settings' /* Add this row */
],
...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.