Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Separate the inclusion of stylesheets and javascripts #27

Closed
ajgallego opened this issue Jul 1, 2014 · 2 comments
Closed

Separate the inclusion of stylesheets and javascripts #27

ajgallego opened this issue Jul 1, 2014 · 2 comments

Comments

@ajgallego
Copy link

I would like to separate the load of Rapyd stylesheets and javascripts in order to delay the loading of the javascripts to the end of the load. For example:

<html>
<head>
    ...
    <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
    {{ Rapyd::stylesheets() }}
</head>
<body>
    ...
    <script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
    <script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
    {{ Rapyd::javascripts() }}
</body>
</html>
@zofe
Copy link
Owner

zofe commented Jul 1, 2014

Your suggestion makes sense, it's not complex to fix.
But at this moment there are some "fields" that add some inline javascript (using $.) this is reason I put all css/js on header (jquery must be defined before fields output).

I think I can fix soon, moving field-javascript in an array, enclosed by document ready, so we can put all js at bottom.

@zofe
Copy link
Owner

zofe commented Jul 5, 2014

done, with {{ Rapyd::styles() }} and {{ Rapyd::scripts() }}.
{{ Rapyd::head() }} still works including both

@zofe zofe closed this as completed Jul 5, 2014
zhwei added a commit to zhwei/rapyd-laravel that referenced this issue Jan 26, 2016
fix: reload relation after modify
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants