var RNF_PLATFORM = 'testing';
function waitSpinner( $cell ) {
waitSpinnerClose();
$cell.addClass('wait-nomouse');
$cell.append('
'); //fa fa-refresh fa-2x fa-spin">');
}
function waitSpinnerClose( ) {
jQuery('.wait-nomouse').removeClass('wait-nomouse');
jQuery('.waitspin').remove();
}
var RNF_Transients = RNF_Transients || {
get: function( tname, callback ) {
jQuery.get(
RNFjs.ajax.url,
{
action: 'rnf_transient_ajax_get',
name: tname
}
).done( function( res ) {
if ( 'string' == typeof res && !res.length ) {
res = false;
}
callback.call( jQuery, res );
}).fail( function( res ) {
if ( console && console.log ) {
console.log( 'transient retrieve error:');
console.log( res );
}
})
},
set: function( tname, value, expires, callback ) {
if ( 'function' != typeof callback ) {
callback = function() { void(0) };
}
if ( 'undefined' == typeof expires ) {
expires = 300;
}
expires = parseInt( expires );
if ( 'string' != typeof value ) {
var jvalue = JSON.stringify( value );
} else {
var jvalue = value;
}
jQuery.post(
RNFjs.ajax.url,
{
action: 'rnf_transient_ajax_set',
name: tname,
value: jvalue,
nonce: RNFjs.ajax.generic_nonce,
expires: expires,
is_jstring: 1
}
).done( callback ).fail( function( res ) {
if ( console && console.log ) {
console.log( 'transient set error:');
console.log( res );
}
})
}
}
jQuery().ready( function($) {
if ( 'undefined' === document.referrer || !document.referrer.length ) {
$('.single_post_back').css({
visibility: 'hidden'
});
}
$('#page_body .inline_content iframe[src*="youtu"]').each( function() {
if ( !$(this).parents('.embed-youtube').length ) {
$(this).wrap( $('')).addClass('youtube-player').css({
minHeight: 0
});
}
});
$('img').on('error', function() {
$(this).wrap( $(''));
$(this).attr('src', RNFjs.gsdu + '/images/universal/spacer.gif' );
})
});