Shakes Animation Library - How to Fix for IE7

General Discussion about Mootools 1.2

Moderator: 1.2 Moderators

Shakes Animation Library - How to Fix for IE7

Postby spambanjo on Thu Jan 07, 2010 7:03 pm

Hi Fellas,

I'm fairly new to Mootools, and new to this forum, so forgive me if I'm bringing up old news.

In learning to animate various elements using Mootools, I came across this script to make various animation techniques even easier than they are already. For me it made some of my projects much less of a brain twister than they could have been, and allowed me to do some fairly sexy looking work with litterally NO knowledge of Mootools.

You can find the "Shakes! Animations Plugin for Mootools", and a summary of it's functionality here: http://ayurweba.dinamis.com/projects/shakes/

The reason I want to post, is that I have found a major issue within the "shakes.js" file which causes a serious error in IE7 and literally stops ALL mootools code from functioning in IE7. IE8, Firefox, etc will work fine, and allow Mootools code to run without issue. I have managed to fix the .js file, and felt that I should post this to the forum, as I have tried to contact the original author of the script, but without success. I imagine there are thousands of people who find this script useful, and I imagine many of them will abandon the script when they realise the IE7 issue.

YOU DO NOT HAVE TO ABANDON THIS AWESOME LIBRARY! THERE IS A VERY VERY SIMPLE FIX!!!!!

The problem is caused by several out-of-place commas throughout the document, and can be fixed VERY easily.

For example, the first instance of a misplaced comma appears on line #11 of the shakes.js file, as shown below:
  1. Fx.TweenDelta = new Class({
  2.     Extends: Fx.Tween,
  3.     prepare: function(element, property, delta){
  4.         var values = [];
  5.         values[0] = element.getStyle(property);
  6.         var from = this.parse(values[0]);
  7. //         if( from.parser != Fx.CSS.Parsers.Number ) return; //cant handle anything but numbers
  8.         values[1] = from[0].value + Number(delta[0]);
  9.         var parsed = values.map(this.parse);
  10.         return {from: parsed[0], to: parsed[1]};
  11.     },
  12.    
  13. });


To fix the problem, open up the "shakes.js" file and simply delete these misplaced commas. Your scripts will now function as intended in all browsers, including IE7!!!! A list of the lines where commas appear in the wrong place can be found below:
  • Line 11
  • Line 19
  • Line 263
  • Line 312

I hope this is as helpful to the community as it has been to me, it's a great little library for beginners imo.
Image
I started out with nothing, and I still got most of it left.
User avatar
spambanjo
 
Posts: 10
Joined: Mon Dec 14, 2009 4:59 pm

Re: Shakes Animation Library - How to Fix for IE7

Postby Judgment Day on Sun Jan 31, 2010 4:53 am

Hey, old news is better than no news at all. Hopefully the original author will address this issue...since everyone may not have access to the forum. Thanks for your insight! :)
Judgment Day
 
Posts: 5
Joined: Sun Jan 31, 2010 4:46 am

Re: Shakes Animation Library - How to Fix for IE7

Postby spambanjo on Thu Feb 04, 2010 4:07 pm

Judgment Day wrote:Hopefully the original author will address this issue...since everyone may not have access to the forum


I'm afraid the original author has not responded to my contact in well over a month, and his site still shows the old, broken version.

I think most people have access to this page, I just tried it from a different machine (on which I am logged out) and it showed the page fine. Great news for anyone who wants to keep using Shakes. This page also shows as #1 result for most of the searches I tried for "mootools shakes" followed by general error terms such as problem, fix, ie7, etc. So the reason for me posting here has been a success. The more people this post helps the better :)

It's such a shame when people abandon projects in this manner. I'm sure there would have been someone willing to continue the project after he lost interest if only he had become part of a community such as this one.
Image
I started out with nothing, and I still got most of it left.
User avatar
spambanjo
 
Posts: 10
Joined: Mon Dec 14, 2009 4:59 pm

