An immediately application of the Factory pattern involves Ext.data.HttpProxy. Since initial configuration is all that is likely necessary, not extension, a Factory is perfect. For example, Ruby on Rails needs the Accept header to be set to ‘application/javascript’ for its magic to work when rendering a reply.
Ext.ns(’liaison.util’);
liaison.util.HttpProxyWithOptions = function(config) {
return new Ext.data.HttpProxy(Ext.apply({
headers:{’Accept’:'application/javascript’}
}, config));
};
var [...]
For a vanilla CRM solution I’m building, frequently I need to update SELECT element option lists. For ages, I’ve simply been pasting the methods I used, borrowed heavily from mredkj.com’s select list tutorial, into my various classes.
Finally tiring of that, I wrote a small class that simply lets you add all new options [...]
The short answer is no. Fortunately, the lengthy answer involves a compatibility library for mootools and a few additional options to legacy Json.Remote from mootools 1.11.
First, you’ll need to obtain the mootools 1.2 compatibility library, which includes an implementation of Json.Request that behaves in a manner conducive for sending JSON to an application server.
Next, [...]
Fraught with danger. Thankfully, there are some good resources on migrating to the new release. None completely documents all changes, but then, there are a ton of changes in 1.2.
Conversion from 1.11 to 1.2
Upgrading to MooTools 1.2 - Tips, Tricks, and Backwards Compatibility
MooTools upgrade: From 1.1 to 1.2
digitarald’s all important MooTools 1.1 To [...]
Usually I love mootools, really. Usually. I found CSS Guy’s form field hints posting inspiring, so I modified it to work with mootools. The result is something simple and easy.
$ES(’div.hint’).each(function(el) {
new Element(’div’).addClass(’hint-pointer’).setHTML(’ ’).injectInside(el);
});
$each(document.forms, function(form) {
$each($(form).getElementsBySelector(’input, select’), function(input) {
if($(input).getParent().getElementsByTagName(’div’)[0]) {
$(input).addEvent(’focus’, function(e) {
hint = $E(’.hint’, this.getParent());
hint.setStyle(’display’, ‘inline’);
hint.effect(’opacity’, {duration: 500, wait: false}).set(0).start(1);
}.bind(input));
$(input).addEvent(’blur’, function(e) {
hint = $E(’.hint’, [...]
Mootools v1.11 as shipped has a few bugs I came across. I was assured there couldn’t be any, as it’s been out for a while.
[Mon Jul 16 2007] [15:36:10] JasonBoxatWork: Whoah, you get to box at work, Jason.
[Mon Jul 16 2007] [15:36:11] NICE.
[Mon Jul 16 2007] [15:36:21] * JasonBoxatWork laughs
[Mon Jul 16 2007] [...]
By its very nature, it seems the development of Internet Explorer would be aptly named: Operation Aborted. However, of what I speak is the message, Internet Explorer cannot open the Internet site. Operation Aborted. There are a variety of circumstances that are believed to be the cause, but in the instance of [...]
I have found jscalendar to be an effective, if bloated, solution for integrating a DHTML calendar into an existing form input field requiring a user to enter a date and optionally a time. However, for it transparently effective, it needs to appear when a user brings focus to the form field and disappear when [...]
Hate Flash? You’re not alone. I just finished ripping out Flash support from LightboxEx, so it is no longer required. You will not need to load swfobject.js or Sound.js. The script is smaller with the applied patch, but still includes all the other nice features, like proper resizing for large images [...]