This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Dispatcher = (function(){ | |
| var Dispatcher = Class.create(); | |
| Dispatcher.Version = '1.0.0'; | |
| Dispatcher.options = {}; | |
| Dispatcher.instance = undefined; | |
| Dispatcher.prototype = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Class | |
| snippet pcc | |
| var ${1:ClassName} = ( | |
| var $1 = Class.create(); | |
| $1.Version = ${2:'1.0.0'}; | |
| $1.options = {${4}}; | |
| $1.prototype = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function(){ | |
| function loaded(elem){ | |
| var elem = $(elem); | |
| var images = elem.retrieve('loadingImages', elem.select('img')); | |
| var loading = images.find(function(elem){ | |
| return !elem.complete; | |
| }); | |
| if(loading) return loaded.delay(.3, elem); | |
| else {elem.fire('images:loaded'); elem.store('loadingImages', undefined);} | |
| return elem; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Element.addMethods('FORM', { | |
| clone: function(form, id){ | |
| // if no id was passed use native clone | |
| if( ! Object.isString(id) ) return Element.clone(form, id); | |
| var form = Element.clone(form, true); | |
| form.writeAttribute('id', id); | |
| // change elements with id attr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Methods for extending Prototype | |
| */ | |
| var Position = { | |
| /** | |
| * Centers an element against the parent or body | |
| * parent should be display: relative | |
| */ | |
| center: function(elem, parent){ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var ProForm = (function(){ | |
| /* | |
| * IE 6 & 7 cannot handle dynamic radio and checkboxes correctly. | |
| */ | |
| BROWSER_SUCKS = (function (){ | |
| var sucks = false; | |
| if(Prototype.Browser.IE){ | |
| version_number = navigator.appVersion.match(/MSIE\s(\d+)/); |
NewerOlder