spicywebau / craft-quick-field

Create Craft CMS fields on the fly while designing field layouts
MIT License
106 stars 6 forks source link

Fixes issue where Quick Field JS would load in the frontend #5

Closed mmikkel closed 8 years ago

mmikkel commented 8 years ago

Adds a test for craft()->request->isCpRequest(), preventing Quick Field's JS from loading in the frontend.

Quick Field has no use case outside the CP, so loading its JavaScript in the frontend is redundant. It also causes various JS errors as neither the Craft object nor Garnish is available to the frontend (see http://cly.mmikkel.no/3T411p3I0x0Y).

nexflo commented 8 years ago

fantastic, just wanted to report that one ;)

benjamminf commented 8 years ago

Don't know how I missed that haha. Thanks for the contribution!

mmikkel commented 8 years ago

@benjamminf No worries – thanks for the sharing the awesome work!