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+)/); |
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
| 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
| (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
| # 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
| 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
| var dispatch = { | |
| events: {}, | |
| observe: function(action){ | |
| this.events[action] = {}; | |
| document.observe(action, function(ev){ | |
| for(var x in dispatch.events[action]){ | |
| if(ev.findElement(x)) return dispatch.events[action][x](ev); | |
| } | |
| }); |
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
| // jQuery Extended | |
| var $ajax = $.ajax; | |
| $.ajax = function(options){ | |
| var options = $.extend({cache: false}, options || {}); | |
| return $ajax(options); | |
| } |
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
| source :rubygems | |
| # Project requirements | |
| gem 'rake' | |
| gem 'rack-flash' | |
| gem 'thin' # or mongrel | |
| # Component requirements | |
| gem 'bcrypt-ruby', :require => "bcrypt" | |
| gem 'compass' |
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
| PADRINO_ENV = 'test' unless defined?(PADRINO_ENV) | |
| require 'rubygems' | |
| require 'spork' | |
| Spork.prefork do | |
| # Loading more in this block will cause your tests to run faster. However, | |
| # if you change any configuration or code from libraries loaded here, you'll | |
| # need to restart spork for it take effect. | |
| require File.expand_path(File.dirname(__FILE__) + "/../config/boot") |
OlderNewer