o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1364311661.179626:@value"¹{I"
class:EFI"ProcessedAsset; FI"logical_path; FI",jquery/jquery.html5-placeholder-shim.js; TI"
pathname; FI"š/Users/johanfrolich/.rvm/gems/ruby-1.9.3-p327@refinerycms-menus/gems/refinerycms-core-2.0.9/app/assets/javascripts/jquery/jquery.html5-placeholder-shim.js; TI"content_type; FI"application/javascript; FI"
mtime; FI"2013-02-04T15:34:04+01:00; FI"length; Fi¨I"digest; F"%c05233a1508e07e829050a158fc4a6ecI"source; FI"¨(function($) {
// @todo Document this.
$.extend($,{ placeholder: {
browser_supported: function() {
return this._supported !== undefined ?
this._supported :
( this._supported = !!('placeholder' in $('')[0]) );
},
shim: function(opts) {
var config = {
color: '#888',
cls: 'placeholder',
lr_padding:4,
selector: 'input[placeholder], textarea[placeholder]'
};
$.extend(config,opts);
!this.browser_supported() && $(config.selector)._placeholder_shim(config);
}
}});
$.extend($.fn,{
_placeholder_shim: function(config) {
function calcPositionCss(target)
{
var op = $(target).offsetParent().offset();
var ot = $(target).offset();
return {
top: ot.top - op.top + ($(target).outerHeight() - $(target).height()) /2,
left: ot.left - op.left + config.lr_padding,
width: $(target).width() - config.lr_padding
};
}
return this.each(function() {
if( $(this).data('placeholder') ) {
var $ol = $(this).data('placeholder');
$ol.css(calcPositionCss($(this)));
return true;
}
var possible_line_height = {};
if( $(this).css('height') != 'auto') {
possible_line_height = { lineHeight: $(this).css('height') };
}
var ol = $('')
.text($(this).attr('placeholder'))
.addClass(config.cls)
.css($.extend({
position:'absolute',
display: 'inline',
float:'none',
overflow:'hidden',
whiteSpace:'nowrap',
textAlign: 'left',
color: config.color,
cursor: 'text',
paddingTop: $(this).css('padding-top'),
paddingLeft: $(this).css('padding-left'),
fontSize: $(this).css('font-size'),
fontFamily: $(this).css('font-family'),
fontStyle: $(this).css('font-style'),
fontWeight: $(this).css('font-weight'),
textTransform: $(this).css('text-transform'),
zIndex: 99
}, possible_line_height))
.css(calcPositionCss(this))
.attr('for', this.id)
.data('target',$(this))
.click(function(){
$(this).data('target').focus()
})
.insertBefore(this);
$(this)
.data('placeholder',ol)
.focus(function(){
ol.hide();
}).blur(function() {
ol[$(this).val().length ? 'hide' : 'show']();
}).triggerHandler('blur');
$(window)
.resize(function() {
var $target = ol.data('target')
ol.css(calcPositionCss($target))
});
});
}
});
})(jQuery);
jQuery(document).add(window).bind('ready load', function() {
if (jQuery.placeholder) {
jQuery.placeholder.shim();
}
});
; FI"dependency_digest; F"%cdc2e15f759f462fb78bfede29942435I"required_paths; F[I"š/Users/johanfrolich/.rvm/gems/ruby-1.9.3-p327@refinerycms-menus/gems/refinerycms-core-2.0.9/app/assets/javascripts/jquery/jquery.html5-placeholder-shim.js; TI"dependency_paths; F[{I" path; FI"š/Users/johanfrolich/.rvm/gems/ruby-1.9.3-p327@refinerycms-menus/gems/refinerycms-core-2.0.9/app/assets/javascripts/jquery/jquery.html5-placeholder-shim.js; TI"
mtime; FI"2013-02-04T15:34:04+01:00; FI"digest; F"%8c2ca1d817a0b7c27f91b2778b8d37a1I"
_version; F"%ffd318ca8b794f42f5029101c2cf5d91