Page 2 of 3

Re: [12]Upgrade to mootools 1.2

Posted: Tue Sep 30, 2008 4:48 am
by mark_up
Hi,

I would like to request that the frontend loading of mootools be made optional (configurable via the Joomla Admin configuration panel).

A simple radio button would do:
Load Mootools in the Joomla frontend? Yes No

It is simply ridiculous to force users to download the barely compressed mootools js regardless of whether or not they are ever going to use it. AFAIK it is only used for captions, which only show when a user is logged in. If there is no logging in, why force people to download mootools?

Mootools certainly has it's strong points, but that is irrelevant here. The issue is that Joomla forces mootools down our throats for no good reason (seriously, 70KB extra just to see a caption when there are css-only alternatives?).

Give more power to the designer please.

I prefer Jquery... there are ten times as many plugins and tutes out there for it, it is simpler to learn and it has a friendlier community. Mozilla, Google, Dell, Drupal, Wordpress, etc prefer it over the other libraries and now Microsoft and Nokia will use it as well.

I can use it alongside Joomla in compatibility mode, but why must I have to?

This may come across as a rant, and perhaps it is... but I hope you can see through that. The logic is simple enough.

Cheers,
Mark

Re: [12]Upgrade to mootools 1.2

Posted: Mon Oct 27, 2008 9:49 am
by bucabay
Looks like Phpwcms is using MooTools1.2 with the compatibility files including the "custom compatibility file".

http://code.google.com/p/phpwcms/source ... /mootools/

Could probably get some insight on how well its doing compatibility wise from there.
I would like to request that the frontend loading of mootools be made optional (configurable via the Joomla Admin configuration panel).
I think the current implementation where MooTools is loaded by 3rd party code when needed is better since it makes sure all 3rd party extensions needing mootools will get it, but I definitely agree that the captions should not require mootools or anything else in the Joomla frontend (core) for that matter.

Would be nice to have a very small JS file to load MooTools and other JS on demand, similar to what Google AJAX libraries loader but just for Joomla.

Re: [12]Upgrade to mootools 1.2

Posted: Tue Nov 11, 2008 11:10 am
by H13
Hi, I have changed
libraries\joomla\html\html\behavior.php (mootools method) to:

Code: Select all

....
if($mainframe->isSite()) {
  JHTML::script('mootools-1.2.1-core.js', 'media/system/js/', false);
  JHTML::script('mootools-1.2-more.js', 'media/system/js/', false);
  JHTML::script('mootools-compat-core.js', 'media/system/js/', false);
  JHTML::script('mootools-compat-more.js', 'media/system/js/', false);
  JHTML::script('mootools-compat-custom.js', 'media/system/js/', false);             
} else {
  JHTML::script('mootools.js', 'media/system/js/', false);
}
....
( http://www.siafoo.net/article/62 )

It seems to be working with main functions and changes listed here in the forum, ...

I have problem only with Modal Box, it works but I cannot close the modal box
Error: sizes.size is undefined
source file: ...media/system/js/modal.js

Does anybody know about some solution for modal box...

Thank you Jan

BTW - I think, google.load("mootools", "1.2.1"); and using other external libraries can reduce place, CPU and memory requirements on the server where Joomla! is running...

Re: [12]Upgrade to mootools 1.2

Posted: Wed Nov 12, 2008 12:56 am
by bucabay
H13 wrote:Hi, I have changed
libraries\joomla\html\html\behavior.php (mootools method) to:

Code: Select all

....
if($mainframe->isSite()) {
  JHTML::script('mootools-1.2.1-core.js', 'media/system/js/', false);
  JHTML::script('mootools-1.2-more.js', 'media/system/js/', false);
  JHTML::script('mootools-compat-core.js', 'media/system/js/', false);
  JHTML::script('mootools-compat-more.js', 'media/system/js/', false);
  JHTML::script('mootools-compat-custom.js', 'media/system/js/', false);             
} else {
  JHTML::script('mootools.js', 'media/system/js/', false);
}
....
( http://www.siafoo.net/article/62 )

It seems to be working with main functions and changes listed here in the forum, ...

I have problem only with Modal Box, it works but I cannot close the modal box
Error: sizes.size is undefined
source file: ...media/system/js/modal.js

Does anybody know about some solution for modal box...

Thank you Jan
That problem exists because Element.getSize() gives:

MooTools1.1
$('id').getSize(); // { size: { x: width, y: height }}

MooTools1.2
$('id').getSize(); // { x: width, y: height }

To make the two compatible you could edit mootools-compat-custom.js to give you:

$('id').getSize(); // { x: width, y:height, size: { x: width, y: height }}

pretty redundant but that would be the only forward/backward compatible version.
BTW - I think, google.load("mootools", "1.2.1"); and using other external libraries can reduce place, CPU and memory requirements on the server where Joomla! is running...
I'd be wary about using Google to serve your JS. Have you noticed how slow adsense ads load? lol.

If you use google, the browser has one extra DNS lookup and TCP socket connection to make. If you just have it on your own server, then there is no extra DNS lookup, no extra TCP socket, to send you the JS files. Of course if you have huge amonts of JS this is negligible, but with light sites the delay is apparent.

I think the better way is to just make sure you serve your own JS better, cache the JS well, send it Gzipped, minify/pack it etc.

Re: [12]Upgrade to mootools 1.2

Posted: Thu Nov 13, 2008 1:07 pm
by H13
thank you for this information. I have changed:

Code: Select all

reposition: function(sizes) {
sizes = sizes || window.getSize();
this.overlay.setStyles({
//'left': sizes.scroll.x, 'top': sizes.scroll.y,
// FROM:
//	width: sizes.size.x,
//	height: sizes.size.y
//TO:
	width: sizes.x,
	height: sizes.y
});
in modal.js and it seems to be working...
Jan

Re: [12]Upgrade to mootools 1.2

Posted: Sat Dec 13, 2008 4:35 pm
by ianmac
If anybody is interesting, please see:

http://docs.joomla.org/Mootools_Library_Upgade_12

If you can help us get the 1.2 library tested it would be very helpful for us so that we can move to 1.2 for Joomla! 1.6.

Ian

Re: [12]Upgrade to mootools 1.2

Posted: Sat Dec 13, 2008 4:47 pm
by jiggliemon
Speaking of Mootools in Joomla and Upgrading.
I've recently used this calendar for a little app:
http://www.electricprism.com/aeron/calendar/

And i think this calendar somewhat easier to understand and is more "compatible" being that mootools is already included.

So I'm going to port a version of 1.5.8 to use this calendar

If it's easy enough to describe I'll post the steps.

Re: [12]Upgrade to mootools 1.2

Posted: Sat Dec 13, 2008 5:09 pm
by ianmac
jiggliemon wrote:Speaking of Mootools in Joomla and Upgrading.
I've recently used this calendar for a little app:
http://www.electricprism.com/aeron/calendar/

And i think this calendar somewhat easier to understand and is more "compatible" being that mootools is already included.

So I'm going to port a version of 1.5.8 to use this calendar

If it's easy enough to describe I'll post the steps.
I may be missing something, but it looks like that calendar uses MooTools 1.1, which is the version we are moving from.

Ian

Re: [12]Upgrade to mootools 1.2

Posted: Sat Dec 13, 2008 5:22 pm
by jiggliemon
There's a 1.2 compatable version on the site. I've already used it and it was ectremly simle to impliment. You simply pass the 'Id' if the field and it does the rest.

Re: [12]Upgrade to mootools 1.2

Posted: Sun Dec 14, 2008 11:04 am
by ghazal
@ Ian
Maybe you could get help from mootools google group where there are some joomla users.
http://groups.google.com/group/mootools-users

Re: [12]Upgrade to mootools 1.2

Posted: Sat Jan 10, 2009 1:09 am
by p9939068
Don't rely on compat mode. Rewriting the source is much better, and it's rather straightforward (unless it's related to Sortables, which is a huge hassle). Here's a quick guide: http://wiki.github.com/mootools/mootool ... -11-to-1-2

IMO the move to 1.2 is much needed. I do quite a bit of work with 1.2. The new Request classes are awesome.

Re: [12]Upgrade to mootools 1.2

Posted: Sat Jan 10, 2009 1:58 am
by jiggliemon
They said it would happen in 1.6. Let's see. I think a lot of the javascript needs to be rewritten anyhow. Especially the calendar...

Re: [12]Upgrade to mootools 1.2

Posted: Fri Apr 10, 2009 5:54 pm
by almamun
I'm getting mootools error (shown in IE8). It happens when Phocagallery /Joomgallery page is opened. In case of both Galleries, on clicking thumbnails pics open direct (instead of a shadow popup box) whereas I've set so. This problem is found IE, Firefox, Opera.

What to do?

IE8 says -
When Phoca Gallery opened

Webpage Script Errors

User Agent: Mozilla/4.0 ....

Message: Object doesn't support this property or method
Line: 23
Char: 10
Code: 0
URI: http://dinajpurinfo.com/media/system/js/mootools.js


Message: Object doesn't support this property or method
Line: 59
Char: 102
Code: 0
URI: http://dinajpurinfo.com/media/system/js/mootools.js


Message: Object doesn't support this property or method
Line: 41
Char: 36
Code: 0
URI: http://dinajpurinfo.com/wallpaper/categ ... ture-scene


When Joom Gallery opened

Webpage Script Errors

User Agent: Mozilla/4.0...

Message: Object doesn't support this property or method
Line: 39
Char: 36
Code: 0
URI: http://dinajpurinfo.com/gallery?func=vi ... ry&catid=2


Message: Object doesn't support this property or method
Line: 23
Char: 10
Code: 0
URI: http://dinajpurinfo.com/media/system/js/mootools.js


Message: Object doesn't support this property or method
Line: 59
Char: 102
Code: 0
URI: http://dinajpurinfo.com/media/system/js/mootools.js

Re: [12]Upgrade to mootools 1.2

Posted: Fri Apr 10, 2009 9:12 pm
by ghazal
Hello,
I am afraid this is the wrong topic to ask this question, unless you are working with phocagallery and joomgallery versions upgraded to Motools 1.2.
Joomla 1.5.XX is still using Mootools 1.11 and we were discussing here of ways to upgrade it to Mootools 1.2. Joomla 1.6 should use the last version of this JavaScript framework
Maybe you could create your own topic.
Anyhow, the Firefox extension, Firebug, should give you hints about these errors.
Cheers

Re: [12]Upgrade to mootools 1.2

Posted: Wed Apr 22, 2009 10:30 pm
by dwj
Just as a new part of this discussion, i've taken some of the advices above and made up a sort of tutorial on how to get Mootools 1.2 in your frontend.

http://www.dwightjack.com/diary/2009/02 ... joomla-15/

It uses a compat file for backward compatibility and doesn't need any hack of the core function.
Any suggestion will be appreciated.

Re: [12]Upgrade to mootools 1.2

Posted: Tue May 19, 2009 1:31 pm
by QuickGold
dwj wrote:Just as a new part of this discussion, i've taken some of the advices above and made up a sort of tutorial on how to get Mootools 1.2 in your frontend.

http://www.dwightjack.com/diary/2009/02 ... joomla-15/

It uses a compat file for backward compatibility and doesn't need any hack of the core function.
Any suggestion will be appreciated.
Thank you! That tutorial was perfect.

Re: [12]Upgrade to mootools 1.2

Posted: Sat Jul 18, 2009 12:38 am
by epsi
Also be aware that class name might conflict moo's properties in ie8.

Case: toggle

Joomla has many class using this name
[administrators/com_weblinks/views/weblinks/tmpl/default.php]

Code: Select all

<input type="checkbox" name="toggle" value=""/>
and [mootools-more-element] has this

Code: Select all

Element.implement({
...
	toggle: function(){
		return this[this.isDisplayed() ? 'hide' : 'show']();
	},
...
});
It works in ie6, but miserably fail in ie8.

CMIIW

Re: [12]Upgrade to mootools 1.2

Posted: Sat Jul 18, 2009 9:40 am
by ghazal
@epsi
Are you sure ?
"toggle" qualifies a name not a class in this case.
Have you checked with the mootools crew ?

Re: [12]Upgrade to mootools 1.2

Posted: Sun Jul 19, 2009 8:53 pm
by epsi
I had isolate the symptom in attachment.
it happen only in ie8.

I don't think this is moo's bug or ie8 bug.
But it has impact in my joomla site.

So I don't know the proper place to talk about this.

Maybe it's my js or maybe it is a bug.
I wish it's only a my javascript.
I don't want to scare people.

mootools is great.

Re: [12]Upgrade to mootools 1.2

Posted: Fri Aug 14, 2009 6:51 am
by chanhdao
Hi all,

When i use ja_teline_ii_quickstart_v1.5 package to test JA Telline tempplate the error as below arrising

Message: Invalid argument.
Line: 31
Char: 1
Code: 0
URI: http://localhost/telline/media/system/js/mootools.js


I don't know the error by Joomla or Mootools, Please me fix this error
thanks

Re: [12]Upgrade to mootools 1.2

Posted: Sun Aug 16, 2009 9:47 am
by Symbiot
dwj wrote:Just as a new part of this discussion, i've taken some of the advices above and made up a sort of tutorial on how to get Mootools 1.2 in your frontend.

http://www.dwightjack.com/diary/2009/02 ... joomla-15/

It uses a compat file for backward compatibility and doesn't need any hack of the core function.
Any suggestion will be appreciated.

Hi

I followed the instructions on your webpage, and it worked.

however I have a module (mod_jsSlideshow) which doesn't work properly (it has it's own mootools.js file)
So I tried excluding the module via the guide you provided:

here:

Code: Select all

<head>
<?php
JLoader::import( 'my_libs.behavior' );
MY_Behavior::mootoolsFix(true,array("mod_jsslideshow"));
?>
<jdoc:include type="head" />
<link rel="apple-touch-icon" href="<?php echo $template->url ?>/apple_touch_icon.png" />
</head>
But after doing this, we revert back to mootools 1.1

What can I do to fix this?

Re: [12]Upgrade to mootools 1.2

Posted: Sat Aug 22, 2009 10:58 am
by MindTooth
I'll rather see 2.0, then an out-dated version.
MooTools 2.0 is on the Horizon

As mentioned above, 1.2.3 is likely the last update for MooTools 1.2. MooTools 2.0 will introduce numerous performance improvements and new features. We want to stress that MooTools 2.0 will feature 100% compatibility with MooTools 1.2.x.
Source: MooTools Blog

Birger :)

Re: [12]Upgrade to mootools 1.2

Posted: Tue Sep 22, 2009 1:22 pm
by piotr_cz
MindTooth wrote:I'll rather see 2.0, then an out-dated version.
MooTools 2.0 is on the Horizon

As mentioned above, 1.2.3 is likely the last update for MooTools 1.2. MooTools 2.0 will introduce numerous performance improvements and new features. We want to stress that MooTools 2.0 will feature 100% compatibility with MooTools 1.2.x.
Source: MooTools Blog

Birger :)
MooTools 2.0 is supposed to have full backward compatibility with 1.2.x.
We want to stress that MooTools 2.0 will feature 100% compatibility with MooTools 1.2.x.
Thank you for all information.
I decided to develop all webs in 1.2.x since now, wish me luck!

Re: [12]Upgrade to mootools 1.2

Posted: Tue Sep 22, 2009 2:17 pm
by ianmac
piotr_cz wrote:
MindTooth wrote:I'll rather see 2.0, then an out-dated version.
MooTools 2.0 is on the Horizon

As mentioned above, 1.2.3 is likely the last update for MooTools 1.2. MooTools 2.0 will introduce numerous performance improvements and new features. We want to stress that MooTools 2.0 will feature 100% compatibility with MooTools 1.2.x.
Source: MooTools Blog

Birger :)
MooTools 2.0 is supposed to have full backward compatibility with 1.2.x.
We want to stress that MooTools 2.0 will feature 100% compatibility with MooTools 1.2.x.
Just a note - make sure you stick to documented methods and such. Full backward compatibility only applies to what's in the documentation, afaik.

