Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Embed Framework 13 May 2013 12:35 #7179

  • albert
  • albert's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 70
  • Thank you received: 2
Hi,

i did a component, and i found the famous cancel button does not work on frontpage.
i am using JS Framework Jquery

I tried that using the embed framework the problem is solved, but i already modified a lot the generated component, can someone tell me exactly which lines or modifications do the option Embed Framework yes or not?

thanks in advance
Albert

Please Log in or Create an account to join the conversation.

Re: Embed Framework 13 May 2013 15:00 #7184

Hi Albert

The two names $ and jQuery are synonyms. jQuery is the more explicit; $ may be overridden if you use another framework.

If you pass a function as the first argument to your call to the jQuery function (or, obviously, to $), it is executed exactly as if it were a call to jQuery(document).ready. So yes, it is exactly the same.

Indeed, all these are functionally equivalent (provided you don't have anything else mucking around with $)

as said here

I have found that when using jQuery in j-cook components, you should use jQuery explicit if the "Cancel" button on the view is to remain functional.

Go through your view and change all the jQuery - $ references to the word jQuery and report back to help the others who may follow. Linked JS files are not exempted

Regards
v

Note: If your code breaks you have missed a $ or 2 somewhere, find it and... :)
The following user(s) said Thank You: albert

Please Log in or Create an account to join the conversation.

Last edit: by vlemos.

Re: Embed Framework 15 May 2013 08:43 #7190

  • albert
  • albert's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 70
  • Thank you received: 2
In fact what i did is to replace the code on the helper file
on the headerDeclarations function
as follows
		$componentUrl ...
		$componentUrlAdmin ...

		//Javascript
		$doc->addScript($siteUrl . '/media/system/js/core.js');
		$doc->addScript($componentUrlAdmin . '/dom/assets/jdom.js');
		$doc->addScript($componentUrlAdmin . '/js/formvalidator.js');

		//CSS
		if ($app->isAdmin())
		{....

and now it works fine

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.106 seconds

For starters it's just so easy to design an app in a way that I'm used to i.e. database first then views followed by customization. The fork system is pure brilliance from a developer standpoint as I can override things and still add and update my projects with minimal effort! Truly amazing to be able to build components in Joomla using incremental refinement without having to do everything by hand. Thanks for the great tool! I am so much more productive now than ever and I can't imagine building components any other way!!!!
Dave (Forum)

Get Started