Re: Shakes Animation Library - How to Fix for IE7

Postby Judgment Day on Sat Feb 06, 2010 9:48 pm

Well, as luck would have it, the page is now unavailable. Thank goodness for the Google cache feature, but hopefully the notation is really temporary.

-- Edit -- Looks like it's back up. Cool
Judgment Day
 
Posts: 5
Joined: Sun Jan 31, 2010 4:46 am

Re: Shakes Animation Library - How to Fix for IE7

Postby spambanjo on Tue Feb 09, 2010 1:14 pm

Judgment Day wrote:-- Edit -- Looks like it's back up. Cool


You had me worried there very briefly! I thought, "seriously... this is a private form?!?!" :shock:

Three cheers for common sense (and the mootools community ofc!) :D
Image
I started out with nothing, and I still got most of it left.
User avatar
spambanjo
 
Posts: 10
Joined: Mon Dec 14, 2009 4:59 pm

Re: Shakes Animation Library - How to Fix for IE7

Postby rajeev.sebastian on Mon Mar 08, 2010 5:25 am

Hi Fellas,

The Shakes plugin is not "abandoned" ;)

I feared that noone was actually using it, so I just didn't update it. Whats worse, apparently, my blog software does *not* email me if someone comments on my blog ... which is a shame because I missed your comments :)

Fact is, Shakes was never tested on IEx. Normally, the ',' thing is embedded in my brain ... strange that I left it all over the place in the code. I'll make the fixes to it and push a new version.

Btw the shakes page is at

http://www.rajeevsebastian.com/projects/shakes/

I know Google says different ;)
rajeev.sebastian
 
Posts: 1
Joined: Mon Mar 08, 2010 5:17 am

Re: Shakes Animation Library - How to Fix for IE7

Postby spambanjo on Mon Mar 08, 2010 12:03 pm

rajeev.sebastian wrote:Btw the shakes page is at

http://www.rajeevsebastian.com/projects/shakes/


Woah! Nice to hear ur still working on this project, and thanks for the response.

Might I suggest a redirect form the old site to the new one!! :roll:
Image
I started out with nothing, and I still got most of it left.
User avatar
spambanjo
 
Posts: 10
Joined: Mon Dec 14, 2009 4:59 pm

Re: Shakes Animation Library - How to Fix for IE7

Postby Judgment Day on Tue Apr 06, 2010 9:27 pm

rajeev.sebastian wrote:Hi Fellas,
I feared that noone was actually using it, so I just didn't update it. Whats worse, apparently, my blog software does *not* email me if someone comments on my blog ... which is a shame because I missed your comments :)


Well, I can't vouch for the e-mail part, but on the revamp: Maybe you should revise the site a bit, and have the download link adjacent to the Demo area. Also after your revision, maybe you can submit your animation library to MooTools Forge unless you did this already.
Judgment Day
 
Posts: 5
Joined: Sun Jan 31, 2010 4:46 am

Re: Shakes Animation Library - How to Fix for IE7

Postby dspencerr on Fri Jul 09, 2010 1:47 am

Could you please send me the plugin? I am using Mootools again in full swing and this was an awesome library. Rajeev's site is down. Can you just email it to me?
dspencerr
 
Posts: 1
Joined: Fri Jul 09, 2010 1:43 am

Re: Shakes Animation Library - How to Fix for IE7

Postby Judgment Day on Wed Jul 14, 2010 5:37 am

Because of the recent down times of the host site, I decided to upload the "shakes" javascript file for everyone to retrieve if they need it. This is the fixed version that was mentioned in the initial post of the thread, so you don't have to worry about fixing the areas for IE7.

Keep in mind that I'm doing this on behalf the site being down, and for others to create functional creative websites out of Mootools "shakes". If the creator requests that the file be taken down (or Moderation), I'll do so immediately.
Shakes Animation Library Mirror
Judgment Day
 
Posts: 5
Joined: Sun Jan 31, 2010 4:46 am


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest