MooTools.net has a nice new feature, called Forge. It's a code repository for developers who are willing to share their MooTools based projects. At this time, it has only 36 scripts, but I'm sure, that this will be multiplied in a shot time, check AjaxRain.com for instance. It's a great collection of scripts, but it's uncontrolled.
What I like about MooTools Forge, is that they give you a guideline on how to publish you code. The first step is posting the project into GitHub, then you have to add a simple "yml" file to describe your package. You can even define the dependencies. Read more here.
It does 4 things at a time: provide documentation, example codes, demos and download opportunity. Official MooTools projects will be stored here also.
Last day I had to hack a webshop's basket management system, and deleting the items had to be done via AJAX. The problem was, that each call had to wait the previous to be completed, otherwise some products kept in the session. The solution was simple: call the AJAX requests recursively on the 'onComplete' event.
Here is a cleaned up code, using MooTools 1.2.4. Call addAjaxParam() to prepare the ajaxParams array.
var ajaxParams = [];
function addAjaxParam( pid )
{
var obj = {
'option': 'module_shop_action',
'product_id': pid
}
ajaxParams.push( obj );
}
Slimbox is a great lightbox clone, developed by Cristophe Beyle.
The 1.7 MooTools based version has some problems in Google Chrome, that I was able to fix:
Simply change in slimbox.js lines 127 to 132 to this:
if ( center.offsetWidth != centerWidth || center.offsetHeight != centerHeight ) {
check = fxResize.start({width: centerWidth, marginLeft: -centerWidth/2, height: centerHeight, top: top});
}
It alters the animation a little bit, but I think this is as good as the original. See a demo on my projects page.
All rights reserved, ©2008-2010 - Built on CodeIgniter framework - Konami codes - Mostly Valid XHTML 1.1 - Valid CSS 2.1