It may be possible to get 2.0 into 1.6 if it is released on time.

Ian

Re: [12]Upgrade to mootools 1.2

Posted: Tue Sep 29, 2009 1:25 pm
by p9939068
Have a quick read at this: http://mootools.net/blog/2009/09/22/moo ... -released/

Firefox is about to release an update that will affect 1.1.1. I haven't read up on what change this update will bring, but I guess it's safe to assume J! 1.5 is going to have to release an update with Mootools 1.1.2?

Re: [12]Upgrade to mootools 1.2

Posted: Mon Oct 05, 2009 7:51 pm
by dynedain
I frequently have to disable Joomla's inclusion of MooTools 1.1.1 on the frontend so that I can provide MooTools 1.2 or some other JS framework that might otherwise conflict.

I basically do it by unsetting the inclusion from my template. This way there's no modification of core files:

Here's an example of how to disable MooTools 1.1.1 from a Joomla template

Re: [12]Upgrade to mootools 1.2

Posted: Wed Oct 21, 2009 7:14 am
by epsi
Cheers....

Mootools 1.2.4 Finally release.
http://mootools.net/blog/2009/10/19/mootools-1-2-4/

They say this release has a lot of good stuff in it.

~epsi

note:
You can see experimental moo12 template showcase in iluni.org.
Don't mind the looks, template is shareable, and the site is non profit.

Re: [12]Upgrade to mootools 1.2

Posted: Wed Dec 02, 2009 11:32 am
by lenarque
I have upgraded mootools from 1.11 to 1.2.0 in my media/system/js folder.
Pb: the suckerfish menu on the admin site won't work. If I backtrack to previous release 1.11, my slide effects won't do anything.
Any workaround on this issue that you may share?
I don't want to load too many libraries within my index.php main file (although I can't load the 2 versions of mootools at same time).
Thanks for you reply

Re: [12]Upgrade to mootools 1.2

Posted: Sun Dec 20, 2009 8:03 am
by epsi
Greet lenarque,

Considering this message
http://forum.joomla.org/viewtopic.php?p ... 7#p1275437

And because Moo1.1 is actually not compatible with moo1.2,
we cannot just replace the library.

The scheme for J15 is
  • Moo1.1 for back-end admin
  • Moo1.2 for front-end site
Mine need a little core hack for behavior.php

Code: Select all

		if ($debug || $konkcheck) {
...
		} else {
			$app = &JFactory::getApplication();
			if	($app->isSite()) {
				$path = JURI::base().'media/custom/js/';
  				JHTML::script('mootools-1.2.4-core-nc.js', $path, false);
  				JHTML::script('mootools-1.2.4.2-more-nc.js', $path, false);
			} else {
  				JHTML::script('mootools.js', 'media/system/js/', false);
			}
		}
What you need might be, just backing up J15's behavior.php,
and then replace it with a new one (hacked version).

Good luck

~epsi

Re: [12]Upgrade to mootools 1.2

Posted: Mon Dec 21, 2009 10:31 am
by lenarque
Thank you epsi,
Your suggeestion looks good to me. I also upgraded to 1.2.4 for core and more. The latest mootools has improved.
FYI,
I am still however a bit disapointed that they still didn't implement sanity check within their code. For instance, there's no check for null values passed as argument. I had to extend it myself and perform try-catch blocks. Basically, another hack but i guess we can have one size fits all.