Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add template shortcut functions for style and script #10911

Merged
merged 1 commit into from Sep 8, 2014

Conversation

BernhardPosselt
Copy link
Contributor

Would turn

<?php
\OCP\Util::addScript('news', 'vendor/traceur-runtime/traceur-runtime.min');
\OCP\Util::addScript('news', 'vendor/angular/angular.min');
\OCP\Util::addScript('news', 'vendor/angular-route/angular-route.min');
\OCP\Util::addScript('news', 'vendor/angular-sanitize/angular-sanitize.min');
\OCP\Util::addScript('news', 'vendor/angular-animate/angular-animate.min');
\OCP\Util::addScript('news', 'vendor/momentjs/min/moment-with-locales.min');
\OCP\Util::addScript('news', 'build/app.min');

\OCP\Util::addStyle('news', 'app');
\OCP\Util::addStyle('news', 'navigation');
\OCP\Util::addStyle('news', 'content');
\OCP\Util::addStyle('news', 'settings');

into

<?php
script('news', 'vendor/traceur-runtime/traceur-runtime.min');
script('news', 'vendor/angular/angular.min');
script('news', 'vendor/angular-route/angular-route.min');
script('news', 'vendor/angular-sanitize/angular-sanitize.min');
script('news', 'vendor/angular-animate/angular-animate.min');
script('news', 'vendor/momentjs/min/moment-with-locales.min');
script('news', 'build/app.min');

style('news', 'app');
style('news', 'navigation');
style('news', 'content');
style('news', 'settings');

in the News app for instance

@jbtbnl @raghunayyar @DeepDiver1975 @MorrisJobke @georgehrke @LEDfan

@scrutinizer-notifier
Copy link

A new inspection was created.

@georgehrke
Copy link
Contributor

makes sense 👍

@ghost
Copy link

ghost commented Sep 6, 2014

🚀 Test Passed. 🚀
Refer to this link for build results: https://ci.owncloud.org/job/pull-request-analyser/7126/

@LukasReschke
Copy link
Member

Yes 👍

LukasReschke added a commit that referenced this pull request Sep 8, 2014
Add template shortcut functions for style and script
@LukasReschke LukasReschke merged commit 0cdfe4f into master Sep 8, 2014
@LukasReschke LukasReschke deleted the template-funcs branch September 8, 2014 14:32
@vgezer
Copy link
Contributor

vgezer commented Oct 11, 2014

@Raydiation do you consider adding those shortcuts into development manual? :)

@BernhardPosselt
Copy link
Contributor Author

They are in or there is already an open pull request

@lock lock bot locked as resolved and limited conversation to collaborators Aug 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants