This file contains 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
#mainmenu { | |
/* Declarations for proper Browsers */ | |
border-radius: 6px; | |
box-shadow: 0 1px 3px rgba(0,0,0, .15); | |
/* Common declarations */ | |
background: #fff; | |
border: 1px solid #d1d1d1; |
This file contains 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 foo = (function() { | |
// Any reference to "this" anonymous function in here? | |
})(); |
This file contains 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
/** | |
* Usage: new Tabkey('id_of_form_element'); | |
*/ | |
var Tabkey = Class.create({ | |
initialize: function(element) { | |
this.observeInput(element); | |
}, | |
observeInput: function(element) { |
This file contains 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
Object.extend = Object.extend.wrap(function() { | |
var args = $A(arguments), | |
origExtend = args.shift(), | |
removeProperty; | |
/* | |
if(Object.isArray(args[2])) { | |
for (removeProperty in args[2]) | |
delete args[2][removeProperty]; | |
} |
This file contains 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 Section = Class.create({ | |
attach: function(element) { | |
Object.extend(element, this.extension); | |
} | |
extension: { | |
// Methods and properties here | |
} | |
} |
This file contains 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
Layout = { | |
settingsToSave: {}, | |
saveSettings: function(data) { | |
Layout.settingsToSave[data[0]] = data[1].value; | |
}, | |
submitSettings: function() { | |
new Ajax.Request('view_ax.php?submit__layout__update_settings', { | |
method: 'post', |
This file contains 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
%a{:name => "post_#{post.id}"} | |
-div_for post do | |
-unless post.user_id == 6 && current_user.id == 16 | |
.name= user_name(post.user) | |
.date | |
=post.created_at.strftime('%Y/%m/%d %H:%M:%S') | |
/ =time_ago_in_words(post.created_at) | |
/ ago | |
.body | |
=format_body(post) |
This file contains 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 properties = $w('borderBottomColor borderBottomStyle borderBottomWidth borderTopColor borderTopStyle borderTopWidth borderRightColor borderRightStyle borderRightWidth borderLeftColor borderLeftStyle borderLeftWidth fontSize fontFamily fontWeight letterSpacing lineHeight margin marginTop marginRight marginBottom marginLeft paddingTop paddingRight paddingBottom paddingLeft textAlign textIndent width wordSpacing'); | |
for (var i = 0, length = properties.length; i < length; i++) { | |
toStyles[properties[i]] = from.getStyle(properties[i]); | |
} | |
this.setContentStyle(toStyles); |
This file contains 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
style_json = {}; | |
style_json[css_property] = color.readAttribute("color"); | |
$$(for_element).each(function(el) { | |
el.setStyle(style_json); | |
}); |
This file contains 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
document.observe("dom:loaded", function() { | |
var customsPage = Class.create({ | |
initialize: function(page, draggable_obj) { | |
if(draggable_obj) | |
this.draggableObject = new Draggable(draggable_obj); | |
Object.extend(page, this); |
NewerOlder