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

  • vlemos
  • vlemos's Avatar
  • Away
  • Elite Member
  • Elite Member
  • Posts: 295
  • Thank you received: 41
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.062 seconds
Je suis vraiment impressionné par la puissance de COOK et encore plus admiratif de ton travail. A ce jour je crois que c'est ce que j'ai vu de plus abouti dans le domaine de la conception d'extension pour Joomla!
felichon (Forum)  

Get Started